[IPython-dev] Is there a way to open a notebook via one click in tmpnb.org?

Jason Moore moorepants at gmail.com
Mon Jun 1 12:32:50 EDT 2015


Thanks Kyle,

The issue: https://github.com/jupyter/docker-demo-images/issues/16 is
exactly what I was hoping existed. It'd be nice to simply click a button on
a notebook in nbviewer and it opens up in a tmpnb.org instance. But
obviously from the conversation there is more than meets the eye.


Jason
moorepants.info
+01 530-601-9791

On Mon, Jun 1, 2015 at 9:06 AM, Kyle Kelley <rgbkrk at gmail.com> wrote:

> Whoops, just realized I misunderstood your initial question Jason. Sorry!
>
> There's not a way to bring in content from GitHub (or anywhere over the
> network) from the hosted tmpnb.org because of network lock down. You can
> pass anything you want in through JavaScript and file upload (as you're
> doing by bringing the notebook in). This means that if there was any
> integration between client side tooling, e.g. github.js (
> https://github.com/michael/github), we could display all manner of things
> from GitHub within the notebook environment. There's a strong demand for
> this, including myself.
>
> The starter for an endeavor like this (to do it the right way), would be
> to write a client side contents service like jupyter-drive (
> https://github.com/jupyter/jupyter-drive) whose backend was github.
> prose.io already has a nice setup for simple editing using github.js and
> it's surprisingly performant.
>
> The missing piece, to me, is data and scripts being available. Considering
> the notebooks and kernels behave with normal file system operations, it
> wouldn't have knowledge of the rest of the repository.
>
> Stuff to chew on.
>
> -- Kyle
>
>
>
>
> On Mon, Jun 1, 2015 at 10:05 AM, Kyle Kelley <rgbkrk at gmail.com> wrote:
>
>> > I see a lot of problems with this
>>
>> I assume you're saying the inherent cross site scripting issue with this.
>> If we ever enabled it, it wouldn't be a default on tmpnb (the code, not the
>> service). The related issue for this is
>> https://github.com/jupyter/docker-demo-images/issues/16 (I should open a
>> new one...)
>>
>> If someone wants to add it on to jupyter/tmpnb, it's a matter of making
>> the redirect uri an optional GET param for the spawn handler (that should
>> be disabled at the server level by default):
>> https://github.com/jupyter/tmpnb/blob/d74561c7ff80721b4aefea66ab435459e59dfe9a/orchestrate.py#L68
>>
>> > Perhaps another option could be to use sharecell and thebe
>>
>> :) I like how if I leak something on Twitter it eventually reaches the
>> mailing list. Share cell was built for a demo this weekend, but
>> (expectedly so) people are already using for silly little snippets:
>> https://goo.gl/02ekaZ
>>
>> Pairing it up with github.js is quite neat, I did a bit of a mockup with
>> it earlier but was unsure about a reasonable standard of handling gists.
>> Mimicking nbviewer might be ok. The nice thing there is that it can all be
>> done client side. ;)
>>
>> The difference between a link to a sharecell "page" and a notebook is
>> that javascript output on sharecell doesn't show until you run the snippet
>> whereas the notebook server will display any trusted notebook.
>>
>> -- Kyle
>>
>> On Mon, Jun 1, 2015 at 8:41 AM, Cyrille Rossant <
>> cyrille.rossant at gmail.com> wrote:
>>
>>> Perhaps another option could be to use sharecell and thebe?
>>> https://github.com/rgbkrk/share-cell
>>> https://github.com/oreillymedia/thebe
>>>
>>> I imagine one could create a pure client-side JS app that downloads a
>>> public notebook and displays one interactive cell per notebook cell.
>>>
>>> 2015-06-01 14:24 GMT+02:00 Nicholas Bollweg <nick.bollweg at gmail.com>:
>>> > I see a lot of problems with this, but would desperately love to see it
>>> > happen.
>>> >
>>> > If some route on tmpnb used the same url scheme as nbviewer, and we
>>> knew
>>> > which kernels were there, it would be possible to make every notebook
>>> up
>>> > there viewable... Maybe even use nbviewer as a first pass filter.
>>> >
>>> > The issues:
>>> > - no real knowledge of which kernels are available in tmpnb (working on
>>> > this)
>>> > - no concise metadata for what should be available when the kernel
>>> starts
>>> > (requirements.txt)
>>> > - many notebooks use other things (code, assets) stored along with
>>> them...
>>> > What should we being along? For repos, that would be "easy," for raw
>>> URLs
>>> > that would be "impossible".
>>> > - At the end of a session... So what? Likely will never add
>>> authentication
>>> > to tmpnb, so it would be hard to get your data back out... Fine for
>>> > playground stuff, but...
>>> >
>>> >
>>> > On 08:11, Mon, Jun 1, 2015 Jason Moore <moorepants at gmail.com> wrote:
>>> >>
>>> >> I'd like to provide a url in a lecture that the audience can enter in
>>> >> their browser opening tmpnb.org with a particular notebook (i.e.
>>> without
>>> >> downloading the notebook, uploading, and then opening it). Is that
>>> possible?
>>> >>
>>> >> Jason
>>> >> moorepants.info
>>> >> +01 530-601-9791
>>> >> _______________________________________________
>>> >> IPython-dev mailing list
>>> >> IPython-dev at scipy.org
>>> >> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>> >
>>> >
>>> > _______________________________________________
>>> > IPython-dev mailing list
>>> > IPython-dev at scipy.org
>>> > http://mail.scipy.org/mailman/listinfo/ipython-dev
>>> >
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>
>>
>>
>>
>> --
>> Kyle Kelley (@rgbkrk <https://twitter.com/rgbkrk>; lambdaops.com,
>> developer.rackspace.com)
>>
>
>
>
> --
> Kyle Kelley (@rgbkrk <https://twitter.com/rgbkrk>; lambdaops.com,
> developer.rackspace.com)
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150601/d7924921/attachment.html>


More information about the IPython-dev mailing list