Skip to content

Instantly share code, notes, and snippets.

View khanakia's full-sized avatar
🎯
Focusing

Aman Bansal khanakia

🎯
Focusing
View GitHub Profile
@karpathy
karpathy / microgpt.py
Last active February 15, 2026 02:11
microgpt
"""
The most atomic way to train and inference 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

Question

how can i use context7 self hosted? I have many projects which has repositories and documentations. I want to create something like context7

Answer

Got it. If by “Context7” you mean a self-hosted, local-first “context hub” that ingests your repos and docs, indexes them, and lets you query with LLMs—here’s a clean way to build and run your own, end-to-end. I’ll outline a minimal, production-ready stack you can deploy on a single machine or a small server and scale later.

Plan

  1. Source ingestion
@colinwilson
colinwilson / cf_clr_cache_dev_mode.sh
Created August 15, 2018 03:27
CloudFlare: Clear cache and enable development mode via API
email=colin@wyveo.com
tkn=<API KEY>
domain=wyveo.com
zone=$(curl -s -X GET "https://api.CloudFlare.com/client/v4/zones?name=${domain}&status=active&page=1&per_page=20&order=status&direction=desc&match=all" \
-H "X-Auth-Email: ${email}" \
-H "X-Auth-Key: ${tkn}" \
-H "Content-Type: application/json")
zone=${zone:18:32}