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 requests | |
import bs4 | |
import json | |
import re | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
def parse_index(): | |
""" Return a list of sub-pages with voting data """ | |
response = requests.get("https://www.leg.bc.ca/content-hansard/Index/40th4th/2015votesmhds.htm") | |
if response.status_code != 200: |
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
#! /usr/bin/env python | |
# | |
# This is a particularly simple digitizer implemented with matplotlib. Intended | |
# for converting graphs and figures into pixel measurements that can be | |
# transformed into useful data. | |
# | |
# Requires Python 3.4+ because I was playing with asyncio coroutines. | |
# | |
# Nat Wilson | |
# March, 2015 |
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
""" Tool for searching Landsat archives """ | |
from urllib import request | |
from datetime import datetime | |
from xml.etree import ElementTree | |
from karta import Polygon | |
from karta.crs import LonLatWGS84 | |
from IPython.display import Image, display |
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
# NEGM 2015 | |
## Ben Linhoff | |
Using radon-222 as a proxy for distributed drainage, measured from a proglacial stream in Greenland | |
## Mauri Pelto | |
**Using transient snowline migration to assess alpine glaciers** |
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
case "${host_os}" in | |
*cygwin*) | |
PYTHONINCL=-I$PYTHON_ROOT/include | |
;; | |
*linux*|*darwin*) | |
PYTHONINCL=-I$PYTHON_ROOT/include/python$PYTHON_VERSION | |
;; | |
esac |
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/sh | |
./configure \ | |
--prefix="$ISSM_DIR" \ | |
--with-triangle-dir="$ISSM_DIR/externalpackages/triangle/install" \ | |
--with-python-dir="$HOME/venv-issm" \ | |
--with-python-numpy-dir="$HOME/venv-issm/lib/python2.7/site-packages/numpy/core/include/numpy" \ | |
--with-mpi-include="$ISSM_DIR/externalpackages/mpich/install/include" \ | |
--with-mpi-libflags="-L$ISSM_DIR/externalpackages/mpich/install/lib -lmpich -lmpl -ldl" \ | |
--with-petsc-dir="$ISSM_DIR/externalpackages/petsc/install" \ | |
--with-metis-dir="$ISSM_DIR/externalpackages/metis/install" \ |
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 os | |
def world_files(fname): | |
""" | |
Determine potential world filename combinations, without checking | |
their existence. | |
For example, a '*.tif' file may have one of the following | |
popular conventions for world file extensions '*.tifw', | |
'*.tfw', '*.TIFW' or '*.TFW'. |
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
# Misc higher-level functions for Julia | |
function foldr(f::Function, xs::Number) | |
xs | |
end | |
function foldr(f::Function, xs::Vector) | |
L = length(xs) | |
if L == 0 | |
return [] |