Skip to content

Instantly share code, notes, and snippets.

View bdavidzhang's full-sized avatar

David Zhang bdavidzhang

View GitHub Profile
@bdavidzhang
bdavidzhang / claude-usage
Last active March 11, 2026 11:58 — forked from omachala/claude-usage
Claude Code Usage CLI - check your session, weekly, and extra usage limits from the terminal
#!/bin/bash
# Claude Code Usage CLI
# Fetches usage data from Anthropic API and displays it in a readable format
#
# Setup:
# 1. Make sure you're logged into Claude Code (credentials stored in macOS Keychain)
# 2. If you're behind a firewall, configure PROXY_PORT and SSH_HOST below
# 3. chmod +x claude-usage && ./claude-usage
#
@bdavidzhang
bdavidzhang / microgpt.py
Created February 13, 2026 15:26 — 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