Skip to content

Instantly share code, notes, and snippets.

View d3vw's full-sized avatar
🤗

Juiyang Kuan d3vw

🤗
  • localhost
  • Antarctica(with the penguin)
View GitHub Profile
@d3vw
d3vw / llm-wiki.md
Created April 9, 2026 09:11 — 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.

#
# Copyright (c) Microsoft. All rights reserved.
# To learn more, please visit the documentation - Quickstart: Azure Content Safety: https://aka.ms/acsstudiodoc
#
import enum
import json
import requests
from typing import Union
@d3vw
d3vw / sample.py
Last active March 20, 2026 08:20
mtc
#
# Copyright (c) Microsoft. All rights reserved.
# To learn more, please visit the documentation - Quickstart: Azure Content Safety: https://aka.ms/acsstudiodoc
#
import enum
import json
import requests
from typing import Union
@d3vw
d3vw / log.txt
Created December 20, 2025 08:55
sing-box naive oubound launch crash log
/etc/sing-box ✗ sudo sing-box run
+0800 2025-12-20 16:50:13 INFO network: updated default interface wlan0, index 4
SIGSEGV: segmentation violation
PC=0x3d717df m=3 sigcode=1 addr=0x0
signal arrived during cgo execution
goroutine 1 gp=0xc000002380 m=3 mp=0xc0000a3008 [syscall]:
runtime.cgocall(0x359bc10, 0xc00051edb0)
runtime/cgocall.go:167 +0x4b fp=0xc00051ed88 sp=0xc00051ed50 pc=0x1f75eeb
github.com/sagernet/cronet-go._Cfunc_Cronet_Engine_StartWithParams(0x2c880000c000, 0x2c880001c000)
@d3vw
d3vw / agent loop
Created March 11, 2025 01:12 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@d3vw
d3vw / bb
Created August 1, 2023 08:52
func bb_sort(arr []int) []int {
for i:=range arr {
for j:=len(arr)-1);j>i;j-- {
if arr[j-1]>arr[j] {
arr[j], arr[j-1] = arr[j-1], arr[i]
}
}
}
return arr
}
@d3vw
d3vw / target.html
Last active October 11, 2022 15:20
请问如何找到正文的title和herf,也就是440、458、...行的a标签
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta name="format-detection" content="telephone=no">
<meta http-equiv="refresh" content="120">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,initial-scale=1,user-scalable=no">
<title>
公文通-深圳技术大学