jupyter-notebook

How can I link the slider to update my plot in bokeh while in a jupyter notebook?

左心房为你撑大大i 提交于 2019-12-23 04:47:36
问题 I have created a function called ed_montecarlo that runs a montecarlo simulation with a set number of iterations and returns the results as a pandas data frame with multiple columns (not all of which are used here.) Currently I am trying to link this to a plot with Bokeh and have a slider that when changed will re-run the function using the new value of the slider. My code is as follows: def modify_doc(doc): source = ColumnDataSource(ed_montecarlo(num=1000)) TOOLS = "pan,wheel_zoom,box_zoom

ImportError: No module named data_utils

故事扮演 提交于 2019-12-23 03:57:28
问题 I'm extremely new to python and I'm recently trying to understand more about Machine Learning and Neural Nets I know this is a trivial question but I seem to be having problem importing data_utils on jupyter notebook. Can anyone please help Note: I am not using Keras, and I am following the tutorial in this video. 回答1: I was also following the video and went through the same issue, after searching for a while; Here is the link from Github tensorflow_chatbot_required_files. You can download

No module found error for every conda package in anaconda jupyter notebook

梦想与她 提交于 2019-12-23 03:24:21
问题 After installing scikit learn latest version 19 using conda in anaconda jupyter ,all package showing no module found error - scikit learn , numpy ,matplotlib etc NO module found erroe for all conda package after uninstalling and reinstallling its has same module problem my kerenel specs sana@skb-linux:~$ . activate my_env (my_env) sana@skb-linux:~$ jupyter kernelspec list Available kernels: python3 /home/sana/anaconda3/envs/my_env/share/jupyter/kernels/python3 my code # scipy import scipy

Tweepy: tweepy.error.tweeperror 'code' 215 'message' 'bad authentication data.'

末鹿安然 提交于 2019-12-23 02:29:23
问题 I'm unsure what is going wrong in here. The following code was working until 2 days ago. I'm using tweepy version number 3.6.0 on python3 in jupyter notebook . Now, when I execute the code given below, I keep getting the error, TweepError: [{'code': 215, 'message': 'Bad Authentication data.'}] . What am I doing wrong? I've already looked at similar posts 1, 2,3,4,5 and 6 but no solution. Note, I have also regenerated the keys, still the error persists. The code is; import tweepy ckey = 'xxx'

Undo text entry in Jupyter Notebook under Win7

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 02:17:27
问题 I was surprised I did not find an answer to this question on Jupyter Notebook under Win7 here or on the web. I just overwrote by mistake a larger part of a call block, but not all. Autosave dates back some previous changes that I do not want to revert. Where is the undo function for text entries in Jupyter Notebook? 回答1: Hit the ESC key to enter Command Mode. Now you can hit the h key to see all available commands. To undo an entry you have to go back to Edit Mode (hit ENTER ) and then do a

Script to run jupyter notebooks from remote server

流过昼夜 提交于 2019-12-23 01:37:17
问题 I have a server (Ubuntu server 16.04) that runs jupyter notebooks, and a local machine (Mac) where I use google-chrome to visualize these notebooks. To do so, I have to: Run jupyter notebook in the server: jupyter notebook --no-browser --port=${remotePort} Specify a SHH tunnel in my local machine: ssh -f ${username}@${serverIP} -L ${localPort}:localhost:${remotePort} To automate this process, I've created the script jupyter.sh (described below), such that I only run on my local machine: bash

Python: Resetting A Matplotlib From An Ipywidget Button

风格不统一 提交于 2019-12-23 01:29:05
问题 When using iPyWidgets and Matplotlib in a Jupyter notebook, it is fairly easy to get a live-updating figure, even with multiple subplots, and multiple variables with multiple sliders. Simply set an interact to contain the activated plot function, and constructors for two slider variables: %pylab inline from ipywidgets import * from IPython.display import display import numpy as np import matplotlib t = np.arange(0.0, 4*pi, 0.01) def pltsin(f1, f2): ax11 = plt.subplot(121) ax11.set_title('Plot

Jupyter Lab is not using virtual environment

雨燕双飞 提交于 2019-12-22 22:21:15
问题 I created a virtual environment and installed ipython[all] and jupyter with pip. When I run jupyter lab , open a notebook, and try importing a package I installed inside the virtual environment, I get “ModuleNotFoundError.” Running ipython in the console and importing works. Also, which jupyter does point me to the right executable in the virtual environment. 回答1: In addition to installing jupyter , I need to install jupyter lab . Otherwise, even the virtual environment jupyter executable

Jupyter Lab is not using virtual environment

爱⌒轻易说出口 提交于 2019-12-22 22:21:12
问题 I created a virtual environment and installed ipython[all] and jupyter with pip. When I run jupyter lab , open a notebook, and try importing a package I installed inside the virtual environment, I get “ModuleNotFoundError.” Running ipython in the console and importing works. Also, which jupyter does point me to the right executable in the virtual environment. 回答1: In addition to installing jupyter , I need to install jupyter lab . Otherwise, even the virtual environment jupyter executable

Jupyter notebook - can't import python functions from other folders

浪尽此生 提交于 2019-12-22 10:44:10
问题 I have a Jupyter notebook, I want to use local python functions from other folders in my computer. When I do import to these functions I get this error: "ModuleNotFoundError: No module named 'xxxxxxxxxxxxx' I'm using anaconda as the python interpreter 回答1: You can add a path using sys to your local module/python file. import sys sys.path.append("/path/to/file/") # path contains python_file.py import python_file If you want a more permanent solution by adding module to Anaconda path, see