Skip to content

Instantly share code, notes, and snippets.

@aburjg
aburjg / microgpt.py
Created February 15, 2026 11:40 — 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
@aburjg
aburjg / heap-lisp.c
Created October 6, 2025 14:17 — forked from swatson555/heap-lisp.c
Heap based scheme machine.
/* Heap based virtual machine described in section 3.4 of Three Implementation Models for Scheme, Dybvig
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
char token[128][32];