Output exceeds the size limit. Open the full output data in a text editor

Jupyter notebook 

unlimited size of line:

Code #1

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))


Code #2

from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"



Thank you.
🙇🏻‍♂️

IProgress not found. Please update jupyter and ipywidgets.

 

IProgress not found. Please update jupyter and ipywidgets.


..

pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension

..


thx


jupyter notebook to python py

 

run this command

>jupyter nbconvert your_notebook_name.ipynb --to python


thank you.


jupyter print clear

 

Use Ipython.disply to make printed thing clear.

from IPython.display import clear_output

for i in range(10):
clear_output(wait=True)
print("Hello World!")


Thank you.

🙇🏻‍♂️

show image in jupyter notebook

 

from matplotlib import pyplot as plt
import numpy as np
import cv2

img = imread('xxx.png') #or image_data
img2 = img[:,:,::-1]
plt.imshow(img)


error : Bad config encountered during initialization, when you run jupyter

 

type this

jupyter notebook --generate-config


run juypter again

good luck!


Using Virtual Environments in Jupyter Notebook and Python

activate user virtualenv
>source yourenv/bin/activate

install ipykernel
>(yourenv) pip install --user ipykernel


Add you virtualenv to jupyter
>(yourenv) python -m ipykernel install --user --name=myenv

Then you can choose myenv to create new file.



key commands:
pip install --user ipykernel
python -m ipykernel install --user --name=myenv

Jupyter notebook ip and port setting (tip)

ipython notebook --ip=0.0.0.0 --port=80
or
jupyter notebook --ip=0.0.0.0 --port=80