Blog

How to Add Login and a Paywall to a Streamlit App

April 02, 2026

Using Stripe + Streamlit for a simple paywalled application

Read →

Why Reading Parquet from S3 Is Slow (Even In-Network) and What I Did Instead

April 01, 2026

S3 in-network reads still have a ~300ms latency floor. Downloading parquet files to ephemeral disk at startup gave me local-disk speeds (~3ms) for free on Railway.

Read →

Optimising Query Transformations for Retrieval: A Negative Result

January 09, 2026

Could some form of derivative-free optimisation help with transforming retrieval queries for better RAG?

Read →

Polymarket Balance/Allowance Error: A Fractional Shares Problem?

October 07, 2025

An issue I ran into and some findings. Still not fully sure.

Read →

Integrating Pydantic AI with Streamlit: Async Challenges and Fragment Optimisations

September 07, 2025

Trying to use Streamlit's nice chat UI with Pydantic AI

Read →

Pydantic AI Output Validators: Runtime Validation with Dependencies

July 15, 2025

Using Pydantic AI's output validators for runtime validation that depends on context, with automatic retry handling when validation fails.

Read →

Building a Caching System with FastHTML

April 11, 2025

Enable high performance dashboards/APIs by caching precomputed recent data.

Read →

Stock Embeddings - Learning Distributed Representations for Financial Assets

April 08, 2025

Identifying meaningful relationships between the price movements of financial assets is a challenging but important problem in finance. While recent machine learning research often focuses on price forecasting, modeling asset correlations has lagged. Inspired by successes in natural language processing (NLP), we propose a neural model for training *stock embeddings*. This model uses historical returns data to learn nuanced relationships between financial assets. We describe our approach, discuss its potential applications, and present evaluation results demonstrating its utility in real-world financial analytics tasks compared to benchmarks.

Read →

Triggering Multiple Routes from a Single Form - FastHTML & HTMX

March 23, 2025

Using hx-trigger and hx-include to improve page load times etc.

Read →

LSTM Networks | A Detailed Explanation

October 21, 2020

A Comprehensive Introduction to LSTMs. >100k views on Medium. Migrating to here after Toward Data Science moved away from Medium.

Read →