Skip to content

Instantly share code, notes, and snippets.

@navdove
navdove / microgpt.py
Created March 24, 2026 02:32 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for 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
@navdove
navdove / sample.bankstmt.csv
Created February 11, 2016 16:45
Bash shell one liner to parse numbers and manipulate them (sum for e.g) using awk
grep 'DEPOSIT' sample.bankstmt.csv | cut -d ',' -f4 | awk '{s+=$1} END {print s}'
//produces correct output by summing the numbers
//951.95