Skip to content

Instantly share code, notes, and snippets.

View foamdino's full-sized avatar
🏠
Working from home

Kev Jackson foamdino

🏠
Working from home
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 16, 2026 07:02
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@FreyaHolmer
FreyaHolmer / GpuPrinter.cginc
Last active January 17, 2026 01:28
A unity shader .cginc to draw numbers in the fragment shader - see the first comment below for example usage!
///////////////////////////////////////////////////////////////////////////////
// ABOUT: A unity Shader .cginc to draw numbers in the fragment shader
// AUTHOR: Freya Holmér
// LICENSE: Use for whatever, commercial or otherwise!
// Don't hold me liable for issues though
// But pls credit me if it works super well <3
// LIMITATIONS: There's some precision loss beyond 3 decimal places
// CONTRIBUTORS: yes please! if you know a more precise way to get
// decimal digits then pls lemme know!
// GetDecimalSymbolAt() could use some more love/precision