Skip to content

Instantly share code, notes, and snippets.

View birkin's full-sized avatar

Birkin James Diana birkin

View GitHub Profile
@birkin
birkin / code4lib_2026_highlights.md
Last active March 12, 2026 13:31
personal highlighs of the code4lib-2026 conference

code4lib-2026 highlights

Notes:

  • not all talks are listed -- this is just my highlights
  • below contains my raw quick-typed notes, with a Summary of what resonated for me

Day 1 — March 2, 2026

@birkin
birkin / manual_transform.py
Last active March 10, 2026 02:29
script that takes a path or url to a source-inscription and a stylesheet -- and applies the transform.
# /// script
# requires-python = ">=3.8, <3.9"
# dependencies = [
# "httpx~=0.28.0",
# "lxml~=6.0.2.0",
# ]
# ///
"""
@birkin
birkin / api_example_01.py
Created February 25, 2026 15:51
demo script for code4lib-2026 talk on `uv`
# /// script
# requires-python = ">=3.12, <3.13"
# dependencies = [
# "httpx==0.28.1",
# ]
# ///
import httpx
@birkin
birkin / mysql_to_tsv.sh
Last active January 26, 2026 01:44
Script to export all non-view db-tables from a MySQL database to TSV files.
#!/usr/bin/env bash
# Script to export all tables (other than "views") from a MySQL database to TSV files.
# You'll be prompted for the password for each export.
# WILL overwrite existing files in the output directory.
set -euo pipefail # ensures pipeline fails if any command in the pipeline fails
# user-configurable variables ---------------------------------------
MYSQL_BIN="/PATH/TO/mysql"
@birkin
birkin / CALLEE.sh
Created January 7, 2026 22:15
backup CALLEE file for uv-toml projects
#!/bin/bash
## assumes `uv` is installed and available in PATH
## Usage: `bash ./CALLER.sh`, which sets vars and then runs `source /path/to/CALLEE.sh`
## helper code ------------------------------------------------------
## function for calls below
function reset_group_and_permissions () {
@birkin
birkin / AGENTS.md
Last active January 19, 2026 12:46
Instruction-file for both github-copilot and IDE-agents.

AGENTS.md — Repository Agent Instructions (Source of Truth)

This file defines the canonical coding directives for this repository.

If other instruction files exist (Copilot, IDE rules, contributor docs) and conflict with this file, follow this file and treat the others as stale.

Project basics

  • Primary language: Python
@birkin
birkin / cds_spacy_anything.py
Created November 20, 2025 13:49
cds_spacy_anything
# /// script
# requires-python = "==3.12.*"
# dependencies = [
# "spacy~=3.8.0",
# "en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl"
# ]
# ///
import argparse
from collections import Counter
@birkin
birkin / cds_spacy_example.py
Last active November 20, 2025 12:42
demoing uv remote execution
# /// script
# requires-python = "==3.12.*"
# dependencies = [
# "spacy~=3.8.0",
# "en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl"
# ]
# ///
from collections import Counter
@birkin
birkin / hello_world.py
Created November 20, 2025 11:33
temp-testing
print( 'Hello World' )
@birkin
birkin / load_boatload_via_ajax.html
Last active October 15, 2025 13:52
javascript showing two approaches to loading lots of images -- but only a few at a time
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Thumbnail Loader — Ordered Queue & Viewer-Aware Queue</title>
<style>
:root { --gap: 10px; --bg: #0b1020; --card: #11172a; --ink: #e8ecff; --muted: #a6b0d9; }
html, body { margin:0; padding:0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; }
header { position: sticky; top: 0; z-index: 5; background: linear-gradient(180deg, rgba(11,16,32,.96), rgba(11,16,32,.8)); border-bottom: 1px solid #223; }