Skip to content

Instantly share code, notes, and snippets.

View tankorsmash's full-sized avatar

TankorSmash tankorsmash

View GitHub Profile
@tankorsmash
tankorsmash / microgpt.py
Created February 13, 2026 18:55 — 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
@tankorsmash
tankorsmash / magnifier.shadertoy
Last active August 4, 2017 06:40 — forked from detunized/gist:1317940
Magnifying glass shader
// (c) 2011 detunized (http://detunized.net)
// Paste the shader below into http://shadertoy.com
// Click and drag the mouse around
#ifdef GL_ES
precision highp float;
#endif
uniform vec2 resolution;
uniform sampler2D tex0;
@tankorsmash
tankorsmash / xkcd.py
Created February 12, 2013 19:05 — forked from rchrand/xkcd.py
from bs4 import BeautifulSoup
import requests
import os
images = []
final = ""
r = requests.get('http://xkcd.com/')
soup = BeautifulSoup(r.content)