Projects

Black Hole Shadows

Github: neiro-data/Black-Holes-Shadows

A Python ray tracer that draws black-hole shadows and gravitational-lensing images (Schwarzschild with a massive disk, and spinning Kerr black holes). Old, disorganized research code, organized and improved with Claude Code.

Black Hole Shadows: introduction and one-shot effort

How one prompt turned dozens of duplicated, uncommented research files into a clean Python package, and how the ray tracer works: one light ray per pixel is integrated through the spacetime and ends in the shadow, on the thin disk, or in the lensed sky.

Speeding up the image generation with Apple Silicon GPU

Taking the code to the next level: seeting up the Apple Silicon GPU backend, which traces rays 20 to 60 times faster than the CPU (a 2048 × 2048 image in 6 to 11 seconds), plus the explanation of how to deal with its accuracy and the smaller improvements that came with it.

Claude Code Session Analytics

Github: neiro-data/analyze-claude-sessions

A local, offline analytics stack for your Claude Code transcripts: token, cache and cost dashboards and sub-agent lineage.

Claude Code Session Analytics: where do my tokens go?

What the tool measures and how it works: Claude Code transcripts loaded into PostgreSQL and shown in four Grafana dashboards, fully offline. Three months of my own usage: almost 2 billion input tokens, 96.74% of them cache reads, and a quarter of them used by sub-agents I never saw.

Using Grafana to analyze your Claude Code usage

Four Grafana dashboards built as layers: start from where your tokens go, replay one session call by call to find the cache misses, then put chains of sessions back together to see what a whole piece of multi-agent work really cost. Everything is provisioned as code and read-only.

Token accounting: what Claude Code really used

How the tool counts tokens and cost, and where the first version got it wrong: why the transcript, not the session, is the reliable unit of measure; how 8,684 sub-agent calls were credited to the wrong session and then corrected; why /stats reports roughly twice the deduplicated total (956 M vs 468 M tokens over 30 days); and how cost is estimated from dated API list prices.

Asking my Claude usage data questions in plain English

Plain-English questions matched to a curated SQL catalog with local embeddings: recall@1 93.3% on a held-out set, refusing instead of guessing, and a read-only access to the database.

Useful Tools

Github: neiro-data/useful-tools

A collection of small tools for day-to-day use, each one an independent project.
Most of them are Python projects managed with uv. All of them run locally.

Time Tracker App

A personal time tracker that runs only locally, with all the data in one SQLite file: live timer, Today, Week and Month views. Creates reports with charts and a rule-based narrative, and exports to HTML, Markdown, PDF and CSV. Built with a Claude Code agent pipeline.

Webpage Time Limiter

A free userscript for Chrome and Safari that sets a daily time limit for each site you choose. It counts only the time you actually spend on the page, and it nudges harder the longer you stay past the limit: an overlay, a delayed Dismiss, then a gray page and paused videos. With a step-by-step installation guide.

Face Blur

An offline tool that blurs faces in a photo on your own computer. Use one command, or a local web page where you click faces on or off and draw extra boxes. Choose blur, pixelate or a solid fill. Nothing is uploaded, and the output has no metadata (EXIF).

Portugal Public Contracts (BASE)

Github: neiro-data/portal-base-data-analysis

A data pipeline for Portugal’s public procurement. BASE has no API, so the tool downloads the yearly exports from dados.gov.pt, checks and cleans them, and loads 2.3 million contracts (2012–2026, €159bn) into PostgreSQL with six Grafana dashboards.

Portugal Public Contracts: what it does and how to install it

What the tool does, how the pipeline works (download, raw and treated parquet, PostgreSQL, Grafana), how to install it, the size of the 2012–2026 data, and the first findings: direct awards are 58% of the contracts but 22% of the value, and 10% of the contracts have no identified winner.