Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active February 13, 2026 01:08
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
@p14041999
p14041999 / Token.sol
Created July 8, 2022 16:32
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.10+commit.fc410830.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;
// should store balance
// can be transferred
// generation of token
// CASE1: I WANT TO TRANSFER FROM MY ACCOUNT TO SOMEONE ELSE ✅
// IF WE ALLOW CASE 2