Show more

I'm over the moon that the #Python helper function I write more than _any_ other, `chunks`, is coming to the stdlib in 3.12 as `itertools.batched(iterable, n)`! It takes a long iterable and yields chucks (or batches) of length `n`.

I think I've pasted the same Stackoverflow snippet into... 10 projects at this point? So this is huge for me.

docs.python.org/3.12/library/i

Carter’s has this shirt for kids, but I can’t find an adult version anywhere. Trying to tell Amazon or a search engine that it’s important that the shirt have all three colors (much less in a specific order) seems impossible.

Show thread

One day I hope ML technology advances to the point that I can describe a shirt and find out if someone is selling something like it.

@mjgardner @icing actually, being liberal in accepting things is not a good idea either. If it violates the protocol, eject, close, kill, abort. At once. That leads to better code and protocols in the longer run.

Do I know anyone who's worked on budgeting infrastructure projects (physical infrastructure like roads and buildings, not software) who would be open to chatting with me for a short time and answering some questions about terminology used in that context?

Today's my last day at Google 🥲

I'm taking some time off to focus on my family, personal health, and to work on my bots.

If anyone knows of a role that'll fit me, I'll appreciate the intro! 😊

#funemployed

It’s relatively easy to make a drop-in replacement for these, but also we’re deprecating them because they’re conceptually the wrong thing to do, so it’s best to migrate to using aware datetimes if possible: blog.ganssle.io/articles/2019/

Show thread

datetime.utcnow and datetime.utcfromtimestamp will be deprecated in 3.12: github.com/python/cpython/issu

If you maintain a package, now is probably a good time to grep your source code for utcnow and utcfromtimestamp to get out ahead of the deprecation warnings. 📅🕐

$ sudo dd if=/dev/zero of=/dev/mapper/to_be_wiped status=progress
59001459200 bytes (59 GB, 55 GiB) copied, 904 s, 65.3 MB/s

65 MB/s, nice, nice. At this rate it’s only going to take…. 3 days to wipe this 16TB drive.

Step 5/7 : RUN python3 -m pip install .
 ---> Running in 31b96e802fdb/usr/bin/python3: No module named pip

Hmm.. So also ships a crippled thing that is not when you dnf install python3.

I was hoping that that was a reasonable alternative to Debian/Ubuntu ☹

Solutions needed: Is it possible for coverage.py to automatically exclude Protocols from measurement?

github.com/nedbat/coveragepy/i

Should coverage.py report a missing branch if a comprehension doesn't run to completion? github.com/nedbat/coveragepy/i

Would it be better if instead of "2->exit" it said "completion(2)" ?

Bugs like dt.replace(year=dt.year + 1), code that works with ordinal day-of-year, etc.

Show thread

Psst. Next year is a leap year. Depending on your deployment story, now (or 3 months ago😅) might be a good time to start looking into logic that won’t handle leap years correctly.

isn’t great, but it’s a darn sight better than this.

Show thread

“Oh I need to communicate with someone on Discord quickly, guess I’ll launch it. Oh, there’s an update available, so Discord prevents me from opening their appliaction.”

Reason #215 to avoid .

Just released Typer 0.8.0 🔖

With support for ✨ custom param types ✨

Thanks to John Purviance for the work in the PyCon sprint! 🍰

typer.tiangolo.com/tutorial/pa

Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.