@alex@moreati.org.uk avatar

alex

@alex@moreati.org.uk

Python and Ansible developer. Recovering Sherlock. Armchair energy pundit. Pun usually intended. He/they.

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

fanf, to random
@fanf@mendeddrum.org avatar

heh look what i just found in an old .bashrc

export CVS_RSH=which ssh

alex,
@alex@moreati.org.uk avatar

@fanf was dig eject.cdrom.fanf.eng.demon.net ever wired in to anything? 🙂

alex, to python
@alex@moreati.org.uk avatar

I may write a client library to automate/replace clicking around the web UI of the router my ISP provided (Nokia HA-140W-B). I'll check for existing implementations first, or frameworks I can adapt

alex,
@alex@moreati.org.uk avatar

@CenturyAvocado I may do eventually, for now it's good enough and I'm happy to self nerd-snipe

nedbat, to random
@nedbat@hachyderm.io avatar

My test suite has just one dot on the last line. What would you do?

  • Delete one test
  • Change the width of the terminal
  • Keep it as a visceral reminder of the uncomfortably chaotic nature of the universe
  • Write more tests
alex,
@alex@moreati.org.uk avatar

@nedbat rewrite the pytest progress indicator using braille characters, so more passing tests fit on a single line.

jpmens, to random
@jpmens@mastodon.social avatar

I: "please pay particular attention to the names I specify"

They: "oing.yml"

alex,
@alex@moreati.org.uk avatar

@jpmens oing? Wasn't that in an old Batman episode? Adam West fought a pig on a pogo stick.

alex, to python
@alex@moreati.org.uk avatar

I prototyped Python bindings for Linux adjtimex() with CFFI, ctypes, Cython, and PyO3 https://github.com/moreati/python-adjtimex-experiments Please be gentle, this is Baby's First Rust.

hynek, to random
@hynek@mastodon.social avatar

is there any research on the causality between not bringing ANC headphones and the density of screaming babies because I have a datapoint

alex,
@alex@moreati.org.uk avatar

@hynek could be an opportunity for cross disciplinary collaboration with the meteorology dept., on the Umbrella Hypothesis.

alex, to TeslaMotors
@alex@moreati.org.uk avatar

UK now has a £350 grant to install a cross-pavement solution for on-street charging of an EV. AKA cut a thin channel across the pavement for the cable to go in, with a flap so it doesn't trip or impede pedestrians. https://www.find-government-grants.service.gov.uk/grants/electric-vehicle-chargepoint-grant-for-households-with-on-street-parking-1#summary

tubetime, to random
@tubetime@mastodon.social avatar

fun fact! the numbers in coin cell part numbers are dimensions. a CR2025 is 20mm diameter and 2.5mm thick!

alex,
@alex@moreati.org.uk avatar

@tubetime also true of cylindrical cells. An 18650 cell is nominally 18 mm diameter by 65 mm long. AA cells are sometimes called 14500, nominal 14 mm dia. by 50 mm length.

kushal, to python
@kushal@toots.dgplug.org avatar

https://strftime.org/ is always a very useful site

alex,
@alex@moreati.org.uk avatar
sldrant, to random
@sldrant@mastodon.social avatar

@Edent sorry if this is a stupid question, but I've been wondering about hardware tokens (fido etc) for a while...

Do you need a spare in case you lose one or do most sites offer some other secure recovery?

And how hard is it to enroll a replacement device should you lose one? Do you need to do it on every site again?

alex,
@alex@moreati.org.uk avatar

@Edent @sldrant most sites don't enforce a 2 hardware token minimum. Apple ID does, it's he only one I know of.

alex,
@alex@moreati.org.uk avatar

@Edent @sldrant I didn't mean to contradict your good rule. (Resisting British urge to apologise**2)

hynek, to random
@hynek@mastodon.social avatar

I love writing on my 2018 iPad Pro but god has it gotten slow… please daddy Tim Apple give us new ones in 2024 🥹

alex,
@alex@moreati.org.uk avatar

@hynek I'm probably due too. I hear there's a new connector for docking.

alex, to python
@alex@moreati.org.uk avatar

I've inherited some Python code that calls import('somepkg.module, fromlist=[''])
Has anyone seen this elsewhere?Is there a significance of an empty string in fromlist?
Current guess is it's a bug, or a workaround for Python 2.4 era behaviour. The code is https://github.com/mitogen-hq/mitogen/blob/798032b979bf5cabf50d3665f113f67cb5b33152/mitogen/core.py#L682, it's been around since the initial commit https://github.com/mitogen-hq/mitogen/blob/6d403481d44cdffb85ee36cc9e01642bcbc447df/mitogen/core.py#L461

alex,
@alex@moreati.org.uk avatar

I'm looking at this because in modern Python it causes sys.meta_path finders to be called with mpf.find_spec('somepkg.module.', ...), (note the trailing fullstop). Which I'm fairly certain is wrong.

