Re: [jupyter] Online converter notebook->html

2018-01-16 Thread Michael Milligan
Hi,

As far as Jupyter components go, the basic nbconvert install only requires
the jupyter_core package. Jupyterhub is unrelated to your use-case. Using
pip or conda to install nbconvert will pull in the bits you need
automatically.

If you are simply planning to render prepared notebooks to HTML, that's
probably all you need. If you want to output formats other than HTML, you
will also need to install pandoc and possibly a TeX distribution. If you
wanted to use the "--execute" flag to actually generate the output cells,
then the problem would be much harder, but fortunately it sounds like
that's beyond the scope of what you're trying to do.

On Tue, Jan 16, 2018 at 4:38 PM, Angel Marchev, Jr. 
wrote:

> Hi all,
> I am trying to implement in my website an online, on-the-fly converter of
> notebooks which I figured should be working something like this:
> 1) I compute and save my notebook (with images, base64) on some (local or
> virtual) machine;
> 2) I go to my website (Wordpress), I start a new page
> 3) In the new page I click a button to upload my saved notebook and it is
> converted to standard html form and imported in the page (not as iframe)
> 4) If it is possible (not sure yet) I would like to edit the notebook (in
> html form) after that for additional corrections.
>
> I found out that converting notebooks to HTML (and other formats) could be
> done by nbconvert.
>
> So the questions are:
> * Do I need to install full Jupiter package for using only nbconvert?
> * If yes, then which version - Jupyter or JupiterHub? (My site is
> multiuser community)
> * Is there something that I am missing or something that you would advise
> me?
>
> I am fairly well familiar with php for wordpress development, but I only
> started using jupyter notebook recently and probably my questions may seem
> very basic.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/c3316cf9-3042-4c47-9855-522194f9075c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Michael Milligan, Ph.D. | Supercomputing Institute
Assistant Director for  | University of Minnesota
   Application Development  | milli...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAPuy8gohxP2xsoXE5oU6BqWCz_eKqAW%2B5qxq7ig3r0iM2G1h5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Online converter notebook->html

2018-01-16 Thread Angel Marchev, Jr.
Hi all,
I am trying to implement in my website an online, on-the-fly converter of 
notebooks which I figured should be working something like this:
1) I compute and save my notebook (with images, base64) on some (local or 
virtual) machine;
2) I go to my website (Wordpress), I start a new page
3) In the new page I click a button to upload my saved notebook and it is 
converted to standard html form and imported in the page (not as iframe)
4) If it is possible (not sure yet) I would like to edit the notebook (in 
html form) after that for additional corrections.

I found out that converting notebooks to HTML (and other formats) could be 
done by nbconvert.

So the questions are:
* Do I need to install full Jupiter package for using only nbconvert?
* If yes, then which version - Jupyter or JupiterHub? (My site is multiuser 
community)
* Is there something that I am missing or something that you would advise 
me?

I am fairly well familiar with php for wordpress development, but I only 
started using jupyter notebook recently and probably my questions may seem 
very basic.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/c3316cf9-3042-4c47-9855-522194f9075c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Re: how to test for running server?

2018-01-16 Thread MinRK
A GET on the user shows their server status(es). If the user is not
running, the server value will be null. If it is running, the server value
will be the URL of the running server.

The below results are with the named-servers extension enabled. If it is
not enabled, then the servers key may be omitted. Only the 'default' server
will show up in user.server, so user.servers will have a dict of all
running servers for a given user, keyed by name.

Running:

GET /users/:name

{
  "kind": "user",
  "name": "name",
  "admin": true,
  "groups": [],
  "server": "/user/name/",
  "pending": null,
  "last_activity": "2018-01-16T18:31:36.151369",
  "servers": {
"": {
  "name": "",
  "url": "/user/name/"
}
  }
}

Not running:

{
  "kind": "user",
  "name": "name",
  "admin": true,
  "groups": [],
  "server": null,
  "pending": null,
  "last_activity": "2018-01-16T18:35:54.491154",
  "servers": {}
}

​

On Wed, Dec 20, 2017 at 4:14 PM, Tim Harsch  wrote:

> Right.  Sorry, I should have been more clear.  In the case of DELETE, if
> you attempt to DELETE when no server is running you will get a HTTP 400 and
> no action taken.  But, if you DELETE and a server is running then the
> server stops and you will get HTTP 204(I think).   Similar logic for POST.
> I really just want to check the status, without causing stop or start of
> the server.
>
> Since there seems to be no GET method, could I possibly something using
> the services?  or maybe I could implement the GET ?  Just looking for
> advice on best way forward.
>

I think it would be fine to add a GET for individual servers.


>
> Thanks,
> Tim
>
> On Wednesday, December 20, 2017 at 3:26:32 PM UTC-8, Lawrence D’Oliveiro
> wrote:
>>
>> On Wednesday, December 20, 2017 at 11:44:35 AM UTC+13, Tim Harsch wrote:
>>>
>>> I see with JupyterHub API you can POST or DELETE to
>>> /users/{name}/server but there doesn't seem to be a GET.  If that's true is
>>> there another way I can test for a running server other than POST or DELETE
>>> which have their side effects?..
>>>
>>
>> Whether POST and GET have “side” effects or not is entirely up to how the
>> server interprets the request.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/4de7b283-659c-4d63-ad8e-ca5c432f5b12%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAHNn8BXWTJvi%2Br3%3DTPg_w4pKeG%2BS1LiXtCrg4tMw9fhoQ0CBfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] More on DNS rebinding

2018-01-16 Thread Matthias Bussonnier
Hi Thomas,

Thanks for the heads up, this is  nice description. I think it's a good
idea to add this extra line of defense, and a flag to disable it with a big
warning, to give some people the time to upgrade the ability to update the
notebook server without deploying a large change to their infrastructure.

Thanks !
-- 
Matthias

On 16 January 2018 at 12:18, Thomas Kluyver  wrote:

> Google's 'Project Zero' security effort just disclosed a DNS rebinding
> vulnerability in at least one popular Bittorrent client. There's some
> interesting description which helps me understand how it works:
>
> https://bugs.chromium.org/p/project-zero/issues/detail?id=1447
> https://arstechnica.com/information-technology/2018/
> 01/bittorrent-users-beware-flaw-lets-hackers-control-your-computer/
>
> First off, I think this supports our decision to have token authentication
> enabled by default, even though it's inconvenient in some situations. As I
> understand it, this should prevent DNS rebinding attacks from taking any
> action that requires authentication.
>
> Second, the fix Tavis Ormandy suggested for Transmission is interesting:
>
> """
>
> I discussed this with a jannh, I think a good solution would work like this:
>
> * If a connection is over the loopback interface, the hostname must match 
> "localhost",
>   "localhost.", "127.0.0.1", or "[::1]". This is the same list CUPS uses:
>   https://github.com/apple/cups/blob/master/scheduler/client.c#L3752
> * If a connection is not over loopback, allow any hostname iff auth is 
> enabled.
> * If a connection is not over loopback and auth is not enabled, require the 
> user to
>   create a whitelist of acceptable hostnames (They can specify * if they 
> really
>   really don't want security).
> """
>
> Should we look at employing hostname whitelisting in addition to 
> authentication, either as an
> extra line of defence or as a convenience for users on localhost?
>
> My leaning would be to do it as an extra line of defence; given how complex 
> browsers are and
> the fact that Jupyter is designed to execute arbitrary code, defence in depth 
> makes sense.
>
> Thomas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/CAOvn4qiNK_CrmtUx9rhwW%3D6zYu8meaPGDKE3C3pS4uhMc742MA
> %40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANJQusWHdW4Cn8hC4iv_LN3%3DP8pRHdrLYasqmzBL_qwN357iVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.