Notes on software engineering

Archive / page 9

161–180 of 546 posts, newest first.

  1. 2025
  2. SQLite pragma_function_list()

    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.

    3 min read
  3. Vega-Lite bar charts in the same order as the data

    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…

    1 min read
  4. Generating OpenAPI specifications using GPT-3

    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.

    1 min read
  5. How to run MediaWiki with SQLite on a macOS laptop

    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!

    2 min read
  6. Introspecting Python function parameters

    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.

    1 min read
  7. Recovering data from AWS Lightsail using EC2

    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.

    2 min read
  8. Async fixtures with pytest-asyncio

    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.

    1 min read
  9. Downloading MapZen elevation tiles

    Via Tony Hirst I found out about MapZen's elevation tiles, which encode elevation data in PNG and other formats.

    1 min read
  10. Testing things in Fedora using Docker

    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.

    1 min read
  11. How streaming LLM APIs work

    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.

    2 min read
  12. 2024
  13. Combining CTEs and VALUES in SQLite

    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.

    1 min read
  14. Adding project links to PyPI

    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.

    1 min read
  15. Calculating the size of a SQLite database file using SQL

    I learned this trick today while browsing the code of Blacklite, a neat Java library for writing diagnostic logs to a SQLite database.

    1 min read
  16. Attaching a bash shell to a running Docker container

    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…

    1 min read
  17. Bulk fetching repository details with the GitHub GraphQL API

    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.

    1 min read
  18. Convert a datetime object to UTC without using pytz

    I wanted to convert a datetime object (from GitPython) to UTC without adding the dependency.

    1 min read
  19. Querying the GitHub archive with the ClickHouse playground

    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…

    2 min read
  20. Running multiple servers in a single Bash script

    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?

    1 min read
  21. Signing and notarizing an Electron app for distribution using GitHub Actions

    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.

    4 min read
  22. Using build-arg variables with Cloud Run deployments

    For datasette/issues/1522 I wanted to use a Docker build argument in a that would then be deployed to Cloud Run. I needed this to be able to control the version of Datasette that was deployed.

    1 min read