Skip to content

Instantly share code, notes, and snippets.

@takluyver
takluyver / gist:887333
Created Mar 25, 2011
IPython Qtconsole Windows ls traceback
View gist:887333
C:\python\external\ipython>ipython-qtconsole
Starting the kernel at pid: 2216
XREP Channel on port 4380
PUB Channel on port 4381
REQ Channel on port 4382
Heartbeat REP Channel on port 4383
To connect another client to this kernel, use:
-e --xreq 4380 --sub 4381 --rep 4382 --hb 4383
---------------------------------------------------------------------------
@takluyver
takluyver / gist:914402
Created Apr 11, 2011
IPython pylabtools test error
View gist:914402
======================================================================
ERROR: test (IPython.lib.tests.test_pylabtools.test_figure_to_svg)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.6/site-packages/IPython/testing/_paramtestpy2.py", line 53, in run_parametric
testgen.next()
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.6/site-packages/IPython/lib/tests/test_pylabtools.py", line 49, in test_figure_to_svg
fig, ax = plt.subplots()
AttributeError: 'module' object has no attribute 'subplots'
@takluyver
takluyver / gist:954331
Created May 3, 2011
IPython test failure - Python 2.7
View gist:954331
======================================================================
FAIL: Test the IPython runner.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/lib/tests/test_irunner.py", line 130, in testIPython
self._test_runner(runner,source,output)
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/lib/tests/test_irunner.py", line 57, in _test_runner
mismatch)
AssertionError: Number of mismatched lines: 1
'Number of mismatched lines: 1' = self._formatMessage('Number of mismatched lines: 1', "%s is not true" % safe_repr(False))
@takluyver
takluyver / gist:985716
Created May 22, 2011
rpy2 test failures with Python 3.2
View gist:985716
thomas@thomas-desktop:~$ python3 -m rpy2.tests
.E...Traceback (most recent call last):
File "/tmp/tmpm66dxe.py", line 4, in <module>
import rpy2.rinterface as ri
File "/usr/local/lib/python3.2/dist-packages/rpy2/rinterface/__init__.py", line 79, in <module>
from rpy2.rinterface._rinterface import *
ImportError: No module named _rinterface
......../usr/local/lib/python3.2/dist-packages/rpy2/rinterface/tests/test_EmbeddedR.py:324: DeprecationWarning: Please use assertEqual instead.
self.assertEquals("Doesn't work.", str(sys.last_value))
.......................................................................................F....................................................................................................................................................................F...............................................
View trendsjournals.csl
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>Trends Journals</title>
<id>http://www.zotero.org/styles/trends-journal</id>
<link href="http://www.zotero.org/styles/trends-journal" rel="self"/>
<author>
<name>Adam Zeilinger</name>
<email>arzeilinger@gmail.com</email>
</author>
@takluyver
takluyver / gist:1101890
Created Jul 23, 2011
Get issues from JSON API
View gist:1101890
import json
from urllib import urlopen
def get_issues(project="ipython/ipython/", state="open"):
f = urlopen("http://github.com/api/v2/json/issues/list/%s%s" % (project, state))
return json.load(f)['issues']
def _parse_datetime(s):
"""Parse dates in the format returned by the Github API"""
return datetime.strptime(s.rpartition(")[0], ")
@takluyver
takluyver / gist:1118000
Created Aug 1, 2011
IPython crash traceback
View gist:1118000
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
KeyboardInterrupt Python 2.6.6: /home/ben/dev/ve/ticket-manager/bin/python
Mon Aug 1 12:21:42 2011
A problem occured executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/lib/python2.6/atexit.pyc in _run_exitfuncs()
@takluyver
takluyver / gist:1118181
Created Aug 1, 2011
IPython.parallel test failures
View gist:1118181
iptest IPython.parallel
..............................................................FSSSSSSSSSS.................................F
======================================================================
FAIL: test graceful handling of engine death (balanced)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/parallel/tests/test_lbview.py", line 44, in test_z_crash_task
self.assertRaisesRemote(error.EngineError, ar.get, 10)
File "/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/parallel/tests/clienttest.py", line 109, in assertRaisesRemote
self.assertEquals(etype.__name__, e.ename, "Should have raised %r, but raised %r"%(etype.__name__, e.ename))
@takluyver
takluyver / gist:1118274
Created Aug 1, 2011
IPython Qtconsole crash report
View gist:1118274
***************************************************************************
IPython post-mortem report
{'commit_hash': '464280a',
'commit_source': 'installation',
'ipython_path': 'c:\\python26\\lib\\site-packages\\IPython',
'ipython_version': '0.11',
'os_name': 'nt',
'platform': 'Windows-XP-5.1.2600-SP2',
@takluyver
takluyver / gist:1281034
Created Oct 12, 2011
Plotting pandas columns
View gist:1281034
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
/home/thomas/Experiments/Emergence depth/<ipython-input-5-1c9d8c0f3fd8> in <module>()
----> 1 plot(soy_w['Depth'])
/home/thomas/code/virtualenvs/mpl/lib/python2.7/site-packages/matplotlib/pyplot.pyc in plot(*args, **kwargs)
2284 ax.hold(hold)
2285 try:
-> 2286 ret = ax.plot(*args, **kwargs)
2287 draw_if_interactive()
You can’t perform that action at this time.