Skip to content

Instantly share code, notes, and snippets.

View jordaniza's full-sized avatar
🎲
All In

Jordan jordaniza

🎲
All In
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 15, 2026 21:27
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
pragma solidity ^0.8.0;
contract AtomicityGuard {
// address => block => status
uint256 private constant _ENTERED = 1;
mapping(address => mapping( uint256 => uint256)) ledger;
modifier nonAtomic() {
@cwhinfrey
cwhinfrey / message-taxonomy.md
Last active April 9, 2024 16:14
An Incomplete Taxonomy of Cross-Chain Messages

An Incomplete Taxonomy of Cross-Chain Messages

Single or Batched

Single Messages - Single messages have a single target address, target chainId, and data payload. The vast majority of cross-chain messages today are single messages.

Example:

function dispatchMessage(uint256 toChainId, address to, bytes calldata data) external payable returns (bytes32 messageId);
@emo-eth
emo-eth / chain_funcs.sh
Last active February 1, 2026 01:37
Helper functions for interacting with chains and Foundry tests. Source from .zshrc etc
###########
# Imports #
###########
# the RPCs file should include RPC URLs and Etherscan API Keys for relevant networks
# (in a separate file so they don't get committed)
source "$(dirname "$0")/rpcs.sh"
# any useful addresses for various networks for easy reference
source "$(dirname "$0")/addresses.sh"
# any useful functions and definitions for interacting with Seaport