Advertisement
Open Source Projects by Phil Schwartz

Articles

Understanding Roulette With 38 Numbers For Australian PlayersRoulette with 38 numbers refers to the American wheel, which contains the numbers 1 through 36 plus a single zero and a double zero. That extra green pocket…
File locking with Python fcntl in multi-process systemsWhen several Python processes need to touch the same file at the same time, the outcome is rarely pretty. A worker in Brisbane might be appending a JSON record…
Building a Python interactive shell for a small databaseWorking from a home office in Brisbane often means juggling a few side projects alongside client work, and lately I've been tinkering with a bespoke…
Gracefully Stopping a Python Daemon with the signal ModuleA long-running daemon rarely lives in isolation. It usually sits behind a systemd unit, a container, or a small supervisor script, and somewhere in that…
Building a Python script to harvest and analyse HTTP headersHTTP headers travel with every request and response that crosses the web, carrying metadata that reveals how a server is configured, what software powers it,…
Building a Python Filename Sanitizer for Windows, macOS and LinuxCross-platform development is something Australian engineers grapple with constantly. A script written on a MacBook in Surry Hills might end up running on a…
How I built a Python command-line tool to diff two JSON structuresComparing JSON files sounds simple until the documents become large, deeply nested, or generated by different systems. A line-by-line comparison quickly…
Building a Precision Execution Timer with PythonMeasuring how long a Python operation takes sounds simple, yet reliable timing requires more care than subtracting two clock readings. Wall-clock time can…
Building a Python Detector for Rogue DHCP ServersA rogue DHCP server can quietly redirect devices to the wrong gateway, DNS resolver, or network segment. It may be caused by a misconfigured access point, an…
A practical Python rate limiter for CLI applicationsA command-line tool can overwhelm an API surprisingly quickly. A shell loop, parallel job, or retrying script may send hundreds of requests before a user…