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
(*Get all airports in an area*)GetAirports[area_]:=GeoEntities[area,"Airport"] | |
(*Filter to only public-use airports with at least 1 runway longer than a specified length*) | |
FilterPublicAirportsAndRunwayLength[airports_,rwyLen_: 3000]:=Module[{rwy},rwy=Quantity[rwyLen,"Feet"]; | |
First[Transpose[Select[Transpose[{airports,EntityValue[airports,"LongestRunwayLength"],EntityValue[airports,"Uses"]}],#[[2]]>=rwy \[And] #[[3]][[1]]=="Public"&]]]] | |
(*Get the shortest tour of all the airports*) | |
AirportShortestTour[airports_]:= Module[{shortest}, | |
shortest = FindShortestTour[EntityValue[airports,"Position"]]; | |
{First[shortest], airports[[Last[shortest]]]}] |
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
import sys | |
import os | |
import urllib | |
import glob | |
import re | |
import urlparse | |
from shutil import copyfile | |
from lxml import html | |
from lxml import etree |
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
delete from MyTable; |
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
// Step 1: Generate the request token | |
var jwt = require('jsonwebtoken'); | |
var key = require('./key'); // path to service account JSON file | |
var SERVICE_ID = '...'; // this is the 'host' proprety of the service management's openapi.yaml | |
var now = Math.floor(Date.now() / 1000); | |
var payload = { | |
iat: now, // issued right now | |
exp: now + 3600, // expire after 1 hour |
OlderNewer