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.
Notes on software engineering
361–380 of 550 posts, newest first.
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.
If you copy and paste from a web page - including a full table - into a GitHub issue comment GitHub converts it to the corresponding Markdown for you. Really quick way to construct Markdown tables.
A few notes on JavaScript object, based on trying to do some basic things with them in Observable notebooks.
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…
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.
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.
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.
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.
redbean is a fascinating project - it provides a web server in a self-contained executable which you can add assets (or dynamic Lua code) to just by zipping them into the same binary package.
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?
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…
To my surprise, if you setup a Cloudflare caching proxy in front of a website it won't cache HTML pages by default, even if they are served with headers.
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.
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.
I started exploring WebAuthn today - a set of browser standards that adds support for both Yubikey 2FA hardware devices and "platform" authentication using things like Touch ID and Face ID.
My iPhone has a weird bug: I can no longer re-arrange the app icons on the home screen (or in the dock) by dragging them around on my phone.
I've been playing around with the Mastodon timelines API. It's pretty fun! I'm running my own instance which means I don't feel limited by politeness in terms of rate limits - if I'm just using my own…
Given a table with a column in SQLite I want to figure out if every value in that table is actually the text representation of an integer or floating point value, so I can decide if it's a good idea…
For datasette issue 1802 I needed to run my test suite using a specific version of Python 3.7. I decided to do this using Docker, using the official python:3.7-buster image.
I've been wanting to figure out how to do this for years. Today I finally put all of the pieces together for it. AWS Lambda can host functions written in Python.