This file contains 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
from hestia_earth.calculation import Engine | |
engine = Engine() | |
# cycle: {"@context": "https://hestia.earth/Cycle.jsonld", "@id": "id", "@type": "Cycle", "site": {"@type": "Site"}, ...} | |
engine.import_data(cycle) | |
# run the calculations | |
engine.calculate_all() | |
# read the data |
This file contains 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
// use this in https://www.clearroadev.xyz/geoprocessing/trips/process | |
{ | |
"coordinates": [{"lat":40.9144592,"lng":-73.1276016},{"lat":40.9144592,"lng":-73.1276016},{"lat":40.9145088,"lng":-73.1276321},{"lat":40.9145851,"lng":-73.1280136},{"lat":40.9146385,"lng":-73.1283722},{"lat":40.9146385,"lng":-73.1284714},{"lat":40.9143028,"lng":-73.1286545},{"lat":40.9140205,"lng":-73.1287308},{"lat":40.9140205,"lng":-73.1287308},{"lat":40.913868,"lng":-73.1287308},{"lat":40.9137154,"lng":-73.1287003},{"lat":40.9136124,"lng":-73.1287003},{"lat":40.9134064,"lng":-73.1289825},{"lat":40.9133072,"lng":-73.1291656},{"lat":40.9133072,"lng":-73.1291656},{"lat":40.9132805,"lng":-73.1292191},{"lat":40.9131279,"lng":-73.1292191},{"lat":40.912693,"lng":-73.1287842},{"lat":40.912281,"lng":-73.1283188},{"lat":40.9121284,"lng":-73.1280899},{"lat":40.9120255,"lng":-73.1279373},{"lat":40.9118195,"lng":-73.1276321},{"lat":40.9115906,"lng":-73.1272964},{"lat":40.9112587,"lng":-73.1267319},{"lat":40.911129,"lng":-73.1264496},{"lat":40.91 |
This file contains 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
{ | |
"id": "process-coordinates-lng-lat", | |
"coordinates": [[-73.1276016,40.9144592],[-73.1276016,40.9144592],[-73.1276321,40.9145088],[-73.1280136,40.9145851],[-73.1283722,40.9146385],[-73.1284714,40.9146385],[-73.1286545,40.9143028],[-73.1287308,40.9140205],[-73.1287308,40.9140205],[-73.1287308,40.913868],[-73.1287003,40.9137154],[-73.1287003,40.9136124],[-73.1289825,40.9134064],[-73.1291656,40.9133072],[-73.1291656,40.9133072],[-73.1292191,40.9132805],[-73.1292191,40.9131279],[-73.1287842,40.912693],[-73.1283188,40.912281],[-73.1280899,40.9121284],[-73.1279373,40.9120255],[-73.1276321,40.9118195],[-73.1272964,40.9115906],[-73.1267319,40.9112587],[-73.1264496,40.911129],[-73.1262207,40.911026],[-73.1254807,40.9107208],[-73.124733,40.9104652],[-73.1245041,40.9103889],[-73.1240158,40.9102325],[-73.1234818,40.9099007],[-73.1232224,40.9094658],[-73.1232224,40.908287],[-73.1229706,40.907444],[-73.1220474,40.9060097],[-73.1217422,40.9052162],[-73.1216354,40.9042702],[-73.1219177,40.9028625],[-73.1218948,40.9022217 |
This file contains 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
{ | |
"id": "process-coordinates-lat-lng", | |
"coordinates": [[40.9144592,-73.1276016],[40.9144592,-73.1276016],[40.9145088,-73.1276321],[40.9145851,-73.1280136],[40.9146385,-73.1283722],[40.9146385,-73.1284714],[40.9143028,-73.1286545],[40.9140205,-73.1287308],[40.9140205,-73.1287308],[40.913868,-73.1287308],[40.9137154,-73.1287003],[40.9136124,-73.1287003],[40.9134064,-73.1289825],[40.9133072,-73.1291656],[40.9133072,-73.1291656],[40.9132805,-73.1292191],[40.9131279,-73.1292191],[40.912693,-73.1287842],[40.912281,-73.1283188],[40.9121284,-73.1280899],[40.9120255,-73.1279373],[40.9118195,-73.1276321],[40.9115906,-73.1272964],[40.9112587,-73.1267319],[40.911129,-73.1264496],[40.911026,-73.1262207],[40.9107208,-73.1254807],[40.9104652,-73.124733],[40.9103889,-73.1245041],[40.9102325,-73.1240158],[40.9099007,-73.1234818],[40.9094658,-73.1232224],[40.908287,-73.1232224],[40.907444,-73.1229706],[40.9060097,-73.1220474],[40.9052162,-73.1217422],[40.9042702,-73.1216354],[40.9028625,-73.1219177],[40.9022217,-73.1218948 |
This file contains 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
(function(global, factory) { | |
if (typeof module === 'object' && typeof module.exports === 'object') { | |
var wrapper = function(w) { | |
if (!w.document) { | |
throw Error('AnyChart requires a window with a document'); | |
} | |
factory.call(w, w, w.document); | |
try { | |
w.acgraph.isNodeJS = Object.prototype.toString.call(global.process) == "[object process]"; | |
} catch (e) {}; |
This file has been truncated, but you can view the full file.
This file contains 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
(function(global, factory) { | |
if (typeof module === 'object' && typeof module.exports === 'object') { | |
var wrapper = function(w) { | |
if (!w.document) { | |
throw Error('AnyChart requires a window with a document'); | |
} | |
factory.call(w, w, w.document); | |
try { | |
w.acgraph.isNodeJS = Object.prototype.toString.call(global.process) == "[object process]"; | |
} catch (e) {}; |
This file contains 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
#!/bin/sh | |
# pre-push git hook. | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
pass=true | |
if [ $current_branch = "dev" ]; then | |
npm test | |
if [ $? != 0 ]; then | |
pass=false |
This file contains 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
#!/bin/sh | |
# pre-commit git hook. | |
files=$(git diff --cached --name-only --diff-filter=ACMR -- \*.js **/*.js) | |
pass=true | |
if [ "$files" != "" ]; then | |
for file in ${files}; do |
This file contains 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
(function() { | |
'use strict'; | |
var nodegit = require('nodegit'), | |
path = require('path'); | |
var ChangelogCommit = function() { | |
var _config = { | |
branch: 'master' | |
}, |
This file contains 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
/* | |
* Usage: node changelog.js [options] | |
* Options: | |
* --file Location of the generated CHANGELOG.MD | |
* --branch Name of the branch to generate the changelog | |
* --host JIRA host | |
* --port JIRA port number | |
* --username JIRA username | |
* --password JIRA password | |
* --progress Wether to display a progress bar while creating the changelog |
NewerOlder