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
from __future__ import division | |
import numpy as np | |
import math | |
for n in [2**50, 2**55., 2**60.]: | |
print '===', n | |
m = 1e10 * 1e2 * 365 * 1e2 | |
print m, '%e' % 2**60 |
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
{ | |
"cursor": "0|10", | |
"items": [ | |
{ | |
"meta": { | |
"timestamp": "2013-11-18 16:27:39", | |
"labels": [ | |
"timeline" | |
], | |
"uri": "message\/fm:815deaa8721a48f1a76577d6c21f5863:2\/", |
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
class PlanckUniversalColormap(Colormap): | |
name = "planckuniv" | |
def __init__(self, cmap): | |
Colormap.__init__(self, "planckuniv-" + cmap.name, cmap.N) | |
self.cmap = cmap | |
self.N = self.cmap.N | |
def __call__(self, xi, alpha=1.0, **kw): | |
x = xi * (1e7+1e3) - 1e3 | |
yi = self.modsinh(x) |
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
{ | |
"metadata": { | |
"name": "Multigrid Sinv" | |
}, | |
"nbformat": 3, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", |
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
""" | |
A PyYAML loader that annotates position in source code. | |
The loader is based on `SafeConstructor`, i.e., the behaviour of | |
`yaml.safe_load`, but in addition: | |
- Every dict/list/unicode is replaced with dict_node/list_node/unicode_node, | |
which subclasses dict/list/unicode to add the attributes `start_mark` | |
and `end_mark`. (See the yaml.error module for the `Mark` class.) |
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
from numpy import * | |
from scipy.linalg import eig, eigh | |
N = 100 | |
M = 40 | |
noise = 0.01 | |
i = arange(M, dtype=float) | |
cinv = 1 + i**2 |
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
!/bin/sh | |
# start multi-line shebang | |
if "true" : '''\'; then | |
p=`pwd`; f="$0"; b=`basename $f` | |
while [ -L "$f" ]; do | |
f=`readlink $f`; cd `dirname $f`; f=`basename $f` | |
done | |
f=`pwd -P` | |
cd "$f/../../../../usr/bin" | |
i=`pwd -P` |
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
from __future__ import division | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import cPickle as pickle | |
import scipy.linalg as la | |
import scipy | |
from commander.sphere.mmajor import lm_to_idx | |
nside = 16 |
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
from __future__ import division | |
import numpy as np | |
import os | |
import commander as cm | |
# | |
# Parameters (just variables that are reused further down)\ | |
# | |
output_filename = 'newmonodip-em7-%d.h5' % os.getpid() |
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
from __future__ import division | |
import numpy as np | |
import os | |
import commander as cm | |
# | |
# Parameters (just variables that are reused further down)\ | |
# | |
output_filename = 'sync-dust-priors-%d.h5' % os.getpid() |
NewerOlder