This file contains hidden or 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
setup: function() { | |
// code to run on startup | |
flotoptions.yaxis.max = prompt("Enter a maximum graph height percentage, such as '50'");$.plot($("#graph"),$W.data,flotoptions); | |
}, | |
draw: function() { | |
// code to run every frame | |
} |
This file contains hidden or 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
setup: function() { | |
// code to run on startup | |
smooth_complete = function(row) { | |
var orig_img = $('#image')[0] | |
$('body').append("<canvas id='tmp_canvas'></canvas>") | |
var img = new Image() | |
img.src = orig_img.src | |
var canvas = $('#tmp_canvas')[0] | |
canvas.width = img.width |
This file contains hidden or 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 | |
from astropy.io import fits | |
header1 = """ | |
SIMPLE = T / conforms to FITS standard | |
BITPIX = -64 / array data type | |
NAXIS = 2 / number of array dimensions | |
NAXIS1 = 128 | |
NAXIS2 = 128 | |
CRVAL1 = 0.0 / Value at ref. pixel on axis 1 |
This file contains hidden or 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 functools | |
class class_or_instance(object): | |
def __init__(self, fn): | |
self.fn = fn | |
def __get__(self, obj, cls): | |
if obj is not None: | |
return lambda *args, **kwds: self.fn(obj, *args, **kwds) | |
else: | |
return lambda *args, **kwds: self.fn(cls, *args, **kwds) |
This file contains hidden or 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 functools | |
class class_or_instance(object): | |
def __init__(self, fn): | |
self.fn = fn | |
def __get__(self, obj, cls): | |
if obj is not None: | |
return lambda *args, **kwds: self.fn(obj, *args, **kwds) | |
else: | |
return lambda *args, **kwds: self.fn(cls, *args, **kwds) |
This file contains hidden or 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 fftw3 | |
import pyfftw | |
import multiprocessing | |
import matplotlib | |
import matplotlib.pyplot as pl | |
import time | |
def fft_comparison_tests(size=2048, dtype=np.complex128, byte_align=False): |
This file contains hidden or 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 pymc as pm | |
import numpy as np | |
# FIXME: Need to store duplicates too, when jumps are rejected. That means some mechanism | |
# for making sure the history is full-rank needs to be employed. | |
class HistoryCovarianceStepper(pm.StepMethod): | |
_state = ['n_points','history','tally','verbose'] | |
This file contains hidden or 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
""" | |
Match two sets of on-sky coordinates to each other. | |
I.e., find nearest neighbor of one that's in the other. | |
Similar in purpose to IDL's spherematch, but totally different implementation. | |
Requires numpy and scipy. | |
""" | |
from __future__ import division | |
import numpy as np |
This file contains hidden or 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
SIMPLE = T / file does conform to FITS standard BITPIX = 32 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 341 / length of data axis 1 NAXIS2 = 291 / length of data axis 2 EXTEND = T / FITS dataset may contain extensions COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H EXTNAME = 'On ' HDUNAME = 'On ' CTYPE1 = 'GLON-CAR' / Type of co-ordinate on axis 1 CTYPE2 = 'GLAT-CAR' / Type of co-ordinate on axis 2 RADESYS = ' ' / Reference frame for RA/DEC valu |
This file contains hidden or 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
require 'rubygems' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'date' | |
require 'uri' | |
# usage: ruby import.rb my-blog.xml | |
# my-blog.xml is a file from Settings -> Basic -> Export in blogger. | |
data = File.read ARGV[0] |
NewerOlder