Skip to content

Instantly share code, notes, and snippets.

@flxai
flxai / dump-waboorrt.sh
Last active January 1, 2022 19:34
Dump & analyze waboorrt game logs via API
#!/usr/bin/env bash
# Dump waboorrt game logs
rid=0
lid=
mkdir -p data
if [[ ! -f data/ids.lst ]]; then
echo -n > data/ids.lst
echo -n > data/elo.jsonl
echo -n "Downloading ids"
while [[ "$rid" != "$lid" ]]; do
@flxai
flxai / corona-gdp.ipynb
Last active November 1, 2021 20:06
Correlation between corona deaths per million and GDP per capita
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flxai
flxai / README.md
Created October 28, 2021 19:47
c3sets.de client in bash using mpv and git

c3sets.de in bash

Install git and mpv, place somewhere and execute. It gives a menu like the following that allows you to select the set:

1) [15 Jahre Chaosdorf] Couchsofa - Spaaaaaace                          79) [gpn17] Morelle
2) [18 Jahre Chaosdorf] vidister - Topfschlagen an der Tschunkbar       80) [gpn17] Rio
3) [20 Jahre Chaosdorf] Couchsofa - Der Gute Stoff Muss Brennbar Sein   81) [gpn17] Tasmo
4) [20 Jahre Entropia] Couchsofa - Peleus and Thetis                    82) [gpn18] Alexeyan - I Made the Nerds Dance
5) [29c3] Tasmo - Poppen Pt2                                            83) [gpn18] Bam - Deployment Day
@flxai
flxai / README.md
Created October 2, 2021 11:38
SomaFM client in bash using mpv and pup

SomaFM in bash

Install pup and mpv, place somewhere and execute. It gives a menu like the following that allows you to select the station:

Getting radio stations...
-#O=#   #   #
 1) doomed           12) gsclassic        23) 7soul           34) missioncontrol
 2) dronezone        13) synphaera        24) seventies       35) sf1033
 3) deepspaceone     14) n5md             25) u80s            36) scanner
@flxai
flxai / README.md
Created March 13, 2021 01:56
Get 10 year nominal yields on US government bonds from the Federal Reserve

These two lines download the 10 year nominal yields on US government bonds from the Federal Reserve. The 10 year government bond yield is considered a standard indicator of long-term interest rates. It was inspired by this repo.

@flxai
flxai / ssh-keyring
Created March 7, 2021 02:24
Unlock SSH keys using passphrases stored in KeePassXC database
#!/usr/bin/env bash
# Unlock ssh keys using passphrases stored in keepassxc database
if [[ $# -lt 2 ]]; then
echo -e "Usage:\n${0##*/} KEEPASS_DB KEY_DIR"
exit 1
fi
# Some variables
kpdb="$1"
@flxai
flxai / linear-extrapolation.ipynb
Last active March 2, 2021 21:05
Linear Extrapolation within Pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flxai
flxai / google-trends-historic-daily-precision.ipynb
Last active February 15, 2021 16:20
Collect Google Trend historic data with daily precision
@flxai
flxai / cam.py
Created January 7, 2021 23:53
Python stub for testing DIY remote release for Lumix GH2
#!/usr/bin/env python3
from gpiozero import LED
from time import sleep
pin_trigger = LED('BOARD13')
pin_focus = LED('BOARD11')
sleep_min = .1
def trigger():
@flxai
flxai / dfget.py
Created November 21, 2020 00:07
Download URL, select table and have interactive IPython shell with defined DataFrame
#!/usr/bin/env python
# dfget gets URL and interprets interactively selected table as Pandas DataFrame
import inquirer
import requests
import sys
import IPython
import pandas as pd