August 17, 2025
Permutation test for binomial data
Based on Jake Vanderplas' presentation Statistics for Hackers video, section 2 Shuffling It's almost the same setup as in the presentation, the only missing piece is how to break down binomial data into individual examples (Bernoulli trials). One way is to represent it with a sequence of k 1s and (n - k) 0s. For example, n=5, k=2 could...
Read more
Read more
July 28, 2025
Application factory pattern in jupyter notebooks
After working with jupyter notebooks for a while, I faced an annoying boilerplate code migrating from notebook to notebook: import pandas as pd import numpy as np import seaborn as sns from pyspark.sql import SparkSession clickhouse = create_engine(…) spark = SparkSession.builder.appName(app_name).getOrCreate() minio = boto3.client("s3...
Read more
Read more
June 4, 2025
Cost-Effective IoT Data Processing on a Shoestring Budget
A friend running a pre-revenue startup asked me how to collect and analyze IoT data affordably. With a tight budget, the challenge was to build an efficient, scalable solution without breaking the bank. Here's a streamlined approach that delivers robust performance at minimal cost. Traditional Approach A typical IoT data pipeline might...
Read more
Read more
May 3, 2025
Low-Latency Bayesian Inference: Deploying Models with PyTorch and ONNX
Deploying Bayesian models in production often requires balancing predictive accuracy with low-latency inference. A common approach is to use inference data from PyMC and perform pm.sample_posterior_predictive. While effective, this method typically takes seconds, which is unacceptable when latency requirements are in milliseconds. Alte...
Read more
Read more
January 29, 2025
The Phenomenon of No-Performers
Over the past few weeks, I’ve been working on a project that involves collaborating with a team I didn’t personally hire. What I experienced was nothing short of cultural shock. It took me a while to even grasp how this was possible. I call it the no-performer phenomenon. So, what is a no-performer? A no-performer is someone who contri...
Read more
Read more
January 3, 2025
A short story on the importance of details in a contract. Spanish edition.
Llivia, a small exclave of Spain inside France, exists due to historical treaties and political arrangements dating back to the 17th century. Key Reasons: 1. Treaty of the Pyrenees (1659) • This treaty ended the Franco-Spanish War (1635–1659), and Spain ceded several territories in the northern Catalonia region to France. 2. Treaty of ...
Read more
Read more