Skip to content

Instantly share code, notes, and snippets.

View thoo's full-sized avatar

Thein Oo thoo

  • University of Pittsburgh Medical Center
  • Pittsburgh, PA
View GitHub Profile
@thoo
thoo / pg_copy_from.py
Created March 7, 2017 18:47 — forked from jsheedy/pg_copy_from.py
benchmark for postgres inserts using copy_from and IteratorFile from https://gist.github.com/jsheedy/ed81cdf18190183b3b7d
import time
import psycopg2
from iter_file import IteratorFile
conn = psycopg2.connect(host="localhost", database="test")
# args = [(1,2), (3,4), (5,6)]
args = [(i,i+1) for i in range(1,1*10**4,2)]
@thoo
thoo / Anaconda Install on EC2
Last active May 30, 2016 22:11 — forked from yangj1e/notebook.sh
Deploy Jupyter Notebook server
#!/usr/bin/env bash
cd ~
wget http://repo.continuum.io/archive/Anaconda3-4.0.0-Linux-x86_64.sh
bash Anaconda3-4.0.0-Linux-x86_64.sh -b
echo 'PATH="/home/ubuntu/anaconda3/bin:$PATH"' >> .bashrc
source ~/.bashrc