Simon Willison’s Weblog

Newsletter
Atom feed

Elsewhere

Filters: Sorted by date

Release django-sql-dashboard 0.15.1 — Django app for building dashboards using raw SQL queries
None
TIL Building a Markdown summary of Django group permissions — [Django SQL Dashboard](https://django-sql-dashboard.datasette.io/) can display rendered markdown generated by a SQL query.
Release sqlite-utils 3.8 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 3.7 — Python CLI utility and library for manipulating SQLite databases
None
TIL Finding CSV files that start with a BOM using ripgrep — For [sqlite-utils issue 250](https://github.com/simonw/sqlite-utils/issues/250) I needed to locate some test CSV files that start with a UTF-8 BOM.
Release datasette 0.57a1 — An open source multi-tool for exploring and publishing data
None
TIL Running Docker on an M1 Mac — *TLDR: Use `platform: linux/amd64` in `docker-compose.yml` and your containers will probably work!*
None
TIL Docker Compose for Django development — I had to get Docker Compose working for a Django project, primarily to make it easier for other developers to get a working development environment.
Release django-sql-dashboard 0.15 — Django app for building dashboards using raw SQL queries
Release datasette 0.57a0 — An open source multi-tool for exploring and publishing data
Release geojson-to-sqlite 0.3.1 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
None
TIL Finding duplicate records by matching name and nearby distance — I wanted to find potentially duplicate records in my data, based on having the exact same name and being geographically located within 500 meters of each other.
None
TIL Switching between gcloud accounts — I have two different Google Cloud accounts active at the moment. Here's how to list them with `gcloud auth list`:
None
TIL Django data migration using a PostgreSQL CTE — I figured out how to use a PostgreSQL CTE as part of an update statement in a Django data migration. The trick here is mainly understanding how to combine CTEs with a PostgreSQL update - here's the pattern for that:
None
TIL KNN queries with SpatiaLite — The latest version of SpatiaLite adds KNN support, which makes it easy to efficiently answer the question "what are the X closest records to this point".
None
TIL Enabling a gin index for faster LIKE queries — I tried using a gin index to speed up `LIKE '%term%'` queries against a column.
Release geojson-to-sqlite 0.3 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Release django-sql-dashboard 0.14 — Django app for building dashboards using raw SQL queries
None
TIL 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.
None
TIL The Wikipedia page stats API — Via https://alexgarcia.xyz/dataflow/examples/wiki-pageviews/ I found this API for retrieving daily pageview stats from Wikipedia for any article:
Release django-sql-dashboard 0.13 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12.3 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12.2 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12.1 — Django app for building dashboards using raw SQL queries
Release django-sql-dashboard 0.12 — Django app for building dashboards using raw SQL queries
None
TIL Scroll page to form if there are errors — For a Django application I'm working on ([this issue](https://github.com/simonw/django-sql-dashboard/issues/44)) I have a form that can be quite a long way down the page.
None
TIL Running Datasette on Replit — I figured out how to run Datasette on https://replit.com/
None
TIL migrations.RunSQL.noop for reversible SQL migrations — `migrations.RunSQL.noop` 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 by an irreversible migration).
Release django-sql-dashboard 0.11a0 — Django app for building dashboards using raw SQL queries