notebook

jupyter notebook inline plots as svg

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: By default jupyter notebook inline plots are displayed as png, e.g.: import matplotlib.pyplot as plt %matplotlib inline plt.plot() How can you configure jupyter notebooks to display matplotlib inline plots as svg? 回答1: %config InlineBackend.figure_format = 'svg' does the trick. A minimal example is: import matplotlib.pyplot as plt %matplotlib inline %config InlineBackend.figure_format = 'svg' plt.plot() 文章来源: jupyter notebook inline plots as svg

No supported color terminal library Python/Jupyter

匿名 (未验证) 提交于 2019-12-03 02:18:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to start a Jupyter Notebook server on my Windows 7 machine, but I keep getting this odd, seemingly unsearchable error after typing: jupyter notebook into cmd.exe C:\Users\zfleeman>jupyter notebook Traceback (most recent call last): File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "c:\python27\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Python27\Scripts\jupyter-notebook.EXE\__main__.py", line 9, in <modul e> File "c:\python27\lib\site-packages

How do I get the current IPython Notebook name

匿名 (未验证) 提交于 2019-12-03 01:55:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am trying to obtain the current NoteBook name when running the IPython notebook. I know I can see it at the top of the notebook. What I am after something like currentNotebook = IPython . foo . bar . notebookname () I need to get the name in a variable. 回答1: As already mentioned you probably aren't really supposed to be able to do this, but I did find a way. It's a flaming hack though so don't rely on this at all: import json import os import urllib2 import IPython from IPython . lib import kernel connection_file_path = kernel .

wxpython notebook inside boxsizer

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What is wrong with this code? I am trying to place a notebook on a panel that is being controlled by a boxsizer. I am new to wxpython and can't figure out what I am doing wrong. When I run it it just makes a mess in the corner :( import wx class TestNoteBook(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title, size=(600, 500)) panel = wx.Panel(self) hsizer = wx.BoxSizer(wx.HORIZONTAL) leftpanel = wx.Panel(panel) notebook = wx.Notebook(leftpanel) posterpage = wx.Panel(notebook) listpage = wx.Panel

canvas.mpl_connect in jupyter notebook

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have the following code in test.py: fig = plt . figure () ax = fig . add_subplot ( 111 ) ax . plot ( np . random . rand ( 10 )) def onclick ( event ): print ( 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f' % ( event . button , event . x , event . y , event . xdata , event . ydata )) cid = fig . canvas . mpl_connect ( 'button_press_event' , onclick ) when i run test.py in the command line by "python test.py", 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f' gets printed as i click the plot however, the results are not printed in jupyter

Jupyter (IPython) notebook not plotting

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I installed anaconda to use pandas and scipy. I reading and watching pandas tutorials and they all say to open the ipython notebook using ipython notebook --pylab==inline but when I do that I get a message saying "Support for specifying --pylab on the command line has been removed. Please use '%pylab = inline' or '%matplotlib =inline' in the notebook itself" But that does not work. Then when I try "plot(arange(10))" I get a message saying "name 'plot' is not defined." I trying plotting data from a .csv file and got "matplotlib.axes._subplots

ImportError: No module named notebook.notebookapp

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What do you recommend guys for this error when I type in console ipython notebook and got ImportError: No module named notebook.notebookapp ? I installed ipython notebook with pip and really I don't know what is going on. 回答1: For 4.0 and above You need to install the notebook app separately from https://github.com/jupyter/notebook pip install jupyter 回答2: conda install jupyter will install latest jupyter along with other required dependencies The following packages will be downloaded: package | build ---------------------------|------------

Rstudio Notebook (rmarkdown) running python: describe not shown

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am runing some python chunks in a Rstudio notebook, which include reading a csv file and printing basic statistics. I could not find the way to print the statistics (describe()) as an output. Here is the code: ```{python, engine.path = '/home/user/anaconda3/bin/python3'} import pandas data_py = pandas.read_csv('/home/user/datafiles/data.csv', sep= ';') ``` ```{python, engine.path = '/home/user/anaconda3/bin/python3'} data_py.describe(include='all') ``` NO output printed. I also tried: ```{python, engine.path = '/home/user/anaconda3/bin

本地用浏览器远程访问服务器上的jupyter notebook或者jupyter lab,并解决启动时的PermissionError错误

匿名 (未验证) 提交于 2019-12-03 00:34:01
大家都知道,对于从事数据科学或者机器学习的人来说,用jupyter做实验简直就是一个神器,但是往往许多算法和模型我们都希望利用远程的linux服务器进行实现和测试 这里介绍一种能用本地的浏览器访问服务器上架设的jupyter的方案,使得我们可以通过本地浏览器使用服务器的计算资源、访问服务器上的文件系统 官网下载anaconda,或者用pyenv下载都行,安装到服务器,个人用户的东西安装不要用sudo权限。(anaconda是一个很方面的python管理和集成包,里面包含一个python版本和对应的一些工具,其中就包括jupyter) 接下来,我们需要在当前用户的根目录创建一个名为nbserver的配置文件。 $ ipython profile create nbserver 这将创建一个文件夹,其中包含一些原始的配置文件。我们跳转到这个文件夹进行一些配置 $ cd ~ /.ipython/profile _nbserver/ 由于ipython Notebook要求https连接,因此我们需要创建一个ssl证书。 $ openssl req -x509 -nodes -days 365 -newkey rsa: 1024 -keyout mycert . pem -out mycert . pem 启动ipython:(ipython其实就是jupyter的底层shell界面