Skip to content

Instantly share code, notes, and snippets.

View txoof's full-sized avatar

Aaron Ciuffo txoof

View GitHub Profile
@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)
@txoof
txoof / multiple_profiles.md
Last active November 19, 2024 09:11
Multiple GitHub Profiles

Introduction

Enable working with multiple github profiles on the command line using multiple SSH keys.

Create SSH Keys

From the command line, generate an SSH key for each account to be accessed. Do this with care as you may already have an ssh key in use.

Generate ssh key pairs for accounts and add them to GitHub accounts. Do this with care; there may already be existing SSH keys in the local ~/.ssh/ directory. You will need one SSH key per GitHub identity. It is only necessary to generate keys for identities that do not yet exist.

@txoof
txoof / conda_setup.md
Last active July 22, 2024 11:08
Bootstrap miniconda Jupyter development environment on Windows

Bootstrap a Miniconda/Anaconda Environment

Bootstrap a *conda development environment for jupyter lab development using multiple environments and kernels under windows 11.

This will allow the use of multiple kernels from a single Jupyter Lab session. Each notebook or project can run within a specific python virtual environment by using the kernel drop-down menu within the notebook. This helps avoid dependency conflicts between various libraries and allows multiple different python, ane even R versions symultaniously.

This is particularly useful if you:

  • Need to run an older verison of Python for legacy projects
  • Need to use conflicting versions of librarys such as PIL and pillow
@txoof
txoof / pdf_rmN.md
Last active May 29, 2025 16:09
PDF to Editable Remarkable Notebook (Mac OS)

Converting a PDF to an editable reMarkable Notebook

Use case: Working with PDF text books, it can be helpful to be able to extract problems and images to use in notes and when working problemsets on the reMarkable tablet.

These instructions are MacOS centric, but should be reproducable on most platforms as the tools are fairly platform agnostic.

Requirements

  • homebrew - package manager for installing components
  • DrawJ2d - Convert PDF to remarkable notebook (rmn) format
@txoof
txoof / spocon.md
Last active August 10, 2025 13:26
Install SpoCon on BookWorm and Later if Installer Fails

Installer Failure Modes

Failure: Unmet Dependendencies

Open JDK 8, 11 are unavailable for Bookworm and later

The following packages have unmet dependencies:
 spocon : Depends: openjdk-11-jre but it is not installable or
                   openjdk-8-jre but it is not installable
@txoof
txoof / PowerQuery_Notes.md
Last active February 14, 2025 00:51
Guide for things that can and should not be done when creating power queries.

PowerQuery Creation Notes

Notes

Returned Column References

The columns section of the XML document refer to the columsn that will be offered in the Data Export Manager screens. The text of the column name is arbitrary and can be anything, but the <column column="TABLE.FIELD"> portion must refer to a "core" table of powerschool. When in doubt, use column="STUDENTS.ID" Avoid using DCID of any table in the column parameter as it might render the query disabled in DEM (grayed out). Reason being the DCID of most tables, starting with Students, is a non-editable identifier key even for system admin roles. Having DCID in SQL and in feild access is acceptable.