This file contains 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
%matplotlib inline | |
import matplotlib.pyplot as plt | |
from matplotlib import rc | |
# To use unicode, turn off latex | |
#rc('text', usetex=True) | |
import math | |
import numpy as np | |
import scipy as sp |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
"""Callable object, to test various parts of ipython's info system. | |
Run this file and then do f(, g( or c( or c.method( in the qt gui to see the | |
various tooltips. | |
""" | |
class Call(object): | |
"""This is the class docstring.""" | |
def __init__(self, x, y=1): |
This file contains 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 | |
def bin_perm_rep(ndim,a=0,b=1): | |
"""bin_perm_rep(ndim) -> ndim permutations with repetitions of (a,b). | |
Returns an array with all the possible permutations with repetitions of | |
(0,1) in ndim dimensions. The array is shaped as (2**ndim,ndim), and is | |
ordered with the last index changing fastest. For examble, for ndim=3: | |
Examples: |
This file contains 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
// Another change | |
// Testing gists on the web | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> | |
<title>Google AJAX Language API - Basic Transliteration</title> | |
<script type="text/javascript" src="//www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
This file contains 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
#!/usr/bin/env python | |
# -*- encoding: utf-8 | |
#from IPython.external | |
import sys | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
paa = parser.add_argument |
This file contains 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
====================================================================== | |
ERROR: test pushing and pulling functions | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/fperez/usr/lib/python2.6/site-packages/IPython/parallel/tests/test_view.py", line 92, in test_push_pull_function | |
self.assertEqual(r(1.0), testf(1.0)) | |
TypeError: 'AsyncResult' object is not callable | |
====================================================================== | |
FAIL: test_queue_status (IPython.parallel.tests.test_client.TestClient) |
This file contains 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
#!/usr/bin/env python | |
"""Simple script to remove nose-style parametric tests and turn them into | |
normal ones. | |
Usage: | |
param2normal.py file1.py file2.py ... | |
By default it overwrites the files in-place, you can change that below in the | |
__main__ section. |
This file contains 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
#!/usr/bin/env python | |
""" | |
file with deliberate errors to check IPython. | |
""" | |
from numpy import * | |
import time,sys | |
import sys |
This file contains 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
longs[junk]> nosetests matplotlib | |
/home/fperez/usr/opt/lib/python2.7/site-packages/matplotlib/__init__.py:923: UserWarning: This call to matplotlib.use() has no effect | |
because the the backend has already been chosen; | |
matplotlib.use() must be called *before* pylab, matplotlib.pyplot, | |
or matplotlib.backends is imported for the first time. | |
if warn: warnings.warn(_use_error_msg) | |
/home/fperez/usr/opt/lib/python2.7/site-packages/matplotlib/font_manager.py:1210: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to Bitstream Vera Sans | |
(prop.get_family(), self.defaultFamily[fontext])) |