Simon Willison: TIL

Things I've learned, collected in simonw/til. You may also enjoy my blog.

Atom feed

Browse by topic: ab 1 · amplitude 1 · asgi 1 · auth0 2 · aws 8 · awslambda 1 · azure 1 · bash 9 · caddy 1 · clickhouse 1 · cloudflare 1 · cloudrun 8 · cocktails 3 · cookiecutter 2 · cooking 1 · datasette 11 · deno 1 · digitalocean 1 · django 16 · docker 9 · duckdb 2 · electron 6 · firefox 1 · fly 7 · gis 3 · git 5 · github 13 · github-actions 23 · google-sheets 1 · googlecloud 5 · gpt3 7 · graphql 3 · hacker-news 1 · heroku 3 · homebrew 5 · html 3 · ics 1 · imagemagick 2 · javascript 15 · jinja 2 · jq 7 · json 1 · jupyter 1 · kubernetes 2 · linux 4 · llms 4 · macos 15 · markdown 3 · mastodon 4 · mediawiki 1 · networking 1 · nginx 1 · node 1 · npm 3 · observable 1 · observable-plot 2 · pixelmator 1 · pluggy 1 · postgresql 6 · presenting 1 · purpleair 1 · pypi 1 · pytest 18 · python 46 · quarto 1 · readthedocs 5 · reddit 1 · selenium 2 · service-workers 1 · shot-scraper 3 · spatialite 4 · sphinx 3 · sql 4 · sqlite 40 · svg 1 · tailscale 1 · tesseract 1 · twitter 3 · typescript 1 · vega 1 · vim 1 · vscode 2 · web-components 1 · webassembly 2 · webauthn 1 · wikipedia 1 · zeit-now 2 · zsh 2

Recent TILs

observable Using jq in an Observable notebook - 2023-03-25

I use the jq language quite a lot these days, mainly because I can get ChatGPT to write little JSON transformation programs for me very quickly. …

jq Convert git log output to JSON using jq - 2023-03-25

I just spent way too long messing around with ChatGPT (transcript here) trying to figure this out. After much iteration, here's a recipe that works (mostly written by me at this point): …

duckdb Use DuckDB to convert parquet to JSON and then open it in Datasette Lite - 2023-03-21

pickapic.io is a new tool funded by stability.ai which asks people to generate and then vote on images in order to provide data to be used for fine tuning an open source image generation model. …

llms A simple Python implementation of the ReAct pattern for LLMs - 2023-03-17

A popular nightmare scenario for AI is giving it access to tools, so it can make API calls and execute its own code and generally break free of the constraints of its initial environment. …

datasette Scraping Reddit and writing data to the Datasette write API - 2023-03-13

Today I built a system for monitoring Reddit for new posts that link to various domains that I own. …

hacker-news How to read Hacker News threads with most recent comments first - 2023-03-12

Hacker News displays comments in a tree. This can be frustrating if you want to keep track of a particular conversation, as you constantly have to seek through the tree to find the latest comment. …

javascript Copy rich text to the clipboard - 2023-03-10

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. …

llms Running LLaMA 7B and 13B on a 64GB M2 MacBook Pro with llama.cpp - 2023-03-10

See also: Large language models are having their Stable Diffusion moment right now. …

gis Using SQL with GDAL - 2023-03-09

Inspired by Brad Neuberg I decided to take a look at the SQL features in the GDAL family of tools. …

gpt3 Using ChatGPT to write AppleScript - 2023-03-08

I found a killer application for ChatGPT today: writing AppleScript! …

pytest Mocking subprocess with pytest-subprocess - 2023-03-08

For apple-notes-to-sqlite I needed to write some tests that simulated executing the osascript command using the Python subprocess module. …

gpt3 A simple Python wrapper for the ChatGPT API - 2023-03-02

OpenAI released an API for ChatGPT yesterday. It's 1/10th of the price of the text-davinci-003 model! …

macos sips: Scriptable image processing system - 2023-02-18

I wanted to convert some .webp images to .png on my Mac. I asked ChatGPT: …

llms Training nanoGPT entirely on content from my blog - 2023-02-09

This is a follow-up to Running nanoGPT on a MacBook M2 to generate terrible Shakespeare. …

sqlite Subqueries in select expressions in SQLite - also window functions - 2023-02-08

I figured out a single SQL query for the following today. Given a table of GitHub repositories, for each repository return: …

ab Avoiding "length" errors in Apache Bench with the -l option - 2023-02-08

I was using the Apache Bench ab command to exercise some new code I'm writing in Datasette and I noticed I was getting a lot of errors: …

sqlite The SQLite now argument is stable within the same query - 2023-02-05

I stumbled across an interesting little detail of SQLite today, running the following query: …

mastodon Building Mastodon bots with GitHub Actions and toot - 2023-02-02

Twitter announced today that they'll be ending free API access for bots. …

webassembly Run Python code in a WebAssembly sandbox - 2023-02-02

I've been trying to figure this out for ages. Tim Bart responded to my call for help on Hacker News with this extremely useful code example showing how to run Python code in WebAssembly inside Python, using wasmtime-py and the new Python WASM build released by VMware Wasm Labs. …

llms Running nanoGPT on a MacBook M2 to generate terrible Shakespeare - 2023-02-01

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

python Calculating embeddings with gtr-t5-large in Python - 2023-01-31

I've long wanted to run some kind of large language model on my own computer. Now that I have a M2 MacBook Pro I'm even more keen to find interesting ways to keep all of those CPU cores busy. …

sql Using recursive CTEs to explore hierarchical Twitter threads - 2023-01-30

This TIL adapted from a Gist I put together in 2019, before I started tracking TILs here. …

sqlite Combining CTEs and VALUES in SQLite - 2023-01-29

Here's how to use SQLite's VALUES syntax with a CTE to create a temporary table that you can then perform joins against in a query: …

python Installing lxml for Python on an M1/M2 Mac - 2023-01-27

I ran into this error while trying to run pip install lxml on an M2 Mac, inside a virtual environment I had intitially created using pipenv shell: …

sqlite SQLite pragma_function_list() - 2023-01-27

The SQLite pragma_function_list() table-valued function returns a list of functions that have been registered with SQLite, including functions that were added by extensions. …

git Rewriting a Git repo to remove secrets from the history - 2023-01-24

I decided to make a GitHub repository public today that had previously been private. Unfortunately the revision history of that repository included some secret values, one of which I could not figure out a way to revoke. …

python Upgrading a pipx application to an alpha version - 2023-01-11

I wanted to upgrade my git-history installation to a new alpha version. …

shot-scraper Scraping the Sky News Westminster Accounts, a Flourish application - 2023-01-10

Sky News in partnership with Tortoise published a fantastic piece of investigative data reporting: the Westminster Accounts, a database of money in UK politics that brought together data from three different sources and make it explorable. …

sqlite Loading SQLite extensions in Python on macOS - 2023-01-07

I finally found a workaround for this error when attempting to load a SQLite extension in Python on macOS: …

sqlite Geopoly in SQLite - 2023-01-04

I noticed this morning that one of my Datasette installations had the Geopoly SQLite extension enabled. I don't know how it got there - it has to be compiled specifically - but since it was there I decided to try it out. …

Browse all 397 TILs