Need to install paramiko port and context2lib then fabric python 3.3 port:
pip install git+https://github.com/scottkmaxwell/paramiko.git@py3-support-without-py25
pip install contextlib2
pip install git+https://github.com/pashinin/fabric.git@p33
""" | |
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' |
# -*- coding: utf-8 -*- | |
""" | |
Created on Wed Jul 17 10:50:56 2013 | |
@author: cmarshall | |
""" | |
import sip | |
sip.setapi('QString', 1) | |
sip.setapi('QVariant', 1) |
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): |
from IPython.core.display import Image | |
Image("http://www.python.org/images/python-logo.gif") |
*~ | |
*.pyc | |
.vagrant | |
venv |
""" | |
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 |
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. |
# 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. |