Skip to content

Instantly share code, notes, and snippets.

View KarthickSelvam's full-sized avatar

Karthick S KarthickSelvam

View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 16, 2026 05:51
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
@orottier
orottier / RetryTest.php
Last active July 21, 2023 10:10
Retry function for PHP with exponential backoff
<?php
class RetryTest extends TestCase
{
public function setUp()
{
parent::setUp();
// abuse superglobal to keep track of state
$_GET['a'] = 0;
}