Skip to content

Instantly share code, notes, and snippets.

View svngoku's full-sized avatar
💭
🥸

svngoku

💭
🥸
  • Paris, France
View GitHub Profile
@weshoke
weshoke / codebase-analyzer.py
Created February 8, 2026 21:34
dspy.RLM analyzing a code base with a rules file
#!/usr/bin/env python3
"""
Codebase analyzer using Recursive Language Models (RLM) via DSPy.
Based on: https://kmad.ai/Recursive-Language-Models-Security-Audit
Usage:
python analyze-codebase.py --mode security --output report.md
python analyze-codebase.py --mode documentation --exclude tests,vendor
python analyze-codebase.py --mode quality --max-iterations 50
@intellectronica
intellectronica / 0.README.md
Last active February 18, 2026 09:22
SKILL: Fetch YouTube Transcript

YouTube Transcript SKILL

Get youtube-transcript.zip

Use this skill to fetch the transcript of a YouTube video, with or without timestamps.

Use this skill with Claude (by extracting it to .claude/skills/) or with any other agent using Skillz.

Note: This skill is unlikely to run successfully on the Claude web app, since access to YouTube is blocked. Use it with Claude Code or other local agents.

@glennmatlin
glennmatlin / claude_code_hooks_for_uv.md
Last active February 10, 2026 18:58
Claude Code hooks for working with `uv`

Claude Code Hooks for working with uv

by Glenn Matlin / glennmatlin on all socials

What This Does

Prevents Claude Code from using pip, python, pytest, etc. directly in projects that use uv for Python environment management. Instead, Claude is guided to use uv run, uv add, etc.

Smart detection:

  • Only activates in directories with pyproject.toml
@EvanBacon
EvanBacon / CLAUDE.md
Created July 22, 2025 16:43
Expo Router CLAUDE.md file.

Architecture

  • Website: Expo Router website with Tailwind.
  • Native app: Expo Router app with CNG.
  • Backend: Expo API routes WinterTC-compliant. Routes are in src/app/api/ directory. API routes use +api.ts suffix (chat+api.ts).
  • Secrets: Use .env files and API routes for secret management. Never use EXPO_PUBLIC_ prefix for sensitive data.

Code Style

  • Use TypeScript whenever possible.
# /// script
# requires-python = ">=3.11,<3.12"
# dependencies = [
# "distilabel[hf-transformers, hf-inference-endpoints]",
# ]
# ///
from distilabel.models import InferenceEndpointsLLM
from distilabel.pipeline import InstructionResponsePipeline
repo_id = "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B"
@davidberenstein1957
davidberenstein1957 / vector_search_hub_datasets.py
Last active February 28, 2025 11:10
vector search on the Hugging Face Hub
# /// script
# requires-python = ">=3.11,<3.12"
# dependencies = [
# "duckdb", sentence-transformers, huggingface_hub
# ]
# ///
from sentence_transformers import SentenceTransformer
import duckdb
from huggingface_hub import get_token
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active February 24, 2026 23:37
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
import os
from llama_parse import LlamaParse # pip install llama-parse
from llama_index.core import SimpleDirectoryReader # pip install llama-index
source_directory = r'\data'
target_directory = r'\tables'
parser = LlamaParse(
api_key="...", # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown", # "markdown" and "text" are available
@mlabonne
mlabonne / finetune_llama2.py
Last active January 22, 2025 15:02
Easy Llama 2 fine-tuning script (📝 Article: https://tinyurl.com/finetunellama2)
# Based on younesbelkada/finetune_llama_v2.py
# Install the following libraries:
# pip install accelerate==0.21.0 peft==0.4.0 bitsandbytes==0.40.2 transformers==4.31.0 trl==0.4.7 scipy
from dataclasses import dataclass, field
from typing import Optional
import torch
from datasets import load_dataset
from transformers import (
@phortuin
phortuin / postgres.md
Last active August 18, 2025 04:04
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)