I hereby claim:
- I am danwald on github.
- I am danwald (https://keybase.io/danwald) on keybase.
- I have a public key whose fingerprint is F2C8 CC3B FABD 2C94 441D B2C0 BCFD B00D 122C 2410
To claim this, I am signing this object:
import dataclasses | |
import logging | |
logging.basicConfig(level='INFO') | |
logger = logging.getLogger(__name__) | |
@dataclasses.dataclass | |
class DictAttrib: | |
# class attribute |
''' | |
encodes a pair of +ive ints to an int and complementary method | |
src: http://mathforum.org/library/drmath/view/56036.html | |
''' | |
def encode_pair(a: int, b: int) -> int: | |
''' | |
implements | |
[(a + b)^2 + 3a + b]/2 |
#!/bin/bash | |
for a in *.flac; do | |
ffmpeg -i "$a" -qscale:a 0 "${a[@]/%flac/mp3}" | |
done |
import redis | |
import sys | |
ip = '172.35.5.201' | |
port = 6379 | |
db = 1 | |
sixty_days_back_sec = 5184000 | |
thirty_days_back_sec = sixty_days_back_sec / 2 | |
ten_days_back_sec = thirty_days_back_sec / 3 | |
total=ten_db=thirty_db=sixty_db=deleted=0 |
#!/bin/bash | |
export from_name='' | |
lockfile=$1 | |
flock=`which flock` | |
#uses mandrill-sendmail via @blackdotsh's https://raw.githubusercontent.com/blackdotsh/mandrillapp-cli/master/sendmail.sh | |
sendmail=$HOME/msendmail.sh | |
dt=`date` | |
$flock -xn "/tmp/$lockfile" echo "${@:2}" |
function dbash(){ | |
if test -z "$1" | |
then | |
container=`docker ps -lq` | |
echo "Using last active container $container" | |
else | |
container=$1 | |
fi | |
docker exec -it $container bash | |
} |
LOG_TS=$(tail -n 1000 __STR__ | grep INFO | tail -n 1 | grep -Po "\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}") && [[ $((`date +%s`-`date +%s -d"$LOG_TS"`)) -lt 60 ]] || echo "More than a minute" |
ifconfig eth0 | grep inet | awk -F: '{print $2; exit}' | cut -d' ' -f1 |
#!/bin/bash | |
set -e | |
function get_include_string() | |
{ | |
local str="" | |
for i in {7..0} | |
do | |
str+="--include \"" |
I hereby claim:
To claim this, I am signing this object: