Replies

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ehmatthes, to python
@ehmatthes@fosstodon.org avatar

TIL how to use itertools.dropwhile() to get all lines from a file after a specific line. I always used to write my own loop to solve this problem.

I'm curious, have you heard of dropwhile()? Have you used it?

paarth,
@paarth@pirate.lgbt avatar

@AlSweigart @ehmatthes itertools and functools take the crown for each being parts of the standard library that are grossly underused. They solve so, so many common programming patterns in a way that is measurably more performant than other solutions.

You want to have a for loop within a for loop? You can use itertools.product instead!
You want memoization of a function/instance property? Just use functools.cache, or functools.cached_property respectively!

elb, to HomeAutomation
@elb@social.sdf.org avatar

I really like the idea of . However, the available software systems just do NOT do it for me. My smart thermostat has been blinking that it cannot connect to my wi-fi for weeks, my is out-of-date because updating it is painful, my Z-Wave adapter is currently not functioning properly because somehow the adapter stack can't talk to it, ...

This is all a joke.

paarth,
@paarth@pirate.lgbt avatar

@grimmy @elb tbh updating has never been more complicated for me than docker compose pull && docker compose up -d

ottaross, to homeassistant
@ottaross@mastodon.social avatar

Some techy stuff that'll hit all the hashtags…

As a bit of a project, I noticed my old is quite near my 3D printer (basement) and it just runs a server. It has more capacity than that, so I attached an old usb camera, loaded and wrote some to take a pic of the printer and stuff it into both a web page and a home assistant dashboard.

Some innovation though…

paarth,
@paarth@pirate.lgbt avatar

@ottaross depending on your printer model (or even if you just want dedicated integration via a third party component), you might be very interested in https://octoprint.org/

nf3xn, to ChatGPT
@nf3xn@mastodon.social avatar

Holy shit GPT4 quality has gone through the floor - what the hell its like being back working with da_vinci2 models???

This is why serious people cannot rely on a cloud AI service.

paarth,
@paarth@pirate.lgbt avatar

@nf3xn fascinating, I haven't noticed anything yet; what's been going on? 👀

paarth, to random
@paarth@pirate.lgbt avatar
paarth,
@paarth@pirate.lgbt avatar

@ryan 🥵🥵

thisismissem, (edited ) to random
@thisismissem@hachyderm.io avatar

Okay, have just submitted a PR to a fediverse project to fix a critical security vulnerability; CVE score is like 9.9/10.

More news once administrators of this servers using this project can upgrade safely.

Update: CVE was in @pixelfed, and the advisory is published here: https://github.com/pixelfed/pixelfed/security/advisories/GHSA-gccq-h3xj-jgvf

paarth,
@paarth@pirate.lgbt avatar

@thisismissem @pixelfed that's kinda a horrifying vulnerability level

paarth,
@paarth@pirate.lgbt avatar

@thisismissem @pixelfed I'm curious how it got caught/why it wasn't caught earlier, and whether older versions in the wild may still be affected. Though I imagine that may all have to wait until after 2/25?

arraybolt3, to python
@arraybolt3@theres.life avatar

This is why I hate Python.

paarth,
@paarth@pirate.lgbt avatar

@hugovk @arraybolt3 oh lord, yeah, please don't write code that supports python3.2. Don't encourage those people 😅

paarth,
@paarth@pirate.lgbt avatar

@hugovk @arraybolt3 aha yep that's what I meant!
(that said, I'd not even bother supporting anything <3.8 personally)

ryan, to random
@ryan@pirate.lgbt avatar

so yeah being a sysadmin is hard

paarth,
@paarth@pirate.lgbt avatar

@ryan dunno what you're talking about

ryan, to random
@ryan@pirate.lgbt avatar

do you ever just want to grab a coworker by the shoulders and shake them while shouting "WHY DO YOU NOT READ THE TEXT ON THE SCREEN"

paarth,
@paarth@pirate.lgbt avatar

@ryan They pay me to keep my mouth shut on that one

paarth, to Costco
@paarth@pirate.lgbt avatar

I wasn't expecting to see a nun picking out glasses frames at a optical today, but that's just where we are as a society I guess

paarth,
@paarth@pirate.lgbt avatar

@ryan I guess I always assumed that a covent/abbey would have a live-in lenscrafter

ryan, to random
@ryan@pirate.lgbt avatar

Some east coast piece of shit sets a meeting at 7am. I get up and drink coffee starting at 6:30 to prepare. The meeting is canceled at 6:55.

paarth,
@paarth@pirate.lgbt avatar

@ryan bastards

e_urq, to news
@e_urq@journa.host avatar

BREAKING: Conservative Republican Governor Mike DeWine has just announced he will VETO the ban on gender affirming care that recently passed the legislature.

This comes after tireless efforts by families, LGBTQ+ activists, and the heads of Ohio's nationally recognized children's hospitals.

paarth,
@paarth@pirate.lgbt avatar

@e_urq @gavinisdie
> "None of [the families] that I talked to talked about surgery," said DeWine on Friday. "That's not where they were going in the discussion. And I think that's, frankly, a fallacy that's out there that, you know, this goes right to surgery. It just doesn't. All the children's hospitals say that we don't do surgeries."

https://abcnews.go.com/US/ohio-governor-vetoes-transgender-sports-gender-affirming-care/story?id=105988126

paarth, to google
@paarth@pirate.lgbt avatar

I know is on the decline, but this is kinda ridiculous

18+ paarth,
@paarth@pirate.lgbt avatar

@ryan it at least had the correct unit/conversion, but yeah converting 1005 hPA makes way more sense for human-survivable conditions

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • kavyap
  • DreamBathrooms
  • cisconetworking
  • magazineikmin
  • InstantRegret
  • Durango
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • mdbf
  • khanakhh
  • ethstaker
  • JUstTest
  • everett
  • GTA5RPClips
  • Leos
  • cubers
  • ngwrru68w68
  • osvaldo12
  • tester
  • tacticalgear
  • modclub
  • anitta
  • normalnudes
  • provamag3
  • lostlight
  • All magazines