Skip to content

Instantly share code, notes, and snippets.

@Phdntom
Phdntom / microgpt.py
Created March 3, 2026 22:48 — forked from karpathy/microgpt.py
microgpt
"""
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
@Phdntom
Phdntom / MovieSimilarities.scala
Created July 14, 2017 19:02 — forked from MLnick/MovieSimilarities.scala
Movie Similarities with Spark
import spark.SparkContext
import SparkContext._
/**
* A port of [[http://blog.echen.me/2012/02/09/movie-recommendations-and-more-via-mapreduce-and-scalding/]]
* to Spark.
* Uses movie ratings data from MovieLens 100k dataset found at [[http://www.grouplens.org/node/73]]
*/
object MovieSimilarities {