Skip to content

Instantly share code, notes, and snippets.

View fritzprix's full-sized avatar
🎯
Focusing

DooWoong Lee (David) fritzprix

🎯
Focusing
View GitHub Profile
@fritzprix
fritzprix / llm-commit.sh
Last active January 12, 2025 09:47
🤖 Generate git commit messages automatically using local LLM (Ollama). Simple bash script that analyzes your git diff and creates meaningful commit messages. No API keys, no cloud - runs locally with Ollama.
#!/bin/bash
# Get the git diff and save it to a temporary file
git diff --cached > /tmp/git_diff.txt
# If there's no diff, exit
if [ ! -s /tmp/git_diff.txt ]; then
echo "No staged changes to commit"
exit 1
fi
@karpathy
karpathy / min-char-rnn.py
Last active February 26, 2025 02:03
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)