yo_scottie_oh

joined 1 year ago
[–] yo_scottie_oh@lemmy.ml 1 points 10 hours ago

I’ve gotten pretty good results from Perplexity. The responses contain links to sources, Wikipedia style, which enables me to verify the answers in the AI generated response.

[–] yo_scottie_oh@lemmy.ml 14 points 4 days ago (1 children)

Did the ride in the autonomous vehicle cost more than a human driver, or are you making a blanket statement about taxis in general?

[–] yo_scottie_oh@lemmy.ml 14 points 4 days ago (4 children)

Care to elaborate? What was stupid bullshit about it as a rider?

[–] yo_scottie_oh@lemmy.ml 3 points 5 days ago (2 children)

Do you use anki on Android? And if so, any Android app recommendations? Last time I searched the app store, several results came up, and I didn’t know which one to choose, so I gave up. 🤣

[–] yo_scottie_oh@lemmy.ml 2 points 1 week ago

crowd sourced traffic info

I did not know that about Magic Earth. I’ll have to test that out on my next trip into the city.

[–] yo_scottie_oh@lemmy.ml 55 points 1 week ago (4 children)

Can’t wait for some people to cite increased voter turnout as evidence of fraud!

[–] yo_scottie_oh@lemmy.ml 1 points 2 weeks ago

Thanks for the tip—I did not know that. I'll give it some more time and practice w/ quicker swipes. I'm on the Pixel 7a.

[–] yo_scottie_oh@lemmy.ml 0 points 3 weeks ago (1 children)

Got it, thank you so much!

[–] yo_scottie_oh@lemmy.ml 0 points 3 weeks ago (3 children)

Thanks, I'll take a look at Revanced. The top two search results on DDG are revanced.net and revanced.to. The third and fourth results are two different githubs with "revanced" in the name. Is there a tried and true community approved way to get it?

 

Background: In my quest to migrate from iOS to Android, I’m searching for a way to watch YouTube on my phone, with SponsorBlock (no ads or sponsorship segments), while also signed into Google so that when I switch from android device to desktop computer or SmartTube on my TV, videos I’ve already watched are marked watched.

On my smart TV, the SmartTube app checks both boxes—incorporates SponsorBlock and enables me to sign into my Google account, with usability enhancements to boot. On my desktop computer, Firefox w/ SponsorBlock extension meets my needs just fine.

From digging around android forums, I gather there are several apps that incorporate SponsorBlock (e.g. various invidious/piped clients), but do not have the ability to log into Google. I understand the premise is to protect users’ privacy from Google, but in my case, I actually want to be signed in.

On my android device I’ve tried various Firefox forks with SponsorBlock extension (Fennec, Mull), but in all cases, the SponsorBlock extension does not pull any segments even though I know they exist (verified on another device).

Has anyone else gotten sponsorblock + signed into google working on an android device? If so, how? Thanks in advance!

[–] yo_scottie_oh@lemmy.ml 1 points 3 weeks ago

I had not considered that. Thanks for the tip.

[–] yo_scottie_oh@lemmy.ml 3 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

The GrapheneOS installation process is exceptionally easy to follow. It's much faster and easier than the old Cyanogenmod days.

That is comforting to hear.

As for whether or not I can flash a custom ROM, if the boot loader is locked, then I’m SOL, right? (hence your original comment)

[–] yo_scottie_oh@lemmy.ml 11 points 3 weeks ago* (last edited 3 weeks ago) (5 children)

I wanna run GrapheneOS, so thanks for the heads up.

Based on reviews, the listing in my OP looks like a mixed bag—some reviewers complaining that the boot loader is locked (hence they cannot flash a custom ROM onto it), others complaining that it’s unlocked (hence a security risk)—so if I get this phone, I guess it’s up to chance whether the bootloader is locked or not. 🤞🏻

 

I want my next phone to be "unlocked" so I can use it w/ any carrier - Verizon, AT&T, T-Mobile, Mint, etc. I'm based in the US, but if I travel internationally, it would be nice to be able to just pop in a local SIM card and continue using my phone like normal.

What gives me pause is, I see used phones listed as "US Version," and reviewers claiming the phone was not unlocked (for example, this Pixel 7a on Amazon).

Questions:

  1. What am I missing here? Do these reviewers just not know what they're doing, or are they buying from shady resellers?
  2. Does "US Version" imply I would not be able to use the phone internationally by just popping in a local SIM card?

Thank you!

 

Inb4 "analytics" is a bad word in the fediverse, understandably so, but I ask because for one of the communities that I moderate, I noticed the banner image and icon image were nearly 20 MB each, so I replaced them with smaller versions (<1 MB each). On desktop w/ a fast wired connection, it's no biggie, but it's good practice anyway to minimize page weight, if for no other reason than to make the site more usable for people on slow or cellular connections.

