Default template for iPython notebook (using Jupyter)

I know it may not be what you’re looking for (this example is not good for working on notebooks that need to be run in multiple environments, e.g. shared), but I put the following in a file called ipython_config.py in my .ipython folder. c.InteractiveShellApp.exec_lines = [‘%matplotlib inline’, ‘import numpy as np’, ‘import scipy.constants as scc’, … Read more

IPython Jupyter: uploading folder

Convert it into a single Zip file and upload that. to unzip the folder use the code down bellow import zipfile as zf files = zf.ZipFile(“ZippedFolder.zip”, ‘r’) files.extractall(‘directory to extract’) files.close() However, sometimes you may need to download several files from notebook. There are several ways to do this but the easiest way is to … Read more

IPython: How to wipe IPython’s history selectively & securely?

History is store on $(ipython locate)/profile_default/history.sqlite by default. You can remove the file, and or do any operation you want on it (secure erase, etc..). It’s an sqlite file so you can load it with any sqlite program and do query on it. Check in $(ipython locate)/profile_default/ and other $(ipython locate)/profile_xxx that you do not … Read more

A simple way to view ipython notebook

There appears to be limited non-GitHub options for sharing notebooks. You can still share a link directly from Google’s colaboratory. This will allow you to: Upload your file Share the link with various permissions Any Google user can view (and optionally edit) your notebook. See also other options: binder: sharing notebooks from a GitHub repo; … Read more

How do I set custom CSS for my IPython/IHaskell/Jupyter Notebook?

To add custom CSS to a particular notebook you can use HTML. Add and execute a regular Python code cell with the following content: from IPython.core.display import HTML HTML(“”” <style> // add your CSS styling here </style> “””) Alternatively (thanks @abalter) use the %%html cell magic: %%html <style> // add your CSS styling here </style>

How do I delete/refresh available kernels for IPython/Jupyter notebook v4.0?

After a brute force search, Jupyter stores kernel info for OS X in /Users/${USER}/Library/Jupyter/kernels. This list got copied across from my .ipython/kernels list hence renaming it made no difference. Removing /Users/${USER}/Library/Jupyter/kernels fixes the issue. This is the reference I was looking for: http://jupyter-client.readthedocs.org/en/latest/kernels.html#kernelspecs

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)