SQLite pragma_function_list()
The SQLite table-valued function returns a list of functions that have been registered with SQLite, including functions that were added by extensions. Here's how to interpret its output.
320 posts tagged “til”.
The SQLite table-valued function returns a list of functions that have been registered with SQLite, including functions that were added by extensions. Here's how to interpret its output.
I've been puzzling over this one for a couple of years now, and I finally figured out the solution. The Vega-Lite charting library can generate bar charts using a JSON definition that looks like this…
For https://github.com/simonw/datasette/issues/581 I want to be able to inspect a Python function to determine which named parameters it accepts and send only those arguments.
I ran into problems with my AWS Lightsail instance: it exceeded the CPU burst quota for too long and was suspended, and I couldn't figure out how to un-suspend it.
I attempted to replicate the bug in a Fedora container using Docker, by running this command: This downloaded the official image and dropped me into a Bash shell.
Via this comment on Hacker News I started exploring the ClickHouse Playground. It's really cool, and among other things it allows CORS-enabled API hits that can query a decade of history from the…
I spotted this script that starts the opendream appication running both a Python server and a script and it intrigued me - was it this easy to have a single Bash script run two servers?
I had to figure this out for Datasette Desktop. Pay for an Apple Developer account First step is to pay $99/year for an Apple Developer account.
For datasette/issues/1522 I wanted to use a Docker build argument in a that would then be deployed to Cloud Run. I needed this to be able to control the version of Datasette that was deployed.
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…
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.
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.
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…
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…
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…
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.
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.
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.
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).
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…