Skip to content

Instantly share code, notes, and snippets.

View pelson's full-sized avatar

Phil Elson pelson

View GitHub Profile
@pelson
pelson / speed_of_loading.ipynb
Last active December 23, 2015 17:29
Measures the speed of reading an entire 2d array then indexing, vs reading a single value after seeking.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / colors.html
Last active December 27, 2015 01:59
View all of the named colours in matplotlib
<html><body><table>
<tr><td>aliceblue</td><td bgcolor="#F0F8FF" width="150px"></td></tr>
<tr><td>antiquewhite</td><td bgcolor="#FAEBD7" width="150px"></td></tr>
<tr><td>aqua</td><td bgcolor="#00FFFF" width="150px"></td></tr>
<tr><td>aquamarine</td><td bgcolor="#7FFFD4" width="150px"></td></tr>
<tr><td>azure</td><td bgcolor="#F0FFFF" width="150px"></td></tr>
<tr><td>beige</td><td bgcolor="#F5F5DC" width="150px"></td></tr>
<tr><td>bisque</td><td bgcolor="#FFE4C4" width="150px"></td></tr>
<tr><td>black</td><td bgcolor="#000000" width="150px"></td></tr>
<tr><td>blanchedalmond</td><td bgcolor="#FFEBCD" width="150px"></td></tr>
@pelson
pelson / notebook.ipynb
Last active December 29, 2015 08:19
Identifying why two coordinates do not become orthogonal can be tricky when using iris' "load" functionality. This notebook aids to diagnose pictorially what is going on, and offers a non-general solution but which can be re-applied to similar cases.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / vectors.ipynb
Created December 3, 2013 16:25
Demonstration of some of the vector visualisations in cartopy.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / cartopy_map_tiles.ipynb
Last active August 29, 2015 13:56
Example of adding a map tiles layer to a Cartopy map.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / Biggus_intro.ipynb
Last active August 29, 2015 13:56
Presentation for PyData London 2014 on Biggus.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / OpenLayers.js
Last active September 18, 2015 12:19
Demonstration of constructing web map tile files. This is a useful step for static map tiles, though a further example using tornado to generate the tiles on the fly will follow - see pelson.github.io for.
/*
OpenLayers.js -- OpenLayers Map Viewer Library
Copyright (c) 2006-2013 by OpenLayers Contributors
Published under the 2-clause BSD license.
See http://openlayers.org/dev/license.txt for the full text of the license, and http://openlayers.org/dev/authors.txt for full list of contributors.
Includes compressed code under the following licenses:
@pelson
pelson / sorted.ipynb
Last active April 14, 2021 15:39
Sorting an Iris cube by coordinate.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / shapely.ipynb
Created March 26, 2014 15:10
Demonstration of the new shapely.vectorized functionality
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.