Skip to content

Instantly share code, notes, and snippets.

View bradenmacdonald's full-sized avatar

Braden MacDonald bradenmacdonald

View GitHub Profile
@bradenmacdonald
bradenmacdonald / gist:1726769
Created February 3, 2012 00:39
Creating a bunch of plots in a PDF file using astrodendro
#!/usr/bin/env python
# coding: utf8
import numpy as np
import sys
import subprocess
import matplotlib as mpl
from matplotlib.backends.backend_pdf import PdfPages
from astrodendro import Dendrogram
from astrocube import DataCube
@bradenmacdonald
bradenmacdonald / gist:1592916
Created January 11, 2012 03:50
astrodendro-viewer Macro for plot sorting tests
import numpy as np
plot_sort_name = "npix"
cube_view.z = 212
set_color_map("bone")
highlighters = [create_highlighter(c) for c in ["purple", "green", "orange", "brown"]]
@bradenmacdonald
bradenmacdonald / gist:1320318
Created October 27, 2011 18:05
Django-CMS Wymeditor cross-domain issue workaround
# Set up your site so that static files can be accessed from the static
# domain *or* from a subfolder of the main site (e.g. use a symlink)
# Then add a setting like the following to your site's settings.py,
# such that /static/ is the same as http://static.yourdomain.com
#############################################################################
WYM_CMS_STATIC_URL = '/static/cms/'
#############################################################################
# Replace the last line of cms/plugins/text/settings.py with the following: