September 22, 2026/5 min readFlat image in, living character outIn short: give the pipeline a JPG or PNG of a character and it produces a layered rig plus a small web player that breathes, blinks, shows emotion and lip-syncs to a real voice. The steps are…
June 16, 2026/5 min readWarm intros from a graph: shortest path between two peopleIn short: put people and the organisations they belong to in one graph, and "who can introduce me" becomes a shortest-path query. I built a small demo of this on public Wikidata records for about six…
March 10, 2026/5 min readIngesting a country's law when every province has its own formatIn short: Canada's legislation lives on a different website for nearly every province and territory, as PDFs, Word files, an XML API and plain web pages. When a product depends on that text, the…
December 16, 2025/5 min readRules vs transformers for extracting metadata from legal documentsIn short: on the same Spanish-language legal documents, the transformer path was more accurate and slower. The rules were fast, cheap and easy to explain. I kept both: rules by default, the…
November 18, 2025/5 min readRewriting a Next.js backend in Python without users noticingIn short: I moved an app's API out of Next.js routes and into a FastAPI service one endpoint at a time, keeping every request and response shape the same, and only pointed the frontend at the new…
November 4, 2025/5 min readStreaming speech: where the latency actually goesIn short: in a voice pipeline that waits for each stage to finish, the first sound waits for the whole answer to be written and then spoken. Streaming doesn't make any stage faster. It lets the stages…
October 21, 2025/4 min readA voice assistant in a weekend: LLM to speech over WebSocketsIn short: a working voice assistant is one WebSocket, one language model call and one text-to-speech call, in that order. I built one in a weekend with FastAPI and OpenAI's APIs. It works, it's…
August 26, 2025/5 min readSelecting papers for a review without reading all of themIn short: export every search hit as a .bib file, let a language model screen titles and abstracts against written criteria, then hand-check a random sample to see how often it's right. The model…
July 1, 2025/5 min readAgents with opinions: a weekend multi-agent buildIn short: I built a small stock analyzer where five agents, each with a fixed investing style, look at the same company and give their own reading. The per-agent outputs are not the interesting part.…
May 6, 2025/5 min readData that doesn't match across sitesIn short: when several sites collect "the same" data, the columns share names and almost nothing else. Before any model, write one data dictionary, map every site to it in code, and check the result…
March 11, 2025/5 min readAudio preprocessing that matters more than the modelIn short: on medical audio, the steps before the model decide most of what the model can learn. Resampling, trimming, filtering, fixed-length windows and a split by patient each remove a shortcut the…
January 14, 2025/5 min readMerging two sensor streams that tick at different ratesIn short: to put a 100 Hz signal and irregular detections on one 10 Hz clock, summarise the dense stream per bin, count and carry forward the sparse one, and make sure no bin ever sees a sample from…
November 19, 2024/5 min readMaking a Sankey diagram people actually readIn short: a Sankey diagram works when a reader can follow one flow from left to right without reading a legend. Most unreadable ones fail on the same three things: too many nodes, an order nobody…
November 5, 2024/4 min readReal-time transcription on a laptop: what Whisper gets wrongIn short: live on a laptop, Whisper invents text in silence, repeats itself, transcribes your speakers, cuts words at chunk edges and mangles names. Most of the fixes sit around the model, not in it:…
September 10, 2024/4 min readExperiment tracking I actually keep usingIn short: I use DVC to version data, MLflow to record runs and models, and Weights and Biases when I want to watch a long training live or share charts. What makes them useful is one habit: every run…
August 13, 2024/5 min readDoing ML in a field that runs on R and SPSSIn short: psychiatry researchers trust R and SPSS because they've checked those tools for years. Python output earns the same trust when it reproduces a result they already know, comes back in the…
March 2, 2020/6 min readCOVID-19 Detection with ML and CXR | تشخیص کرونا توسط یادگیری ماشین و CXRIn short: when Iran ran short of COVID-19 test kits, I built a demo that looks at a chest X-ray and tells a normal lung from an abnormal one. Full Keras code below. زمانیکه شروع به ساخت این برنامه…