Generate a new GPG key (https://help.github.com/articles/generating-a-new-gpg-key/)
$ gpg2 --full-gen-key
$ gpg2 --list-keys --keyid-format LONG
from collections import defaultdict | |
import boto3 | |
""" | |
A tool for retrieving basic information from the running EC2 instances. | |
""" | |
# Connect to EC2 | |
ec2 = boto3.resource('ec2') |
def s3_to_pandas(client, bucket, key, header=None): | |
# get key using boto3 client | |
obj = client.get_object(Bucket=bucket, Key=key) | |
gz = gzip.GzipFile(fileobj=obj['Body']) | |
# load stream directly to DF | |
return pd.read_csv(gz, header=header, dtype=str) | |
def s3_to_pandas_with_processing(client, bucket, key, header=None): |
# -*- coding: utf-8 -*- | |
""" | |
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for | |
each table | |
""" | |
from bs4 import BeautifulSoup | |
import urllib2 | |
import os | |
import codecs |
curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
chmod +x Miniconda3-latest-Linux-x86_64.sh | |
./Miniconda3-latest-Linux-x86_64.sh | |
echo 'set -U fish_user_paths $HOME/miniconda3/bin $fish_user_paths' >> ~/.config/fish/config.fish | |
echo 'source (conda info --root)/etc/fish/conf.d/conda.fish' >> ~/.config/fish/config.fish | |
echo 'set -gx CONDA_LEFT_PROMPT 1' >> ~/.config/fish/config.fish | |
curl -L https://get.oh-my.fish | fish |
$ gpg2 --full-gen-key
$ gpg2 --list-keys --keyid-format LONG
MASTER=document.tex | |
DESCRIBE=$(shell git describe --tags --dirty) | |
SOURCE="\def\MyGitRevision{$(DESCRIBE)}\input{$(MASTER)}" | |
full: | |
make pdf | |
make pdf | |
pdf: | |
pdflatex "\def\MyGitRevision{$(DESCRIBE)}\input{$(MASTER)}" |
# | |
# Vagrantfile for testing | |
# | |
Vagrant::configure("2") do |config| | |
# the Chef version to use | |
config.omnibus.chef_version = "11.4.4" | |
def configure_vbox_provider(config, name, ip, memory = 384) | |
config.vm.provider :virtualbox do |vbox, override| |
Compression | |
------------ | |
http://linux.dsplabs.com.au/tar-how-to-create-and-extract-tar-gz-and-bz2-compressed-archives-under-linux-p39/ | |
**Creating archives tar | |
tar cf dir.tar dir/ | |
tar czf dir.tar.gz dir/ | |
tar cjf dir.tar.bz2 dir/ | |
**Extracting archives |
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[T1]{fontenc} | |
\usepackage[spanish]{babel} | |
\usepackage{times} | |
\usepackage{color} | |
\definecolor{gray97}{gray}{.97} | |
\definecolor{gray75}{gray}{.75} |
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |