Skip to content

Instantly share code, notes, and snippets.

View SamHatoum's full-sized avatar
👩‍💻
Building on Auto

Sam Hatoum SamHatoum

👩‍💻
Building on Auto
View GitHub Profile
@SamHatoum
SamHatoum / cs.sh
Created May 15, 2026 19:33 — forked from jedi4ever/cs.sh
Simple script to run claude headless without the -p (to avoid extra costs)
#!/usr/bin/env bash
# Usage: ./cs "your prompt"
# Runs Claude headlessly, suppresses the TUI, prints Claude's final reply on stdout.
set -uo pipefail
PROMPT="$*"
REPLY_FILE=$(mktemp)
SESSION_ID=$(uuidgen | tr 'A-Z' 'a-z')
ENC_CWD=$(pwd | sed 's|/|-|g')
@SamHatoum
SamHatoum / microgpt.py
Created February 12, 2026 14:44 — forked from karpathy/microgpt.py
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