I hereby claim:
- I am byrney on github.
- I am byrney (https://keybase.io/byrney) on keybase.
- I have a public key ASD5QvelbmJVtgs4w9A_Z_bm8qSfMCqt1ro0oXqE6bZtjAo
To claim this, I am signing this object:
const net = require('net'); | |
const stream = require('stream'); | |
function createSource(count, batchSize, sep){ | |
const s = stream.Readable(); | |
let buf = ''; | |
for(let i = 0; i < count; i++){ | |
if(i > 0 && (i % batchSize) == 0) { | |
s.push(buf + sep); | |
buf = ''; |
J1001 J1002 72 | |
J1001 J1026 795 | |
J1001 J1031 28 | |
J1002 J1001 72 | |
J1002 J1019 161 | |
J1002 J1030 242 | |
J1003 J1011 189 | |
J1003 J1012 593 | |
J1003 J1021 639 | |
J1003 J1030 463 |
I hereby claim:
To claim this, I am signing this object:
<html> | |
<head> | |
<style> | |
#overlay { | |
} | |
.transform-delay { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Toggling layers</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.js'></script> | |
<link href='https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } |
host='localhost' | |
port="5432" | |
db='rob' | |
user='rob' | |
password='password' | |
filter = "name = 'M5'" | |
uri = QgsDataSourceURI() | |
uri.setConnection(host, port, db, user, password) | |
uri.setDataSource("public", "dft_major_roads", "geom", filter ,"gid") |
# | |
# Paste this into the QGIS python console | |
# | |
sx=-3.51249995613522 | |
sy=50.7355583126591 | |
ex=-3.53626387621797 | |
ey=50.7058687562277 | |
host = 'http://router.project-osrm.org' | |
template = '/route/v1/driving/{},{};{},{}?steps=true' |
import time | |
import random | |
from multiprocessing import Process, Queue, current_process, freeze_support | |
# | |
# Function run by worker processes | |
# | |
def worker(state, input, output): |
""" | |
Usage: | |
program run [options] [--] (FILE... | --stdin) | |
program load [options] [--] (FILE... | --stdin) | |
Options: | |
-d DATABASE --database=DATABASE Specify database | |
-v --verbose Be verbose |
> for(i in c(1,10,25,50, 100)){ print(system.time(x <- do_work(300, i, 50)))} | |
user system elapsed | |
0.03 0.02 0.08 | |
user system elapsed | |
0.03 0.02 0.05 | |
user system elapsed | |
0.04 0.00 0.06 | |
user system elapsed | |
0.03 0.00 0.05 | |
user system elapsed |