Notes on software engineering

Archive / page 10

181–200 of 546 posts, newest first.

  1. 2024
  2. Copy rich text to the clipboard

    I've been experimenting with a tool for generating the content for a weekly Substack newsletter by querying the Datasette API for my blog and assembling HTML for the last week of content.

    1 min read
  3. Cumulative total over time in SQL

    This is a quick trick for creating a cumulative chart of the total number of items created over time based just on their creation date.

    1 min read
  4. Exporting Amplitude events to SQLite

    Amplitude offers an "Export Data" button in the project settings page. This can export up to 365 days of events (up to 4GB per export), where the export is a zip file containing gzipped…

    1 min read
  5. Exploring OpenAI's deep research API model o4-mini-deep-research

    I was reviewing some older PRs and landed this one by Manuel Solorzano adding pricing for o4-mini-deep-research and o3-deep-research to my llm-prices.com site.

    1 min read
  6. Google OAuth for a CLI application

    :warning: The OOB flow described in this document has been scheduled for deprecation by Google. See issue 39 for notes on how to replace it.

    2 min read
  7. Treating warnings as errors in pytest

    I was seeing this warning in a Django project when I thought I was correctly using timezone-aware dates everywhere: RuntimeWarning: DateTimeField Shift.shift start received a naive datetime…

    1 min read
  8. Using jq in an Observable notebook

    I use the language quite a lot these days, mainly because I can get ChatGPT to write little JSON transformation programs for me very quickly. I just figured out how to run in an Observable notebook.

    1 min read
  9. SQLite triggers

    I wrote a Python script, triggers.py, to help me understand what data is available to SQLite triggers for which operations. SQLite triggers are documented here.

    1 min read
  10. Storing and serving related documents with openai-to-sqlite and embeddings

    I decide to upgrade the related articles feature on my TILs site. Previously I calculated these using full-text search, but I wanted to try out a new trick using OpenAI embeddings for document…

    5 min read
  11. mlc-chat - RedPajama-INCITE-Chat-3B on macOS

    MLC (Machine Learning Compilation) on May 22nd 2023: Bringing Open Large Language Models to Consumer Devices RedPajama on Apple Silicon is achieved by compiling the LLM using Metal for M1/M2 GPUs The…

    1 min read
  12. Upgrade Postgres.app on macOS

    I've been using Postgres.app to run PostgreSQL on my Mac for years. I like that it's easy to install, gives me a task tray icon to control it and means I don't have to run a full Docker environment…

    1 min read
  13. Using Jest without a package.json

    I wanted to try out Jest for writing JavaScript unit tests, in a project that wasn't set up with and other NPM related things. Jest looks for tests in a directory.

    1 min read
  14. Looping over comma-separated values in Bash

    Given a file (or a process) that produces comma separated values, here's how to split those into separate variables and use them in a bash script.

    1 min read
  15. Adding Sphinx autodoc to a project, and configuring Read The Docs to build it

    I built a new API reference page today for , using the Sphinx autodoc extension to extract docstrings from the code and use them to build a full class reference.

    3 min read
  16. Pisco sour

    This classic Peruvian cocktail recipe is particularly useful if you have both a lemon tree and chickens producing fresh eggs! Here's the recipe I've landed on, after some experimentation.

    1 min read
  17. Search and replace with regular expressions in VS Code

    I wanted to replace all instances of this: With this: :issue: For sqlite-utils issue 306. I used the VS Code's Find and Replace tool with regular expression mode turned on (the button).

    1 min read
  18. GUnion to combine geometries in SpatiaLite

    I was playing around with datanews/amtrak-geojson, which provides GeoJSON for Amtrak stations and track segments.

    1 min read
  19. How to ask questions

    admin only: false HOW TO ASK QUESTIONS THE SMART WAY Original Authors: Eric S. Raymond, Rick Moen Version: 1.0 (Adapted) Original Copyright © 2001-2014 Eric S.

    8 min read
  20. Calculating the size of all LFS files in a repo

    I wanted to know how large the deepseek-ai/DeepSeek-V3-Base repo on Hugging Face was without actually downloading all of the files. With some help from Claude, here's the recipe that worked.

    1 min read
  21. migrations.RunSQL.noop for reversible SQL migrations

    provides an easy way to create "reversible" Django SQL migrations, where the reverse operation does nothing (but keeps it possible to reverse back to a previous migration state without being blocked…

    1 min read