Skip to content

Instantly share code, notes, and snippets.

View ShikChen's full-sized avatar
💤
Sleeping from home

ShikChen

💤
Sleeping from home
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
@ptman
ptman / heroku-alternatives.md
Last active April 1, 2026 16:47
Heroku alternatives
Tool / Project Type / Architecture UI / Dashboard CLI / API Multi‑node / Clustering Auto TLS / SSL / ACME Zero‑downtime / Rolling Deploy Preview / PR Environments Team / Permissions Volume / Backup Support Open Source / License Heroku‑style Compatibility Pros / Strengths Cons / Caveats / Weaknesses
Dokku Single‑server (extensions for multi) Minimal (no central UI, though plugins exist) CLI, plugin APIs Via community / plugin / custom setups Yes (Let’s Encrypt plugin) Via Docker techniques / plugin Limited, requires extra setup Basic (single admin; community plugins) Plugin / manual (e.g. volume backups) MIT (fully open source) Good: git push, buildpack style, plugins add DB, etc. Very stable, mature, lots of community extensions Scaling / multi‑node is manual; UI is weak; managing many apps / teams is harder
Dokploy Multi‑node / cluster (Docker Swarm) Yes (built‑in UI) CLI + AP
@nreHieW
nreHieW / transformer.py
Created July 9, 2024 13:36
2024 Noam Transformer
"""
The 2024 Transformer (the Noam Transformer):
- RMSNorm
- GQA or some combination
- Sliding window attention
- Swiglu
- RoPE (Rotary Positional Embedding)
LLM Arches:
hidden | MLP mult. | n_layers | rope_theta | GQA Group Size | GLU Act. | ops
@catgirlinspace
catgirlinspace / readme.md
Last active January 12, 2023 05:51
splatnet 3 paths

hi! this is a list of all¹ the paths in the splatnet 3 application as of september 10th, 2022. a lot of these are probably not useful for external applications. i found all these manually through developer tools. some may be incorrect. a : indicates that it's a parameter. i have marked what i considered to be notable with a ⭐️ emoji.

these can be used to launch the splatnet 3 application on a device with the nintendo switch online app installed. on ios, this is done with com.nintendo.znca://znca/game/4834290508791808?p=<url encoded path>. i am not sure how this works on android, but it's probably similar. for example, to open the anarchy schedule, use com.nintendo.znca://znca/game/4834290508791808?p=%2Fschedule%2Fbankara.

@johnkhbaek
johnkhbaek / machoload.c
Last active December 29, 2025 02:11
Load macho using NSLinkModule with arguments
/*
================================================================================
modified from this: https://github.com/its-a-feature/macos_execute_from_memory (supports only bundle)
code injection : https://github.com/CylanceVulnResearch/osx_runbin by Stephanie Archibald (does not support m1 x64 emulation and FAT header)
added FAT header (universal Macho) parsing
script-kiddied, debugged, etc. by @exploitpreacher
================================================================================
*/
@kb10uy
kb10uy / sus-specification-2.7.md
Last active September 4, 2025 02:28
SUS フォーマット v2.7 仕様

SUS Format Specification v2.7 (rev2)

注: SUS は今や Sliding Universal Score の略であり、 SeaUrchin Score ではありません。

1. 概要

  • テキストデータであり、全て printable character で構成される。
  • 拡張子: *.sus
  • EOL: CRLF もしくは LF
  • エンコード: 常に UTF-8
  • # で始まる行がデータとして意味を持ち、それ以外の行はコメントとして無視される。
  • 文字列データを指定する部分は " ~ " でクォートする。
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active March 29, 2026 11:21
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

WARNING: Article moved to separate repo to allow users contributions: https://github.com/raysan5/custom_game_engines

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like [Unreal](https:

@Treeki
Treeki / TurnipPrices.cpp
Last active March 24, 2026 07:00
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@Chillee
Chillee / dinic.cpp
Last active December 8, 2024 16:50
Max Flow (Dinic's, HLPP)
template <int MAXV, class T = int> struct Dinic {
const static bool SCALING = false; // non-scaling = V^2E, Scaling=VElog(U) with higher constant
int lim = 1;
const T INF = numeric_limits<T>::max();
struct edge {
int to, rev;
T cap, flow;
};
int s = MAXV - 2, t = MAXV - 1;