Skip to content

Instantly share code, notes, and snippets.

View rajathsalegame's full-sized avatar
🏙️
nyc

Rajath Salegame rajathsalegame

🏙️
nyc
View GitHub Profile
@rajathsalegame
rajathsalegame / claude_fleet.sh
Created August 19, 2025 23:54
launch n instances of claude code with tmux
#!/bin/bash
# Default number of Claude instances
N=${1:-10}
# Validate input
if ! [[ "$N" =~ ^[0-9]+$ ]] || [ "$N" -lt 1 ]; then
echo "Usage: $0 [number_of_instances]"
echo "Number of instances must be a positive integer (default: 10)"
exit 1
@rajathsalegame
rajathsalegame / balancer.py
Created February 7, 2024 20:29
quick impl of load balancing algorithms
from typing import Tuple
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
def d_choice_balancer(array: np.ndarray, d: int) -> Tuple[int, int]:
N = len(array)
d_choices = np.random.randint(0, N, size=(d, 2))
@rajathsalegame
rajathsalegame / pi_sampler.py
Last active February 16, 2021 09:44
Pi Estimation via Rejection Sampling from Bernoulli Coin Flips
from typing import List, NamedTuple
import numpy as np
from scipy.special import gamma
class NDPiSimulator(NamedTuple):
p: int
d: int
num_bins: int