<network-security-config>
<debug-overrides>
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
| """ | |
| The most atomic way to train and run inference for 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 |
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
| """ | |
| microgpt_dnb.py — Fork of Karpathy's microgpt with Dynamic Notes Bus | |
| Original: https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95 | |
| Paper: https://arxiv.org/abs/2512.10054 | |
| Code: https://github.com/logan-robbins/parallel-decoder-transformer | |
| Karpathy's microgpt is the complete GPT algorithm in ~200 lines of pure Python. | |
| This fork adds ~100 lines to show where the Dynamic Notes Bus (DNB), Shared | |
| Notes Cross-Attention (SNC), and Planner Head fit inside the transformer to |
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
| """ | |
| The most atomic way to train and run inference for 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 |
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
| import math | |
| import random | |
| random.seed(42) | |
| # ----------------------------------------------------------------------------- | |
| # Tape-based Autograd Engine | |
| # ----------------------------------------------------------------------------- | |
| class Tape: |
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
| """ | |
| The most atomic way to train and run inference for 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 |
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
| brew install caddy mkcert nss dnsmasq | |
| mkcert -install | |
| mkcert '*.app.test' '*.cdn.test' | |
| # rename the certs and move them under /usr/local/etc/caddy/certs | |
| cat <<EOF > /usr/local/etc/caddy/Caddyfile | |
| *.app.test:443, *.cdn.test:443 { |
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 python3 | |
| import os | |
| import time | |
| import subprocess | |
| from PIL import ImageGrab , Image | |
| from pathlib import Path | |
| import io | |
| import codecs | |
| import tempfile | |
| import pyperclip |
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
| from django.http import FileResponse | |
| from io import BufferedReader, BytesIO | |
| def file_response_from_str(content: str, filename: str) -> FileResponse: | |
| """ Serves a file response from the given string | |
| Args: | |
| content: str |
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
| from aioredis import Channel, Redis | |
| from fastapi import FastAPI | |
| from fastapi.params import Depends | |
| from fastapi_plugins import depends_redis, redis_plugin | |
| from sse_starlette.sse import EventSourceResponse | |
| from starlette.responses import HTMLResponse | |
| html = """ | |
| <!DOCTYPE html> | |
| <html> |
NewerOlder