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 groovy.grape.Grape | |
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.2') | |
import groovyx.net.http.RESTClient | |
import static groovyx.net.http.ContentType.JSON | |
import groovy.json.JsonSlurper | |
def urlToSendTo = 'https://hooks.slack.com/services/token/tokenAgain/evenMoreToken' | |
def message = """{ |
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 groovy.xml.* | |
/** | |
* Removes some additional MetaData I dont want and splits the | |
* US county KML file into seperate files for each state | |
* Get the census data from: | |
* https://www.census.gov/geo/maps-data/data/kml/kml_counties.html | |
* The higher the ratio, the lower the resolution | |
* | |
* This data can be easily imported into a Google MyMap | |
* |
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/bash | |
# `` sudo sh install.sh `` | |
# Developement environnement | |
# | |
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724 | |
echo Install Phantomjs | |
cd /usr/local/share | |
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | |
sudo tar -xvf phantomjs-2.1.1-linux-x86_64.tar.bz2 |
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
%fast altitude calculation based on: | |
%https://en.wikipedia.org/wiki/Pressure_altitude | |
%(1-(millibars/1013.25)^(0.190284))*145366.45 = feet | |
%Bounds setup: | |
paMin = 69683; | |
paMax = 106597; | |
stepCount = 500; %number of values to plot | |
%setup pa vector |
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 numpy as np | |
import os | |
import matplotlib.pyplot as plt | |
def f(pressure): | |
return ((1.0 - pow(pressure/101325.0, 0.190284)) * 145366.45) * 0.3048 | |
def finv(alt): | |
return 101325.0*(1-2.25577*10**-5 * alt) ** 5.25588 |