Skip to content

Instantly share code, notes, and snippets.

View subu1979's full-sized avatar
💭
I may be slow to respond.

KMV.Subramanyam subu1979

💭
I may be slow to respond.
  • Chennai
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 15, 2026 12:26
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
@fqrouter
fqrouter / worker nginx conf
Last active February 3, 2026 15:22
Youtube Reverse Proxy
resolver 8.8.8.8;
location /video/ {
if ($request_uri ~ "^/video/(.+?)/.+") {
set $upstream_host $1.googlevideo.com;
add_header Content-Disposition "attachment; filename=video.mp4;";
}
rewrite /video/.+?/(.+)$ /$1 break;
proxy_buffering off;
proxy_pass https://$upstream_host;
proxy_set_header Host $upstream_host;