Skip to content

Instantly share code, notes, and snippets.

View NoRaincheck's full-sized avatar

NoRaincheck

  • Nowhere
View GitHub Profile
@NoRaincheck
NoRaincheck / skill_tools.py
Created March 11, 2026 11:53
stdlib Python for processing SKILL.md (as long as its runnable-ish)
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = []
# ///
"""Single-file `skill_tools` CLI and library helpers.
This script is designed to run in uv script mode and bundles the same core
functionality as the package modules:
@NoRaincheck
NoRaincheck / catppuccin-macchiato.css
Last active March 11, 2026 00:45
A simple Catppuccin Macchiato theme for anything markdown driven.
/*
Catppuccin Macchiato Markdown Theme
Simple & clean version – good for most markdown renderers
*/
:root {
/* Macchiato palette */
--ctp-rosewater: #f4dbd6;
--ctp-flamingo: #f0c6c6;
--ctp-pink: #f5bde6;
@NoRaincheck
NoRaincheck / example.py
Last active March 1, 2026 02:44
maya1 GGUF example. To use this, first launch the maya1 gguf using llama-cpp or LM Studio. Then the example below should 'just work'.
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "httpx>=0.28.1",
# "snac>=1.2.1",
# "torch>=2.10.0",
# "transformers>=5.2.0",
# ]
# ///
import httpx
@NoRaincheck
NoRaincheck / benchmark_bm25.py
Created February 22, 2026 05:09
Microbenchmark of bm25 and difflib. difflib is much, much slower, but probably 'good enough' for small contexts/corpuses. Stop words makes a big difference with speed and performance
# /// script
# requires-python = ">=3.14"
# dependencies = [
# "beir>=2.2.0",
# "rank-bm25>=0.2.2",
# ]
# ///
import datetime
import logging
import os
"""
Diamond-Square Terrain Generator
A Python implementation of the Diamond-Square algorithm for procedural fractal
terrain generation, with extensions for constrained generation, seamless tile
stitching, and water ratio control.
THE DIAMOND-SQUARE ALGORITHM
============================
"""
FFT Terrain Generator
Generates 2D fractal noise terrain using Fast Fourier Transforms.
Based on Paul Bourke's "Frequency Synthesis of Landscapes (and clouds)" (1997).
"""
import argparse
import numpy as np
from PIL import Image
@NoRaincheck
NoRaincheck / mab.py
Created January 2, 2026 10:46
an incomplete attempt at contextual bandits with sklearn with coba
import random
from typing import Any, Dict, Hashable, List, Tuple, Union
import numpy as np
from coba.primitives import Learner
from scipy.special import softmax
from sklearn.base import BaseEstimator, clone
class BaseOnline(Learner):
#!/bin/bash
PATH=/usr/local/bin:/opt/homebrew/bin/:$PATH
# Check if an argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 <input-image-file>"
exit 1
fi
@NoRaincheck
NoRaincheck / cool
Last active December 8, 2025 05:10
strudel.cc music
/*
@title Strudeldudel
@by Lennard Voogdt
@license CC BY-NC-SA
*/
// let cpm = 77
setcps(78/60)
register('withAsdr', x => x.attack(saw.range(0, 0.05).fast(6)).decay(rand.range(0.1, 0.3)).sustain(0))
import math
from collections import Counter
# primes chosen to be the 4, 6, 8, 12, 20, 100 primes to match the dice roll
# with this it is at least possible to get a reproducible sequence, for each one
# with length desired
DICE = [4, 6, 8, 12, 20, 100]
PRIME_NUMBERS = [11, 13, 19, 29, 41, 211]