I hereby claim:
- I am jczaplew on github.
- I am johnjcz (https://keybase.io/johnjcz) on keybase.
- I have a public key whose fingerprint is 8FB0 0594 B47A F27F 890D 5EE6 969F F71E 2039 17F8
To claim this, I am signing this object:
from tqdm import * | |
from queue import Queue | |
from threading import Thread | |
import time | |
THREADS = 4 | |
class WorkerThread(Thread): | |
def __init__(self, queue): | |
Thread.__init__(self) |
class Cancelable { | |
constructor() { | |
this.canceled = false | |
} | |
count(val) { | |
return new Promise((resolve, reject) => { | |
setTimeout(function() { | |
resolve(val*val) | |
}, 1000) |
-- | |
-- PostgreSQL database dump | |
-- | |
-- Dumped from database version 9.6.4 | |
-- Dumped by pg_dump version 9.6.4 | |
SET statement_timeout = 0; | |
SET lock_timeout = 0; | |
SET idle_in_transaction_session_timeout = 0; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8' /> | |
<title></title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install git | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt-get update && sudo apt-get install gcc-4.9 g++-4.9 | |
rm /usr/bin/g++ && sudo ln -s /usr/bin/g++-4.9 /usr/bin/g++ | |
wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-0.9.34.tar.bz2 |
I hereby claim:
To claim this, I am signing this object:
''' | |
Adapted from http://stackoverflow.com/a/1881201/1956065 and http://stackoverflow.com/a/25304159/1956065 | |
12 January 2017 | |
John J Czaplewski | |
[email protected] | |
''' | |
def xProduct(v0, v1, v2): | |
dx1 = v1[0] - v0[0] | |
dy1 = v1[1] - v0[1] |
import csv | |
import sys | |
import subprocess | |
with open(sys.argv[1], 'rb') as csvfile: | |
reader = csv.reader(csvfile) | |
header_row = reader.next() | |
cmd1 = "psql -U you dbname -c 'CREATE TABLE " + sys.argv[2] + " (" | |
for idx, column in enumerate(header_row): |