jupyter-notebook

Unable to Build and Compile Toree

空扰寡人 提交于 2019-12-25 04:34:18
问题 I'm having errors when running make dev and make release and make jupyter in toree when building from master. My machine is Ubuntu 16.04 root@ubuntu-2gb-sgp1-01:/home/incubator-toree# uname -r 4.4.0-47-generic when running make release in toree root i get root@ubuntu-2gb-sgp1-01:/home/incubator-toree# make release APACHE_SPARK_VERSION=2.0.0 VERSION=0.2.0.dev1-incubating IS_SNAPSHOT=true sbt toree/assembly Unrecognized VM option 'MaxPermSize=1024M' Error: Could not create the Java Virtual

Plotly (offline) for Python click events

余生长醉 提交于 2019-12-25 03:56:11
问题 I need to get click events in Plotly (offline) in Jupyter. The way I am thinking to handle this is use javascript and the following command to return the values to python: var kernel = IPython.notebook.kernel; kernel.execute(command); ...where command would be something like variable = xxxxx (just like here) I am stucked in the beggining of my attempt, trying to plot a chart in HTML in python (observe that I can succesfully load jQuery this way): from IPython.display import HTML HTML('''

jupyter notebook kernel crashing non-stop

冷暖自知 提交于 2019-12-25 03:17:21
问题 I have installed Jupyter Notebook through Conda. Been using it for a month without any issues. Suddenly today Jupyter Kernel started crashing and it is failing to restart. One point to note. This opens without any problems: http://localhost:8888/tree but crashes start to happen as soon as I open any notebook (.ipynb file) (gpd) [arnuld@arch64 geo]$ jupyter-notebook [I 13:01:24.389 NotebookApp] Serving notebooks from local directory: /mnt/sda5/knuth/geo [I 13:01:24.389 NotebookApp] The Jupyter

I keep getting AttributeError in RandomSearchCV

痴心易碎 提交于 2019-12-25 02:13:48
问题 x_tu = data_cls_tu.iloc[:,1:].values y_tu = data_cls_tu.iloc[:,0].values classifier = DecisionTreeClassifier() parameters = [{"max_depth": [3,None], "min_samples_leaf": np.random.randint(1,9), "criterion": ["gini","entropy"]}] randomcv = RandomizedSearchCV(estimator=classifier, param_distributions=parameters, scoring='accuracy', cv=10, n_jobs=-1, random_state=0) randomcv.fit(x_tu, y_tu) --------------------------------------------------------------------------- AttributeError Traceback (most

Redirect from http port (80) to https port(443) on Kubernetes

社会主义新天地 提交于 2019-12-25 01:33:38
问题 i'm new to this, How can I redirect from http port(80) to https port(443) on the same domain(service) in Kubernetes. I've tried putting nginx on same pod(container) and redirecting from http to https but it didn't work. I tried this way on same pod //nginx server { listen 80; server_name example.com; return 301 https://$server_name$request_uri; } Kubernetes example deployment file. //Jupyterhub is running on port 8000. spec: ports: - port: 443 name: https protocol: TCP targetPort: 8000 - port

Select activity from a specific date using SQL

寵の児 提交于 2019-12-25 01:18:03
问题 I want to look up the number of questions are asked in a specific day on the Stack Overflow Question and answer dataset. How many questions were asked at 2018-11-11? how = """SELECT EXTRACT(DAY FROM DATE '2018-11-11') AS Day, EXTRACT(MONTH FROM DATE '2018-11-11') AS Month, EXTRACT(YEAR FROM DATE '2018-11-11') AS Year, COUNT(*) AS Number_of_Questions, ROUND(100 * SUM(IF(answer_count > 0, 1, 0)) / COUNT(*), 1) AS Percent_Questions_with_Answers FROM `bigquery-public-data.stackoverflow.posts

Python: pip install sublime not working

≡放荡痞女 提交于 2019-12-25 00:43:30
问题 I am considerably new to both sublime. However, I really enjoy that one may add lots of feature to sublime using python code. I always do my python on Jupyter notebook. I usually install modules as easy through Anaconda i.e. !pip install sublime I actually coded the following on my jupyter notebook !pip install sublime the outcome: Collecting sublime Downloading sublime-0.1.0.tar.gz Collecting click<4.0,>=3.3 (from sublime) Downloading click-3.3-py2.py3-none-any.whl (58kB) Building wheels for

FileNotFoundError: [WinError 3] The system cannot find the path specified

梦想的初衷 提交于 2019-12-25 00:28:55
问题 Code: import os import cv2 folder = ['test images', 'ALB', 'BET', 'DOL', 'LAG', 'NoF', 'OTHER', 'SHARK', 'YFT' ] Path = r'D:\ncfm\train' for i in range(9): listing = os.listdir(path+'/'+folder[i]) folder[i+1] = np.array([np.array(cv2.imread(path+'/'+folder[i]+'/'+file)).flatten() for file in listing]) Error: FileNotFoundError Traceback (most recent call last) <ipython-input-152-d8f8c2149488> in <module> 5 6 for i in range(9): ----> 7 listing = os.listdir(path+'/'+folder[i]) 8 folder[i+1] = np

Jupyter Notebook issue - NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:snowflake`

江枫思渺然 提交于 2019-12-25 00:18:01
问题 I'm getting the following error in Jupyter notebook running on docker. NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:snowflake` I'm running the following from sqlalchemy import create_engine engine = create_engine( f'snowflake://asd:asd@bla/analytics/public?warehouse=general&role=analyst' ) From within the Notebook I can execute the following and get the code to work, with results below: !python3 --version !echo '---' !cat test.py !echo '---' !python3 test.py Python 3.6.8 ::

Showing seaborn plot from dictionary

我们两清 提交于 2019-12-25 00:07:48
问题 I need to store plots in a dictionary like this: import matplotlib.pyplot as plt import seaborn as sns test = dict() test['a'] = sns.lmplot(x="sepal_length", y="sepal_width", hue="species", truncate=True, height=5, data=sns.load_dataset("iris")) But how do I show that plot from the dict ? test['a'] returns the plot object like <seaborn.axisgrid.FacetGrid at 0x233011bfe80> but does not show the plot itself. test['a'] plt.show() Does not show the plot either. Any suggestions how to show the