<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>ipython-notebook &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/ipython-notebook/</link>
	<description>Feed of posts on WordPress.com tagged "ipython-notebook"</description>
	<pubDate>Tue, 18 Jun 2013 21:39:04 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Python Notebook]]></title>
<link>http://priortimeslikelihood.com/2013/06/17/python-notebook/</link>
<pubDate>Mon, 17 Jun 2013 15:54:57 +0000</pubDate>
<dc:creator>phewson</dc:creator>
<guid>http://priortimeslikelihood.com/2013/06/17/python-notebook/</guid>
<description><![CDATA[It has been a busy year, for various reasons. However, one loose end that urgently needs tidying up]]></description>
<content:encoded><![CDATA[<p>It has been a busy year, for various reasons.   However, one loose end that urgently needs tidying up are an assortment of bits and pieces relating to the use of python as a computing language.   Somewhere during the year the iPython notebook seemed to catch on.   So, we have reworked the famous Coal Disaster changepoint model as a Bayesian model fitted with a Gibbs sampler using python.   There are all sorts of nice features about the notebook:</p>
<ul>
<li>Code chunks can be run as a block (great for debugging, and checking out sensitivity to starting values
</li>
<li>The R magic tool lets you send objects to R for work there (I am still taking a long time to learn python &#8211; at the moment rather a lot of plotting functions are farmed out that way</li>
<li>There is an online notebook viewing service available via the nbviewer website.   The current version of my notebook can be viewed here: <a href="http://nbviewer.ipython.org/5797913" title="Gibbs sampler changepoint">Gibbs Sampler Changepoint</a></li>
</ul>
<p>One small issue I&#8217;m still struggling with in terms of the nbviewer is the ability to output directly to html &#8211; I can&#8217;t find a template file html-blogger for example.   But still, this looks like a very promising tool indeed.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Broadcasting IPython Notebooks]]></title>
<link>http://penandpants.com/2013/05/08/broadcasting-ipython-notebooks/</link>
<pubDate>Wed, 08 May 2013 17:13:04 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2013/05/08/broadcasting-ipython-notebooks/</guid>
<description><![CDATA[A useful feature of the IPython Notebook is that you can set the server to broadcast so that others]]></description>
<content:encoded><![CDATA[<p>A useful feature of the <a href="http://ipython.org/notebook.html">IPython Notebook</a> is that you can set the server to broadcast so that others on your local network can see the server and your notebooks. This is especially nice as a teacher so that students can load your notebooks as you work, copy text out of them, and see them in their entirety instead of just what you have on screen. Here’s the outline of what to do, with detailed instructions below:</p>
<ol>
<li>Create an IPython profile with a password for the Notebook server.</li>
<li>Figure out your IP address on the local network.</li>
<li>Launch IPython in broadcast + read-only mode using your new profile.</li>
<li>Have your students navigate to your Notebook server.</li>
</ol>
<p><!--more--></p>
<h1>Make a New Profile</h1>
<p>IPython has quite a number of <a href="http://ipython.org/ipython-doc/dev/config/overview.html">configuration options</a> that you might like to be set one way or another depending what you’re doing. To help make that configuration management easier IPython has <a href="http://ipython.org/ipython-doc/dev/config/overview.html#profiles">profiles</a>. We’re going to make a new profile in which we’ll set a password that must be entered to edit or make new notebooks. Here’s the command:</p>
<pre><code>ipython profile create teaching
</code></pre>
<p>I’ll use a profile named “teaching” throughout these instructions, you can name it whatever you like.</p>
<h1>Setting a Notebook Password</h1>
<p>One of IPython’s configuration options is the ability to set a password on the Notebook server. This usually makes it so that only people with the password can access the server, but if you start the server with the <code>--read-only</code> flag anyone can access and see the notebooks, but only you with the password can can edit notebooks or make new ones.</p>
<p>Follow the IPython instructions on <a href="http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html#security">making a Notebook password</a> to generate your password hash string. Once you’ve got your password hash string<br />
(which should look something like <code>sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed</code>), you’re going to put that into the Notebook configuration file for you new teaching profile. To find out where that is you can run this command:</p>
<pre><code>ipython locate profile teaching
</code></pre>
<p>It will probably tell you something like <code>~/.ipython/profile_teaching</code>, which is the directory where the configuration files for that profile are stored. Open the file called <code>ipython_notebook_config.py</code> within that directory and find the line that has the string <code>c.NotebookApp.password</code>. Uncomment that line and paste your password hash string into the empty quotes there. When you’re done it should like this:</p>
<pre><code>c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
</code></pre>
<p>And when you start the Notebook server with the teaching profile it will be password protected. You can change your password at any time be generating a new password hash string and pasting into <code>ipython_notebook_config.py</code>.</p>
<h1>Find Out Your IP Address</h1>
<p>Your students need to know where to point their browsers so they can see your notebooks and for that you need to know your IP address on the local network. On Macs you can get this from the Network pane of System Preferences, but I like to use <a href="https://github.com/swcarpentry/boot-camps/blob/master/setup/get-my-ip.py">this Python script from Software Carpentry</a>, which should work on any system. On my home WiFi my IP is usually something like <code>10.0.1.9</code> but it will vary depending on where you are. Take note of your IP address, in a minute we’ll combine it with the port number used by the IPython Notebook server so your students can type something into their URL bars.</p>
<h1>Start The Notebook Server and Note the Port Number</h1>
<p>It’s time to start your Notebook server with some added options. You’re going to tell it:</p>
<ul>
<li>Use my teaching profile: <code>--profile=teaching</code></li>
<li>Broadcast yourself: <code>--ip='*'</code></li>
<li>Allow others to see my notebooks without a password: <code>--read-only</code></li>
</ul>
<p>Here’s what the whole command looks like:</p>
<pre><code>ipython notebook --profile=teaching --read-only --ip='*'
</code></pre>
<p>When IPython starts up the Notebook server it will print a line containing the URL of the server, including the port number. It will look like this:</p>
<pre><code>[NotebookApp] The IPython Notebook is running at: http://[all ip addresses on your system]:8888/
</code></pre>
<p>The last four numbers after the colon (in this case <code>8888</code>) are the port number of the server. Take note of that number.</p>
<h1>Tell Your Students Where to Go</h1>
<p>Finally you can tell your students what to type into their browsers. Combine your IP address with the Notebook server port number (separated by a colon) and that will be the URL your students go to. For me that would be:</p>
<pre><code>http://10.0.1.9:8888/
</code></pre>
<p>When your students land there they should see the usual IPython Notebook dashboard and they should be able to look at your existing notebooks, but they shouldn’t be able to create new notebooks, save changes to your notebooks, or execute code.</p>
<h1>Some Notes</h1>
<ul>
<li>The students’ views don’t update in real time. I find that in order for them to see my changes I must save my notebook and then the students have to manually reload. They won’t see unsaved changes and they won’t see any changes at all unless they reload.</li>
<li>The <a href="http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html#security">IPython security docs</a> recommend making an SSL certificate so you can connect to your server over HTTPS, which will encrypt your password. I generally don’t bother, but be advised that anyone who can execute code on your computer can do things like delete your entire hard drive. Either way, be sure not to use a password you use anywhere else.</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Installing iPython Notebook and StarCluster]]></title>
<link>http://hollybik.wordpress.com/2013/05/06/installing-ipython-notebook-and-starcluster/</link>
<pubDate>Mon, 06 May 2013 06:02:42 +0000</pubDate>
<dc:creator>hollybik</dc:creator>
<guid>http://hollybik.wordpress.com/2013/05/06/installing-ipython-notebook-and-starcluster/</guid>
<description><![CDATA[Finally taking this leap to get iPython Notebook and StarCluster up and running on my MacAir laptop.]]></description>
<content:encoded><![CDATA[<p>Finally taking this leap to get iPython Notebook and StarCluster up and running on my MacAir laptop. <a href="http://qiime.org/tutorials/working_with_aws.html?highlight=ipython">The QIIME tutorial for this process can be found here</a>. Mainly I didn&#8217;t find the QIIME page to have enough detail, so I followed instructions on this <a href="http://gureckislab.org/courses/spring12/modeling/ipythonhints.html">NYU install tutorial for Mac OS X</a>, as follows:</p>
<ul>
<li><span style="line-height:13px;">Install command line tools on Xcode (Preferences&#8211;&#62;Downloads)</span></li>
<li>Checked my version of Python (yes, I have Python &#62;2.7)</li>
<li>Installed SciPy superpack <a href="http://fonnesbeck.github.io/ScipySuperpack/">from this site</a> (used instructions for OS X 10.8)</li>
<li>Installed PySide pyside-1.1.0-qt47-py27apple.pkg<a href="http://qt-project.org/wiki/PySide_Binaries_MacOSX"> from this site</a></li>
<li>Installed readline, pyzmq, pygments, tornado using this command: <em>sudo easy_install readline pyzmq pygments tornado</em></li>
<li>Installed iPython from Github using this command: <em>sudo easy_install <a href="https://github.com/ipython/ipython/tarball/master" rel="nofollow">https://github.com/ipython/ipython/tarball/master</a></em></li>
<li>Tested iPython install success by typing this command: <em>ipython notebook &#8211;pylab inline</em> (it worked! HTML notebook launched!)</li>
<li>Followed the manual install instructions for StarCluster (see quick start install guide below) &#8211; had to download tarball, unzip and run script.</li>
<li>Followed the StarCluster config instructions (but not sure if I did this right&#8230;)</li>
</ul>
<p>Questions I still have:</p>
<ul>
<li><span style="line-height:13px;">Do I need to install QT? Seems like I don&#8217;t need it if I&#8217;m using iPython Notebook in a web browser, but can&#8217;t find much info about possible QT dependencies.</span></li>
<li>Need some advice on the StarCluster config file &#8211; AWS settings and iPython plugin options</li>
<li>Then I need to figure out how to actually link iPython to AWS and start doing my analyses&#8230;</li>
</ul>
<p>Useful Websites:</p>
<ul>
<li><a href="http://ipython.org/ipython-doc/stable/interactive/htmlnotebook.html"><span style="line-height:13px;">iPython Notebook homepage</span></a></li>
<li><a href="http://star.mit.edu/cluster/docs/latest/quickstart.html">StarCluster quickstart install guide</a></li>
<li><a href="http://star.mit.edu/cluster/docs/latest/plugins/ipython.html">Configuring StarCluster for iPython Notebook plugin</a></li>
<li><a href="http://www.youtube.com/watch?v=pDyaUUmvWvk&#38;feature=youtu.be">Titus Brown&#8217;s video for linking iPython Notebook to Amazon AWS</a></li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Exploring iPython notebook: importing external images]]></title>
<link>http://piquantbites.wordpress.com/2013/02/27/exploring-ipython-notebook-importing-external-imagesh/</link>
<pubDate>Wed, 27 Feb 2013 19:35:38 +0000</pubDate>
<dc:creator>shriv29</dc:creator>
<guid>http://piquantbites.wordpress.com/2013/02/27/exploring-ipython-notebook-importing-external-imagesh/</guid>
<description><![CDATA[iPython notebook is probably one of the coolest things in my life right now. I got stuck on it after]]></description>
<content:encoded><![CDATA[iPython notebook is probably one of the coolest things in my life right now. I got stuck on it after]]></content:encoded>
</item>
<item>
<title><![CDATA[ipythonblocks - A Visual Tool for Practicing Python]]></title>
<link>http://penandpants.com/2013/01/10/ipythonblocks-a-visual-tool-for-practicing-python/</link>
<pubDate>Fri, 11 Jan 2013 02:22:58 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2013/01/10/ipythonblocks-a-visual-tool-for-practicing-python/</guid>
<description><![CDATA[Learning to program and learning the basics of control flow can be tricky business for novices. I wa]]></description>
<content:encoded><![CDATA[<p>Learning to program and learning the basics of control flow can be tricky business for novices. I wanted to make something that provided immediate, visual feedback to students as they practice things like <code>for</code> loops and <code>if</code> statements so they can see precisely what their code is (or isn&#8217;t) doing. So I wrote <a href="https://github.com/jiffyclub/ipythonblocks">ipythonblocks</a>.</p>
<p>The <a href="http://ipython.org">IPython</a> <a href="http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html">Notebook</a> makes it possible to display <a title="pandas in the IPython Notebook" href="http://penandpants.com/2012/06/14/pandas-in-the-ipython-notebook/">rich representations of Python objects</a> using HTML (among other things). That allowed me to make a Python object whose representation in the Notebook is a colored table. Students can index into the table to change the color properties of individual table cells and then immediately display their changes.</p>
<p>With <code>ipythonblocks</code> instructors can give coding problems like &#8216;turn every block in the third column red&#8217; or &#8216;turn every blue block green&#8217; and by displaying their blocks students can see right away whether their code is having the desired effect.</p>
<p>Check out the <a href="http://nbviewer.ipython.org/urls/raw.github.com/jiffyclub/ipythonblocks/master/demos/ipythonblocks_demo.ipynb">demo notebook</a> to see <a href="https://github.com/jiffyclub/ipythonblocks">ipythonblocks</a> in action.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[IPython Notebook]]></title>
<link>http://paulcrickard.wordpress.com/2012/12/27/ipython-notebook/</link>
<pubDate>Thu, 27 Dec 2012 19:12:04 +0000</pubDate>
<dc:creator>paulcrickard</dc:creator>
<guid>http://paulcrickard.wordpress.com/2012/12/27/ipython-notebook/</guid>
<description><![CDATA[My IPython Notebook I love IPython Notebook. It is an interactive web environment for executing code]]></description>
<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 288px"><a href="http://paulcrickard.files.wordpress.com/2012/12/barchart.jpg"><img class="wp-image   " id="i-664" title="BarChart" alt="Image" src="http://paulcrickard.files.wordpress.com/2012/12/barchart.jpg?w=278&#038;h=204" width="278" height="204" /></a><p class="wp-caption-text">My IPython Notebook</p></div>
<p>I love <a title="IPython" href="http://ipython.org/" target="_blank">IPython</a> Notebook. It is an interactive web environment for executing code. You can also save and share your notebook. Don&#8217;t have IPython? you can view notebooks on the web using the website <a title="Notebook Viewer" href="http://nbviewer.ipython.org" target="_blank">http://nbviewer.ipython.org</a>. I have a notebook for my <a title="Pandas and Python...Oh My" href="http://paulcrickard.wordpress.com/2012/12/21/pandas-and-python-oh-my/" target="_blank">Pandas Bar Chart Example</a>. On the viewer site, enter the URL:</p>
<p><a href="http://educationalfacilityplanning.com/MySamplePandasBarChart.ipynb" rel="nofollow">http://educationalfacilityplanning.com/MySamplePandasBarChart.ipynb</a></p>
<p>Or, click <a title="Viewer" href="http://nbviewer.ipython.org/url/educationalfacilityplanning.com/MySamplePandasBarChart.ipynb" target="_blank">http://nbviewer.ipython.org/url/educationalfacilityplanning.com/MySamplePandasBarChart.ipynb</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Playing with Wolfram Alpha and Python]]></title>
<link>http://jeffelmore.org/2012/11/11/playing-with-wolfram-alpha-and-python/</link>
<pubDate>Sun, 11 Nov 2012 01:53:28 +0000</pubDate>
<dc:creator>Jeff Elmore</dc:creator>
<guid>http://jeffelmore.org/2012/11/11/playing-with-wolfram-alpha-and-python/</guid>
<description><![CDATA[I love the idea of Wolfram Alpha. I haven&#8217;t used it enough to tell how the reality of it compa]]></description>
<content:encoded><![CDATA[<p>I love the idea of Wolfram Alpha. I haven&#8217;t used it enough to tell how the reality of it compares. Mostly what I&#8217;ve seen is easter-eggs, which are fun, but I wanted to see if I could do something more substantive.</p>
<p>An article I&#8217;d seen in the news lately piqued my interest about the number of PhDs by US State. It took a goodly amount of fiddling before I figured out I could get the answer by submitting this query:</p>
<p>&#8216;How many phds in California?&#8217;</p>
<p>Take a look at what this gives you: <a href="http://www.wolframalpha.com/input/?i=how+many+phds+in+california%3F">http://www.wolframalpha.com/input/?i=how+many+phds+in+california%3F</a></p>
<p>Lots of great information, including the specific answer I want, 331,101.</p>
<p>If I want to do this for all fifty states, I&#8217;m going to need to use the API not the interface. I registered for an API account which was quick and easy and checked out the bindings available on their site. The bindings left a lot to be desired, so I decided to just use urllib2.</p>
<p>Lately I can&#8217;t abide dealing directly with XML, so I found this nice library xmltodict. I&#8217;m sure [insert xml parsing technique] would work just as well or better.</p>
<p>As I was working I realized I also wanted to pull in total population, total adult population, etc. so I could talk about percentages.</p>
<p>I did this all in an IPython Notebook (if you&#8217;re not using this, you need to start, it&#8217;s totally awesome. Check out <a href="http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html">http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html</a>).</p>
<p>Here is my notebook (created using Python 2.7): <a href="https://gist.github.com/4052828">https://gist.github.com/4052828</a></p>
<p>Here is a rendered version of the notebook: <a href="http://nbviewer.ipython.org/4052828/">http://nbviewer.ipython.org/4052828/</a></p>
<p>All in all it was a fun exercise but it still felt like page scraping. The one advantage is that you can ask the same question with slight modifications easily (e.g., how many people in California vs how many adults in Idaho) and get back essentially the same response so that&#8217;s handy. And although Wolfram Alpha returns a machine readable data structure (XML), it&#8217;s not exactly richly semantically tagged. There are plain text bits that have to be parsed. For example, sometimes a population will be expressed as its raw number, sometimes as 1.2 million. So I had to put special handling in my code for that case. It would be nice if such quantities were available with no plain-text parsing required.</p>
<p>One other adjustment that would be good would be to thread-out the calls to the API. It takes a good amount of time to process all of these serially and there&#8217;s no reason they couldn&#8217;t be threaded. I&#8217;ll definitely take a look at doing this.</p>
<p>If you&#8217;re just interested in results, here you go. This is the percentage of adults with PhDs and percentage of adults with at least an associates degree ranked by state from highest to lowest.</p>
<p>EDIT: After writing this, I found <a href="http://pypi.python.org/pypi/wolframalpha/1.0">http://pypi.python.org/pypi/wolframalpha/1.0</a>. This looks to be a nicer wrapper, I&#8217;ll have to take a look and see if it works as advertised. Let me know if you&#8217;ve used it successfully.</p>
<pre>
----------------------------------------------------------------------------------------------------
phds
#1: Washington DC: 3.68%
#2: Maryland: 2.32%
#3: Massachusetts: 2.30%
#4: New Mexico: 1.75%
#5: Vermont: 1.66%
#6: Connecticut: 1.60%
#7: Delaware: 1.56%
#8: Virginia: 1.54%
#9: California: 1.42%
#10: New Jersey: 1.41%
#11: Rhode Island: 1.39%
#12: Colorado: 1.37%
#13: Oregon: 1.35%
#14: Washington State: 1.34%
#15: Pennsylvania: 1.31%
#16: New York: 1.30%
#17: Hawaii: 1.25%
#18: New Hampshire: 1.24%
#19: Arizona: 1.18%
#20: Utah: 1.17%
#21: Minnesota: 1.16%
#22: Montana: 1.14%
#23: North Carolina: 1.13%
#24: Illinois: 1.13%
#25: Nebraska: 1.12%
#26: Maine: 1.12%
#27: Florida: 1.10%
#28: Alaska: 1.10%
#29: Kansas: 1.08%
#30: Tennessee: 1.05%
#31: Missouri: 1.05%
#32: Georgia: 1.04%
#33: Idaho: 1.02%
#34: Wyoming: 1.02%
#35: Iowa: 1.02%
#36: Wisconsin: 0.99%
#37: Michigan: 0.98%
#38: South Dakota: 0.97%
#39: Ohio: 0.97%
#40: Texas: 0.94%
#41: South Carolina: 0.93%
#42: Alabama: 0.92%
#43: Indiana: 0.91%
#44: North Dakota: 0.87%
#45: Mississippi: 0.82%
#46: Oklahoma: 0.81%
#47: Louisiana: 0.81%
#48: Kentucky: 0.80%
#49: Nevada: 0.78%
#50: Arkansas: 0.77%
#51: West Virginia: 0.77%
----------------------------------------------------------------------------------------------------
college graduates
#1: Washington DC: 50.47%
#2: Massachusetts: 48.28%
#3: Connecticut: 45.71%
#4: New Hampshire: 44.77%
#5: Colorado: 44.07%
#6: Vermont: 43.98%
#7: New Jersey: 43.76%
#8: Maryland: 43.53%
#9: Minnesota: 42.94%
#10: Hawaii: 41.90%
#11: Washington State: 41.71%
#12: Virginia: 41.58%
#13: New York: 40.38%
#14: Rhode Island: 39.72%
#15: North Dakota: 39.42%
#16: Maine: 39.06%
#17: Illinois: 39.05%
#18: Oregon: 39.04%
#19: Florida: 38.78%
#20: Nebraska: 38.50%
#21: Montana: 38.27%
#22: Kansas: 38.26%
#23: California: 38.13%
#24: Delaware: 37.30%
#25: South Dakota: 37.15%
#26: Iowa: 36.75%
#27: Wisconsin: 36.73%
#28: Pennsylvania: 36.66%
#29: Utah: 36.56%
#30: Arizona: 36.26%
#31: North Carolina: 35.96%
#32: Michigan: 34.98%
#33: Wyoming: 34.34%
#34: New Mexico: 34.09%
#35: Georgia: 33.89%
#36: South Carolina: 33.78%
#37: Idaho: 33.74%
#38: Ohio: 33.65%
#39: Missouri: 33.54%
#40: Alaska: 33.04%
#41: Texas: 31.96%
#42: Indiana: 31.04%
#43: Oklahoma: 30.72%
#44: Tennessee: 30.29%
#45: Alabama: 30.18%
#46: Nevada: 30.18%
#47: Kentucky: 28.44%
#48: Mississippi: 27.99%
#49: Arkansas: 26.74%
#50: Louisiana: 26.32%
#51: West Virginia: 25.49%
</pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Wanted: Testing Frameworks in the IPython Notebook]]></title>
<link>http://penandpants.com/2012/11/03/wanted-testing-frameworks-in-the-ipython-notebook/</link>
<pubDate>Sun, 04 Nov 2012 01:45:42 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2012/11/03/wanted-testing-frameworks-in-the-ipython-notebook/</guid>
<description><![CDATA[As a tool when teaching unit testing it would be great to have a way to run nose or pytest in an IPy]]></description>
<content:encoded><![CDATA[<p>As a tool when teaching unit testing it would be great to have a way to run <a href="https://nose.readthedocs.org/en/latest/">nose</a> or <a href="http://pytest.org/">pytest</a> in an IPython Notebook. For example, a <code>%nosetests</code> magic would do test collection in the Notebook namespace and do its usual run and reporting. Of course it&#8217;s always possible to write test functions and then just call them, but having a report that compiles everything in one place is nice. Plus it could look just like nosetests called from the command line.</p>
<p>Unfortunately for this idea these testing frameworks have for the most part been engineered for doing their test collection using the file system as the starting point. In a couple hours of fiddling I couldn&#8217;t figure out how to use either nose or pytest to do test collection in a notebook. I&#8217;m sure it could be done with enough hacking.</p>
<p>Just for kicks, though, I threw together a little IPython line magic that does its own limited test collection, running, and reporting. You can see it <a href="http://nbviewer.ipython.org/4005510/">via nbviewer</a> and grab it <a href="https://raw.github.com/gist/4005510/15907c514788382290e117c5e1c5db27586c234a/runtests-magic.ipynb">on GitHub</a>. This magic only grabs functions that begin with &#8220;test&#8221; and the reporting doesn&#8217;t include tracebacks when there are failures or errors. But you do get the exceptions themselves.</p>
<p>(This whole experiment was inspired by a <a href="https://twitter.com/ethanwhite/status/264026365232308226">conversation on Twitter</a>.)</p>
<p><strong>Update:</strong> On the <a href="https://twitter.com/stefanvdwalt/status/264957302312955904">advice of @stefanvdwalt</a> I put the <code>%runtests</code> magic into a <a href="https://gist.github.com/4013594">.py file</a> so it can be installed via <code>%install_ext</code>:</p>
<pre>%install_ext https://raw.github.com/gist/4013594/runtests.py</pre>
<p>Once that&#8217;s done you can run</p>
<pre>%load_ext runtests
%runtests</pre>
<p>to have it do its limited collection, running, and reporting as in this <a href="http://nbviewer.ipython.org/4014528/">demo notebook</a>.</p>
<p><strong>Update 2:</strong> Someone has made this work with nose: <a href="https://github.com/taavi/ipython_nose">https://github.com/taavi/ipython_nose</a>!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Open in nbviewer Firefox Add-on]]></title>
<link>http://penandpants.com/2012/10/31/open-in-nbviewer-firefox-add-on/</link>
<pubDate>Thu, 01 Nov 2012 02:10:09 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2012/10/31/open-in-nbviewer-firefox-add-on/</guid>
<description><![CDATA[I&#8217;m happy to announce that there is now a Firefox add-on with the same functionality as the Op]]></description>
<content:encoded><![CDATA[<p>I&#8217;m happy to announce that there is now a <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a> add-on with the same functionality as the Open in nbviewer <a title="Open in nbviewer Chrome Extension" href="http://penandpants.com/2012/10/10/open-in-nbviewer-chrome-extension/">Chrome extension</a> and <a title="Open in nbviewer Bookmarklet" href="http://penandpants.com/2012/10/16/open-in-nbviewer-bookmarklet/">bookmarklet</a>. It can be installed via the <a href="https://addons.mozilla.org/en-US/firefox/addon/open-in-nbviewer/">Mozilla Add-ons directory</a>. It will add an <a href="http://nbviewer.ipython.org">nbviewer</a> icon to Firefox&#8217;s toolbar that, when clicked, will attempt to open your current page in nbviewer.</p>
<p>The code is <a href="https://github.com/jiffyclub/open-in-nbviewer">available on GitHub</a>.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Open in nbviewer Bookmarklet]]></title>
<link>http://penandpants.com/2012/10/16/open-in-nbviewer-bookmarklet/</link>
<pubDate>Wed, 17 Oct 2012 01:15:19 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2012/10/16/open-in-nbviewer-bookmarklet/</guid>
<description><![CDATA[Last week I made a Chrome extension that opens your current page in nbviewer. This isn&#8217;t ideal]]></description>
<content:encoded><![CDATA[<p>Last week I made a Chrome extension that <a title="Open in nbviewer Chrome Extension" href="http://penandpants.com/2012/10/10/open-in-nbviewer-chrome-extension/">opens your current page</a> in <a href="http://nbviewer.ipython.org">nbviewer</a>. This isn&#8217;t ideal, though, since it is limited to people who use Chrome. Today I learned about <a href="http://en.wikipedia.org/wiki/Bookmarklet">bookmarklets</a>, which are little bits of JavaScript that live in browser bookmarks (<a href="https://twitter.com/ethanwhite/status/258358984522756096">thanks Ethan</a>). The Chrome extension is just a little bit of JS so it was easy to <a href="https://gist.github.com/3903134">adapt</a> into a bookmarklet. To use this bookmarklet just make a new bookmark (call it whatever you want) and copy <a href="https://github.com/jiffyclub/open-in-nbviewer/blob/master/bookmarklet/nbviewer_bookmarklet.js" target="_blank">this code</a> into the URL field. Once you have the bookmark just click on it while you are on any page that can be loaded by <a href="http://nbviewer.ipython.org">nbviewer</a>.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Open in nbviewer Chrome Extension]]></title>
<link>http://penandpants.com/2012/10/10/open-in-nbviewer-chrome-extension/</link>
<pubDate>Thu, 11 Oct 2012 03:02:39 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2012/10/10/open-in-nbviewer-chrome-extension/</guid>
<description><![CDATA[I got tired of pasting URLs into nbviewer so I made a Chrome extension that will try to load your cu]]></description>
<content:encoded><![CDATA[<p>I got tired of pasting URLs into <a href="http://nbviewer.ipython.org">nbviewer </a>so I made a Chrome extension that will try to load your current page via nbviewer.</p>
<p>For example, if you are at <a href="https://gist.github.com/3778422">https://gist.github.com/3778422</a> you can click the &#8220;Open in nbviewer&#8221; extension button and it will load <a href="http://nbviewer.ipython.org/3778422/">http://nbviewer.ipython.org/3778422/</a> in a new tab. It also works for URLs ending in <code>.ipynb</code>.</p>
<p>You can download the extension from the <a href="https://chrome.google.com/webstore/detail/open-in-nbviewer/ihlhlehlibooakiicbiakgojckpnlali?hl=en">Chrome Web Store</a> and see the code <a href="https://github.com/jiffyclub/open-in-nbviewer">on GitHub</a>.</p>
<p>I took the extension icon from the <a href="http://nbviewer.ipython.org/static/ico/ipynb_icon_16x16.png">nbviewer favicon</a>, so thanks to them for that! Thanks also for making something as awesome as nbviewer, it&#8217;s getting so I couldn&#8217;t live without it!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Teaching with the IPython Notebook]]></title>
<link>http://penandpants.com/2012/10/07/teaching-with-the-ipython-notebook/</link>
<pubDate>Mon, 08 Oct 2012 02:28:57 +0000</pubDate>
<dc:creator>jiffyclub</dc:creator>
<guid>http://penandpants.com/2012/10/07/teaching-with-the-ipython-notebook/</guid>
<description><![CDATA[For a few months now I&#8217;ve been using the IPython Notebook as my primary teaching tool for Pyth]]></description>
<content:encoded><![CDATA[<p>For a few months now I&#8217;ve been using the <a href="http://ipython.org">IPython</a> Notebook as my primary teaching tool for <a title="IPython Notebook Viewer" href="http://penandpants.com/2012/08/13/ipython-notebook-viewer/">Python topics</a>. Within <a href="http://software-carpentry.org">Software Carpentry</a> we&#8217;re also switching over to using the Notebook for both in-person bootcamps and our online repository of material. <a href="http://whitelab.weecology.org/">Ethan White</a> and I put together a post on this topic on the <a href="http://software-carpentry.org/2012/10/transitioning-to-the-ipython-notebook/">Software Carpentry blog</a> and now <a href="http://ivory.idyll.org/blog/">Titus Brown</a> has blogged with <a href="http://ivory.idyll.org/blog/teaching-with-ipynb-2.html">his own thoughts</a>. We&#8217;ve put in a PyCon proposal for a panel on this topic in 2013.</p>
<p>The IPython developers have to be given a huge amount of credit for putting together the Notebook and the rest of IPython. The Notebook especially is quite a feat: a top notch research/engineering/teaching tool all in one. And they aren&#8217;t resting on their laurels, they have a ton of ideas in mind for the Notebook in the future, including a slide-show mode. I&#8217;m definitely looking forward to seeing what they&#8217;ve got!</p>
<p>As with many open source projects, the IPython developers struggle to find the time and funding to write their software. If any open source project is helping with your job or your research you can easily help by citing the software in your papers and in public on social media or blogs. This gives the developers more ammunition the next time they&#8217;re writing grants, so please make your support known!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ipython notebook]]></title>
<link>http://pythonadventures.wordpress.com/2012/03/31/ipython-notebook/</link>
<pubDate>Sat, 31 Mar 2012 11:58:55 +0000</pubDate>
<dc:creator>Jabba Laci</dc:creator>
<guid>http://pythonadventures.wordpress.com/2012/03/31/ipython-notebook/</guid>
<description><![CDATA[IPython notebook can be installed the following way on Ubuntu: sudo pip install ipython -U sudo pip]]></description>
<content:encoded><![CDATA[<p><a href="http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html">IPython notebook</a> can be installed the following way on Ubuntu:</p>
<pre class="brush: bash; title: ; notranslate" title="">
sudo pip install ipython -U
sudo pip install tornado
sudo apt-get install libzmq-dev
sudo apt-get install python2.7-dev
sudo pip install pyzmq
</pre>
<p>Execution:</p>
<pre>
ipython notebook
</pre>
<p><strong>Update (20120418)</strong><br />
To learn more about IPython, check out this <a href="http://pyvideo.org/video/605/ipython-in-depth-high-productivity-interactive-a">monstre tutorial</a> (more than 3 hours long :))</p>
]]></content:encoded>
</item>

</channel>
</rss>
