Blog
Franken-GPUs - The Market for Modded AI Chips
High-tech products typically rely on economies of scale and massive up-front investment. This creates odd situations. Tesla hides its high-performance mode behind a feature flag. The hearing aid manufacturer Unitron uses the same practice to lock down advanced Speech in Noise algorithms. These devices are effectively derated from their maximum hardware capability. Beyond consumer outrage, this occasionally creates markets for modding. A lot of manufacturing cost has to be invested up front.
Updating a Runpod Serverless Endpoint in CI
Programatically creating new releases in RunPod for serverless endpoints is undocumented (as of writing). TL;DR copy paste the Python code from here and call update_endpoint_image("ghcr.io/...") with your new image on every deployment. Or use the Github Action. Their built in workflow for building a Dockerfile straight from a Github repository didn’t work for me. Builds always failed without giving an indication for why they failed. Logs seemed to stop at random points during the build.
Visualize go mod graph with Neo4j
Here’s a simple utility to visualize the dependency graph of a Go module using Neo4j (or any database that supports cypher). Running the utility is simple: go get github.com/halbgut/godep2cypher cd /some/go/project go mod graph | godep2cypher | cypher-shell Here’s the code.
Vim: Compute this in R
Often when working with numbers in code I need to convert them into some different format. Just opening an R REPL and running the calculation there is great. But it quickly becomes annoying when you have to do it on a whole list of numbers. After bumping into this annoyance a few times I wrote myself a simple solution. A key mapping that computes whatever is in the visual selection in R and inserts the result in its place.
Setting up a Magento 2 test instance on Docker
Setting up a Magento 2 test instance on Docker Magento currently doesn’t provide an official docker container for its open source product (AFAIK). Getting it up and running took me a bit, so I hope this guide eases the pain a bit for you. The setup I used was a bunch of docker containers without using docker-compose. Creating Dockerfiles and a docker-compose file from this guide should be pretty straight forward as well though.
Docker in untrusted networks
Backstory Today I set up a Pelias instance to use at Vaayu. Running Pelias requires quite beefy hardware, so running it on a normal cloud provider is prohibitively expensive. So instead I decided to host it on a dedicated machine on Scaleway. They have pretty decent prices. I’m running a well performing Pelias instance for €44 a month (not counting enterprise support and some other fees). To add TLS and password protection, I spun up an Nginx in front of it.
Promise based APIs in Node.js
For a long time I thought that Node.js was moving a bit slowly in their async/await adoption. It seemed like a simple thing to do. Just make the callback optional and return a promise if it’s not given. In the last weeks I discovered that the Node.js developers have been putting a lot of work into the creating good Promise based APIs. Using async/await to do asynchronous programming makes code so much more readable.
Working with REPLs in VIM
Working with Postgres and R recently, I had found some solution for getting my stuff from my VIM to their respective REPLs. That’s how I came up with this solution. I’m a minimalist, and I like command lines. So the idea of having to use an IDE gives me nightmares. Recently I’ve been playing a lot with Postgres. Of course, I exclusively used the psql interactive terminal. It uses Readline, so it feels like any REPL does.
Standard Deviation
When looking at a dataset of ranked values one question you might ask yourself is; how spread out are these values? You might have a dataset with an average of 0 where all values are close to 0. Like this set {1, 1, 2, -2, -1, -1}. But just looking at the average the set might as well look like this {100, 100, -100, -100}, but we wouldn’t know. That’s the question that “Standard Deviation” answers.
TABLESAMPLE
Recently I’ve been working a bit with Postgres. I wanted to offload as much work as possible to the database. I had never seriously learned SQL before, so this was a first for me. One of the things I wanted to do in SQL was taking a sample of 1'000 entities out of a big table with 70'000 rows. SQL specifies the TABLESAMPLE clause to do just that (and Postgres supports this since 9.
Let's encrypt Express
Since Let’s Encrypt will be coming out soon, I thought I’d try it on my Site. Let’s Encrypts infrastructure is actually fully operational already. They still label it as being in beta, because the client has some (around 400) bugs. My Site runs on Node.js using Express on Alpine Linux. The guide should work on pretty much any Linux system, since both Node.js and Let’s Encrypt are made to be as cross-platform-compatible as possible.