Skip to content

Instantly share code, notes, and snippets.

@kwindla
kwindla / gpt-5-voice.agent.py
Last active August 24, 2025 03:59
GPT-5 voice agent single-file example
# export OPENAI_API_KEY=sk_proj-...
# uv run gpt-5-voice-agent.py
# /// script
# dependencies = [
# "numba==0.61.2",
# "openai",
# "python-dotenv",
# "fastapi[all]",
# "uvicorn",
@karpathy
karpathy / gist:587454dc0146a6ae21fc
Last active February 13, 2026 04:32
An efficient, batched LSTM.
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):