Simon Willison’s Weblog

Subscribe
Atom feed

Elsewhere

Filters: Sorted by date

Release llm 0.5 — Access large language models from the command-line
Release ttok 0.2 — Count and truncate text based on tokens
TIL Quickly testing code in a different Python version using pyenv — I had [a bug](https://github.com/simonw/llm/issues/82#issuecomment-1629735729) that was only showing up in CI against Python 3.8.
None
TIL Using git-filter-repo to set commit dates to author dates — After rebasing a branch with 60+ commits onto `main` I was disappointed to see that the commit dates on the commits (which are a different thing from the author dates) had all been reset to the same time. This meant the GitHub default UI for commits implied everything had been written at the same moment.
None
TIL Using OpenAI functions and their Python library for data extraction — Here's the pattern I figured out for using the [openai](https://github.com/openai/openai-python) Python library to extract structured data from text using a single call to the model.
None
Release strip-tags 0.5.1 — CLI tool for stripping tags from HTML
Release pocket-to-sqlite 0.2.3 — Create a SQLite database containing data from your Pocket account
TIL Python packages with pyproject.toml and nothing else — I've been using `setuptools` and `setup.py` for my Python packages for a long time: I like that it works without me having to think about installing and learning any additional tools such as [Flit](https://flit.pypa.io/) or [pip-tools](https://pip-tools.readthedocs.io/) or [Poetry](https://python-poetry.org/) or [Hatch](https://github.com/pypa/hatch).
None
TIL Syntax highlighted code examples in Datasette — I wanted to add syntax highlighting to the new tutorial [Data analysis with SQLite and Python](https://datasette.io/tutorials/data-analysis).
None
TIL Custom Jinja template tags with attributes — I decided to implement a custom Jinja template block tag for my [datasette-render-markdown](https://datasette.io/plugins/datasette-render-markdown) plugin. I wanted the tag to work like this:
None
Release datasette-render-markdown 2.2 — Datasette plugin for rendering Markdown
Release asgi-proxy-lib 0.1a0 — An ASGI function for proxying to a backend over HTTP
TIL Local wildcard DNS on macOS with dnsmasq — I wanted to get wildcard DNS running on my Mac laptop, for development purposes. I wanted `http://anything.mysite.lan/` to point to my localhost IP address.
None
TIL A Discord bot to expand issue links to a private GitHub repository — I have a private Discord channel and a private GitHub repository.
None
Release symbex 1.0 — Find the Python code for specified symbols
TIL Bulk editing status in GitHub Projects — GitHub Projects has a mechanism for bulk updating the status of items, but it's pretty difficult to figure out how to do it.
None
TIL CLI tools hidden in the Python standard library — Seth Michael Larson [pointed out](https://twitter.com/sethmlarson/status/1674141676325990400) that the Python `gzip` module can be used as a CLI tool like this:
None
Release datasette-upload-csvs 0.8.3 — Datasette plugin for uploading CSV files and converting them to database tables
Release strip-tags 0.5 — CLI tool for stripping tags from HTML
TIL TOML in Python — I finally got around to fully learning [TOML](https://toml.io/). Some notes, including how to read and write it from Python.
None
Release sqlite-utils 3.33 — Python CLI utility and library for manipulating SQLite databases
Release symbex 0.7 — Find the Python code for specified symbols
TIL Automatically maintaining Homebrew formulas using GitHub Actions — I previously wrote about [Packaging a Python CLI tool for Homebrew](https://til.simonwillison.net/homebrew/packaging-python-cli-for-homebrew). I've now figured out a pattern for automatically updating those formulas over time, using GitHub Actions.
None
Release symbex 0.6 — Find the Python code for specified symbols
Release symbex 0.5 — Find the Python code for specified symbols
Release symbex 0.4 — Find the Python code for specified symbols
Release symbex 0.3.2 — Find the Python code for specified symbols
Release symbex 0.3.1 — Find the Python code for specified symbols
Release symbex 0.3 — Find the Python code for specified symbols
Release symbex 0.2.1 — Find the Python code for specified symbols