As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/python | |
import os | |
import sys | |
import boto3 | |
# get an access token, local (from) directory, and S3 (to) directory | |
# from the command-line | |
local_directory, bucket, destination = sys.argv[1:4] |
# -*- coding: utf-8 -*- | |
import datetime as dt | |
import numpy | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as md | |
import locale | |
from functools import reduce | |
locale.setlocale(locale.LC_ALL, "") | |
matplotlib.rcParams['font.family']='IPAPGothic' |
import psycopg2 as pg | |
import pandas.io.sql as psql | |
# get connected to the database | |
connection = pg.connect("dbname=mydatabase user=postgres") | |
dataframe = psql.frame_query("SELECT * FROM <tablename>", connection) |
#!/bin/sh | |
# Userland mode (~$USER/), (~/). | |
# ~/.fonts is now deprecated and that | |
#FONT_HOME=~/.fonts | |
# ~/.local/share/fonts should be used instead | |
FONT_HOME=~/.local/share/fonts | |
echo "installing fonts at $PWD to $FONT_HOME" | |
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro" |
# Install R | |
sudo apt-get update | |
sudo apt-get install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev | |
# Install RStudio | |
cd ~/Downloads | |
wget https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb | |
sudo gdebi rstudio-xenial-1.1.383-amd64.deb | |
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile |
import logging | |
import flask | |
app = flask.Flask(__name__) | |
@app.before_first_request | |
def setup_logging(): | |
if not app.debug: | |
# In production mode, add log handler to sys.stderr. | |
app.logger.addHandler(logging.StreamHandler()) |
par(mar=c(0,0,0,0)) | |
plot(0,0,xlim=c(0,28),ylim=c(0,1), | |
xaxt="n",yaxt="n",bty="n",xlab="",ylab="",type="n") | |
i <- 1 | |
for(j in 1:20) | |
{ | |
test <- (6+j):26 | |
train <- 1:(5+j) | |
arrows(0,1-j/20,27,1-j/20,0.05) | |
points(train,rep(1-j/20,length(train)),pch=19,col="blue") |
""" | |
AWS Batch wrapper for Luigi | |
From the AWS website: | |
AWS Batch enables you to run batch computing workloads on the AWS Cloud. | |
Batch computing is a common way for developers, scientists, and engineers | |
to access large amounts of compute resources, and AWS Batch removes the | |
undifferentiated heavy lifting of configuring and managing the required |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm