View shapely_benchmarks.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View iPython_svg_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View pygments_magic.py
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
""" | |
IPython magics for displaying source code files with syntax highlighting. | |
This uses the Pygments library: http://pygments.org. | |
To make it works, you need to cute and paste this file into | |
~/.ipython/profile_default/startup/ | |
If you use custom profile, replace profile_default with your own path | |
Two magics are available: |
View wrapper-usage.js
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
define([ | |
'my/superModule', | |
'wrapper'; | |
], function (superModule, wrapper) { | |
// Let's wrap it, aspect style | |
wrapper(superModule, 'superModule'); | |
// Tada, all superModule methods will now log | |
}); |
View extract_airports_pdf.py
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
# -*- coding: utf8 -*- | |
import lxml.html | |
from lxml.cssselect import CSSSelector | |
# get some html | |
import requests | |
def scrapeAirport(page): | |
r = requests.get('http://aeronav.faa.gov/new_afd.asp?effDate=24JUL2014&eff=07-24-2014&end=09-18-2014&search=&submit1=Search&select=&StateSearch=ALL&CitySearch=&ChartSearch=&volsearch=&navaidSearch=&page=%s#results' % page) |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Swipe between layers</title> | |
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
<script src='http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js'></script> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<style> | |
body { margin:0; padding:0; } |
View index.html
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/en/v3.0.0/css/ol.css" type="text/css"> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
.map { |
View index.html
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/proj4js/1.1.0/proj4js-compressed.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js"></script> | |
<script type="text/javascript"> | |
//Correct datum for potsdam (altough already corrected with changes in towgs84 in the projection declaration) | |
// Only useful if you use the outdated spatialreference.org proj4js definition whereas epsg.io is right... | |
Proj4js.Datum["potsdam"] = {towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", ellipse: "bessel", datumName: "Potsdam Rauenberg 1950 DHDN"}; | |
// Declare projection |
View index.html
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.3/proj4.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js"></script> | |
<script type="text/javascript"> | |
//Snippet comes from http://osgeo-org.1560.x6.nabble.com/OL-2-13-1-latest-Proj4js-td5081636.html | |
window.Proj4js = { | |
Proj: function(code) { | |
return proj4(Proj4js.defs[code]); |
View deploy_python_27_alwaysdata.py
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 __future__ import with_statement | |
from fabric.api import local, settings, abort, run, cd, env | |
from fabric.contrib.console import confirm | |
from fabric.contrib.files import exists, contains | |
# We reuse config from $HOME/.ssh/config | |
# Try | |
# fab --hosts=alwaysdata -f deploy_python_27_alwaysdata.py deploy_python | |
# or to set a specific version | |
# fab --hosts=alwaysdata -f deploy_python_27_alwaysdata.py deploy_python:version=2.7.5 |
OlderNewer