This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*.log | |
Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*.log | |
Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = new WebPage(), | |
address, output, size; | |
address = "http://www.metachunk.com/"; | |
width = 1024; height = 600; | |
output = "./screenshots/wat-"+width+"X"+height+".png"; | |
page.viewportSize = { width: width, height: height }; | |
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*.log | |
Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Furthest distance travelled from start point. // http://javi.cartodb.com/api/v2/sql?q= | |
WITH points AS | |
(SELECT | |
(SELECT (the_geom) FROM stratos ORDER BY id ASC LIMIT 1) as p1, | |
(SELECT (the_geom) FROM stratos | |
WHERE ST_x(the_geom)<180 AND ST_x(the_geom)>-180 AND ST_x(the_geom)<>0 | |
AND ST_x(the_geom)<>0 ORDER BY ST_Distance(the_geom,(SELECT the_geom | |
FROM stratos ORDER BY id ASC LIMIT 1)) DESC LIMIT 1) as p2 | |
) | |
SELECT ST_distance(p1::geography,p2::geography) as furthest_distance FROM points |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import urllib2 | |
import json | |
from cartodb import CartoDBAPIKey, CartoDBException | |
from secret import API_KEY | |
URL = 'http://services.redbullstratos.com/LiveData/Get' | |
cl = CartoDBAPIKey(API_KEY, 'javi') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"mappings": { | |
"locations": { | |
"properties": { | |
"recordId": { | |
"type": "long" | |
}, | |
"namePlain": { | |
"type": "string", | |
"store": "no", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store | |
*.log | |
Gemfile.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Simple script for creating demo data in CKAN | |
Requires existence of a tester user. You can create this by doing:: | |
paster create-test-data user | |
''' | |
import ckanclient | |
base_location = 'http://localhost:5000/api' | |
api_key = 'tester' |