Skip to content

Instantly share code, notes, and snippets.

View pelson's full-sized avatar

Phil Elson pelson

View GitHub Profile
@pelson
pelson / index.ipynb
Last active January 5, 2019 11:36
First pass at documenting the cartopy project_segment algorithm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / index.ipynb
Last active August 31, 2018 09:10
A notebook to answer a StackOverflow question (https://stackoverflow.com/questions/51801109) relating to animating the rotation of a projecton using cartopy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import cartopy.crs as ccrs
import matplotlib.animation as animation
import matplotlib.pyplot as plt
ax = plt.axes(projection=ccrs.Robinson())
ax.stock_img()
ny_lon, ny_lat = -75, 43
delhi_lon, delhi_lat = 77.23, 28.61
@pelson
pelson / contour.geojson
Created July 4, 2018 12:36
Example of a GeoJSON produced with cartopy and matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / mega_merge.ipynb
Last active July 4, 2018 06:41
Iris cube mega-merge: how to join disjoint tiles into a single cube with Iris
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / scalar_pp.ipynb
Created June 13, 2018 03:27
Working around a scalar PP saving issue by adding an extra point to a scalar dimension
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / .gitignore
Last active May 27, 2018 08:49
Looking at how much of the South West Coast Path I've walked
.ipynb_checkpoints/
south_west_coast_path.gpx
@pelson
pelson / LFRic_UGRID_containment.ipynb
Last active May 25, 2018 11:30
LFRic's cubesphere UGRID and containment/intersection testing investigation using Shaply and Cartopy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pelson
pelson / demo.py
Last active February 1, 2018 08:40
aiohttp security authorization for StaticResource (or any aiohttp resource)
from aiohttp import web
from functools import wraps
from logging import getLogger
from types import MethodType
_LOGGER = getLogger(__name__)
AUTH_USER = 'authenticated_user'
@pelson
pelson / example.ipynb
Last active February 21, 2024 16:05
Example of authenticating a GitHub app using jwt in Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.