Skip to content

Instantly share code, notes, and snippets.

View NoRaincheck's full-sized avatar

NoRaincheck

  • Nowhere
View GitHub Profile
"""
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]

Important: Background information

Overview

This page will look up trainer battle AI procedures for the Generation IV Pokémon games – Pokémon Diamond, Pearl, Platinum, HeartGold, and SoulSilver. Trainer AI between each of these games is nearly identical, with only Diamond and Pearl having a single small difference from Platinum, HeartGold, and SoulSilver (in Icy Wind / Mud Shot / Rock Tomb!).

I recommend you read over this whole article at least once to be made aware of all the strange quirks and edge cases that affect the AI procedures.

The Battle AI uses a scoring system to determine which move to use (and which target to use it on, if applicable). Each move starts with a score of 100 (but this starting point is arbitrary), which is then added or subtracted to by the different parts of the scoring procedure.

{
"description": "Remap mouse keys",
"manipulators": [
{
"from": {
"key_code": "spacebar",
"modifiers": { "mandatory": ["right_control"] }
},
"to": [
{
This file has been truncated, but you can view the full file.
[
{
"isrc": "USUAN1100001",
"title": "C-Funk",
"instruments": [
"Bass",
"Kit",
"Guitar",
"Bari Sax",
"Tenor Sax",
@NoRaincheck
NoRaincheck / rainbow_scheme.py
Created April 29, 2025 13:16
Rainbow Colour Scheme - a start of something.
from itertools import cycle
# the colors cycle in 3 different "rates"
def linspace(start, stop, num):
"""Generate num evenly spaced numbers over the interval [start, stop]."""
if num < 2:
return [start]
step = (stop - start) / (num - 1)
return [start + step * i for i in range(num)]