Star this Gist to indicate preference for the flatter form (no "when", no "type", no new GeoJSON items, JSON-LD required) of GeoJSON-LD time (see geojson/geojson-ld#13).
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 datetime | |
import math | |
import mercantile | |
import pytz | |
import suncalc | |
def date(yyyy, mm, dd, hh): | |
dt_naive = datetime.datetime(yyyy, mm, dd, int(hh), int((60 * hh) % 60)) | |
dt_local = dt_naive.astimezone(pytz.timezone('America/Los_Angeles')) | |
dt_utc = dt_local.astimezone(pytz.utc) |
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
#!/usr/bin/python3 | |
import html | |
import mailbox | |
import re | |
import sys | |
import time | |
from urllib.parse import urljoin | |
import requests |