I tried searching for traffic data about Lemmy, and the best I could find is this page on similarweb.com, which shows traffic broken out by country and referrals, among other things, but a breakout of mobile vs desktop appears to be locked behind a paywall.

Do we have any analytics on mobile vs desktop traffic for Lemmy?

 

I have the T.16000M FCS HOTAS (throttle and stick) like this one linked on Amazon. When I search Amazon for "dust cover for hotas" I get listings that say "for Thrustmaster Warthog." Does anyone have the T.16000M, and if so, can you recommend a dust cover for those? Doesn't have to be custom fitting, any generic dust cover will do, my main concern is keeping dust from collecting in the ball joint of the stick and the rail of the thrust slider. Thank you!

EDIT: I'm thinking about getting this or this, or just going cheap with some clear plastic bags.

 

Useful links for tracking this issue:

Edit: Viewing and editing functionality seem to be restored.

 

Edit: The way I had it in the photos is correct. Thanks for helping me out, those who chimed in!

Original question:

I replaced the straight handlebars with risers on my mountain bike, and because of the slightly longer distances involved, I have to replace the brake and gear cables with slightly longer ones.

Unfortunately, I did not take a picture of the cable clamp for the front derailleur before I undid it. Now I'm clueless as to how to route the replacement cable - basically the same problem as this poster on RetroBike, except their derailleur is different from mine.

I have super old parts, so I've had a hard time finding documentation online. The best documentation I've found is the following:

In the service instructions, third column, "SIS adjustment" section, three-quarters of the way down, it says:

  • Cut off any unnecessary cable, attach an end cup, and hook it onto the pin.
  • Note: Pass the cable through as shown in the illustration.

What is absolutely throwing me for a loop is the illustration seems to show the cable running from the bottom upward, but... how? Can anyone help me figure out what I'm missing? I feel like a dumb dumb.

 

EDIT: After discussing this on Matrix, I believe the answer is in the mod logs. The author of the post in question was issued a temporary ban in another community on lemmy.ml, which I suspect is affecting the display of this user’s content across all of lemmy.ml even though the post in question is in a different community from the one that issued the ban (which is kinda screwy tbh).

Description of the problem

The last several months, I've been trying to build up the community over at !caps@lemmy.world. It's going mostly well, but one thing that has me scratching my head lately is that when I'm browsing from lemmy.ml (i.e. https://lemmy.ml/c/caps@lemmy.world), which is 99% of the time, I can't see the most recent post. Oddly enough, the author is also from lemmy.ml, and I have previously interacted w/ the same user in the comments of older posts, so I know it's not a user-specific issue. I've double checked my profile settings and haven't blocked the community, instance, or user. This issue seems specific to lemmy.ml because I can see it when I browse to the community from other instances.

Any ideas why this could be happening and what I can do to resolve it? Thanks.

Steps to reproduce the issue

Actual result

The post is not there.

Expected result

The post should show up in the feed.

 

EDIT: After reading all the responses, I’ve decided to allow cookies to persist after they close the browser, which I expect will make it so that 2FA doesn’t kick in as often, at least not on their most frequently used web sites. I may also look into privacy oriented browser extensions that might offer some protection, such as Privacy Badger. Thanks, all!

OP: I know two factor authentication is considered more secure than just passwords, but here’s the deal: One of my family members uses Linux Mint on their laptop (at my recommendation and yes, they are aware that it’s not a Mac), and while they’ve mostly adapted to the different workflows (coming from a macbook), one of their biggest pain points is that web sites are constantly challenging them because they don’t recognize their machine. It’s frustrating to them because they used to just allow all cookies in Safari, whereas I’ve configured Firefox on their Linux laptop not to keep any cookies after the browser is closed. I know this isn’t a Linux/Firefox issue, but I think they might not see it that way and I worry they’ll get frustrated to the point that they’ll go out and splurge on a new macbook air when they already have a perfectly functional laptop with functional OS.

Right now I’m thinking of adding their most frequently used web sites as exceptions in Firefox settings so at least those cookies would persist after closing the browser, making them easier to log into. Or maybe I’ll just allow all cookies indefinitely, although I’d rather not just throw in the towel on Big Surveillance. Is there another way to walk that line between convenience and security that I’m not thinking of? Should I just remove my tin foil hat and allow all cookies indefinitely?

Thanks in advance for your advice.

12
submitted 7 months ago* (last edited 7 months ago) by yo_scottie_oh@lemmy.ml to c/python@programming.dev
 

Not sure if this is allowed here, and it's not my playlist, but I thought I'd post these tutorials since I've found them helpful for learning the basics.

 

