Skip to content

Instantly share code, notes, and snippets.

View MustaphaU's full-sized avatar

Mustapha Unubi Momoh MustaphaU

View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 14, 2026 02:53
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
@james-jory
james-jory / aws_personalize_training_cost_calculator.py
Last active December 10, 2024 14:42
Calculates total training hours cost (for all time) for one or more Amazon Personalize solutions
'''
Calculates total training hours cost (for all time) for one or more Amazon Personalize solutions.
Total training hours and costs across AWS regions as well as grand totals will be printed as output.
By default, the script will calculate the costs for all solutions in the default AWS region (as
configured in your local environment). Alternatively, you can pass a filename as an argument to
the script where the filename points to a text file containing one or more Amazon Personalize
solution ARNs (1 per line). The solution ARNs in the file can come from multiple regions.
'''