This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| ▄▀█ ▀█▀ ▀█▀ █▀█ █▀▀ █▀█ ▀█▀ ⚛️ | |
| █▀█ █ █ █▄█ █▄█ █▀▀ █ | |
| And God said, "Let there be quarks," and the quarks were very small. And God said, "Let there be MicroGPT," and it was even smaller. | |
| """ | |
| import os,math,random as R | |
| if not os.path.exists("input.txt"):import urllib.request;urllib.request.urlretrieve("https://raw.githubusercontent.com/karpathy/makemore/988aa59/names.txt","input.txt") | |
| D=[s.strip()for s in open("input.txt")if s.strip()];R.shuffle(D);C=sorted(set("".join(D)));B=len(C);V=B+1 | |
| class X: | |
| def __init__(s,d,c=(),l=()):s.d,s.g,s.c,s.l=d,0,c,l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S cargo +nightly -Zscript | |
| --- | |
| [package] | |
| name = "microgpt" | |
| version = "0.1.0" | |
| edition = "2024" | |
| --- | |
| //! Rust translation of Andrej Karpathy's microgpt, using a Wengert tape for | |
| //! reverse-mode automatic differentiation instead of a pointer-based DAG. | |
| //! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Atomic GPT training & inference in pure Python. @karpathy, modified by @JGalego""" | |
| import os, math, random; random.seed(42) | |
| if not os.path.exists('input.txt'): | |
| import urllib.request | |
| urllib.request.urlretrieve('https://raw.githubusercontent.com/karpathy/makemore/988aa59/names.txt', 'input.txt') | |
| with open('input.txt', encoding='utf-8') as f: docs = [l.strip() for l in f if l.strip()] | |
| random.shuffle(docs) | |
| uchars = sorted(set(''.join(docs))) | |
| BOS, vocab_size = len(uchars), len(uchars) + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "matplotlib", | |
| # "numpy", | |
| # "pillow", # for GIF saving | |
| # "ffmpeg" # for MP4 saving; ensure ffmpeg is installed and | |
| # ] | |
| # /// |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /- | |
| This file was generated by Aristotle. | |
| Lean version: leanprover/lean4:v4.24.0 | |
| Mathlib version: f897ebcf72cd16f89ab4577d0c826cd14afaafc7 | |
| This project request had uuid: a1c7c561-6dc8-41fd-b0b2-72ead2fe9b02 | |
| -/ | |
| /- | |
| We model the decision problem facing Edmond Dantès in The Count of Monte Cristo. We define two actions: `Vengeance` and `Forgiveness`. We assign utility values to the outcomes based on justice, inner peace, and love. We then prove that `Vengeance` is not the optimal action, as `Forgiveness` yields a higher utility. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "aristotlelib >= 0.6.0", | |
| # ] | |
| # /// | |
| r""" | |
| Fill sorries and prove theorems using Aristotle by Harmonic 🏛️🦉🏺 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "pygame >= 2.6.1", | |
| # ] | |
| # /// | |
| """ | |
| An escape game where the player avoids enemies with flocking behavior and collects items. | |
| Enemies exhibit herd behavior (separation, alignment, cohesion). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| r""" | |
| A simple JSON / JSONLines to TOON Converter | |
| .------.. | |
| - - | |
| / \ | |
| / \ | |
| / .--._ .---. | | |
| | / -__- \ | | |
| | | | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CFLAGS= -O2 -Wall | |
| CC= gcc | |
| LDFLAGS= -lm |
NewerOlder