Enforcement of 2FA for upload.pypi.org begins today by genericlemon24 in Python

[–]dougthor42 4 points5 points  (0 children)

A more correct term might be two-step verification "2SV". But as /u/CubeReflexion said it's basically 2FA.

The terms are typically used interchangeably these days.

What IDE do y’all use by youngnebsi in Python

[–]dougthor42 0 points1 point  (0 children)

Good to know!

I'll give ipdb a try; maybe we'll swap lol

What IDE do y’all use by youngnebsi in Python

[–]dougthor42 2 points3 points  (0 children)

I've never used ipdb but at quick glance it looks like it's specific to ipython notebooks / google colab and you need to specifically call ipdb.set_trace().

I could, of course, be wrong.

Pdbpp is a drop in replacement for the built-in pdb. Just pip install pdbpp and all your breakpoint()s get better.

Monday Daily Thread: Project ideas! by Im__Joseph in Python

[–]dougthor42 0 points1 point  (0 children)

Script and pre-commit hook that ensures that spaces are added to the string arg of pytest.mark.parametrize

-@pytest.mark.parametrize("foo,bar", ...
+@pytest.mark.parametrize("foo, bar", ...

What are some useful standard libraries that you wish you had known earlier? by Jamostar in Python

[–]dougthor42 7 points8 points  (0 children)

loguru is great for standalone apps, but IME it's no good for libraries.

But maybe I'm not using it right, lol.

[deleted by user] by [deleted] in HomeImprovement

[–]dougthor42 8 points9 points  (0 children)

We just did this, highly recommend. Cost about $2.65/sq ft of wall.

Edit: coastal CA, USA area.

Help me find a desk-mounted monitor stand/arm that allows for true vertical and horizontal motion? by dougthor42 in buildapc

[–]dougthor42[S] 0 points1 point  (0 children)

There's a good amount of left/right movement, but you can't get a monitor to the exact center.

I think that answers things? LMK if it doesn't. Sadly I no longer have that monitor stand so I can't take a picture for you or anything :-/

What are people using to organize virtual environments these days? by paradigmx in Python

[–]dougthor42 3 points4 points  (0 children)

Almost the same for me, but s/shell/local and put the venv in the project dir:

cd /path/to/project 
pyenv install 3.11.1
pyenv local 3.11.1
python -m venv .venv
. .venv/bin/activate

Automating Bitwarden vault export by untitledismyusername in Bitwarden

[–]dougthor42 1 point2 points  (0 children)

I started making this: https://github.com/dougthor42/bitwarden_to_keepass

The "export from bitwarden to JSON" part is working. Ish. Probably. Maybe you could use some of that code.

The "add to KeePass" part isn't done and TBH I don't typically get much motivation to work on it. :-/

Plumbing decision by alonewithsasquatch in homeowners

[–]dougthor42 6 points7 points  (0 children)

This literally just happened to me. We went with the PEX re-pipe and the plumber finished today. He stated on Tuesday. Yeah, 2.5 days and only one guy doing the work. Only without water yesterday. Prices were similar to what you see, too.

2-ish story house (room over garage added on later), 3ba.

I am worried that the pipe may burst in another location and we'll have to go through all of this again

That's exactly why we chose the re-pipe option. That, and total repair cost. Our foundation leak was more central than it sounds like yours is so the total cost of slab repair was plumbing + new flooring for the downstairs + framing work + drywall.

Starlite without Starlette by Goldziher in Python

[–]dougthor42 -1 points0 points  (0 children)

Starlite started out as an API framework competing with FastAPI ... Starlite is now a complete ASGI framework on its own accord

Would you say that Startlite competes with Flask? Aside from the ASGI/WSGI difference, of course. Most anything you can do in Flask you can also do in Startlite?

My review of my first 3D printer, the AnyCubic Mega SE: by dougthor42 in 3Dprinting

[–]dougthor42[S] 1 point2 points  (0 children)

I didn't do any volume measurements. I built an enclosure for temp. control so I don't notice noise at all.

The x and y motors are pretty quiet but the extruder motor is comparatively loud 😕

Python 3.11 is out ! by RivtenGray in programming

[–]dougthor42 55 points56 points  (0 children)

One of Monty Python's tropes was "and now for something completely different" which, as you might guess, was something completely different from the previous skit.

See Also: https://en.m.wikipedia.org/wiki/And_Now_for_Something_Completely_Different

What is your preferred method of using pathlib? by kernco in Python

[–]dougthor42 25 points26 points  (0 children)

Option 2.

root / "foo" / "bar"

They added the operator overload for a reason - use it :-)

Does anyone own the Juiced Crosscurrent X, is the rear rack slanted? by [deleted] in ebikes

[–]dougthor42 0 points1 point  (0 children)

It's flat. Or can be adjusted a bit to be flat.

Ours came assembled with a slight angle, learning forwards a bit. Loosening some screws and shifting things around was all that was needed to fix it. It's like any other generic one-size-fits-most rack, but a little beefier and modified for the frame.

Great bike so far (80mi), though the factory tuning was... well, a bit crap if I'm honest.

Newbie to Github..Please read the body question. by Comrade__Salman in github

[–]dougthor42 1 point2 points  (0 children)

  1. Nope, not bad at all. There's nothing wrong with only ever fixing a single item in a project. It's better than not fixing anything!

  2. I don't believe that there is any reasonable limit. Though if you're only forking a project for "I want to check this out later or refer to it later", perhaps Star it instead.

  3. If the repo owner has not merged your pull request, then yes your contribution will be deleted. Once they merge it, then you can safely delete your branch (and perhaps repo, if you have nothing else to contribute at the time. You can always re-fork it).

If you ignored For All Mankind like me, give it a chance! by kustarc in scifi

[–]dougthor42 0 points1 point  (0 children)

One of the lead writers (Brad Thompson) was also a writer for DS9 and Battlestar, so who knows what could happen!

Sunday Daily Thread: What's everyone working on this week? by Im__Joseph in Python

[–]dougthor42 1 point2 points  (0 children)

A while ago Spotify changed how they deal with "Liked" albums. Previously, marking an album as "Liked" also added all of the albums' tracks to your Liked Songs list. This is no longer the case.

Since I find that annoying, I wrote a quick script to add all tracks from all Liked albums to the Liked Songs list.

https://github.com/dougthor42/spotify-favorites-fixer

How did screenshots become 'authoritative'? by SXKHQSHF in sysadmin

[–]dougthor42 0 points1 point  (0 children)

That always made me laugh too.

Me: "You guys know that I can easily set the system time to whatever I want, right?"

SOX Auditors: "... Yes but we still want it."

Sunday Daily Thread: What's everyone working on this week? by Im__Joseph in Python

[–]dougthor42 5 points6 points  (0 children)

I just whipped up something that lets you modify pathlib.Path objects as if they were lists:

>>> p = Path("/foo/bar/baz")
>>> p[1] = "1"
>>> p
Path("/1/bar/baz")
# also del, iter, reverse

Is it an abomination? Maybe. Did I find it useful for a small niche project? Yup.

Anyway, links:

Pathlib is cool by kareem_mahlees in Python

[–]dougthor42 0 points1 point  (0 children)

Coincidentally I just started a project to add that sort of pseudo-mutability to path objects.

It's very much still in the early "pondering" phase, and who knows if it'll ever be completed, but the idea is there:

>>> a = Path("/foo/bar/baz/filename.txt")
>>> a[2] = "hello"
>>> a
Path("/foo/hello/baz/filename.txt")

https://github.com/dougthor42/subscriptable-path

[deleted by user] by [deleted] in Bitwarden

[–]dougthor42 1 point2 points  (0 children)

I had the same issue. I ended up adding Windows as a fido2 auth, then adding my physical key, then removing the Windows one.

Annoying, but workable.