Session-scoped temporary directories in pytest
I habitually use the fixture in pytest to get a temporary directory that will be cleaned up after each test, but that doesn't work with - which can be used to ensure an expensive fixture is run only…
Notes on software engineering
161–180 of 547 posts, newest first.
I habitually use the fixture in pytest to get a temporary directory that will be cleaned up after each test, but that doesn't work with - which can be used to ensure an expensive fixture is run only…
The SQLite table-valued function returns a list of functions that have been registered with SQLite, including functions that were added by extensions. Here's how to interpret its output.
I've been puzzling over this one for a couple of years now, and I finally figured out the solution. The Vega-Lite charting library can generate bar charts using a JSON definition that looks like this…
I wanted to start playing around with OpenAPI. I decided to see if I could get GPT-3 to generate the first version of a specification for me.
Today I got curious about how MediaWiki records page history, so I started digging around and in the process figured out how to run it against a SQLite database on my macOS laptop!
For https://github.com/simonw/datasette/issues/581 I want to be able to inspect a Python function to determine which named parameters it accepts and send only those arguments.
I ran into problems with my AWS Lightsail instance: it exceeded the CPU burst quota for too long and was suspended, and I couldn't figure out how to un-suspend it.
I wanted to use a fixture with that was itsef as function, so that it could execute statements. Since I'm using a file containing I had to use the fixture to get this to work.
Via Tony Hirst I found out about MapZen's elevation tiles, which encode elevation data in PNG and other formats.
I attempted to replicate the bug in a Fedora container using Docker, by running this command: This downloaded the official image and dropped me into a Bash shell.
I decided to have a poke around and see if I could figure out how the HTTP streaming APIs from the various hosted LLM providers actually worked. Here are my notes so far.
Here's how to use SQLite's syntax with a CTE to create a temporary table that you can then perform joins against in a query: Try that here.
I spotted a neat looking project links section on https://pypi.org/project/ExifReader/ Turns out that's added using a key in setup.py, e.g.
I learned this trick today while browsing the code of Blacklite, a neat Java library for writing diagnostic logs to a SQLite database.
Use to find the container ID: $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 81b2ad3194cb alexdebrie/livegrep-base:1 "/livegrep-github-re…" 2 minutes ago Up 2 minutes compassionate…
I wanted to be able to fetch details of a list of different repositories from the GitHub GraphQL API by name in a single operation.
I wanted to convert a datetime object (from GitPython) to UTC without adding the dependency.
Via this comment on Hacker News I started exploring the ClickHouse Playground. It's really cool, and among other things it allows CORS-enabled API hits that can query a decade of history from the…
I spotted this script that starts the opendream appication running both a Python server and a script and it intrigued me - was it this easy to have a single Bash script run two servers?
I had to figure this out for Datasette Desktop. Pay for an Apple Developer account First step is to pay $99/year for an Apple Developer account.