jupyter-notebook

jupyter notebook: return getattr(self._sock,name)(*args) socket.error: [Errno 99] Cannot assign requested address

◇◆丶佛笑我妖孽 提交于 2019-12-10 23:14:57
问题 Hi I want to run the jupyter notebook on the cloud Ubuntu server(16.04). and the server IP is 213.138.10.176 (just example), and port is 22011 I have installed jupyter, and python 2.07, and edited the jupyter_notebook_config.py as following: c.NotebookApp.ip = '213.138.10.176' c.NotebookApp.open_browser = False c.NotebookApp.port = 22011 But after I saved it, and run jupyter notebook command on the Ubuntn server. there is error: File "/usr/local/bin/jupyter-notebook", line 11, in <module> sys

Defining colors of Matplotlib 3D bar plot

梦想与她 提交于 2019-12-10 22:16:48
问题 I can't figure out the right way to set a cmap (or colors) for a 3d bar plot in matplotlib in my iPython notebook. I can setup my chart correctly (28 x 7 labels) in the X and Y plane, with some random Z values. The graph is hard to interpret, and one reason is that the default colors for the x_data labels [1,2,3,4,5] are all the same. Here is the code: %matplotlib inline from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as npfig = plt.figure(figsize=(18,12))

How to directly upload a Jupyter notebook from Local Machine onto Google Collab? Is there a way to do this?

扶醉桌前 提交于 2019-12-10 22:00:59
问题 Currently I have the Jupyter notebook on my local machine. It will be helpful if I could directly export it to Google Collab rather than copy pasting it? 回答1: For me, I go to https://drive.google.com Then upload the notebook file to folder 'Colab Notebooks', then open it from there. Another, simpler way, is the go to the menu in Colab File > Upload notebook... Select the notebook file to upload Now (nov 2018) another simpler way is to click open the left pane. Click File tab, then click

how to add a jar to python notebook on bluemix spark?

本秂侑毒 提交于 2019-12-10 21:43:09
问题 I would like to use spark jdbc with python. First step was to add a jar: %AddJar http://central.maven.org/maven2/org/apache/hive/hive-jdbc/2.0.0/hive-jdbc-2.0.0.jar -f However, the response: ERROR: Line magic function `%AddJar` not found. How can I add JDBC jar files in a python script? 回答1: Presently, this is not possible only from a python notebook; but it is understood as an important requirement. What you can do until this is supported, is from the same spark service instance of your

How to handle python module installation when running jupyter notebook in docker?

偶尔善良 提交于 2019-12-10 21:08:19
问题 I'm currently starting to use the awesome jupyter notebook. Since I've always had troubles with stuff not working because of different python versions and python module versions, I like to run jupyter notebook in a docker container. I've created a Dockerfile to build my image (based on the official jupyter/scipy-notebook image on dockerhub), I have everything up and running and its working great. The only thing that concerns me is how to handle the installation of different python modules I

Jupyter notebook only works in base environment

烂漫一生 提交于 2019-12-10 20:56:58
问题 Jupyter notebook stopped working as usual suddenly today. If I launch Jupyter like this then everything works fine in base environment. activate base jupyter notebook But launching it in any other environment or simply without declaring environment activate XXX jupyter notebook results as a localhost:8889/tree blank page in browser. Also there are no errors in Jupyter console. I have reinstalled Anaconda and Jupyter, restarted PC and used ip 127.0.0.1 instead of localhost, but nothing helps.

The Kernel appears to have died. Always when I am loading a large file

霸气de小男生 提交于 2019-12-10 20:15:43
问题 I am using Jupyter notebooks for creating a ML Model with TuriCreate . The steps that I am following are the above. I have download a .csv and .json (same file) from https://www.kaggle.com/zynicide/wine-reviews The file has 51 MB size. I have made an environment turienv From Anaconda Navigation and the following steps work perfect for smaller CSV / JSON files. source activate turienv pip install turicreate=5.0 Jupiter notebook ----inside Notebook---- import turicreate as tc wine_data = tc

How to convert a python script with cell delimiters to a jupyter notebook?

醉酒当歌 提交于 2019-12-10 19:40:00
问题 I mostly use Spyder for my data analysis and am quite satisfied with it. There you can use the cell functionality of Jupyter Notebooks in normal python scripts using # %% to delimit individual code cells (and also execute blocks). The same thing is also possible in Atom with Hydrogen. What I am looking for is a way to convert these scripts into a jupyter notebook, automaticlally splitting cells at each # %% . The notebook I would use to document, explain and share my workflow by inserting

display DataFrame() values in bold font in one row only

隐身守侯 提交于 2019-12-10 19:34:32
问题 having dataframe summary being called directly from jupyter cell summary #(Shift + Enter) how can I make the highlighted row only (last row) in bold font? 回答1: Please, please provide the code to at least generate the dataframe you are posting. For what you want, you can use style.applymap() function. The rest is to find the correct properties of font that can be set to bold and how to set index of last row. In [1]: import pandas as pd In [2]: def df_style(val): return 'font-weight: bold' In

How to install scipy in Python3.5 virtual env | windows 10?

冷暖自知 提交于 2019-12-10 19:32:34
问题 I have Anaconda (Python 3.6) in my Windows 10. This includes Scipy. I am also using a virtual Python 3.5 env to support TensorFlow. Now, the problem is that I cannot import Scipy while I'm inside this virtual env. I have tried: pip install scipy (didn't work) easy-install scipy (didn't work) I also visited http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy to look for suitable package to install but I could not figure out which numpy+mkl and scipy combination to download. I'll be grateful for