Skip to content

Instantly share code, notes, and snippets.

View OnlyBelter's full-sized avatar
🎯
Focusing

Xin Xiong OnlyBelter

🎯
Focusing
View GitHub Profile
@OnlyBelter
OnlyBelter / microgpt.py
Created November 2, 2026 02:49 — 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
@OnlyBelter
OnlyBelter / custom constraint function in TF2.ipynb
Last active August 20, 2020 08:26
custom constraint function in TF2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OnlyBelter
OnlyBelter / hierarchy_cluster_demo.ipynb
Created July 24, 2020 13:01
Do hierarchy clustering by scipy and split clusters by distance threshold
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OnlyBelter
OnlyBelter / 01RPKM_TPM.ipynb
Created July 6, 2020 09:18
Calculate TPM in Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.