jupyter-notebook

Jupyter Notebooks not displaying progress bars

我只是一个虾纸丫 提交于 2020-03-21 21:58:17
问题 I'm trying to get a progress bar going in Jupyter notebooks. This is a new computer and what I normally do doesn't seem to work: from tqdm import tqdm_notebook example_iter = [1,2,3,4,5] for rec in tqdm_notebook(example_iter): time.sleep(.1) Produces the following text output and doesn't show any progress bar HBox(children=(IntProgress(value=0, max=5), HTML(value=''))) Similarly, this code: from ipywidgets import FloatProgress from IPython.display import display f = FloatProgress(min=0, max=1

How do I use snippets for Jupyter Notebook with VSCode?

你离开我真会死。 提交于 2020-03-20 02:30:17
问题 I've been using VSCode for a while and at the moment I am trying to set up snippets to work. They seem to work well with simple Python (.py) files but not with Jupyter Notebook (.ipynb) files. Is there any way to make them work together? The snippet is right here: "Create a new figure":{ "scope": "python", "prefix": "nf", "body": [ "plt.figure(figsize=(9, 9))", "", "$1", "", "plt.show()" ] } 回答1: I'm a developer on this extension. From the comments above it seems like the answer is already

pop-up plots using Python Jupyter Notebook

邮差的信 提交于 2020-03-18 12:26:14
问题 Is there a way to have the plots created inside Jupyter Notebook using matplotlib to appear on a separate pop-up screen that would allow you to expand/shrink the image by hand? I've tried experimenting with (%matplotlib notebook) but that didn't really do the trick. Just wondering if this is possible. 回答1: Just use an interactive backend. This works for me: import matplotlib.pyplot as plt %matplotlib tk plt.plot([1, 2]) The notebook (nbagg) backend also allows for expand/shrink by hand. It

How to make Jupyter notebook use PYTHONPATH in system variables without hacking sys.path directly?

|▌冷眼眸甩不掉的悲伤 提交于 2020-03-18 03:39:39
问题 Same problem as in this question sys.path different in Jupyter and Python - how to import own modules in Jupyter?. In pure Python, it prepends my system environment variable PYTHONPATH to sys.path but Jupyter notebook doesn't, so I can't import my own module. There are many similar questions asked on SO, and the solution is to directly manipulate sys.path in the script. Is there a way to make Jupyter notebook use my system PYTHONPATH variable, as in pure python? 回答1: Jupyter uses its own

How can one use Binder (mybinder.org) with private Github repositories?

匆匆过客 提交于 2020-03-17 11:24:30
问题 After reviewing this exact issue (https://github.com/jupyterhub/binderhub/issues/237) it seems that the functionality for this has been implemented with this merged pull request (https://github.com/jupyterhub/binderhub/pull/671). However I can not seem to find guidance in the docs or elsewhere which explains what should go into the secrets.yml file or if there are other steps required in order to use Binder with private Github repos (Apologies if I have missed the obvious -- complete Binder

Change Jupyter notebook version 4.x+ logo

会有一股神秘感。 提交于 2020-03-17 11:15:09
问题 In IPython notebook version 2.x , you can add logo by customizing folder .ipython/profile_name/static/base/images/logo.png and it will display the custom logo that we made on the header of the notebook. In Jupyter notebook version 4.x , we know that they move directory to .jupyter/ instead i.e. .jupyter/base/ and .jupyter/custom/custom.css . However, when I try to customize default profile in ~/.jupyter/base/images/logo.png , I couldn't custom the logo anymore. The question is: How to custom

Change Jupyter notebook version 4.x+ logo

房东的猫 提交于 2020-03-17 11:13:30
问题 In IPython notebook version 2.x , you can add logo by customizing folder .ipython/profile_name/static/base/images/logo.png and it will display the custom logo that we made on the header of the notebook. In Jupyter notebook version 4.x , we know that they move directory to .jupyter/ instead i.e. .jupyter/base/ and .jupyter/custom/custom.css . However, when I try to customize default profile in ~/.jupyter/base/images/logo.png , I couldn't custom the logo anymore. The question is: How to custom

How to get interactive bokeh in Jupyter notebook

五迷三道 提交于 2020-03-17 06:45:11
问题 I'm gearing up towards using bokeh for an interactive online implementation of some python models I've written. Step 1 is understanding some basic interactive examples, but I can't get the introductory examples running INTERACTIVELY in a Jupyter notebook. I'm hoping someone can correct my misunderstanding of what is a copy-paste of bokeh's own example code. I'm aware that the Bokeh documentation isn't perfect (I fixed an outdated reference to bokeh.plotting.show rather than io.show ), but I

Jupyter notebook, wrong sys.path and sys.executable

落爺英雄遲暮 提交于 2020-03-17 06:02:04
问题 I'm trying to run the anaconda distribution of python libraries in a Jupyter Notebook, but when I run the notebook I keep getting ImportErrors because the python path is set to the default distribution from Mac OS X 10.11 When I print out the sys.path and sys.executable, they differ when running python vs running jupyter notebook. For example, from pprint import pprint as p import sys p(sys.path) After doing this in python I get the correct output: ['', '/Users/glennraskovich/anaconda2/lib

opencv.imshow will cause jupyter notebook crash

我的梦境 提交于 2020-03-17 04:45:25
问题 I check other question on google or stackoverflow, they are talking about run cv2.imshow in script, but my code run in jupyter notebook. Here is my configuration: ubuntu 16.4x64 python 3.5 opencv 3.1.0 I start a jupyter notebook: here is the code I put it notebook: %pylab notebook import cv2 cvim2disp = cv2.imread('data/home.jpg') cv2.imshow('HelloWorld', cvim2disp) cv2.waitKey() #image will not show until this is called cv2.destroyWindow('HelloWorld') #make sure window closes cleanly When I