Various topics of interest... to me, at least!
Local Ollama HTTP Server with Markdown, Streaming and Model Selection
As a hedge against paywalled online LLM's, I threw together this ollama/python/HTTP/Markdown streaming LLM server. There are plenty of 'TODO's for it, especially adding in the chat mode w/ past messages, but it formats code and tables nicely, streams responses, and lets you pick from whatever models you've installed. Another TODO is to add in an agentic toolbox, so it can do things like make searches and execute python locally. Another idea is to include some agentic aspect to it to help it provide richer answers.
Process Low-Density Parity Check (LDPC) Belief Propagation Networks in CUDA on an NVIDIA GPU
A belief propagation network is one (popular) algorithm used to process digital messages containing low-density parity check (LDPC) forward error correction (FEC). While not being "embarassingly" parallelizable, the algorithm can benefit from parallel execution using simple instructions and is therefore a candidate to run on a GPU. Some proof-of-concept code is contained here.
Turn Your Raspberry Pi into an IR/Infrared Remote Control
UPDATE: For lower cost, I've also implemented this on the Raspberry Pi Pico W using uasyncio. See bottom of post for details.
I had run into issues with infrared remote control routines available on the internet for the Raspberry Pi. The main issues: being forced to use some specialized hardware that cost as much as a Raspberry Pi or getting interrupted by the Linux kernel all the time when controlling pins myself! Check out the details for how I overcame those issues.
Adding a Variable-Volume Line Out to my Sony Bravia TV
My Sony Bravia HDTV has built-in speakers and a fixed-level line out. I had a Logitech Z323 2-way + subwoofer speaker system with a volume knob. This is how I merged the two and kept my remote volume control!
Calculating (instead of PSPICE'ing) the value of the Resistor Mass in XKCD #730
I couldn't find anyone who had simply calculated the value of the resistor mass, vs finding it via simulation in PSPICE, so I thought I'd go ahead and do that. Hint: there are 27 unknowns.
Trimming Silence in Audio Files
FFMPEG's silenceremove functionality is a bit cryptic and unwieldy. This substitute was done as a quick project just to see how simply I could code it using Python, while still maintaining performance. It ended up being able to process 2 hours of audio in 5.7 seconds on my midrange, 2020 machine! Not bad for Python! I also put in a lot of nice features like auto-thresholding and blip ignoring.
Making Movies from tinySA Captures
The tinySA is a small spectrum analyzer that lets you send commands over serial/USB, one of which is to retrieve a 'capture' (screenshot). This script uses moviepy to periodically capture images and combine those images into movies every frame-count frames. This is useful when using the spectrum analyzer to monitor activity over a long period of time. The max-hold functionality can be activated and reset at the beginning of every movie.