Can I run Jupyter notebook cells in commandline?

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

Is there a way to run multiple cells simultaneously in IPython notebook?

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

how to reload a Class in python shell?

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

What is causing ImportError: No module named pkg_resources after upgrade of Python on os X?

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

Turn off auto-closing parentheses in ipython

@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