Skip to content

Instantly share code, notes, and snippets.

View Simfreed's full-sized avatar

Simon Freedman Simfreed

View GitHub Profile
@Simfreed
Simfreed / microgpt.py
Created February 12, 2026 22:48 — 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
@Simfreed
Simfreed / print-program-options.cc
Created June 3, 2016 03:43 — forked from gesquive/print-program-options.cc
Methods to print out boost::program_options objects
#include <string.h>
#include <iostream>
#include "boost/program_options.hpp"
#include "boost/filesystem.hpp"
#include "boost/any.hpp"
namespace po = boost::program_options;
inline void PrintUsage(const boost::program_options::options_description desc) {
std::cout << "Usage: " << app_name << " [options]" << std::endl;