I hereby claim:
- I am ortsed on github.
- I am llewhinkes (https://keybase.io/llewhinkes) on keybase.
- I have a public key ASBcU6XcOnBo98h_BCPJ4a1w8HK6U3TXGKqLkle9emjSywo
To claim this, I am signing this object:
#!/bin/sh | |
ADDRESS='127.0.0.1' | |
PYTHON="/opt/django/bin/python" | |
GUNICORN="/opt/django/bin/gunicorn_django" | |
PROJECTLOC="/opt/django/project" | |
MANAGELOC="$PROJECTLOC/manage.py" | |
DEFAULT_ARGS="--workers=3 --daemon --bind=$ADDRESS:" | |
BASE_CMD="$GUNICORN $DEFAULT_ARGS" |
export CLICOLOR=1 | |
function settitle() { echo -ne "\033]0;$@\007";} | |
alias untar=’tar xvzf’ | |
alias push='git push origin' | |
alias pull='git pull origin' | |
alias restart='sudo /usr/local/apache2/bin/apachectl restart' | |
alias stop='sudo /usr/local/apache2/bin/apachectl stop' | |
alias pkill='~/pkill.sh' |
#installation | |
yum update | |
yum install gcc mysql-devel python-devel mariadb-server mysql MySQL-python git | |
yum install epel-release | |
yum install nginx | |
easy_install Django pip uwsgi |
CREATE TABLE calendar_table ( | |
dt DATE NOT NULL PRIMARY KEY, | |
y SMALLINT NULL, | |
q tinyint NULL, | |
m tinyint NULL, | |
d tinyint NULL, | |
dw tinyint NULL, | |
monthName VARCHAR(9) NULL, | |
dayName VARCHAR(9) NULL, | |
w tinyint NULL, |
import os | |
import subprocess | |
for top, dirs, files in os.walk('/my/pdf/folder'): | |
for filename in files: | |
if filename.endswith('.pdf'): | |
abspath = os.path.join(top, filename) | |
subprocess.call('lowriter --invisible --convert-to doc "{}"' | |
.format(abspath), shell=True) |
# 1. Change the URL to the url of the site to be archived | |
# 2. run this script and pipe to an output text file FILENAME | |
# 3. Download the URLs via wget -i FILENAME | |
import json | |
from urllib.parse import urlencode, quote_plus | |
URL = "https://www.url.com" |
from random import randint | |
i = 0 | |
# count of wins without switching choice, with switching | |
without_switching = 0 | |
with_switching = 0 | |
iterations = 100000 | |
while i <iterations: |
These agencies received fewer than 50 FOIA requests in 2018. We can do better. | |
Administrative Conference of the United States | |
Advisory Council on Historic Preservation | |
American Battle Monuments Commission | |
Appraisal Subcommittee |
# Cheat Sheet | |
import warnings | |
warnings.filterwarnings('ignore') | |
# Pandas | |
pd.to_numeric(df, coalesce="") | |
pd.to_datetime() | |
pd.to_timestamp() | |
pd.to_timedelta() |
I hereby claim:
To claim this, I am signing this object: