Skip to content

Instantly share code, notes, and snippets.

View jyshnkr's full-sized avatar
👨‍💻
Focusing

JayaShankar Mangina jyshnkr

👨‍💻
Focusing
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 15, 2026 03:23
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
@primaryobjects
primaryobjects / linked-list-compare.java
Created February 26, 2017 19:03
Compare two linked lists. Compare values of 2 linked lists for equality.
int CompareLists(Node headA, Node headB) {
int result = 1;
Node current1 = headA;
Node current2 = headB;
while (current1 != null && current2 != null && current1.data == current2.data) {
current1 = current1.next;
current2 = current2.next;
}