Skip to content

Instantly share code, notes, and snippets.

View glnarayanan's full-sized avatar
🎯
Focusing

Lakshmi Narayanan G glnarayanan

🎯
Focusing
View GitHub Profile
@glnarayanan
glnarayanan / microgpt.py
Created February 12, 2026 20:06 — forked from karpathy/microgpt.py
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
@glnarayanan
glnarayanan / s3_outline_backup.sh
Created May 28, 2020 16:34
Outline Wiki Backup Script for S3
#!/bin/bash
pushd ()
{
dirname=$1
DIR_STACK="$dirname ${DIR_STACK:-$PWD' '}"
cd ${dirname:?"missing directory name."}
echo "$DIR_STACK"
}