Skip to content

Instantly share code, notes, and snippets.

View Radagaisus's full-sized avatar

Almog Melamed Radagaisus

View GitHub Profile
@Radagaisus
Radagaisus / walk-of-shame.md
Created June 18, 2026 14:46
Anti-Overengineering Rules

Anti-Overengineering Rules

  • Do not invent requirements. If the user, product docs, or existing code contract did not ask for it, do not build it.
  • First find the domain meaning. Do not design from mechanical implementation details when there is a clearer product concept.
  • Do not create a second API when the existing API should simply mean the right thing. Fix the primary abstraction instead of adding wrapper methods beside it.
  • Keep the default path focused on the states, data, and behavior the product actually cares about. Exhaustive debug/audit paths must be explicit.
  • Keep capability ownership in one place. Consumers should call the owning API, not learn how to re-implement part of its policy.
  • Names must describe the domain result, not the implementation step. A bad name is a design bug, not a cosmetic issue.
  • Do not turn a simple predicate into a subsystem. A filter filters enumeration; it is not a permission layer, custom error surface, CLI policy engine, or future compatibility hook unless e
@Radagaisus
Radagaisus / SKILL.md
Created June 2, 2026 08:03
A skill for getting the AI to somewhat sometimes write well
name tachless
description Use when the user asks for information needed for decision-making.

Your goal is to give me the right information for me to make the right decisions for how we move forward from here.

Tachless means you cut to the chase and give me the bottom line. Tachless means you explain things clearly and simply, not in a condensed cryptic language.

@Radagaisus
Radagaisus / randomness.py
Last active November 5, 2022 16:45
Helper module for deterministic PRNG seeding
# Deterministic Pseudo-Random Number Generator Seeding
# ------------------------------------------------------------------------------
# A helper script for setting a consistent deterministic PRNG seed for third-
# party libraries, supporting more reproducible experiment execution.
#
# Setting a deterministic seed:
#
# - By an environment variable: `PYTHON_SEED=12345 python script.py`
# - By calling `randomness.reseed(12345)`
#
@Radagaisus
Radagaisus / generate_intraday_stocks_dataset.py
Last active January 19, 2022 11:07
Stocks Dataset using AlphaVantage API
# Stocks Data Assembly and Preprocessing
# ------------------------------------------------------------------------------
import os
import csv
import time
from pathlib import Path
from functools import reduce
import pandas as pd
from alpha_vantage.timeseries import TimeSeries
from argparse_prompt import PromptParser
@Radagaisus
Radagaisus / intentional_expanding_quine.py
Last active November 4, 2022 08:07
Self-Modifying Quine
def f(x,s):
start = 44
a = 0
print(a)
if x==1:
start = int(s[24:29])
s = list(s[:24]) + list('{:>5d}'.format(start+11)) + list(s[29:start]) + list(' a += 1\n') + list(s[start:])
s = ''.join(s)
return s
@Radagaisus
Radagaisus / interpolation_stability.py
Last active June 7, 2019 08:34
Trying out code from "Using Eigendecomposition to Convert Rotations and Interpolate Operations". Found some numerical stability issues. https://algassert.com/quantum/2016/01/10/eigendecomposition-for-rotation-and-interpolation.html
import numpy as np
from scipy.stats import unitary_group
def eigenterpolate(U0, U1, s):
"""Interpolates between two matrices."""
return U0 * eigenpow(U0.H * U1, s)
def eigenpow(M, t):
"""Raises a matrix to a power."""
return eigenlift(lambda b: b**t, M)
@Radagaisus
Radagaisus / DynamicDepthSort.cs
Created January 12, 2019 12:11
Static and Moving Depth Sort Behaviours for Unity
using UnityEngine;
namespace Islands {
[ExecuteInEditMode]
[RequireComponent(typeof(SpriteRenderer))]
public class DynamicDepthSort: MonoBehaviour {
/// <summary>
/// A reference to the game object’s sprite renderer component.
/// </summary>
@Radagaisus
Radagaisus / ThirdPartyNoticesExample.md
Created October 20, 2016 23:18
Markdown Table from Yarn Licenses (YMMV)
@Radagaisus
Radagaisus / captain_up.rb
Created July 3, 2015 21:29
Ruby, HTTParty, Captain Up
class CaptainUp
# Include HTTParty as a mix-in
include HTTParty
# Set up the base API endpoint
base_uri 'captainup.com'
# Initialize the Captain Up SDK
def initialize(options = {})
@options = options
@Radagaisus
Radagaisus / captain_up_sign_up_modal.js
Created March 24, 2015 00:25
Hooking into the Captain Up Sign Up Modal
captain.up(function() {
// Listen to the `signup:open` event, that's triggered whenever the sign up
// modal is opened.
captain.on('signup:open', function() {
// Replace the sign up modal title with "Hello, World!"
$('#cpt-sign-up-modal h1').text('Hello, World!');
});
});