Skip to content

Instantly share code, notes, and snippets.

View stepbrobd's full-sized avatar
馃摗
F/KC1VZR

StepBroBD stepbrobd

馃摗
F/KC1VZR
View GitHub Profile
@stepbrobd
stepbrobd / dask_and_ray.nix
Created September 25, 2025 17:21
nix + dask 2024.6.0 + ray 2.47.1
{
inputs.nixpkgs.url = "github:nixOS/nixpkgs/nixos-unstable";
inputs.systems.url = "github:nix-systems/default";
inputs.parts.url = "github:hercules-ci/flake-parts";
inputs.parts.inputs.nixpkgs-lib.follows = "nixpkgs";
inputs.nixpkgs-dask.url = "github:nixOS/nixpkgs/a42717b875f8d9da831ed7a8ceab1dc986ce518b"; # 2024.6.0
inputs.nixpkgs-ray.url = "github:nixOS/nixpkgs/4f6c942f7a68ee2c05832531d42370c6268e7ff1"; # 2.47.1
outputs = inputs: inputs.parts.lib.mkFlake { inherit inputs; } {
@stepbrobd
stepbrobd / anilist_crunchylist_import.py
Created August 17, 2025 15:06
import crunchyroll watchlist to anilist
import requests
import json
import time
import argparse
import sys
import webbrowser
import urllib.parse
from difflib import SequenceMatcher
from typing import Dict, Optional
@stepbrobd
stepbrobd / query_tree.py
Last active February 7, 2025 22:54
query an immutable tree
"""
Problem:
Given聽an聽immutable聽tree聽(where聽each聽node聽is聽identified聽by聽a聽unique聽ID聽and聽contains聽a聽list聽of聽children),
write聽a聽function聽to聽process聽queries聽that聽ask聽for聽the聽n-th聽parent聽(iteratively聽climbing聽upwards)聽of聽a聽node.
Preprocessing is allowed (in below code, all lines that are used to populating cache are considered as preprocessing),
want fastest average query time, allow some space complexity.
Time complexity: O(log(n))
Space complexity: O(n*log(n))
"""
@stepbrobd
stepbrobd / cuda.nix
Last active September 27, 2024 13:31
bruh idk how to get it to run
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
parts.url = "github:hercules-ci/flake-parts";
nixgl.url = "github:nix-community/nixgl";
};
outputs = inputs @ { self, nixpkgs, parts, nixgl }: parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ];
@stepbrobd
stepbrobd / czds.py
Created July 9, 2024 03:06
icann czds downloader
import argparse
import csv
import gzip
import urllib.request
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("file", type=argparse.FileType("r"))
parser.add_argument("auth", type=str)
@stepbrobd
stepbrobd / theme.typ
Created May 24, 2024 06:19
polylux simple theme with page number
#import "@preview/polylux:0.3.1": *
#import themes.simple: *
#import logic
#let simple-footer = state("simple-footer", [])
#let simple-theme(
aspect-ratio: "16-9",
footer: [],
background: white,
@stepbrobd
stepbrobd / nixbuild.nix
Last active June 2, 2024 20:40
distributed build with nixbuild.net for nix-darwin
let
nixbuildDomain = "eu.nixbuild.net";
nixbuildKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
nixbuildPlatforms = [ "x86_64-linux" "aarch64-linux" ];
nixbuildFeatures = [ "big-parallel" "benchmark" "kvm" "nixos-test" ];
nixbuildSSH = ''
Host eu.nixbuild.net
PubkeyAcceptedKeyTypes ssh-ed25519
ServerAliveInterval 60
IPQoS throughput
@stepbrobd
stepbrobd / infect-ec2.sh
Last active December 23, 2023 23:27
ec2 nixos-infect
#! /usr/bin/env bash
# More info at: https://github.com/elitak/nixos-infect
set -e -o pipefail
makeConf() {
# Skip everything if main config already present
[[ -e /etc/nixos/configuration.nix ]] && return 0
@stepbrobd
stepbrobd / wallpaper.py
Last active October 5, 2023 15:27
download macos wallpapers
#!/usr/bin/env python3
import plistlib
import requests
from urllib.request import urlretrieve
def xml(url: str) -> list[str]:
result = []
@stepbrobd
stepbrobd / spin.sh
Last active October 5, 2023 15:18
install spin and ispin
#!/bin/bash
set -exuo pipefail
git clone --depth 1 https://github.com/nimble-code/spin.git ~/.spin
pushd ~/.spin
make
ln -fsv ~/.spin/Src/spin /usr/local/bin/spin