Skip to content

Instantly share code, notes, and snippets.

View ccj5351's full-sized avatar
🎯
Focusing

Changjiang Cai ccj5351

🎯
Focusing
View GitHub Profile
@ccj5351
ccj5351 / llm-wiki.md
Created April 5, 2026 12:56 — 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.

@ccj5351
ccj5351 / extract_ILSVRC.sh
Created September 2, 2020 03:33 — forked from BIGBALLON/extract_ILSVRC.sh
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
@ccj5351
ccj5351 / docker-cleanup-resources.md
Created June 15, 2020 19:07 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ccj5351
ccj5351 / BOOSTwithPython3
Created February 10, 2020 08:57 — forked from melvincabatuan/BOOSTwithPython3
Compile BOOST with Python3 support
1. Check Python3 root
>>> import sys
>>> import os
>>> sys.executable
'/usr/local/bin/python3'
OR
$ which python3
/usr/local/bin/python3
@ccj5351
ccj5351 / install_docker_ubuntu_16.04.sh
Created September 3, 2019 23:14 — forked from gauravkaila/install_docker_ubuntu_16.04.sh
Install Docker and nvidia-docker on Ubuntu-16.04
#!/bin/bash
# add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# add the Docker repository to APT sources
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# update the package database with the Docker packages from the newly added repo
sudo apt-get update
@ccj5351
ccj5351 / tensorflow_rename_variables.py
Created June 19, 2019 18:37 — forked from batzner/tensorflow_rename_variables.py
Small python script to rename variables in a TensorFlow checkpoint
import sys, getopt
import tensorflow as tf
usage_str = 'python tensorflow_rename_variables.py --checkpoint_dir=path/to/dir/ ' \
'--replace_from=substr --replace_to=substr --add_prefix=abc --dry_run'
def rename(checkpoint_dir, replace_from, replace_to, add_prefix, dry_run):
checkpoint = tf.train.get_checkpoint_state(checkpoint_dir)
@ccj5351
ccj5351 / Test-your-tensorflow-installation-2019-03-20 21-22-53.png
Last active March 21, 2019 01:28 — forked from Brainiarc7/build-tensorflow-from-source.md
Build Tensorflow from source, for better performance on Ubuntu.
Test-your-tensorflow-installation-2019-03-20 21-22-53.png
@ccj5351
ccj5351 / VOClabelcolormap.m
Last active June 11, 2021 13:06 — forked from wllhf/VOClabelcolormap.py
Python implementation of the color map function for the PASCAL VOC data set.
%Official Matlab version can be found in the PASCAL VOC devkit
%http://host.robots.ox.ac.uk/pascal/VOC/voc2012/index.html#devkit
% VOCLABELCOLORMAP Creates a label color map such that adjacent indices have different
% colors. Useful for reading and writing index images which contain large indices,
% by encoding them as RGB images.
%
% CMAP = VOCLABELCOLORMAP(N) creates a label color map with N entries.
function cmap = labelcolormap(N)
@ccj5351
ccj5351 / bibtex.png
Created February 15, 2019 16:07 — forked from max-mapper/bibtex.png
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@ccj5351
ccj5351 / gist:ddf52e87c234302f2e50e8120d4ff5d7
Created January 26, 2018 03:49 — forked from asabaylus/gist:3071099
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)