Quickly checking Python dependencies
A short snippet for using `uv` to iterate on changing Python project dependencies.
A short snippet for using `uv` to iterate on changing Python project dependencies.
How to add goatcounter analytics to a Next.js website.
Troubleshooting GPU configuration on GKE can be painful. I explain how to troubleshoot GPU configuration issues in Google Kubernetes Engine (GKE) when running PyTorch workloads, emphasizing the importance of ensuring compatibility between Nvidia drivers, CUDA, and PyTorch. I outline a systematic approach to debug and verify that the GPU is recognized within the container and that PyTorch can access the GPU resources correctly.
I've integrated Large Language Models (LLMs) into my workflows to automate developer activities. This improves my understanding of their capabilities. I provide practical use cases, including code review, file summarization, web page content extraction, and even analyzing running processes, illustrating the diverse applications of LLMs in my daily tasks.
Useful resources for sailing, specifically in the Solent.
I've implemented a process for recording the things I learn in the form of questions and answers, using the active recall technique. I document how I use the latex exam class to generate worksheets with and without the answers.
I demonstrate how to serve a TensorFlow model from Scala by serializing it to the ONNX format, allowing it to be utilized through the Java ONNX runtime. I provide a step-by-step guide on exporting a model and implementing the necessary logic in Scala to invoke it, highlighting key considerations and potential next steps for further development.
In this blog post, I explain how I implemented a GitHub Actions workflow to automate the updating of my Jekyll blog by building it and transferring files to my Droplet using `rsync`. I configured the workflow to trigger on pushes to the `gh-actions` branch and on pull requests to the main branch, ensuring efficient testing and deployment of changes.
I explain how to perform metaprogramming in Scala using Scalameta to generate case classes based on a dataset schema defined in a CSV file. I detail the process of transforming schema information into an Abstract Syntax Tree (AST) to create valid Scala code automatically, illustrating the solution with various code snippets.
I describe the process and rationale behind deploying my personal Jekyll blog using Terraform and Ansible, emphasizing the importance of simplicity and minimizing dependencies on external services. I also outline the architecture of my blog, the tools I used, and my future plans for automation and expansion of the deployment process.
Writing simple tests in Postgres without requiring extra dependencies.
Using org mode to generate documentation and infrastructure.
Literate programming with org-mode and sql.
I share a Python script that safely upserts Pandas DataFrames into a Postgres database using psycopg2, highlighting the importance of handling potential SQL injection risks. I explain the process of constructing SQL statements to manage inserts and updates based on specified constraints, while utilizing the `execute_batch` function for efficient batch processing.
Using scikit-learn and some Python features to set up a machine learning pipeline to quantify the efficiency of different classifers for classifying the movement of a stock price.
I wanted to use lower level linear algebra constructs in Python to calculate a covariance matrix.
A script illustrating how the memory usage of a pandas DataFrame can be reduced through altering data types.
Some useful Python packages and how they fit into my work.
Some notes on useful SQL commands and when they might be useful.
A review of different sources on when JSONB is suitable for use.
Useful resources for learning about data science.
Recovering point locations from vectors.
A review of the MIT 18.065 Spring 2018 opencourseware course, instructed by Gilbert Strang.
Some resources that I use to practice for passing coding interviews.
A review of numerical linear algebra for machine learning.
A review of mathematical concepts helpful for data science.
A review of the literature on uncertainty and sensitivity analysis when applied to optimisation models.