Show newer

I wrote a little post about pipx's new experimental script support: iscinumpy.dev/post/pep723/

You can now have a single Python file that declares its dependencies, and run it via pipx run! #python #pipx

Turing turing.com/ is a really scummy company. After all those "our AI thinks you'd like this" spam emails didn't work, now they've somehow found my private phone number and texted me spam about their product. This is the first time I've every had a company do this, and it's just disgusting. #TuringCompany #Spam

@weebull Power supply seems like one of the cheaper things to upgrade (though maybe not one of the physically easiest ones, considering that it plugs into everything 😛

@tomnardi I think I figured out why my blinkers weren't waking it up — there's a step-up transformer between the USB output and the blinker switch, and I think the step-up needs to have enough power to run it before the input impedance depends on the impedance across the outputs.

I think if the blinkers ran on 5.5V natively this would be no problem.

The solutions I see to this are:

1. Use a DPDT switch instead of the SPDT switch that's in there now, and with the second pole connected to a resistor across the 5.5V outputs. I don't mind pulling an extra 50mA or whatever for the time the blinker is on, but if you want to get fancy you can probably have this connected to a simple circuit that spikes the impedance when first turned on, then turns off.

2. Add a battery or capacitor to the input of the step-up that is sufficient to power the circuit when the battery pack is off, and where the quiescent current of the step-up would take 3-7 days to discharge the cap. That way any time you turn on the blinker, the circuit draws current and the battery pack wakes up (and recharges the capacitor).

I'm probably going to look for another solution that involves either pulling power from the bike itself or adding a drill battery or something, but I think the capacitor thing would probably work if I was really married to the battery pack solution.

OK, for a while I've been thinking I'd like access to a GPU to do some local jobs. Probably don't need to train a bunch of models from scratch, but I can imagine wanting to do some fine-tuning.

Right now I use Whisper on CPU and image generators like Stable Diffusion via pre-existing endpoints. I can imagine in the future my heaviest use will be image generators like SDXL and text-to-speech, and possibly I'd want to use them for high quality speech-to-text workflows as well.

I've got [this small media server](pcpartpicker.com/user/pineappl) that has a free PCiE slot, anyone know if I can just throw something like [this](pcpartpicker.com/product/4DkH9) in there and call it a day?

@tomnardi What does that mean to trigger a load, though? The blinkers themselves draw current, so if all that is required is to have a circuit that would draw power, they should be waking up the device.

If I understand what the 555 circuit is doing correctly, I think it's keeping the battery pack awake — which is a much easier task, because the battery pack is active and you just need to draw enough current for it to not go to sleep.

@tomnardi But what would the microcontroller do? I've never seen a description of any sort of protocol that wakes up battery packs from sleep, they just wake up when they detect something has been plugged in or if you press the button on the side.

In the long run I need to find a different way to power the blinkers anyway — either pulling power directly from the ebike battery (if I can get a line in there) or switch to using like a drill battery or something.

I'm thinking that in the short run I'll just plug in a second circuit that just burns the minimum amount of power to keep it awake, and unplug that circuit when I'm not actively riding the bike.

Show thread

Anyone know if it's possible to wake up a USB battery pack that has gone to sleep?

I'm using a battery pack to power a blinker circuit, but the pack goes to sleep like right away. I was hoping that the blinker circuit drawing power would be enough to wake it up, but apparently not.

Most of what I'm finding when I search for this are ways to keep the battery awake all the time (for powering low-power circuits), but I really just want to wake it up when I'm actively using the blinkers, and let it sleep otherwise.

Spoiler for 8 

@danzin @nedbat It is asking you to delete a file called `password.txt` in the current directory.

It's time for another episode of the core.py podcast about #Python internals!

This time Pablo and I are answering the fundamental question "what even *is* an interpreter?"

We go and attempt to explain this to people who never looked at the heart of CPython before (located in the ceval.c file).

podcasters.spotify.com/pod/sho

Though TBH I am kind of shocked that there are quality variations (sometimes the sound comes out tinny, sometimes it crackles, etc). I would think that it would basically just be doing the exact same math and outputting the same waveforms, so I don't really get why it' varies at all.

Maybe it uses some sort of compression or heuristics based on the output, and I can tell Tone.js "Take your time and give me the highest quality version of this" (possibly I could even write this to a cache...)

Show thread

Does anyone know if there's a mature Python or Rust or something version of this? tonejs.github.io/

I mainly want the feature where you can take samples and turn them into a synthesizer so that I can give it a bunch of recorded piano notes, then feed it something like `(["C4", "F4", "A4"], 2)` and have it play that chord for 2 seconds (then presumably output that to a file).

Right now Tone.js is working really well for me in most cases, but I'm getting inconsistent results depending on the browser and whether or not you've got headphones plugged in, which is... not great.

My needs are pretty limited, so I think I can just generate all the sounds I'm going to want ahead of time and serve static files to improve consistency and quality.

I'm seeing a bit of accidental FUD around `setup.py` in relation to `pyproject.toml` in Python packaging that I want to clear up.

The key point is `setup.py` isn't going anywhere! If you want to keep using it to configure setuptools, then keep doing it! All you do in `pyproject.toml` is specify setuptools are your build back-end.

The thing that HAS changed is setuptools deprecated calling `setup.py` DIRECTLY; e.g., don't do `python3 setup.py bdist_wheel` anymore, do `pipx run build` instead.

Lol, seems like Vanguard changed their password rules to max out at 20 characters, and now my password is too strong to let me log in. Great job guys.

@jankatins The only problem is it's Minecraft and I think my son may have already played a bunch, not sure if he'll lose his world...

@jankatins I did buy it with the family credit card. I am thinking I might try to return it and buy it with my main account.

Show older
Qoto Mastodon

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