Skip to content

Instantly share code, notes, and snippets.

@mustfaunlu
mustfaunlu / microgpt.py
Created March 31, 2026 21:56 — 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
@mustfaunlu
mustfaunlu / AutoResizeText.kt
Created June 9, 2024 18:12 — forked from ardakazanci/AutoResizeText.kt
Auto Resize Text in Jetpack Compose
@Composable
fun AutoTextSizeCard() {
var textLength by remember { mutableStateOf(50) }
val baseText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
val longText = baseText.repeat(textLength / baseText.length + 1).substring(0, textLength)
Card(
modifier = Modifier
.fillMaxWidth()