This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional | |
component_list = list[tuple[float, float]] | |
class Helpers: | |
@staticmethod | |
def oz2ml(oz): | |
return oz * 29.5735 | |
@staticmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const numbers = { | |
vp3: 322, | |
vp4: 481, | |
vp7: 769, | |
vp10: 1025, | |
vp12: 1281, | |
} | |
let breakpoints = {} | |
for (const prop in numbers) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const setPath = (obj, path, val) => { | |
if (path.length == 1) obj[path[0]] = val; | |
else { | |
obj[path[0]] = obj[path[0]] || {}; | |
setPath(obj[path[0]], path.slice(1), val); | |
} | |
return; | |
}; | |
const struct = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
def timing(t, task): | |
"""Helper function for timing tasks""" | |
now = time.time() | |
print(f"{now-t} for {task}.") | |
return now | |
t = time.time() | |
time.sleep(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import lru_cache, wraps | |
def hashable_lru(func): | |
"""Dictionaries are unhashable, so this converts them to json for caching | |
purposes only. Then it converts them back from json, in order to actually | |
run the function. It's incredibly clever and I stole it from [stack | |
overflow][0]. | |
[0]: https://stackoverflow.com/a/46590069 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDEGS0s7dKfKnpkhFuXpZUiuuF13rwrKVcHWgcFpbVn3VK0np8hKxAXqMowTrcIT7fXbJpe8KPMtojNwJJugiXjwFLG6ydVhulTx34moK5tC1hZrRzU6s2HAlRgSMWia2kXhmcebvDCsID2okfe7knZ5iI8IaH5qbscAmICQHqPQEeXMQ0LGLinibwp3OmXZ1N1ufzxUOM0XX/Q3zJQLipp130KwBSZIstGGtvwxA936F0AG5nGU0njWu1MeP2oMXRMbx9akUoetU3b7D4DQcVbEnjFGp97B15Hk2gdMpZNeA3rMERqsXIj3gJmrTaZ0vfpbShEmGcYkcfqKoQCaNqYIiy9y1WfKN1S6alRJ6LeUjIRUiKQitzqv5UEW2xWoomomL4Vrh/aG8dNK5Rr4uc5dr/O3QhO0VSfud+u8AfnD5Y9Zvyz/foBrQdkeT1vdMkRGf1FBXA4ahBPAnsTuJ+so2xwPNzf7awuABfxJtb+1iNq1SYZJoJfAQpYCSLCMSE= malan@levain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * * * * * * * * * * * * | |
* Nord Color Variables * | |
* * * * * * * * * * * * */ | |
/* For details see https://www.nordtheme.com/docs/colors-and-palettes */ | |
/* Polar Night Palette */ | |
$nord0: #2e3440; | |
$nord1: #3B4252; | |
$nord2: #434C5E; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgehJt1XYt4BQ/f7Z48cQ1TZZHkVnX5HwFvuQuJF7rLezgp7BC8IUrYDUGjd91JWsuI3+BUO77OIDmyitYnQ8WXsRg2gTrWmCb2S/wqhHAwLTX4nTZkMoLT4wO6zFGWqphfMx+1zKhv8xpWhjzfGvEOS8FRp+jirHqwAcX2M2dBTf//M5KdyDAYAu3MCQsVD3xc2D3GJ2egoIuHkk100b8xHfEEz5LzL0Uv8Z8QadgIaHbDGZe1PRgMkZHXrkrGVN+U1pST3LrU8DMuoLWF5PZNG5y4p4qzviElr4KDTVojHMWnoundjdo+AKjPyWLmUuLvRbF9/5Vv2evIzOaHZsQQ== rsa-key-20190212 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage{float} | |
\usepackage{graphicx} | |
\usepackage{pgffor} | |
\def\gpgkey{yourkeyname} | |
\newcommand\gpgtopng{ | |
\immediate\write18{gpg --export-secret-key \gpgkey | paperkey --output-type raw | base64 > temp} |