Skip to content

Instantly share code, notes, and snippets.

View R11manish's full-sized avatar

Manish Rawat R11manish

View GitHub Profile
@R11manish
R11manish / microgpt.py
Created February 15, 2026 14:41 — 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
{
"keys": [
{
"kty": "RSA",
"kid": "otwzn6It1qGDeGrE72SdpbIvOG1JupQXoLo-TFr6hcI",
"n": "wMmklwUAtBQohLEiAhmzImzHb66TIT69C-aO3p1zdbmBU39tNT3hTnCprJTpwHlz1zsata0bHJ44GTI5mYTFPssRkwXkJL98fwW9-CK1gYOqS1O3ENsu1HLobD8ke8c2GV779q5i_akgtFapQlIfXwmh0Z50nngLN97Q4WyxmPfqI6zZoCEQ9td2CNr34ri4RnpbC0XI7sRXptthYAN7SNbMTDCy-GFvQaVNjEiGw4pMloXKsnvH2FyvHLfoVWbRnRU_fk8TLmFhDPIIPUKqoxEzjVBwA0804_BeBeOUpeq1ZO0Lvisj8JR8zBUNKr0Js9BiXUmZyJLzXFQFiGt8OQ",
"e": "AQAB"
}
]
}
@R11manish
R11manish / coding-agent.py
Created March 19, 2025 06:04 — forked from Madhav-MKNC/coding-agent.py
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""
@R11manish
R11manish / coding-agent.py
Created March 19, 2025 06:04 — forked from Madhav-MKNC/coding-agent.py
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""