Skip to content

Instantly share code, notes, and snippets.

@spikebike
spikebike / client.go
Created March 29, 2012 01:13
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@vene
vene / lbfgs_l1logistic.py
Last active January 14, 2023 20:30
Solving L1-regularized problems with l-bfgs-b
"""l-bfgs-b L1-Logistic Regression solver"""
# Author: Vlad Niculae <vlad@vene.ro>
# Suggested by Mathieu Blondel
from __future__ import division, print_function
import numpy as np
from scipy.optimize import fmin_l_bfgs_b
@fasionchan
fasionchan / pyconsole.py
Last active February 4, 2025 12:49
Python 远程交互式终端
import code
import threading
import sys
from io import StringIO
from xmlrpc.client import ServerProxy
from xmlrpc.server import SimpleXMLRPCServer
class OutputHookContext:
addmm(bias, input, weight)
bias: replicated
output = input * weight
input shard(1), weight, shard(0) -> partial tensor
output -> partial -> replicated?
output + bias -> partial? only do on one rank
@ongkiii
ongkiii / IPA-Sources.md
Last active August 23, 2026 23:33
REPOS/TELEGRAM CHANNELS LIST BY u/angkitbharadwaj

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.