Skip to content

Instantly share code, notes, and snippets.

@jonathanagustin
jonathanagustin / colab2pdf.py
Last active October 30, 2025 17:19
Convert Google Colab Notebook to PDF
# @title Convert Notebook to PDF. Save Notebook to: `/content/drive/MyDrive/Colab Notebooks'
NOTEBOOK_NAME = "notebooke.ipynb" # @param {type:"string"}
#------------------------------------------------------------------------------#
from google.colab import drive
drive.mount("/content/drive/", force_remount=True)
NOTEBOOKS = "/content/drive/MyDrive/Colab Notebooks"
NOTEBOOK_PATH = f"{NOTEBOOKS}/{NOTEBOOK_NAME}"
assert os.path.exists(NOTEBOOK_PATH), f"NOTEBOOK NOT FOUND: {NOTEBOOK_PATH}"
!apt install -y texlive-xetex texlive-fonts-recommended texlive-plain-generic
!jupyter nbconvert "$NOTEBOOK_PATH" --to pdf
@jonathanagustin
jonathanagustin / keybase.md
Last active October 18, 2025 02:06
keybase.md

Keybase proof

I hereby claim:

  • I am jonathanagustin on github.
  • I am drengskapur (https://keybase.io/drengskapur) on keybase.
  • I have a public key whose fingerprint is 6DED 1D8C 4F9A 4376 7394 C58A 0C80 E974 9273 65DE

To claim this, I am signing this object:

@jonathanagustin
jonathanagustin / notes.md
Last active October 3, 2025 09:04
consul research notes

Research Notes

Connection Refused Error

When deploying microservices in Kubernetes, one might encounter this error:

upstream connect error or disconnect/reset before headers. reset reason: connection failure, 
transport failure reason: delayed connect error: 111
@jonathanagustin
jonathanagustin / setup.sh
Created September 3, 2025 17:10
TAK Server Setup Script
#!/bin/bash
color() {
STARTCOLOR="\e[$2";
ENDCOLOR="\e[0m";
export "$1"="$STARTCOLOR%b$ENDCOLOR"
}
color info 96m
color success 92m
color warning 93m
@jonathanagustin
jonathanagustin / bootstrap.py
Last active June 30, 2024 11:26
Bootstrap Google Colab
%matplotlib inline
def bootstrap():
# @title Bootstrap Google Colab {display-mode:"form"}
# CONFIGURE: Parameters
GOOGLE_DRIVE_FOLDER = "my_folder" # @param {type:"string"}
GitHub = True # @param {type:"boolean"}
OpenAI = True # @param {type:"boolean"}
HuggingFace = True # @param {type:"boolean"}
@jonathanagustin
jonathanagustin / Kubernetes Resource Extractor.md
Last active June 6, 2024 05:56
Kubernetes Resource Extractor

Resource Extractor

This Go application parses the output of a helm template or kubectl kustomize command and extracts resource information, generating a CSV file with the extracted data.

Prerequisites

  • Go (version 1.17 or later)
  • Helm (version 3 or later) (if using Helm)
  • kubectl (if using Kustomize)
@jonathanagustin
jonathanagustin / install-autogluon-colab.py
Last active May 31, 2024 02:47
Install autogluon on Google Colab
%%capture
# ---------------------------------------------------------------------------- #
# @title Install autogluon on Google Colab { display-mode: "form" }
# ---------------------------------------------------------------------------- #
import contextlib
with open('/content/install-autogluon.log', 'w') as f:
with contextlib.redirect_stdout(f):
%pip install uv
!git clone --recurse-submodules --depth=1 https://github.com/autogluon/autogluon.git
!uv pip install --system -e /content/autogluon/common/
@jonathanagustin
jonathanagustin / install-auto-sklearn-colab.py
Last active May 31, 2024 02:46
Install auto-sklearn on Google Colab
%%capture
# ---------------------------------------------------------------------------- #
# @title Install auto-sklearn on Google Colab { display-mode: "form" }
# ---------------------------------------------------------------------------- #
import contextlib
with open('/content/install-auto-sklearn.log', 'w') as f:
with contextlib.redirect_stdout(f):
%pip install uv
!uv pip install --system Cython==0.29.36 pyparsing==2.4
!uv pip install --system -r https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt
@jonathanagustin
jonathanagustin / git-lfs-track.py
Created May 26, 2024 15:40
Git LFS Track Files Over a Threshold (Default is 100MB)
#!/usr/bin/env python3
import subprocess
from pathlib import Path
SKIP_LIST = [
".git",
"build",
"venv",
".venv",
"node_modules",
print("Hello, World!")