Skip to content

Instantly share code, notes, and snippets.

View txoof's full-sized avatar

Aaron Ciuffo txoof

View GitHub Profile
@txoof
txoof / publishing_docker_GHCR.md
Last active April 23, 2026 12:08
Publishing a Docker Image to GHCR as a Team

Publishing a Docker Image to GHCR as a Team

A step-by-step guide for team members to authenticate with GitHub Container Registry (GHCR) and push Docker images to the organisation namespace.

Prerequisites

  • Docker Desktop installed and running
  • A GitHub account that is a member of BredaUniversityADSAI
  • A Dockerfile at the project root
@txoof
txoof / containerizing.md
Created April 21, 2026 13:57
Containerizing Simple Python Package with Docker and GHCR

Containerising a Python Package with Docker and GHCR

A step-by-step guide to containerising a Python package, publishing the image to GitHub Container Registry (GHCR), and making it easy for teammates to run locally.

Prerequisites

  • Docker Desktop installed and running
  • A GitHub account
  • A Python package managed with Poetry
@txoof
txoof / poetry_pypi.md
Last active April 21, 2026 11:56
Publishing to PyPi with Poetry

Publishing a Python Package to TestPyPI with Poetry

Prerequisites

  • Poetry installed
  • TestPyPI account with 2FA enabled
  • TestPyPI API token

One-time Setup

@txoof
txoof / 00_sphinx_setup.md
Last active April 21, 2026 10:42
Sphinx Setup Guide for Python Packages with a Python `src` Layout

Sphinx Setup Guide for Python Packages with a Python src Layout

This guide walks through setting up automatic Sphinx documentation for a Python package using a src layout. At the end, running make docs generates complete API reference documentation from docstrings without any manual maintenance.

Prerequisites

  • Python 3.10+
  • Poetry installed
  • A repository with this minimum structure:
@txoof
txoof / clearml_setup.md
Created December 12, 2025 07:41
Setting up ClearML Projects for RL Training

ClearML Remote Training with GitHub

Problem

ClearML remote workers clone your repository in an isolated environment.
They do not have access to your local SSH keys, SSH config, or GitHub login state.

This commonly causes jobs to fail with errors like:

@txoof
txoof / gymnasium_tutorial.md
Created December 2, 2025 09:07
Getting Started with Gymnasium

Getting Started with Gymnasium: Updated Tutorial

Original Tutorial: Getting Started With OpenAI Gym: The Basic Building Blocks by DigitalOcean

Updated for Gymnasium by: Claude (Anthropic) in collaboration with the course materials from ADS-AI program at Breda University of Applied Sciences

Last Updated: December 2024


@txoof
txoof / recover_crashed_training_with_wandb.md
Created November 29, 2025 11:24
Recovering from Crashed Training Sessions with Weights & Biases

Recovering from Crashed Training Sessions with Weights & Biases

When training deep learning models, session crashes are inevitable (kernel restarts, OOM errors, connection issues). Here's how to recover your work when using Weights & Biases for experiment tracking.

Key Advantage of W&B

W&B saves metrics in real-time - even if your session crashes, all training history up to that point is preserved on W&B servers. You don't lose your work.

Setup: Ensure Reliable Model Checkpointing

@txoof
txoof / install_pybullet.md
Created November 25, 2025 10:48
Installing PyBullet on macOS Sequoia (15.x) with Apple Silicon

Installing PyBullet on macOS Sequoia (15.x) with Apple Silicon

TL;DR

PyBullet fails to install on macOS Sequoia due to C++ compiler incompatibilities. Install an older LLVM compiler via Homebrew and use it to build pybullet:

brew install llvm@16
export PATH="/opt/homebrew/opt/llvm@16/bin:$PATH"
export CC="/opt/homebrew/opt/llvm@16/bin/clang"
@txoof
txoof / avoid_exploding_loss.md
Last active November 8, 2025 06:43
Avoiding Exploding Loss in Tensor Metal

Issue: Exploding Loss for Simple TensorFlow Metal Models

TL;DR: Add BatchNormalization() layer before final dense layer to fix exploding loss on Apple Silicon. Alternatively, use mixed_precision.set_global_policy('float32') for a quick one-line fix.


Problem Description

IMPACTED VERSIONS

  • Python: 3.11.9
@txoof
txoof / py3_re_cheat_sheet.md
Created August 20, 2025 09:41
Python 3 RE Cheat Sheet

Regex Cheat Sheet (Python re)

Basics

Pattern Meaning
. Any character except newline (unless re.DOTALL)
^ Start of string (or start of line if re.MULTILINE)
$ End of string (or end of line if re.MULTILINE)
\A Start of string (ignores MULTILINE)
\Z End of string (ignores MULTILINE)