ipython-notebook

Converting ipython notebook to html with separate images

夙愿已清 提交于 2019-12-20 20:29:13
问题 I have an ipython notebook with a mixture of SVG and PNG graphs. I can export it to html without any trouble, but it embeds the images as encoded text in the body of the .html file. I'm calling: ipython nbconvert --to html mynotebook.ipynb The output at the command line includes: [NbConvertApp] Converting notebook mynotebook.ipynb to html [NbConvertApp] Support files will be in mynotebook_files/ but no such directory is created, and there are no files in it. There are related posts (1 ,2 ,3

Converting ipython notebook to html with separate images

瘦欲@ 提交于 2019-12-20 20:28:24
问题 I have an ipython notebook with a mixture of SVG and PNG graphs. I can export it to html without any trouble, but it embeds the images as encoded text in the body of the .html file. I'm calling: ipython nbconvert --to html mynotebook.ipynb The output at the command line includes: [NbConvertApp] Converting notebook mynotebook.ipynb to html [NbConvertApp] Support files will be in mynotebook_files/ but no such directory is created, and there are no files in it. There are related posts (1 ,2 ,3

Match a running ipython notebook to a process

自古美人都是妖i 提交于 2019-12-20 19:06:08
问题 My server runs many long running notebooks, and I'd like to monitor the notebooks memory. Is there a way to match between the pid or process name and a notebook? 回答1: Since the question is about monitoring notebooks' memory, I've written a complete example showing the memory consumption of the running notebooks. It is based on the excellent @jcb91 answer and a few other answers (1, 2, 3, 4). import json import os import os.path import posixpath import subprocess import urllib2 import pandas

Match a running ipython notebook to a process

岁酱吖の 提交于 2019-12-20 19:05:18
问题 My server runs many long running notebooks, and I'd like to monitor the notebooks memory. Is there a way to match between the pid or process name and a notebook? 回答1: Since the question is about monitoring notebooks' memory, I've written a complete example showing the memory consumption of the running notebooks. It is based on the excellent @jcb91 answer and a few other answers (1, 2, 3, 4). import json import os import os.path import posixpath import subprocess import urllib2 import pandas

Unreadable Notebook: Unsupported JSON nbformat version 4 (supported version: 3)

依然范特西╮ 提交于 2019-12-20 17:26:25
问题 I've just installed IPython 3.0 using pip on my laptop, which is running Ubuntu 14.04: $ pip search ipython ipython-cluster-helper - Simplify IPython cluster start up and use for multiple schedulers. ipython - IPython: Productive Interactive Computing INSTALLED: 3.0.0 (latest) However, when I go to use IPython , the terminal seems to think it's using version 1.2.1: $ ipython Python 2.7.6 (default, Mar 22 2014, 22:59:38) Type "copyright", "credits" or "license" for more information. IPython 1

IPython Notebook widgets for Matplotlib interactivity

寵の児 提交于 2019-12-20 12:34:19
问题 I would like to use the ipython notebook widgets to add some degree of interactivity to inline matplotlib plots. In general the plot can be quite heavy and I want to only update a specific element of the plot. I understand that widgets have a throttling feature built-in that helps to don't flood the kernel, but when the plot takes let say 30s I don't want to wait so long just to update a line. By reading the example notebooks I was able to create a basic example in which I add a cross cursor

plot() doesn't work on IPython notebook

穿精又带淫゛_ 提交于 2019-12-20 10:43:56
问题 I'm new to python scientific computing, and I tried to make a simple graph on IPython notebook. import pandas plot(arange(10)) Then error had shown as below. --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-2-6b139d572bd6> in <module>() 1 import pandas ----> 2 plot(arange(10)) NameError: name 'plot' is not defined Instead, with IPython --pylab mode, a right graph popped up when I tried the same code. Am I

Choose SQL as default cell magics for Jupyter Notebook

浪子不回头ぞ 提交于 2019-12-20 10:37:29
问题 I'm writing a Jupyter notebook for a database course; most cells will contain SQL code, for which I use the IPython SQL magic. Currently I have to prepend each cell with %%sql . Is there a way to avoid typing %%sql before each cell, by making it the default? I found a related question at How do I set up default cell magics for every ipython notebook cell?. However, I couldn't find a SQL kernel for Jupyter. 回答1: The Jupyter docs tell you how you can edit the CodeMirror settings. CodeMirror has

IPython Notebook - early exit from cell

ぃ、小莉子 提交于 2019-12-20 08:59:45
问题 I'd like to programmatically exit a cell early in IPython Notebook. exit(0) , however, kills the kernel. Whats the proper way to do this? I'd prefer not to split the cell or manually halt execution. 回答1: I'm reposting my answer from here because the solution should apply to your question as well. It will... not kill the kernel on exit not display a full traceback (no traceback for use in IPython shell) not force you to entrench code with try/excepts work with or without IPython, without

TAB completion does not work in Jupyter Notebook but fine in iPython terminal

▼魔方 西西 提交于 2019-12-20 08:57:48
问题 TAB completion works fine in iPython terminal, but not in Firefox browser. So far I had tried but failed, 1). run a command $ sudo easy_install readline , then the .egg file was wrote in /usr/local/lib/python2.7/dist-packages/readline-6.2.4.1-py2.7-linux-x86_64.egg, but TAB completion still doesn't work in Jupyter Notebook. 2). also tried to find locate the ipython_notebook_config.py or ipython_config.py , but failed. I use Python 3.5 and iPython 4.0.0. and both are installed in Ubuntu 15.10