zettelkasten

Search IconIcon to open search
Dark ModeDark Mode

Good Ideas

Things that didn’t make their way into Bad Ideas


Passing all test cases by accident

@Typst very good idea here #args.listing.keys().zip(args.listing.values()).map(((key, value)) => [...])

Noise blocker:

sigaddset(&mask, SIGSOUNDWAVE); 
sigprocmask(SIG_BLOCK, &mask, &prev_mask);

@GPT’s interesting tool choice for making a delicious pickle: import matplotlib.pyplot as plt

Undefined behaviour:
CleanShot 2023-07-30 at 11.00.59@2x.jpg

Hyperparameter Tuning — Coffee Brewing Model:

TUNE /default_pot HTCPCP/2.0
Host: localhost
Content-Type: application/coffee-pot-command

{
	"sweep_configuration" = {
	    "method": "bayes",
	    "name": "tune_coffee_brew_hyperparameters",
	    "metric": {
		    "goal": "maximize", 
		    "name": "taste"
		},
	    "parameters": {
	        "grind_size": {"min": "200µm", "max": "1000µm"},
	        "water_coffee_ratio": {"min": 2, "max": 20},
	        "coffee_mass": {"min": "10g", "max": "50g"},
	        "brew_time": {"min": "30s", "max": "36000s"},
	        "bloom_time": {"min": "0s", "max": "40s"},
	        "water_temperature": {"min": "20°C", "max": "99°C"},
	        ...
	     },
	    "run_cap" : 42
	}
}

Knowledge directory:

mv /knowledge /dev/null

Continuous Integration:
$$\int \int \int \cdots \int \int \int e^x dx dx dx \cdots dx dx dx$$

Time allocation:

// allocates a block of time in seconds, returning a pointer to the allocated time, or returns NULL if no time is available
void* talloc(size_t n); // sidenote: this almost always returns NULL

// allocates a block of time in seconds, returning a pointer to the allocated time, or raise an error is no time is available
void* xtalloc(size_t n);

A very useful python snippet:

class Console:
    def log(self, *args):
        print(*args)
console = Console()

console.log("I definitely write code in python")

Valgrind:

zsh: segmentation fault arch -x86_64 valgrind

PyvaScript:

app = Flask(__name__, static_url_path="")

function get_new_session_id() {
	file = open (SEARCH_LOG_FILE)
}

A life motto (maybe):

while alive:
	optimizer.zero_grad()
	loss.backward()
	optimizer.step()