Skip to content

Instantly share code, notes, and snippets.

View naik-aakash's full-sized avatar
🎯
Focusing

Aakash Ashok Naik naik-aakash

🎯
Focusing
View GitHub Profile
"""
The most atomic way to train and run inference for 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
@jensdebruijn
jensdebruijn / corrected_dependent_ttest.py
Last active January 13, 2026 08:51
Python implementation of the Nadeau and Bengio correction of dependent Student's t-test
# Python implementation of the Nadeau and Bengio correction of dependent Student's t-test
# using the equation stated in https://www.cs.waikato.ac.nz/~eibe/pubs/bouckaert_and_frank.pdf
from scipy.stats import t
from math import sqrt
from statistics import stdev
def corrected_dependent_ttest(data1, data2, n_training_samples, n_test_samples, alpha):
n = len(data1)
differences = [(data1[i]-data2[i]) for i in range(n)]