Skip to content

Instantly share code, notes, and snippets.

View JavaCS3's full-sized avatar
😑
Working

Charles Wei JavaCS3

😑
Working
View GitHub Profile
@JavaCS3
JavaCS3 / llm-wiki.md
Created April 22, 2026 13:45 — forked from karpathy/llm-wiki.md
llm-wiki

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.

@JavaCS3
JavaCS3 / index.html
Created September 13, 2017 10:03 — forked from orbitbot/index.html
Ace editor with http-link highlighting and click action, from http://jsbin.com/jehopaja/30/edit?html,output
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="http://ajaxorg.github.io/ace-builds/src/ace.js"></script>
<style>
#editor { position: absolute; top: 0; left: 0; right: 0; bottom: 0;}
.ace_link_marker {
position: absolute;
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///
@JavaCS3
JavaCS3 / gist:42abac5311eca82f0b5bc2f1a99ddb97
Created October 5, 2016 04:20
上海街道名称列表
黄浦区
街道 南京东路街道 外滩街道 半淞园路街道 小东门街道 豫园街道 老西门街道
卢湾区
街道 五里桥街道 打浦桥街道 淮海中路街道 瑞金二路街道
徐汇区
街道 天平路街道 湖南路街道 斜土路街道 枫林路街道 长桥街道 田林街道 虹梅路街道 康健新村街道 徐家汇街道 凌云路街道 龙华街道 漕河泾街道
镇 华泾镇
类似乡级单位 漕河泾新兴技术开发区
@JavaCS3
JavaCS3 / logging_subprocess.py
Created September 11, 2016 11:02 — forked from bgreenlee/logging_subprocess.py
Variant of subprocess.call that accepts a logger instead of stdout/stderr #python
import subprocess
import select
from logging import DEBUG, ERROR
def call(popenargs, logger, stdout_log_level=DEBUG, stderr_log_level=ERROR, **kwargs):
"""
Variant of subprocess.call that accepts a logger instead of stdout/stderr,
and logs stdout messages via logger.debug and stderr messages via
logger.error.