Hello! I'm attempting to follow some tutorials on unit testing with Python. One of them is a video tutorial Unit Tests in Python on the Socratica channel. Everyone in the comments seems to be making out just fine, and I’m following the instructor’s directions to the letter, yet I get a different result. It’s driving me mad lol.

In the video, the instructor creates two text files, one called circles.py in which she defines a function circle_area(r), and another called test_circles.py in which she writes some unit tests. In my attempt to follow along, I've ended up with two files structured like so:

/home/yo_scottie_oh/Projects/PythonTutorials/Socratica/Circles
├── circles.py
└── test_circles.py

circles.py:

from math import pi

def circle_area(r):
   return pi*(r**2)

# Test function
radii = [2, 0, -3, 2 + 5j, True, "radius"]
message = "Area of circles with r = {radius} is {area}."

for r in radii:
   A = circle_area(r)
   print(message.format(radius=r,area=A))

test_circles.py:

import unittest
from circles import circle_area
from math import pi

class TestCircleArea(unittest.TestCase):
   def test_area(self):
      # Test areas when radius >=0
      self.assertAlmostEqual(circle_area(1),pi)
      self.assertAlmostEqual(circle_area(0),0)
      self.assertAlmostEqual(circle_area(2.1),pi*2.1**2)

Where I'm getting tripped up is at 4:32 in the video, the instructor says to run the unit tests by opening a shell, going to the directory that contains both the circles and test_circles modules, and issuing the following command: python -m unittest test_circles.

Instructor's result (it runs the unit test):

Ran 1 test in 0.000s

OK

My result (it seems to execute circles.py itself):

[yo_scottie_oh@nobara Circles]$ python -m unittest test_circles
Area of circles with r = 2 is 12.566370614359172.
Area of circles with r = 0 is 0.0.
Area of circles with r = -3 is 28.274333882308138.
Area of circles with r = (2+5j) is (-65.97344572538566+62.83185307179586j).
Area of circles with r = True is 3.141592653589793.
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib64/python3.11/unittest/__main__.py", line 18, in <module>
    main(module=None)
  File "/usr/lib64/python3.11/unittest/main.py", line 101, in __init__
    self.parseArgs(argv)
  File "/usr/lib64/python3.11/unittest/main.py", line 150, in parseArgs
    self.createTests()
  File "/usr/lib64/python3.11/unittest/main.py", line 161, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 232, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 232, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 162, in loadTestsFromName
    module = __import__(module_name)
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/yo_scottie_oh/Projects/PythonTutorials/Socratica/Circles/test_circles.py", line 4, in <module>
    from circles import circle_area
  File "/home/yo_scottie_oh/Projects/PythonTutorials/Socratica/Circles/circles.py", line 14, in <module>
    A = circle_area(r)
        ^^^^^^^^^^^^^^
  File "/home/yo_scottie_oh/Projects/PythonTutorials/Socratica/Circles/circles.py", line 6, in circle_area
    return pi*(r**2)
               ~^^~
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
[yo_scottie_oh@nobara Circles]$

I've been banging my head against the wall for hours now trying to figure out why when I execute the same command as the instructor, it appears to execute my Python scripts themselves instead of running the unit tests.

Other things I've tried:

I've read the Python documentation on unit testing. I tried adding this to the end of the test_circles.py document, but that did not change anything.

if __name__ == '__main__':
    unittest.main()

I've tried following this other written tutorial. After I create the text documents and organize them in the separate shapes and tests folders and run the command python -m unittest discover -v, again I get a different result from the author.

Author's result:

test_area (test_circle.TestCircle) ... ok
test_circle_instance_of_shape (test_circle.TestCircle) ... ok
test_create_circle_negative_radius (test_circle.TestCircle) ... ok
test_area (test_square.TestSquare) ... ok
test_create_square_negative_length (test_square.TestSquare) ... ok
test_square_instance_of_shape (test_square.TestSquare) ... ok

----------------------------------------------------------------------
Ran 6 tests in 0.002s

OK

My result:

[yo_scottie_oh@nobara test]$ python -m unittest discover -v
test_circle (unittest.loader._FailedTest.test_circle) ... ERROR
test_square (unittest.loader._FailedTest.test_square) ... ERROR

======================================================================
ERROR: test_circle (unittest.loader._FailedTest.test_circle)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_circle
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/loader.py", line 419, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 362, in _get_module_from_name
    __import__(name)
  File "/home/yo_scottie_oh/Projects/PythonTutorials/PythonUnitTesting/test/test_circle.py", line 4, in <module>
    from shapes.circle import Circle
ModuleNotFoundError: No module named 'shapes'


======================================================================
ERROR: test_square (unittest.loader._FailedTest.test_square)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_square
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/loader.py", line 419, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/unittest/loader.py", line 362, in _get_module_from_name
    __import__(name)
  File "/home/yo_scottie_oh/Projects/PythonTutorials/PythonUnitTesting/test/test_square.py", line 3, in <module>
    from shapes.square import Square
