Notes on software engineering

Archive / page 26

501–520 of 547 posts, newest first.

  1. 2023
  2. Expanding ChatGPT Code Interpreter with Python packages, Deno and Lua

    Update: Code Interpreter often claims that it can't run binaries uploaded like this, but it looks like it still works if you are are persistent enough with it.

    4 min read
  3. How to create a tarball of a git repository using "git archive"

    I figured this out in a Gist in 2016 which has attracted a bunch of comments over the years. Now I'm upgrading it to a retroactive TIL.

    1 min read
  4. Running nanoGPT on a MacBook M2 to generate terrible Shakespeare

    nanoGPT is Andrej Karpathy's "simplest, fastest repository for training/finetuning medium-sized GPTs".

    2 min read
  5. Running tests against PostgreSQL in a service container

    I wanted to run some Django tests - using and with Django configured to pick up the environment variable via dj-database-url - against a PostgreSQL server running in GitHub Actions.

    1 min read
  6. Tommy's Margarita

    A few years ago I decided to learn how to make some classic cocktails. It is a very rewarding hobby. Of all of the drinks that I have learned to make, by far the biggest crowd pleaser is the Tommy's…

    2 min read
  7. How I studied for my Ham radio general exam

    I scraped a pass on my Ham radio general exam today, on the second attempt (you can retake on the same day for an extra $15, thankfully).

    4 min read
  8. Creating GitHub repository labels with an Actions workflow

    Newly created GitHub repositories come with a default set of labels. I have several labels I like to add on top of these.

    2 min read
  9. Enabling a user to execute a specific command as root without a password

    I wanted a script running as a non-root user to be able to restart a systemd service on my Ubuntu machine without needing a password.

    1 min read
  10. nullglob in bash

    I ran into a tricky problem while working on this issue: the following line was behaving in an unexpected way for me: datasette content.db .db –create What I expect this to do is to create a database…

    1 min read
  11. Language-specific indentation settings in VS Code

    When I'm working with Python I like four space indents, but for JavaScript or HTML I like two space indents. Today I figured out how to teach VS Code those defaults. 1.

    1 min read
  12. Writing tests with Copilot

    I needed to write a relatively repetitive collection of tests, for a number of different possible error states.

    1 min read
  13. Code coverage using pytest and codecov.io

    I got my asgi-csrf Python package up to 100% code coverage. Here's the pull request. I started by installing and using the pytest-cov pytest plugin.

    1 min read
  14. Running prompts against images, PDFs, audio and video with Google Gemini

    I'm still working towards adding multi-modal support to my LLM tool. In the meantime, here are notes on running prompts against images and PDFs and audio and video files from the command-line using…

    3 min read
  15. Linking from /latest/ to /stable/ on Read The Docs

    Read The Docs has a handy feature where documentation for older versions will automatically link to the latest release, for example on this page: That feature is enabled by a "Show version warning"…

    1 min read
  16. Running a MySQL server using Homebrew

    First, install MySQL like so: brew install mysql This installs the server but doesn't run it. You can run it in the background like this: Then later on you can stop it like so: While it's running it…

    1 min read
  17. Deploying the CLIP embedding model on Fly

    I ended up deploying a Datasette instance to Fly.io using my llm-clip and datasette-llm-embed plugins.

    2 min read
  18. Using expect() to wait for a selector to match multiple items

    In the Playwright tests for datasette-cluster-map I wanted to assert that two markers had been displayed on a Leaflet map.

    1 min read
  19. Running Python code in a subprocess with a time limit

    I figured out how to run a subprocess with a time limit for datasette-ripgrep, using the method. The pattern looks like this: For datasette-seaborn I wanted to render a chart using the Python seaborn…

    1 min read
  20. Allowing a container in Docker Desktop for Mac to talk to a PostgreSQL server on the host machine

    I like using Postgres.app to run PostgreSQL on my macOS laptop. I use it for a bunch of different projects.

    1 min read
  21. Find local variables in the traceback for an exception

    For sqlite-utils issue 309 I had an error that looked like this: And I wanted to display the values of the and variables as part of a custom error message.

    1 min read