til

320 posts tagged “til”.

  1. 2024
  2. SQLite can use more than one index for a query

    I was trying to figure out if SQLite has the ability to use more than one index as part of executing a single query, or if it only ever picks a single index that it thinks will give the best…

    1 min read
  3. Loading lit from Skypack

    Lit 2 stable was released today, offering a tiny, feature-full framework for constructing web components using modern JavaScript.

    1 min read
  4. Using iconv to convert the text encoding of a file

    In sqlite-utils issue 439 I was testing against a CSV file that used UTF16 little endian encoding, also known as .

    1 min read
  5. SQLite timestamps with floating point seconds

    Today I learned about this: Which outputs: Note the seconds component which reads - that's what you get from the format string.

    1 min read
  6. Promoting the stable version of the documentation using rel=canonical

    I was thinking about documentation SEO today. Like many projects, Datasette offers multiple versions of the documentation: - https://docs.datasette.io/en/latest/ is the latest branch on GitHub -…

    1 min read
  7. Querying for GitHub issues open for less than 60 seconds

    While writing this thread about my habit of opening issues and closing them a few seconds later just so I could link to them in a commit message I decided to answer the question "How many of my issues…

    1 min read
  8. Using S3 triggers to maintain a list of files in DynamoDB

    This is a three-quarters-baked experiment that I ran this morning. I'm interested in efficiently tracking which new files have been added to an S3 bucket, where that bucket could potentially hold…

    6 min read
  9. The most basic possible Hugo site

    With Claude's help I figured out what I think is the most basic version of a static site generated using Hugo.

    2 min read
  10. Listing files uploaded to Cloud Build

    Today while running I noticed the following: indicates a Google Cloud Storage bucket. Can I see what's in that bucket? Turns out I can: The option adds the size information.

    1 min read
  11. Show the SQL schema for a PostgreSQL database

    This took me longer to figure out than I care to admit. pg dump -s name-of-database Surprisingly there doesn't seem to be an easy way to do this using a statement within PostgreSQL itself.

    1 min read
  12. Using the ChatGPT streaming API from Python

    I wanted to stream the results from the ChatGPT API as they were generated, rather than waiting for the entire thing to complete before displaying anything.

    1 min read
  13. JavaScript date objects

    A few notes on JavaScript object, based on trying to do some basic things with them in Observable notebooks.

    1 min read
  14. Python packages with pyproject.toml and nothing else

    I've been using and 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 or pip-tools or Poetry or…

    5 min read
  15. Tailing Google Cloud Run request logs and importing them into SQLite

    The CLI tool has the alpha ability to tail log files - but it's a bit of a pain to setup. You have to install two extras for it.

    2 min read
  16. Trying out Python packages with ipython and uvx

    I figured out a really simple pattern for experimenting with new Python packages today: This command will work if you have uv installed and nothing else.

    1 min read
  17. os.remove() on Windows fails if the file is already open

    I puzzled over this one for quite a while this morning. I had this test that was failing with Windows on Python 3.11: The test checks that the option to my constructor deletes and re-creates the file.

    1 min read
  18. Verifying your GitHub profile on Mastodon

    Mastodon has a really neat way of implementing verification, using the rel=me microformat. You can edit your Mastodon profile and add up to four links to it.

    2 min read
  19. Querying for items stored in UTC that were created on a Thursday in PST

    This came up as a question on Hacker News. How can you query a SQLite database for items that were created on a Thursday in PST, when the data is stored in UTC?

    1 min read
  20. Running Dolly 2.0 on Paperspace

    Dolly 2.0 looks to be a big deal. It calls itself "the first open source, instruction-following LLM, fine-tuned on a human-generated instruction dataset licensed for research and commercial use." I've…

    2 min read
  21. Trying out free-threaded Python on macOS

    Inspired by py-free-threading.github.io I decided to try out a beta of Python 3.13 with the new free-threaded mode enabled, which removes the GIL.

    2 min read