jupyter-notebook

Why cannot python call Javascript() from within a python function?

元气小坏坏 提交于 2019-12-08 05:09:49
问题 I used the code suggested from Download CSV from an iPython Notebook to dynamically build the javascript code and pass it to the browser using Javascript() in python when called from a jupyter notebook. Code works great. If I embed the same code in a python function and call the python function from the same jupyter notebook, the call Javascript() in python no longer works. How can I make the reusable function work? I am trying this on Chrome Version 73.0.3683.103 (Official Build) (64-bit)

How to auto-update jupyter notebook extension during development/debugging?

狂风中的少年 提交于 2019-12-08 05:04:17
问题 I try to write a custom extension for the Jupyter Notebook, as described here: https://towardsdatascience.com/how-to-write-a-jupyter-notebook-extension-a63f9578a38c I use the Chrome developer tools on Windows7 to inspect and edit the Javascript source code of my custom extension. I hoped that when pressing F5 to update the page, my altered source code would be immediately applied. However, as stated in the above mentioned article, I have to run jupyter-contrib-nbextensions.exe install and

Run Jupyter notebook out of Jupyter environment

只谈情不闲聊 提交于 2019-12-08 04:50:46
问题 I have a Jupyter notebook containing python and R scripts as well as magic commands. What I need is to schedule a task using Windows Task scheduler that somehow triggers run of this notebook. My scripts run at night and I prefer Jupyter to be closed. So I wonder if there is a way to do this? Thank you in advance. 回答1: It is perfectly possible to do this Create a bat file that you can reference in the windows task scheduler. Code as follows: cd C:\path to your notebook jupyter nbconvert --to

How do I connect to a dataproc cluster with Jupyter notebooks from cloud shell

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 04:05:51
问题 I have seen the instructions here https://cloud.google.com/dataproc/docs/tutorials/jupyter-notebook for setting up Jupyter notebooks with dataproc but I can't figure out how to alter the process in order to use Cloud shell instead of creating an SSH tunnel locally. I have been able to connect to a datalab notebook by running datalab connect vmname from the cloud shell and then using the preview function. I would like to do something similar but with Jupyter notebooks and a dataproc cluster.

No kernel for language json found - Hydrogen on atom

早过忘川 提交于 2019-12-08 03:39:56
问题 I have found some people complaining about the python kernel but that is not my issue. Here is a print screen of the error, where you can see that when I try to run an ipynb file it gives me an error with the json kernel . The package is configure with default and I have the Python2 and Python3 kernels for Jupyter as you can see below. :~ jupyter kernelspec list --json { "kernelspecs": { "python2": { "spec": { "language": "python", "argv": [ "/usr/local/opt/python/bin/python2.7", "-m",

How to execute a python notebook inside another one at google cloud datalab

自古美人都是妖i 提交于 2019-12-08 03:18:58
问题 I'd like to execute a python notebook I'had created to data pre-processing inside another notebook related with data classification process. So the last notebook depends on the functions and execution provided by the first notebook. How could I do that at google cloud datalab environment? I do like to reuse the functions and variables used at the pre-processing notebook on the classification notebook. Thanks. 回答1: The following should work: myNotebook = <relative path to notebook> %run

IPython Notebook: Why do not appearing the widgets after installing correctly ipywidgets in DSX?

眉间皱痕 提交于 2019-12-08 01:50:46
问题 After installing ipywidgets in a Jupiter notebook, DSX (IBM Datascience Experience framework), it doesn't show the widget, just a static stuff or A Jupyter Widget Example: import ipywidgets as widgets widgets.Dropdown( options = { 'One': 1, 'Two': 2, 'Three': 3 }, value = 2, description = 'Number:', ) Result: A Jupiter Widget I have tried several versions of !jupyter nbextension enable --py widgetsnbextension --sys-prefix based on http://ipywidgets.readthedocs.io/en/latest/user_install.html,

Using ipywidgets with plotly in jupyter notebook

流过昼夜 提交于 2019-12-08 01:44:35
问题 I want to use the offline plotting of plotly inside a jupyter notebook and want to manipulate or redraw the plot by using widgets from ipywidgets. Unfortunately I do not manage to update the plots appropiately: from ipywidgets import widgets, HBox, Output import plotly as py from plotly.offline import iplot from IPython.display import display %matplotlib inline ip_widget = widgets.FloatSlider( value=6, min=3, max=10, step=1, description='num', continuous_update = True ) ow = Output() def

locating and removing hidden kernels in jupyter notebook

試著忘記壹切 提交于 2019-12-08 01:28:28
问题 I am trying to figure out where are my anaconda kernels in my mac, since applications report different things. If I run: jupyter kernelspec list I get: Available kernels: python2 /Users/user/anaconda/share/jupyter/kernels/python2 However, when I open Jupiter notebook, I can see and use: [I 07:47:21.394 NotebookApp] [nb_conda_kernels] enabled, 4 kernels found Here are some screenshots: How can I remove all of those envs and leave only conda root? Thanks 回答1: You are using nb_conda_kernels

Jupyter notebook ImportError: No module named tornado.log

与世无争的帅哥 提交于 2019-12-08 01:22:27
问题 I have installed jupyter and when trying to start it, I get the following error: File "/Library/Frameworks/Python.framework/Versions/2.7/bin/jupyter-notebook", line 7, in <module> from notebook.notebookapp import main File"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/notebook/__init__.py", line 25, in <module> from .nbextensions import install_nbextension File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/notebook/nbextensions