哪些工具部署在运行numpy的Web服务器后面? [英] What tools to deploy webserver running numpy behind?

查看:76
本文介绍了哪些工具部署在运行numpy的Web服务器后面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果给了我一个数据集(例如excel文件),我想部署一个网络服务器,在该服务器上上传这个excel文件,它运行python/numpy代码并显示一些数字. 我还可以在网站上使用一些复选框来更改代码中的参数.

If I am given a dataset (say excel file), I would like to deploy a webserver on which I upload this excel file, it runs python/numpy code and displays some figure. I could also have some checkboxes on the website that would change the parameters in the code.

您会推荐使用哪些工具来做到这一点?最简单的方法是什么?

What tools would you recommend for doing that? What would be the easiest way?

现在我在jupyter笔记本上有python代码并使用:

For now I have the python code on jupyter notebook and use:

from ipywidgets.embed import embed_minimal_html

embed_minimal_html('export.html', views=[fig])

通过运行以下命令在本地查看我的身材(fig):python -m http.server 8080

to see my figure (fig) locally, by running: python -m http.server 8080

我希望部署它并选择要上传的文件.

I would like this to be deployed and choosing the file to upload.

推荐答案

使用Github存储库托管代码,然后通过此处.当您到达那里时,单击launch徽章,临时会话将启动.在随带的笔记本电脑中,您可以在Run菜单下执行Run All Cells.闲置10分钟后,会话终止.您可以下载有用的信息.在此处.我在这里利用了JupyterLab随附的用于文件上传的拖放功能,但是有文件上传小部件(请参见下文).

Use a Github repo to host your code, and then share it via MyBinder.org. An example, that is simpler than yours, but like what you describe in some ways is here. When you get there click the launch badge and a temporary session will spin up. In the notebook that comes up, you can do Run All Cells under the Run menu. The session dies after 10 minutes of inactivity. You can download useful information. See more about the MyBinder project here. I am taking advantage of the drag and drop for file upload that comes with JupyterLab here but there are file upload widgets (see below).

该示例没有精美的小部件,例如用于选择的拨动开关,但您可以添加它们.例如,请参见 appmode 演示. (单击页面上的launch binder按钮.)您将看到可以在笔记本电脑或"appmode"中使用这些小部件.您也可以与小部件爱好者进行互动. Voila画廊中的一些示例将使您更多地了解小部件和交流的可能性到您的基础python.所有这些都在Github上,并通过MyBinder.org的临时会议提供.请记住,如果需要,这些应用程序可以在笔记本中运行.这些小部件也可以在笔记本电脑版本中使用.而且,您可以根据需要直接链接到笔记本模式,如直接以笔记本模式启动链接"标题下所示

That example one doesn't have fancy widgets like toggles to make the choices but you can add them. For example, see the appmode demo. (Click launch binder button on the page.) You'll see you can have the widgets in the notebook or in the 'appmode'. You can make the interactions with the widgets fancier, too. Some examples featured in the Voila gallery will give you more of an idea of what is possible with the widgets and communicating to your underlying python. All those are on Github and served via temporary sessions from MyBinder.org. Keep in mind those apps can run in the notebook if you want that. The widgets work there in the notebook versions as well, too. And you can directly link to the notebook mode if you prefer, as shown under the heading 'Direct links to start out in notebook mode' here.

这篇关于哪些工具部署在运行numpy的Web服务器后面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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