Skip to content

Instantly share code, notes, and snippets.

View arturmartins's full-sized avatar
💭
I may be slow to respond.

Artur Martins arturmartins

💭
I may be slow to respond.
View GitHub Profile

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

"""
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
@minimaxir
minimaxir / CLAUDE.md
Created January 2, 2026 01:57
Rust CLAUDE.md (20260101)

Agent Guidelines for Rust Code Quality

This document provides guidelines for maintaining high-quality Rust code. These rules MUST be followed by all AI coding agents and contributors.

Your Core Principles

All code you write MUST be fully optimized.

"Fully optimized" includes:

@minimaxir
minimaxir / CLAUDE.md
Created January 2, 2026 01:53
Python CLAUDE.md (20260101)

Agent Guidelines for Python Code Quality

This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.

Your Core Principles

All code you write MUST be fully optimized.

"Fully optimized" includes:

@mholtzhausen
mholtzhausen / vtt2txt.py
Last active June 17, 2025 12:35
Converts WEBVTT subtitles (vtt) to plain text - pipe through.
#!/usr/bin/env python3
"""
Convert YouTube subtitles(vtt) to human readable text.
This script is designed to be used as a command-line tool,
reading from stdin and writing to stdout.
Example Usage:
yt-dlp --skip-download --sub-langs en --convert-subs vtt -o ~/.tmp.subtitle <video_url> | vtt2txt; cat ~/.tmp.subtitle.en.vtt | vtt2txt | fabric -ps extract_wisdom
"""
Start year End year Number of days of Pontificate (max) English name Place of birth Age at start of papacy Age at end of papacy Country Country_clean
2025 Leo XIV Chicago 69 Chicago USA
2013 2025.0 4422 Francis I Buenos Aires 76 88 Buenos Aires Argentina
2005 2013.0 2870 Benedict XVI Marktl am Inn, Bavaria, Germany 78 85 Germany Germany
1978 2005.0 9658 John Paul II Wadowice, Poland 58 84 Poland Poland
1978 1978.0 33 John Paul I Forno di Canale, Veneto, Italy 65 65 Italy Italy
1963 1978.0 5521 Paul VI Concesio, Brescia, Italy 65 80 Italy Italy
1958 1963.0 1678 John XXIII Sotto il Monte, Bergamo, Italy 76 81 Italy Italy
1939 1958.0 7156 Pius XII Rome, Italy 63 82 Italy Italy
1922 1939.0 6209 Pius XI Desio, Lombardy-Venetia, Austrian Empire 64 81 Austrian Empire Italy
##############################################################
# How to run local multi-node Kubernetes clusters using kind #
# https://youtu.be/C0v5gJSWuSo #
##############################################################
#########
# Setup #
#########
# Install kind (https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 14, 2026 04:12
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@geerlingguy
geerlingguy / molecule-3-up.sh
Last active January 15, 2021 13:52
Molecule 3.0 update script with all the little changes I had to make.
#!/bin/bash
#
# Update things to be compatible with Molecule 3.0.
#
# This script is NOT idempotent, and should never be run again.
exit 1
export LINT_STRING="lint: |
set -e
yamllint .
@pmkay
pmkay / top-brew-packages.txt
Last active May 8, 2026 14:46 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles