<div dir="ltr">This is awesome, Scott! Absolutely thrilled to see this...<div><br></div><div>As we look at the integration of Fabian's gallery with nbviewer (as per last week's meeting), we should definitely follow with this kind of tool...</div><div><br></div><div>Thanks for sharing this, great job by you and the whole Quantopian team!</div><div><br></div><div>Cheers</div><div><br></div><div>f</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 11, 2015 at 10:30 AM, ssanderson <span dir="ltr"><<a href="mailto:ssanderson@quantopian.com" target="_blank">ssanderson@quantopian.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
At the dev meeting last week we talked a bit about the future of indexing<br>
and sharing IPython/Jupyter notebooks publicly, and I mentioned that we've<br>
been working on adding sharing of notebooks to Quantopian's research<br>
platform alpha.  We launched that system this week, so I thought it might be<br>
helpful to walk through our design as an example of what sharing might look<br>
like in the main notebook project.  I'm also just super proud of our team<br>
for building this and want to show off all their hard work :)<br>
<br>
The backend is basically just nbconvert plus S3 bucket storage and some<br>
custom sanitization logic <<a href="https://github.com/ipython/ipython/pull/7595" target="_blank">https://github.com/ipython/ipython/pull/7595</a>><br>
to guard against XSS.<br>
<br>
The frontend consists of an nbextension that adds a share button to each<br>
cell on mouseover.<br>
<br>
<<a href="http://python.6.x6.nabble.com/file/n5085970/14.png" target="_blank">http://python.6.x6.nabble.com/file/n5085970/14.png</a>><br>
<br>
On hitting the share button we create a window where you can add a title and<br>
description in markdown (the javascript for this is in the same<br>
nbextension):<br>
<br>
<<a href="http://python.6.x6.nabble.com/file/n5085970/36.png" target="_blank">http://python.6.x6.nabble.com/file/n5085970/36.png</a>><br>
<br>
Upon submission, we mark the shared cell as a "preview cell" in its metadata<br>
and then post it to an NBConvert handler that creates a full HTML rendering<br>
of the notebook, plus a stripped down preview of just the selected cell.<br>
These get stored in S3 and are used by our main application to create new<br>
forum posts.  Here's an example of a notebook that we shared today with our<br>
community:<br>
<br>
<a href="https://www.quantopian.com/posts/research-investing-in-women-led-fortune-1000-companies" target="_blank">https://www.quantopian.com/posts/research-investing-in-women-led-fortune-1000-companies</a><br>
<br>
Thanks to the IPython/Jupyter team for building an amazing tool upon which<br>
we can build something like this.  I'm incredibly excited to see how much<br>
the project has progressed in the short time that I've been working on our<br>
integration.<br>
<br>
-Scott<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://python.6.x6.nabble.com/Launching-Jupyter-Notebook-Sharing-on-Quantopian-tp5085970.html" target="_blank">http://python.6.x6.nabble.com/Launching-Jupyter-Notebook-Sharing-on-Quantopian-tp5085970.html</a><br>
Sent from the IPython - Development mailing list archive at Nabble.com.<br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Fernando Perez (@fperez_org; <a href="http://fperez.org" target="_blank">http://fperez.org</a>)<br>fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)<br>fernando.perez-at-berkeley: contact me here for any direct mail<br></div>
</div>