jupyter-notebook

Plotly gives an empty field as output in jupyter lab

天涯浪子 提交于 2019-12-07 09:50:37
问题 I'm using plotly at jupyter lab, but I'm getting a blanked output. I'm having exactly the same problem described here: plotly.offline.iplot gives a large blank field as its output - why? And I tried what they suggested in the answers, but it didn't work. Here is the code I'm using: import pandas as pd import numpy as np %matplotlib inline from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot init_notebook_mode(connected=True) cf.go_offline() df = pd.DataFrame(np.random

Interactive boxplot with pandas and Jupyter notebook

空扰寡人 提交于 2019-12-07 09:42:55
问题 I have data in a pandas DataFrame, and I want to create an interactive boxplot that allows me to select the number of days, whilst plotting a boxplot for the values in each of the categories in the column 'category' This is what my code/data looks like so far: import numpy as np import pandas as pd categories=('A','B','C') data = { 'days': np.random.randint(120, size=100), 'category': np.random.choice(categories, 100), 'value': 100.0 * np.random.random_sample(100) } df = pd.DataFrame(data)

Not able to serve jupyter notebooks in binder

你离开我真会死。 提交于 2019-12-07 08:23:41
问题 Binder project looks promising. It helps in executing notebooks in a github repository by building an executable container. I am trying to build an executable container in binder with the following Dockerfile that has Perl 6 and Python 3 kernels: FROM sumdoc/perl-6 ENV NB_USER jovyan ENV NB_UID 1000 ENV HOME /home/${NB_USER} RUN adduser --disabled-password \ --gecos "Default user" \ --uid ${NB_UID} \ ${NB_USER} RUN apt-get update \ && apt-get install -y build-essential \ git wget libzmq3-dev

Exit pdb Interactive Mode from Jupyter Notebook

会有一股神秘感。 提交于 2019-12-07 08:15:11
问题 Within pdb, I'm using the interact command to enter interactive mode (documentation at https://docs.python.org/3/library/pdb.html). This gives me an InteractiveConsole within pdb (which I need in order to do list comprehension). From within a Jupyter Notebook, how do I leave interactive mode without exiting the debugger entirely? Things I've tried: The link below answers this exact question but the solutions only work from the terminal. Ctrl-d from within Jupyter just adds a bookmark...And

Jupyter Notebook: How to copy paste image into MS word?

北城以北 提交于 2019-12-07 08:07:37
问题 I tried to copy the image and paste them into MS word, but it didn't work. I'm not sure if this is my problem, or the word's problem? The images are at: https://cdn.rawgit.com/cqcn1991/Wind-Speed-Analysis/master/output_HTML/marham.html#5.3-Sectoral-Comaprison The paste result (in MS Word), it's done by CTRL+C, CTRL+V: I can only paste the text, not the image. I experiment it with Medium and another web app. Medium works exactly like MS Word, while another is able to paste. I think the

How to place custom Jupyter kernels inside virtual environment?

蓝咒 提交于 2019-12-07 06:44:42
问题 I have a custom Jupyter kernel which runs IPython using a custom IPython profile which uses a matplotlib stylesheet. I know to run this successfully normally I would put: The matplotlib stylesheet in ~/.config/matplotlib/stylelib/ The IPython profile in ~/.ipython/ The kernel json in ~/.jupyter/kernels/my_kernel/ But I am doing this as part of larger program which runs in a virtualenv, and if I put the things as above then any notebook server running on the computer will be able to see the

Nvidia Theano docker image not available

天大地大妈咪最大 提交于 2019-12-07 06:27:22
问题 Trying to run docker command : nvidia-docker run -d -p 8888:8888 -e PASSWORD="123abcChangeThis" theano_secure start-notebook.sh # Then open your browser at http://HOST:8888 taken from https://github.com/nouiz/Theano-Docker returns error : Error: image library/theano_secure:latest not found Appears the theano_secure image is not currently available ? Searching for theano_secure : $ nvidia-docker search theano_secure:latest NAME DESCRIPTION STARS OFFICIAL AUTOMATED The return of this command is

How to uninstall Jupyter notebook installed from Anaconda?

别说谁变了你拦得住时间么 提交于 2019-12-07 06:24:22
问题 I followed the following instructions to install the Jupyter notebook (Single user mode). However, I actually need to install the multi user (Jupyter-hub) application. How do I uninstall this application? FYI - Using Centos 6.8 Thanks 回答1: You can remove Jupyter Notebook by running: conda remove jupyter jupyter-client jupyter-console jupyter-core You can install Jupyterhub by running: conda install -c conda-forge jupyterhub I believe that this package is only compatible with Python 3. 来源:

Bokeh: pass vars to CustomJS for Widgets

戏子无情 提交于 2019-12-07 05:30:30
问题 A nice thing about Bokeh is that callbacks can be specified from the Python layer that result actions on the javascript level without the need of bokeh-server. So one can create interactive widgets that run in a browser without an Ipython or Bokeh server running. The 0.9.3. documentation gives an example that I can reproduce in an ipython notebook: http://docs.bokeh.org/en/latest/docs/user_guide/interaction.html#cutomjs-for-widgets from bokeh.io import vform from bokeh.models import CustomJS,

Javascript Jupyter Notebook How to get code cell content?

柔情痞子 提交于 2019-12-07 05:30:10
问题 (There is a similar question here, but it is about using python code to read markdown cells. I want to use JavaScript (for example in a Jupyter Notebook front end extension) to read the source code in code cells.) I want to perform an analysis on the code. However, if I simply inspect the DOM of a Jupyter Notebook, it turns out to be a true DOM nightmare of nested div s (probably half of them redundant): As we can see here, each character of the source code is in its own element. Naturally I