ipython-notebook

Ipython Notebook: Elegant way of turning off part of cells?

Ipython Notebook: Elegant way of turning off part of cells? Question: In my ipython notebook, there is part of cells that serves as preliminary inspection. Now I want to turn it off, since after running it I know the status of the dataset, but I also want to keep it, so other people using this …

Total answers: 3

IPython notebook: how to reload all modules in a specific Python file?

IPython notebook: how to reload all modules in a specific Python file? Question: I define many modules in a file, and add from myFile import * to the first line of my ipython notebook so that I can use it as dependency for other parts in this notebook. Currently my workflow is: modify myFile restart …

Total answers: 3

Read cell content in an ipython notebook

Read cell content in an ipython notebook Question: I have an ipython notebook with mixed markdown and python cells. And I’d like some of my python cells to read the adjacent markdown cells and process them as input. An example of the desired situation: CELL 1 (markdown): SQL Code to execute CELL 2 (markdown): select …

Total answers: 1

collapse cell in jupyter notebook

collapse cell in jupyter notebook Question: I am using ipython Jupyter notebook. Let’s say I defined a function that occupies a lot of space on my screen. Is there a way to collapse the cell? I want the function to remain executed and callable, yet I want to hide / collapse the cell in order …

Total answers: 13

How to display print statements interlaced with matplotlib plots inline in Ipython?

How to display print statements interlaced with matplotlib plots inline in Ipython? Question: I would like to have the output of print statements interlaced with plots, in the order in which they were printed and plotted in the Ipython notebook cell. For example, consider the following code: (launching ipython with ipython notebook –no-browser –no-mathjax) %matplotlib …

Total answers: 1

double click to open an ipython notebook

double click to open an ipython notebook Question: Related posts: Open an ipython notebook via double-click on osx How can I open Ipython notebook from double click? I always cd to the directory of the notebook, then type ipython notebook in the browser and then open it in the browser. This steps is very inconvenient. …

Total answers: 4

Using both Python 2.x and Python 3.x in IPython Notebook

Using both Python 2.x and Python 3.x in IPython Notebook Question: I use IPython notebooks and would like to be able to select to create a 2.x or 3.x python notebook in IPython. I initially had Anaconda. With Anaconda a global environment variable had to be changed to select what version of python you want …

Total answers: 11

Display SVG in IPython notebook from a function

Display SVG in IPython notebook from a function Question: In IPython notebook, the following code displays the SVG below the cell: from IPython.display import SVG SVG(url=’http://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg’) The following displays nothing: from IPython.display import SVG def show_svg(): SVG(url=’http://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg’) Is there a way to display an SVG from within a function (or a class)? Asked By: prooffreader …

Total answers: 2

How do I add a kernel on a remote machine in IPython (Jupyter) Notebook?

How do I add a kernel on a remote machine in IPython (Jupyter) Notebook? Question: Dropdown menu in the top-right of the UI on a local machine (PC): Kernel-> Change kernel-> Python 2 (on a local PC) Python 3 (on a local PC) My new kernel (on a remote PC) Asked By: korniichuk || Source …

Total answers: 4

How do I configure mathjax for iPython notebooks?

How do I configure mathjax for iPython notebooks? Question: I’m trying to find a way for mathjax to not use STIX fonts for math in my iPython notebook. Instead, I’d much rather have it use the ‘TeX’ fonts. According to the documentation for Mathjax I should use: MathJax.Hub.Config({ “HTML-CSS”: { preferredFont: “TeX” } }); That …

Total answers: 6