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
#!/usr/bin/env python | |
import datetime | |
current_balance = 450 | |
desired_buffer_days = 30 | |
planned_charge_period_days = 365.25/6 | |
past_charges = [ | |
(datetime.date(2019, 6, 30), 525), | |
(datetime.date(2019, 7, 22), 1250), | |
(datetime.date(2019, 12, 1), 500), |
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 itertools import product | |
dumplings = (352, 175) # Kartoffel Knödel 4000400130570 | |
a5 = (210, 148) | |
def min_mod(x1, x2, n1_max): | |
def mod_for_n1(n1): | |
return (x1*n1) % x2 | |
return min((mod_for_n1(n1), n1) for n1 in range(1, n1_max)) |
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 argparse | |
def create_data(amount=50): | |
return [ | |
{"content": "abcdefghijkl"} for __ in range(amount) | |
] | |
def create_data_empty_list(amount=50): |
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
#! /usr/bin/env bash | |
pulsate_once () { | |
export delay="$1" | |
echo -n O | |
sleep "$delay" | |
} | |
pulsate_word () { | |
word="$1" |
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
# Armv "Archive Move" | |
# A command to write a "moved.txt" file in the source directory with a | |
# list of files moved and the destination. | |
# The command also moves all the files to the destination. | |
# Usage: armv source/path dest/path | |
FROM_PATH="$1" | |
TO_PATH="$2" | |
MOVED_FILE_HEADER="TO: $(realpath "$TO_PATH")" |
OlderNewer