Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / ytdlp.py
Created June 7, 2026 18:43
YTDLP with DOH
#!/usr/bin/env python3
"""
yt-dlp-doh: DNS over HTTPS (DoH) Wrapper for yt-dlp with Logging
This script enables DNS over HTTPS for yt-dlp by monkey-patching Python's
socket.getaddrinfo() function to resolve hostnames via encrypted DoH queries
instead of the system's default DNS resolver.
Features:
✓ Encrypted DNS resolution via RFC 8484 DoH endpoints
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created June 3, 2026 15:12 — forked from Artefact2/README.md
GGUF quantizations overview
package d3d11_main
import D3D11 "vendor:directx/d3d11"
import DXGI "vendor:directx/dxgi"
import D3D "vendor:directx/d3d_compiler"
import SDL "vendor:sdl2"
import glm "core:math/linalg/glsl"
// Based off https://gist.github.com/d7samurai/261c69490cce0620d0bfc93003cd1052
@CypherpunkSamurai
CypherpunkSamurai / OPENSANDBOX.md
Last active May 31, 2026 05:06
OpenSandBox QuickStart

pip install opensandbox-code-interpreter opensandbox-server

$env:OPENSANDBOX_URL="http://localhost:8081"

Step 1: Initialize the Configuration Correctly

Specify the target config file path (~/.sandbox.toml) and replace -f with --force: [1, 2]

opensandbox-server.exe init-config ~/.sandbox.toml --example docker --force

@CypherpunkSamurai
CypherpunkSamurai / README.md
Created May 26, 2026 18:33
Python3 Portable

Here is the complete, definitive guide to the Python and Conda packaging ecosystems. This integrates every component from the original list, alongside native Python tooling, modern Rust-based alternatives, embedded environments, and direct URLs for every tool.

1. Full Installer Distributions (Heavyweight)

These installers package the environment tool along with massive pre-compiled software bundles.

  • Anaconda Distribution: The flagship 5GB+ bundle. It includes a Graphical User Interface (Anaconda Navigator) and hundreds of pre-installed data science packages. Subject to Anaconda's commercial license fees.
  • URL: anaconda.com/download

install with permissions

pnpm add -g --stream -y --dangerously-allow-all-builds @google/gemini-cli @qwen-code/qwen-code opencode-ai @openai/codex @kilocode/cli freebuff @earendil-works/pi-coding-agent deepseek-tui mini-kode 9router

update with permissions

pnpm update -g --latest --dangerously-allow-all-builds

pnpm self-update

@CypherpunkSamurai
CypherpunkSamurai / rust.portable.ps1
Created May 19, 2026 06:29
Rust Installer - Portable
<#
.SYNOPSIS
Creates a portable Rust installation with virtualenv-style activation scripts.
.DESCRIPTION
This script creates a self-contained, portable Rust installation that can be
moved between systems or run from external drives. Supports both GNU and MSVC toolchains.
Creates Python virtualenv-style activate/deactivate scripts for shell integration.
.PARAMETER InstallDir
Directory where portable Rust will be installed. Default: .PortableRust
.PARAMETER ToolchainVersion
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created May 16, 2026 15:38
Good Readme Example

Yes, there are excellent options available depending on whether you want a pure containerless sandbox (isolating raw OS processes) or a dockerless container sandbox (isolating workloads without using the bloated Docker daemon). [1, 2] Here is a breakdown of the best tools and runtimes available, categorized by how they achieve isolation.

1. Pure Containerless Sandboxes (Process-Level)

These tools do not use images, layers, or containers. They isolate regular binaries, scripts, or AI agent commands directly at the OS primitive level.

  • Anthropic Sandbox Runtime (srt): Released as an open-source project by Anthropic, this lightweight runtime enforces file system and network restrictions on arbitrary processes without containerization. It wraps native OS sandboxing features like sandbox-exec on macOS and bubblewrap on Linux. It is heavily used to isolate local AI tools like Claude Code. [1, 3, 4]
  • Nsjail: A light,

USER:

don't search the internet. This is a test to see how well you can craft non-trivial, novel and creative solutions given a "combinatorics" math problem. Provide a full solution to the problem.

Problem:
"A hypergraph $(V,E)$ has a \emph{partition of size $m$} if there exist $D\subseteq V$ and $P\subseteq E$ such that $|D|=m$ and every vertex of $D$ lies in exactly one edge of $P$. Let $H(n)$ be the maximum $|V|$ over all hypergraphs $(V,E)$ with no isolated vertices and no partition of size greater than $n$. It is known that [