Zoomable/rotatable world globe that uses orthographic projection. Drag behavior is enhanced as described here: https://www.jasondavies.com/maps/rotate/
Performance is not good due to redrawing whole world upon zoom/drag.
# based off of this code https://gist.github.com/nandajavarma/a3a6b62f34e74ec4c31674934327bbd3 | |
# Brandon Skerritt | |
# https://skerritt.tech | |
def binary_search(the_array, item, start, end): | |
if start == end: | |
if the_array[start] > item: | |
return start | |
else: | |
return start + 1 |
from random import choice | |
import string | |
import subprocess | |
def generate_passwd(length=8, chars=string.letters+string.digits+'{}"&$@#%*.;'): | |
return ''.join([choice(chars) for i in range(length)]) | |
def generate_username(prefix="jason", index=1): | |
""" """ | |
return "{}{:05d}".format(prefix, index+1) |
LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so | |
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
Zoomable/rotatable world globe that uses orthographic projection. Drag behavior is enhanced as described here: https://www.jasondavies.com/maps/rotate/
Performance is not good due to redrawing whole world upon zoom/drag.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<svg id="defs"> | |
<defs> | |
<linearGradient id="gradBlue" x1="0%" y1="0%" x2="100%" y2="0%"> |
/* | |
* L.SingleTile uses L.ImageOverlay to display a single-tile WMS layer. | |
* url parameter must accept WMS-style width, height and bbox. | |
*/ | |
L.SingleTile = L.ImageOverlay.extend({ | |
defaultWmsParams: { | |
service: 'WMS', | |
request: 'GetMap', | |
version: '1.1.1', |
<!- WMO_CategoryCode :: New CodeList for WMO Core Metadata Profile | |
--> | |
<gmx:codelistItem> | |
<gmx:CodeListDictionary gml:id="WMO_CategoryCode"> | |
<gml:description>additional topic categories for WMO community</gml:description> | |
<gml:identifier codeSpace="WMO Core Metadata Profile">WMO_CategoryCode</gml:identifier> | |
<gmx:codeEntry> | |
<gmx:CodeDefinition gml:id="WMO_CategoryCode_weatherObservations"> | |
<gml:description>weather observations</gml:description> | |
<gml:identifier codeSpace="WMO Core Metadata Profile">weatherObservations</gml:identifier> |
{ | |
"identificationInfo": | |
{ | |
"abstract": "A DevCoCast product, GOES\/MSG Composite is a product created by composing the GOES-12 IR images with MSG IR images, every 15 minutes. Every 3 hours, the composite will be derived from the full disk of GOES and full disk of MSG, in the 13-North to 50-South Latitude; 85-West to 55-East Longitude region, encompassing South America and Africa.", | |
"title": "Composites - GOES-MSG - Africa, South America", | |
"thumbnail": "http:\/\/navigator.eumetsat.int:80\/smartEditor\/preview\/GMC.jpg", | |
"keywords": | |
[ | |
"Atmospheric conditions", | |
"Agriculture", |
import re | |
class CardOutParser(object): | |
LINEEXPR = "##T-step: old_ts#(?P<tstep_old>.*), new_ts#(?P<tstep_new>.*), gyro_Dt#(?P<dt>.*)" | |
lre_timing = re.compile(LINEEXPR) | |
LINEEXPR = "#T-acc#(?P<timestamp_tacc>.*)#Am-Raw#(?P<r_ax>.*),(?P<r_ay>.*),(?P<r_az>.*)#T-gyr#(?P<timestamp_tgyr>.*)#Gm-Raw#(?P<g_ax>.*),(?P<g_ay>.*),(?P<g_az>.*)#T-mag#(?P<timestamp_tmag>.*)#Mm-Raw#(?P<m_ax>.*),(?P<m_ay>.*),(?P<m_az>.*)" | |
lre_data = re.compile(LINEEXPR) | |
# working query with highlight and facets first | |
curl -XGET 'http://localhost:9200/_search?pretty=true' -d ' | |
{ "from" : 0, "size" : 1, | |
"highlight" : { | |
"fields" : | |
{ "identificationInfo.title": {"fragment_size":150,"number_of_fragments":3}, "identificationInfo.abstract": {} } | |
} , | |
"facets" : | |
{ |