I hereby claim:
- I am flushot on github.
- I am flushot (https://keybase.io/flushot) on keybase.
- I have a public key ASDsNJlQBU8PQkSdKncgPmt6de9uafuQgjd7lzNGmyBHDwo
To claim this, I am signing this object:
| import time | |
| import logging | |
| from tqdm import tqdm | |
| LOG = logging.getLogger(__name__) | |
| log_interval = 5 | |
| cursor_up = r'\033[A' # CSI -> A (Cursor up) https://en.wikipedia.org/wiki/ANSI_escape_code | |
| if __name__ == '__main__': |
| #!/bin/bash | |
| os="$(uname -s)" | |
| case $os in | |
| Darwin*|BSD*) sysctl -n hw.ncpu;; # macOS, BSD | |
| Linux*) nproc --all;; # Linux | |
| Solaris*) psrinfo -p;; # Solaris | |
| Win*|CYGWIN*|MINGW*|MSYS_NT*) echo "$NUMBER_OF_PROCESSORS";; # Windows | |
| *) >&2 echo "unsupported os: $os"; exit 1;; # Unsupported | |
| esac |
| #!/usr/bin/env python | |
| # Run: pip install argparse requests tqdm | |
| # Requires 'ffmpeg' is also installed on your system | |
| import os | |
| import sys | |
| import base64 | |
| import tempfile | |
| import subprocess | |
| import io | |
| import shutil |
| LOG_FORMAT = '%(asctime)s %(levelname)-5.5s [%(name)s.%(funcName)s][%(threadName)s] %(message)s' |
| create user USERNAME with encrypted password 'PASSWORD'; | |
| create database DB with owner = USERNAME; | |
| grant all privileges on database DB to USERNAME; |
| """ | |
| PostgreSQL database utilities. | |
| Wrapper for psycopg2 that handles connection pooling, transactions, cursors, and makes the API | |
| easier to deal with. | |
| """ | |
| from collections import defaultdict | |
| import contextlib | |
| import logging | |
| import re |
| #ifndef HD_TRIE_H | |
| #define HD_TRIE_H | |
| #include <map> | |
| #include <string> | |
| #include <vector> | |
| /** | |
| * Trie data structure. | |
| * |
| #!/bin/sh | |
| ffmpeg -i $1.mov -vf "scale=iw/2:ih/2" -vcodec libx264 -crf 20 $1.mp4 |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/sh | |
| # brew install graphviz cpanminus | |
| # cpanm Graph::Easy | |
| graphml2gv ${1:-/dev/stdin} | graph-easy - |