Skip to content

Instantly share code, notes, and snippets.

@gazzar
gazzar / fitpack.pyf
Created September 12, 2012 00:08
Python f2py wrapper for interpolating tensioned splines Fortran routines in Alan K Cline's fitpack avalaible from netlib.org
! -*- f90 -*-
! f2py wrapper for interpolating tensioned splines
! This file was auto-generated with f2py (version:2).
! See http://cens.ioc.ee/projects/f2py2e/
! Modified by Gary Ruben 2012-09-03
! This wraps the curv1() and curv2() functions in Alan K Cline's fitpack http://www.netlib.org/fitpack
! Also requires the fitpack functions ceez(), intrvl(), snhcsh(), and terms().
! fitpack.f contains both high and low precision versions of snhcsh(). I used the higher precision version.
! The low precision version in fitpack.f must be commented out prior to running f2py as follows to create the wrapper:
! f2py -c fitpack.pyf fitpack.f
@gazzar
gazzar / arrayplotter.py
Created October 17, 2012 05:13
Chaco FunctionImageData test
#!/usr/bin/env python
"""
Demonstrates use of the FunctionImageData that depends on an external range
and returns different data depending on that range.
"""
# Major library imports
from numpy import pi, linspace, meshgrid, sin
# Enthought library imports
@gazzar
gazzar / barchart.ipynb
Created November 14, 2012 06:07
barchart.ipynb ipython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gazzar
gazzar / pies.ipynb
Created November 14, 2012 06:37
Another pie chart/wind rose thingy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gazzar
gazzar / app.py
Created December 6, 2012 06:52
Code attempting to update icons on TreeEditor nodes in a TraitsUI TreeEditor
import os
#from traits.etsconfig.api import ETSConfig
#ETSConfig.toolkit = 'qt4'
import numpy as np
from enable.api import ComponentEditor
from traits.api import Str, Bool, Enum, List, Dict, Any, \
HasTraits, Instance, Button, on_trait_change
from traitsui.api import View, Group, HGroup, VGroup, HSplit, \
Item, UItem, TreeEditor, TreeNode, TreeNodeObject, Menu
from traitsui.key_bindings import KeyBinding, KeyBindings
@gazzar
gazzar / windrose examples.ipynb
Created February 14, 2013 11:37
IPython notebook demonstrating some windrose-like plots
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gazzar
gazzar / 04-bloom-filters-GR.ipynb
Created March 17, 2013 08:33
Modified version of Titus Brown's ipynb from http://ivory.idyll.org/blog/2013-pycon-awesome-big-data-algorithms-talk.html with modified ipythonblocks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gazzar
gazzar / Abundances_wordcloud.ipynb
Created June 8, 2013 13:08
An IPython notebook for creating a Wordle.net wordcloud with sizes representing chemical element abundances in the solar system
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gazzar
gazzar / rebin.py
Created April 9, 2014 08:22 — forked from zonca/rebin.py
import numpy as np
def rebin(a, new_shape):
"""
Resizes a 2d array by averaging or repeating elements,
new dimensions must be integral factors of original dimensions
Parameters
----------
a : array_like
@gazzar
gazzar / cubehelix_colormap.ipynb
Last active August 29, 2015 14:00
IPython notebook demonstrating the cubehelix colormap in matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.