alex,
@alex@moreati.org.uk avatar

import(..., fromlist=['']) isn't unique to Mitogen. It's also in imagepy, webpy, cherrypy, and others https://grep.app/search?q=. Most examples use the returned value. I think it's meant as a way to get the leaf module, rather than the top-level package, e.g.
>>> import('xml.dom.minidom')
<module 'xml' from '.../xml/init.py'>
>>> import('xml.dom.minidom', fromlist=[''])
<module 'xml.dom.minidom' from '.../xml/dom/minidom.py'>

alex,
@alex@moreati.org.uk avatar

Historical trivia: import() first appeared in Python 1.2, released April 1995

alex,
@alex@moreati.org.uk avatar

import(..., fromlist['']) is handled by code that swallows the exception. A comment notes "Backwards-compatibility dictates we ignore failed imports triggered by fromlist for modules that don't exist." https://github.com/python/cpython/blob/v3.12.2/Lib/importlib/_bootstrap.py#L1414-L1422 So I think it's a trick that became widespread in early Python (pre 2.x?), enough to be a grudgingly accepted unofficial API. I should specifically handle it as a corner case in Mitogen's find_spec().

whitequark, (edited ) to random
@whitequark@mastodon.social avatar

got a Normal USB cable

it claims to do 100 W. don't think i would trust the flimsy piece of FR4 that forms both mechanical and electrical bits of the rotating joint on the left with 5 amps but thats just me

(there are two rotating joints in this cable. one rotates 360 deg and is disassembled. the other rotates about 180 deg and is integrated into the molded plug)

alex,
@alex@moreati.org.uk avatar

@whitequark in the general case r/UsbCHardware recommends against magnetic USB-C cables https://www.reddit.com/r/UsbCHardware/comments/motlhn/magnetic_usbc_cables_are_not_recommended/

alex, to random
@alex@moreati.org.uk avatar

Hypothetically, if you were redoing a small kitchen would it make sense to not fit a hob into the worktop and use plugin induction hob(s) instead? E.g. https://www.ikea.com/gb/en/p/tillreda-portable-induction-hob-2-zones-white-90497166/ You'd gain some worktop and flexibilty, but I'm not sure if I'm missing a big downside. Probably only an option in countries with 220 volt sockets.

popey, to random
@popey@ubuntu.social avatar

Just putting these in a box for later when I’ll absolutely, definitely need them some day.

alex,
@alex@moreati.org.uk avatar

@popey last week I was able to give someone a some old harddisk power cables, and an old vacuum cleaner. The dream is real. Can I interest you in an external 56k modem?

glyph, to random
@glyph@mastodon.social avatar

I'm pretty sure I'm not the first to come up with this scenario, but one possible outcome of the various bits of copyright litigation and AI hype this year is that data with a strict chain of custody or timestamp that can be validated as pre-2019 or so will be a new category of highly valuable artifact, "low-background training data", the low-background steel of the information age https://en.wikipedia.org/wiki/Low-background_steel

alex,
@alex@moreati.org.uk avatar

@glyph borrowing from other fields

  • 100% organic sourced data
  • contains no artificial inferences
  • vintage 2019 reserve: aged 5 years
alex, to 3DPrinting
@alex@moreati.org.uk avatar

The knob for my cooker hood broke. A replacement is maybe £50. Fortunately the net is bright, and full of nerds. Time to Fix: 60 minutes. https://www.thingiverse.com/thing:4697405

Closeup of a repaired knob for an Ikea Underverk extractor fan. A 3D printed insert is holding the broken piece in place

april, to random
@april@macaw.social avatar

TIL that the US government runs an official dad joke database 👀

https://fatherhood.gov/for-dads/dad-jokes

alex,
@alex@moreati.org.uk avatar

@april and it's not called a dadabase? Disappointing

whitequark, to random
@whitequark@mastodon.social avatar

I think I've formulated how and why I'll use CWs (post titles) here: I'll use them whenever I explicitly want to give others an opportunity to opt out of a topic without opting out of reading my posts

the topic itself doesn't matter in abstract

alex,
@alex@moreati.org.uk avatar

@whitequark a hashtag can also help, providing something followers can mute. I use this to hide Wordle posts from my feed.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • mdbf
  • Youngstown
  • ngwrru68w68
  • osvaldo12
  • slotface
  • PowerRangers
  • hgfsjryuu7
  • khanakhh
  • kavyap
  • tsrsr
  • InstantRegret
  • DreamBathrooms
  • everett
  • Leos
  • magazineikmin
  • rosin
  • GTA5RPClips
  • thenastyranch
  • vwfavf
  • tacticalgear
  • Durango
  • ethstaker
  • tester
  • cisconetworking
  • cubers
  • modclub
  • anitta
  • All magazines