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
{ | |
"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
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
{ | |
"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
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 |
OlderNewer