Disable iPython Notebook Autoscrolling
Can also be done via user interface. Individual cells: Cell->Current Outputs->Toggle Scrolling All cells: Cell->All Outputs->Toggle Scrolling
Can also be done via user interface. Individual cells: Cell->Current Outputs->Toggle Scrolling All cells: Cell->All Outputs->Toggle Scrolling
import checks to see if the module is in sys.modules, and if it is, it returns it. If you want import to load the module fresh from disk, you can delete the appropriate key in sys.modules first. There is the reload builtin function which will, given a module object, reload it from disk and that … Read more
nbconvert (a jupyter tool for notebook conversion) allows you to do this without any extra packages: Just go to your terminal and type $ jupyter nbconvert –to notebook –inplace –execute mynotebook.ipynb Source (Thanks Stephan for suggesting the –inplace flag) NOTE: This said, I’d try to convert everything you need to a proper script. Jupyter notebooks … Read more
Yes. Here is the documentation for ipyparallel (formerly IPython parallel) that will show you how to spawn multiple IPython kernel. After you are free to distribute the work across cores, and you can prefix cells with %%px0 %%px1… %%px999 (once set up) to execute a cell on a specific engine, which in practice correspond to … Read more
Slightly more “proper” options: This will get you out of all but the worst try/except blocks. raise KeyboardInterrupt A little cleaner version of yours: assert(False) or simply: raise if you want to save a couple keystrokes.
On Python 3 only, import the reload function: >>> from importlib import reload On both Python 2.x, and 3.x, you can then simply call reload on the module: >>> import MyPak >>> reload(MyPak) >>> from MyPak import MyMod However, instances of the old class will not be updated (there’s simply no code that describes the … Read more
I encountered the same ImportError. Somehow the setuptools package had been deleted in my Python environment. To fix the issue, run the setup script for setuptools: curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python If you have any version of distribute, or any setuptools below 0.6, you will have to uninstall it first.* See Installation Instructions for further details. … Read more
Use %matplotlib notebook instead of %matplotlib inline to get embedded interactive figures in the IPython notebook – this requires recent versions of matplotlib (1.4+) and IPython (3.0+).
@minrk’s answer is the meat and bones of the fix, but you’ll need to wrap it in an initialization callback, at least with IPython-3.1.0. In your custom.js: require([‘base/js/namespace’, ‘base/js/events’], function(IPython, events) { events.on(‘app_initialized.NotebookApp’, function() { IPython.CodeCell.options_default.cm_config.autoCloseBrackets = false; }); }); Thanks @Mike for your comment about IPython’s RequireJS dependency loading and the pointer to a … Read more
If you don’t mind a code cell that does the job, there is a possibility without adding any extensions. from IPython.display import Markdown as md fr=2 #GHz md(“$f_r = %i$ GHz”%(fr)) This will show a markdown cell in a nicely LaTeX formatted output