Posts
SQLite Basics: Register a Small Python Function for SQL Queries
Expose a pure Python label normalizer through create_function, handle NULL deliberately, and check per-connection registration.
October 30, 2026
SQLite Basics: Open an Existing Database Read-Only with a File URI
Build an escaped file URI, reject accidental writes with mode=ro, and avoid creating a database when the path is wrong.
October 30, 2026
SQLite Basics: Observe a Stable Reader Snapshot in WAL Mode
Use two local SQLite connections to show why a reader keeps its old snapshot after another connection commits.
October 30, 2026
SQLite Basics: Compute a Grouped Weighted Mean with a Python Aggregate
Register a two-argument aggregate, keep separate group state, and define missing-value and zero-weight behavior.
October 30, 2026
SQLite Basics: Bound Generated Queries with Connection Runtime Limits
Lower the placeholder limit on one SQLite connection, observe a rejected statement, and restore the original limit.
October 30, 2026
Python Basics: Run a Spawned Worker with Explicit Result Handling
Start a Python worker with the spawn context, receive a small result through a one-way pipe, and check child completion.
October 30, 2026
Python Basics: Round-Trip PCM Samples with wave
Write and read a tiny mono PCM WAV buffer, checking sample width, frame count, byte order, and end-of-stream behavior.
October 30, 2026
Python Basics: Inventory Directory Entries Without Following Symlinks
Use os.scandir to distinguish regular files, directories, and symbolic links in a small Linux directory inventory.
October 30, 2026
Python Basics: Decode UTF-8 Across Chunk Boundaries
Keep partial UTF-8 characters between byte chunks with an incremental decoder, and detect truncated input at the end.
October 30, 2026
Python Basics: Check Simple Crawl Rules with urllib.robotparser
Parse an in-memory robots.txt fixture and inspect path permissions, crawl delay, request rate, and sitemap declarations.
October 30, 2026