Skip to content

Instantly share code, notes, and snippets.

"""
The most atomic way to train and run inference for 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
@VooDisss
VooDisss / README.md
Created March 9, 2026 20:56
llama-server models.ini guide for Qwen3 reranker + embedding + chat models. Fix for Qwen3-Reranker GGUF producing near-zero scores (4.5e-23) with llama.cpp. Covers /v1/rerank endpoint, pooling=rank, cls.output.weight, convert_hf_to_gguf.py proper conversion, models.ini preset reference with all valid keys,

Running Qwen3 Models with llama-server (Embedding + Reranking + Chat)

A practical guide to running multiple Qwen3 models through a single llama-server instance using model routing. Covers embedding, reranking, and chat/vision models.

Tested on Windows with RTX 3090 (24GB VRAM), llama-server build from llama.cpp master branch. Last updated: 2025-03-09.


What you get

@janosh
janosh / compile-vasp-m1.md
Last active March 13, 2026 15:29
VASP M1 Mac Compilation Guide

Compiling VASP on M1 Mac

Written by Alex Ganose @utf and Janosh Riebesell @janosh. Published 2022-03-28. Last updated 2024-03-30.

  1. Install Xcode command line tools:

    xcode-select --install
  • Shall i implement it?
  • No ...
@sshh12
sshh12 / claude-chrome-extension-internals.md
Created March 1, 2026 00:14
Claude for Chrome Extension Internals (v1.0.56)

Claude for Chrome Extension Internals (v1.0.56)

A deep dive into how Anthropic's Claude for Chrome extension works under the hood, based on reading the extension's source code.

Architecture Overview

The extension is a Chrome Manifest V3 extension built with React, using the Anthropic JavaScript SDK directly in the browser. It opens as a side panel alongside the active tab and acts as an AI agent that can see and interact with web pages.

The Anthropic JS SDK is instantiated in the browser with dangerouslyAllowBrowser: true, authenticating via either OAuth PKCE (default, scopes: user:profile user:inference) or a manual API key (feature-gated for internal use).

/*
* Copyright 2026 Kyriakos Georgiopoulos
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE
*
* Unless required by applicable law or agreed to in writing, software
# /// script
# dependencies = [
# "openai",
# "numpy",
# "pillow",
# ]
# ///
import numpy, base64, io, time, sys, json, re
from openai import OpenAI
from PIL import Image, ImageDraw, ImageFont
@mxpanf
mxpanf / ASCII Art Collection
Last active March 13, 2026 15:24 — forked from creio/ascii art
ASCII Art Collection. A curated collection of static and live ASCII art links, along with some fun terminal commands for weather forecasts and the classic 'Star Wars' episode in ASCII.
# Static ASCII Arts
curl -L git.io/ricex # Rice
curl -L git.io/unix # Unix logo
curl -L git.io/taco # Taco
curl -L git.io/pizzza # Pizza
curl -L git.io/pancakes # Pancakes
curl -L git.io/poptart # Pop-Tart
curl -L git.io/waffles # Waffles
curl -L git.io/burger # Burger
curl -L git.io/rice # Rice (alternative)
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active March 13, 2026 15:23
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under the Quests tab
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter: