在本地运行IPython Notebook查看器 [英] Running IPython Notebook viewer locally

查看:223
本文介绍了在本地运行IPython Notebook查看器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的工作中介绍IPython笔记本。我想要做的一个方法是与同事分享我自己作为笔记本的工作,这样他们就能看到创建复杂报告并分享它们是多么容易。

Im trying to introduce IPython notebook in my work. One of the ways I want to do that is by sharing my own work as notebooks with my colleagues so they would be able to see how easy it is to create sophisticated reports and share them.

我显然无法使用Notebook viewer,因为我们的大部分工作都是保密的。我正在尝试在本地设置笔记本查看器。我阅读了这个问题,并按照那里的说明进行了操作,但是现在nbconvert是IPython的一部分,说明不再有效。

I obviously can't use Notebook viewer since most of our work is confidential. I'm trying to set up notebook viewer locally. I read this question and followed the instructions there, but now that nbconvert is part of IPython the instructions are no longer valid.

有人可以提供帮助吗?

推荐答案

你有一对选项:


  1. 如上所述转换为HTML然后使用简单服务器提供它们,例如python -mSimpleHTTPServer你甚至可以设置一个在一个目录中监听的小蟒蛇脚本。如果将更改或新笔记本添加到目录中,脚本将运行nbconvert并将HTML文件移动到您要服务的文件夹。要导航到正在运行的服务器,请转到yourip:port,例如10.0.0.2:8888(运行IPython notebook命令时请参阅IPython输出)(如果您可以通过网络提供服务,请查看下面的第2点)

  1. As described above convert to HTML and then serve them using a Simple server e.g python -m "SimpleHTTPServer" You can even set up a little python script that would "listen" in one directory. If changes or new notebooks is added to the directory the script will run nbconvert and move the HTML file to the folder you are serving from. To navigate to the server you are running go to yourip:port e.g. 10.0.0.2:8888 (see the IPython output when you run the IPython notebook command) (If you can serve over the network you might just as wel look into point 2 below)

如果您的计算机已联网,您可以通过与同事共享您的IP地址和端口,通过LAN为您的工作服务。然而,这将给他们编辑访问权限,但不应该是一个问题?这意味着他们将导航到您的ipython服务器并查看ipython笔记本并能够运行您的文件。

If your computers are networked you can serve your work over the lan by sharing your IP address and port with your colleagues. This will however give them editing access but should not be a problem? This means that they will navigate to your ipython server and see the ipython notebook and be able to run your files.

在Linode等在线服务器上托管笔记本电脑等...入门级服务器便宜。虽然需要一些工作来添加密码。

Host your notebooks on an online server like Linode etc... entry level servers cheap. Some work is needed to add a password though.

转换为PDF并将其邮寄给他们。

Convert to PDF and mail it to them.

转换为幻灯片(现在可以在版本1.00中)并通过选项1,2提供服务或者只是与它们共享HTML文件。

Convert to a slideshow (now possible in Version 1.00) and serve via option 1,2 or just share the HTML file with them.

让他们全部运行ipython笔记本并将你的文件检查到bitbucket(它的免费私人git repo)的私人仓库。然后他们可以在那里获取您的文件并在他们自己的机器上自行运行。或者只是将它邮寄给他们。更好的是,如果他们不做更改与大家共享一个Dropbox文件夹。如果他们在该文件夹中运行ipython notebook,他们将看到您的文件(尽管有危险)

Let them all run ipython notebook and check your files into a private repo at bitbucket (its free private git repo). They can then get your files there and run it themselves on their own machines.Or just mail it to them. Better yet if they wont make changes share a dropbox folder with everyone. If they run ipython notebook in that folder they will see your files (DANGEROUS though)

将他们带到会议室并展示他们。 :)

Get them in a boardroom and show them. :)

这篇关于在本地运行IPython Notebook查看器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