Skip to content

Instantly share code, notes, and snippets.

View michaelts1's full-sized avatar

Michael Tsaban michaelts1

  • Israel
  • 16:48 (UTC +02:00)
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 15, 2026 14:46
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
@calraith
calraith / extract_tampermonkey_scripts.ps1
Created May 23, 2018 03:20
This is meant to be a PowerShell alternative to https://gist.github.com/derjanb/9f6c10168e63c3dc3cf0 for Windows users unable to compile the leveldb Python module.
# Copy your Tampermonkey storage.js into the same directory as this script.
# It'll extract the user scripts from storage.js and write them as .user.js files
# in the current working directory.
add-type -as System.Web.Extensions
$JSON = new-object Web.Script.Serialization.JavaScriptSerializer
$obj = $JSON.DeserializeObject((gc storage.js))
foreach ($key in $obj.keys) {
foreach ($val in $obj[$key].value) {