ModuleNotFoundError: No module named 'shapes'


----------------------------------------------------------------------
Ran 2 tests in 0.000s

FAILED (errors=2)

So yeah… this brings me to my question: What’s the obvious thing that everybody else gets that I'm missing? Is the tutorial outdated? Is it because the instructor is on Windows and I’m on Linux? Why won’t my unit tests run?

 

EDIT: The audio issue on Wayland seems to have magically resolved itself after several reboots, so while I never figured out why the option for VRR disappeared in the Xorg session, I’ve resorted to using Wayland and everything seems to be as it should.

OP: Howdy. I just installed a new graphics card in my gaming rig, and now the option for Variable Refresh Rate is gone from the Display Settings when I log into a Gnome Xorg session. I swapped out my trusty Vega 64 for a new PowerColor 6750 XT. Before the swap, I always signed into an Xorg session and the option for Variable Refresh Rate was there. After the swap, the option for VRR is there only in Wayland. So why don't I just use Wayland, you ask? The problem is, on Wayland, the audio is distorted and I cannot figure out how to get clear audio. This audio issue seems specific to Steam b/c I can listen to music videos on YouTube crystal clear.

So now I have this dilemma where I have to choose between clear audio (Xorg session) vs variable refresh (Wayland).

Is this a known thing where Xorg doesn't support VRR for newer graphics cards? Is there some trick for getting clear audio in a Wayland session? Do I need a newer kernel or something?

What I've tried so far:

  • I've tried all three DP outs on the new graphics card.
  • Double checked that VRR is toggled on in my monitor's settings, and I can tell if VRR is working or not by turning on the monitor's FPS overlay. I know it was working in Xorg sessions before I swapped out the Vega 64.
  • Updated my motherboard to the latest BIOS.
  • Searched the interwebs for nobara 38 xorg vrr option gone, but alas, not much is coming up.

Display settings in Xorg:

Display settings in Wayland:

System info:

yo_scottie_oh@nobara 
------------ 
OS: Nobara Linux 38 (Thirty Eight) x86_64 
Kernel: 6.5.9-201.fsync.fc38.x86_64 
Uptime: 29 mins 
Packages: 3122 (rpm), 10 (flatpak) 
Shell: bash 5.2.15 
Resolution: 2560x1440 
DE: GNOME 44.2 
WM: Mutter 
WM Theme: Adwaita 
Theme: adw-gtk3-dark [GTK2/3] 
Icons: Papirus-Dark [GTK2/3] 
Terminal: gnome-terminal 
CPU: AMD Ryzen 7 5800X3D (16) @ 3.400GHz 
GPU: AMD ATI Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT 
Memory: 4726MiB / 32002MiB
 

I'm trying to install system updates on my gaming PC, which runs on Nobara 38. Typically I'd accomplish this in the command line by issuing dnf upgrade, but it refuses to update because doing so would remove the protected package nobara-amdgpu-config. Trying --skip-broken produces the same result.

How do I get past this issue or work around it so that I can install updates?

Command line output:

[yo_scottie_oh@nobara ~]$ sudo dnf upgrade
Last metadata expiration check: 0:33:19 ago on Sat 06 Apr 2024 05:57:10 PM EDT.
Error: 
 Problem: The operation would result in removing the following protected packages: nobara-amdgpu-config
(try to add '--skip-broken' to skip uninstallable packages)
[yo_scottie_oh@nobara ~]$ sudo dnf upgrade --skip-broken
Last metadata expiration check: 0:33:42 ago on Sat 06 Apr 2024 05:57:10 PM EDT.
Error: 
 Problem: The operation would result in removing the following protected packages: nobara-amdgpu-config
[yo_scottie_oh@nobara ~]$ sudo dnf update nobara-login
[sudo] password for scott: 
Last metadata expiration check: 0:43:46 ago on Sat 06 Apr 2024 05:57:10 PM EDT.
Error: 
 Problem: The operation would result in removing the following protected packages: nobara-amdgpu-config
(try to add '--skip-broken' to skip uninstallable packages)
[yo_scottie_oh@nobara ~]$ nobara-sync
# Option “-x” is deprecated and might be removed in a later version of gnome-terminal.
# Use “-- ” to terminate the options and put the command line to execute after it.
[yo_scottie_oh@nobara ~]$ 

EDIT: I'm still attempting to solve this on my own. Trying solutions found in this Super User thread and this Reddit thread, which points to this documentation on the Nobara project site.

EDIT 2: Issuing nobara-sync seems to have done the trick. The Nobara project documentation that I linked to above explains why they recommend nobara-sync instead of dnf upgrade.

view more: next ›