⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
# Integral Image + Time | |
# Ke, Y., Sukthankar, R., & Hebert, M. (2005). Efficient Visual Event Detection | |
# Using Volumetric Features. Tenth IEEE International Conference on Computer | |
# Vision ICCV05 Volume 1, 1, 166-173. | |
def integral(cube, closest, farthest): | |
""" | |
Compute the sum of pixels in a cube. |
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 scipy.signal as signal | |
import scipy.ndimage as nd | |
import time | |
def slidingWindow(field, window): | |
""" | |
Gold standard sliding window operator. This slides along the field | |
and sums gridcells in a window. |
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
""" | |
A simple example that generates a random figure and serves it using Bottle | |
""" | |
import numpy as np | |
import StringIO | |
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas | |
from matplotlib.figure import Figure |
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
*~ | |
*.pyc | |
.vagrant | |
venv |
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 IPython.core.display import Image | |
Image("http://www.python.org/images/python-logo.gif") |
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 xml.etree import cElementTree | |
from urlparse import urljoin | |
import requests | |
# namespaces for XML parsing | |
thredds = "http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0" | |
xlink = "http://www.w3.org/1999/xlink" | |
def crawl(catalog): |
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: utf-8 -*- | |
""" | |
Created on Wed Jul 17 10:50:56 2013 | |
@author: cmarshall | |
""" | |
import sip | |
sip.setapi('QString', 1) | |
sip.setapi('QVariant', 1) |
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
""" | |
Fabric configuration for a Python 3.3 environment using Anaconda. | |
""" | |
from fabric.api import run, cd | |
from fabric.context_managers import prefix | |
CONDA_REPO = 'http://repo.continuum.io/miniconda/' | |
CONDA_VERS = 'Miniconda3-3.0.0-Linux-x86_64.sh' |
OlderNewer