Skip to content

Instantly share code, notes, and snippets.

@gazzar
gazzar / mpl_colormaps
Last active August 29, 2015 14:00
Playing with Colo(u)rmaps
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:c94d0761ba047cfd77267c1d2e8b1d694c8fb3c18b19f8007e5c90777da3bfd5"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@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.
@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 / 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 / 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 / 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 / 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 / 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 / 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 / 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