Notes on software engineering

Archive / page 11

201–220 of 550 posts, newest first.

  1. 2024
  2. GUnion to combine geometries in SpatiaLite

    I was playing around with datanews/amtrak-geojson, which provides GeoJSON for Amtrak stations and track segments.

    1 min read
  3. How to ask questions

    admin only: false HOW TO ASK QUESTIONS THE SMART WAY Original Authors: Eric S. Raymond, Rick Moen Version: 1.0 (Adapted) Original Copyright © 2001-2014 Eric S.

    8 min read
  4. Calculating the size of all LFS files in a repo

    I wanted to know how large the deepseek-ai/DeepSeek-V3-Base repo on Hugging Face was without actually downloading all of the files. With some help from Claude, here's the recipe that worked.

    1 min read
  5. migrations.RunSQL.noop for reversible SQL migrations

    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…

    1 min read
  6. Running gdb against a Python process in a running Docker container

    While investigating Datasette issue 1268 I found myself with a Python process that was hanging, and I decided to try running against it based on tips in Debugging of CPython processes with gdb Here's…

    1 min read
  7. Using the tesseract CLI tool

    Tesseract OCR has a command-line utility which is woefully under-documented. Thanks to Alexandru Nedelcu I figured out how to use it today.

    1 min read
  8. Adding a robots.txt using Cloudflare workers

    I got an unexpected traffic spike to https://russian-ira-facebook-ads.datasettes.com/ - which runs on Cloud Run - and decided to use to block crawlers.

    1 min read
  9. kubectl proxy

    Learned about this today as a way of accessing the Kubernetes REST API. Assuming you have setup and authorized against a cluster (I'm using DigitalOcean K8S) you can start a proxy for talking to the…

    1 min read
  10. Combining substr and instr to extract text

    Derek Willis has a Datasette instance full of political campaign emails running on Heroku. Matt Hodges pointed out that a lot of these emails include codes, which are used by ActBlue campaigns to…

    1 min read
  11. Removing a git commit and force pushing to remove it from history

    I accidentally triggered a commit which added a big chunk of unwanted data to my repository. I didn't want this to stick around in the history forever, and no-one else was pulling from the repo, so I…

    1 min read
  12. Creating a dynamic line chart with SVG

    I helped build the tide chart visualizations for Rocky Beaches. I wanted to generate an SVG line representing 24 hours of tide levels.

    2 min read
  13. Reading thermometer temperatures over time from a video

    Natalie has been experimenting with using a microwave as a kiln for pottery, specifically for Raku. She wanted to understand how long to run the microwave to reach the desired temperature for the Raku…

    3 min read
  14. Avoiding "length" errors in Apache Bench with the -l option

    I was using the Apache Bench command to exercise some new code I'm writing in Datasette and I noticed I was getting a lot of errors: Truncated output: What's with the 953 failed requests?

    1 min read
  15. How to deploy a folder with a Dockerfile to Cloud Run

    I deployed https://metmusem.datasettes.com/ by creating a folder on my computer containing a Dockerfile and then shipping that folder up to Google Cloud Run.

    1 min read
  16. Testing cookiecutter templates with pytest

    I added some unit tests to my datasette-plugin cookiecutter template today, since the latest features involved adding a script. Here's the full test script I wrote.

    1 min read
  17. Collecting replies to tweets using JavaScript

    I ran a survey on Twitter the other day to try and figure out what people mean when they use the term "agents" with respect to AI.

    1 min read
  18. Importing CSV data into SQLite with .import

    I usually use my command to import CSV data into SQLite, but for large CSV files (like a 750MB one) this can take quite a long time - over half an hour in this case.

    1 min read
  19. Increasing the time limit for a Google Cloud Scheduler task

    In VIAL issue 724 a Cloud Scheduler job which triggered a Cloud Run hosted export script - by sending an HTTP POST to an endpoint - was returning an error.

    1 min read
  20. Using C_INCLUDE_PATH to install Python packages

    I tried to install my datasette-bplist plugin today in a fresh Python 3.10 virtual environment on macOS and got this error: Thanks to StackOverflow I figured out a workaround.

    1 min read
  21. Using psutil to investigate "Too many open files"

    I was getting this intermittent error running my Datasette test suite: OSError: Errno 24 Too many open files To figure out what was going on, I used the package and its method.

    1 min read