Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / microgpt.py
Last active February 14, 2026 00:47
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
@hasanalisiseci
hasanalisiseci / WebViewHTMLContent.swift
Last active March 14, 2025 23:27
A view derived from WKWebView that returns a dynamically calculated height value based on HTML content using the UIViewRepresentable protocol in SwiftUI.
//
// WebViewHTMLContent.swift
// WebViewHTMLContent
//
// Created by Hasan Ali Şişeci on 20.06.2023.
//
import WebKit
import SwiftUI
@witmin
witmin / ffmpeg-mp4-to-animated-webp.md
Last active February 4, 2026 20:56
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@parmentf
parmentf / GitCommitEmoji.md
Last active February 12, 2026 09:06
Git Commit message Emoji