Saving an in-memory SQLite database to a file in Python
I was messing around in Python with an in-memory SQLite database, when I decided I actually wanted to save my experimental database to a file so I could explore it using Datasette.
Notes on software engineering
241–260 of 546 posts, newest first.
I was messing around in Python with an in-memory SQLite database, when I decided I actually wanted to save my experimental database to a file so I could explore it using Datasette.
Users were reporting the following error using to import some CSV files: csv.Error: field larger than field limit (131072) It turns out the Python standard library CSV module enforces a default field…
I wanted to dynamically run the following command against all files in a directory: I can't use here because I need each file to be processed using the option. I found a solution using .
While exploring null bytes in this issue I learned that the command on macOS (and presumably other Unix systems) has a confusing default output.
Today I figured out how to use the tag to show a static thumbnail that gets replaced by the loaded video only when the user clicks play.
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.
For Datasette Desktop I wanted to run an action which, when I created a release, would build an asset for that release and then upload and attach it.
I'm working with several huge CSV files - over 5 million rows total - and I ran into a problem: it turned out there were a few lines in those files that imported incorrectly because they were not…
I wanted to write a bash script that would start a Datasette server running, run a request against it using , then stop the server again.
Here's a trick I've been using to compare the rows in a table before and after I perform an operation against it. It works well for a few hundred (and maybe a few thousand) rows.
http://radio.garden/ is an amazing website which displays a 3D globe covered in radio stations and lets you listen to any of them. I wanted to have a play around with their data.
I really like Skitch for taking screeshots, mainly because I like to snap a quick shot and then drag the icon onto a Google Doc or similar without saving the file anywhere.
This issue by Parand Darugar pointed out that Datasette doesn't currently run on Linux systems with FIPS enabled, due to the way it uses MD5 hashes. I hadn't heard of FIPS before.
I have two different Google Cloud accounts active at the moment. Here's how to list them with : And to switch between them with :
Fly offers fly-log-shipper as a container you can run in a Fly application to send all of the logs from your other applications to a logging provider. Several providers are supported.
I was getting the following warning for one of my Python test suites: I also saw a deprecation warning elsewhere for my usage of .
David Beazley on Twitter said: I think 95% of the problems once solved by a metaclass can be solved by instead This inspired me to finally learn how to use it!
My TIL website has social media card images to make links shared from it look slightly more interesting when shared on sites like Mastodon and Twitter.
I found this really simple recursive CTE useful for ensuring I understood how to write recursive CTEs. This query returns five rows from a single column - from 0 to 4.
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.