Skip to content

Instantly share code, notes, and snippets.

View Lkruitwagen's full-sized avatar

Lucas Kruitwagen Lkruitwagen

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
@jacobtomlinson
jacobtomlinson / Dask on Fargate from scratch.ipynb
Last active November 4, 2025 15:28
Dask on Fargate from scratch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@systemed
systemed / gist:be2d6bb242d2fa497b5d93dcafe85f0c
Last active December 19, 2025 11:59
Routing algorithm implementations
(Dijkstra and plain A* are generally not included here as there are thousands of
implementations, though I've made an exception for rare Ruby and Crystal versions,
and for Thor, Mapzen's enhanced A*. )
A* Ruby https://github.com/georgian-se/shortest-path
A* Crystal https://github.com/petoem/a-star.cr
A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla
NBA* JS https://github.com/anvaka/ngraph.path
NBA* Java https://github.com/coderodde/GraphSearchPal
NBA* Java https://github.com/coderodde/FunkyPathfinding
@Zhouxing-Su
Zhouxing-Su / Lemon.MinCostFlow.NS.Sample.cpp
Last active December 31, 2022 16:57
Sample code of using Network Simplex in Lemon for Min Cost Flow problem.
#include <iostream>
#include <lemon/smart_graph.h>
#include <lemon/network_simplex.h>
using namespace lemon;
using namespace std;