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 / 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 / cuda.nix
Last active October 3, 2025 07:16
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 / 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 / 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 / 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; } {