ipython-notebook

Seaborn: Specify an exact color

∥☆過路亽.° 提交于 2021-02-08 13:28:07
问题 You can specify a color for plots, but Seaborn will mute the color a bit during plotting. Is there a way to turn off this behavior? Example: import matplotlib import seaborn as sns import numpy as np # Create some data np.random.seed(0) x = np.random.randn(100) # Set the Seaborn style sns.set_style('white') # Specify a color for plotting current_palette = matplotlib.colors.hex2color('#86b92e') # Make a plot g = sns.distplot(x, color=current_palette) # Show what the color should look like sns

running multiple cells in jupyter notebook simultaneously

梦想与她 提交于 2021-02-07 06:23:05
问题 My question is similar to the one asked here. I have a cell in a jupyter notebook that runs for a long time. I want to run the next cell (variables not dependent on the previous cell) along with the previous one. I am not asking for multiprocessing or sharing jobs across CPUs. I want to run the contents of multiple cells run simultaneously. By default, they run sequentially. It is like running two different notebooks but for the sake of continuity and shared objects, variables I want to run

Python - Can't import Seaborn

ⅰ亾dé卋堺 提交于 2021-02-06 13:54:39
问题 I'm running iPhyton Notebooks and I'm trying to import the Seaborn package. When I try to import it from the Terminal, it loads up fine, but when I import it through iPython Notebooks, it give me the following error. I have even tried to re-install Seaborn using both Conda and Pip inside iPython notebooks and still it wont work. Any idea why? Thanks. ImportError Traceback (most recent call last) <ipython-input-1-417274a1ae6c> in <module>() 1 get_ipython().system(u'conda install seaborn') 2

Python - Can't import Seaborn

最后都变了- 提交于 2021-02-06 13:54:01
问题 I'm running iPhyton Notebooks and I'm trying to import the Seaborn package. When I try to import it from the Terminal, it loads up fine, but when I import it through iPython Notebooks, it give me the following error. I have even tried to re-install Seaborn using both Conda and Pip inside iPython notebooks and still it wont work. Any idea why? Thanks. ImportError Traceback (most recent call last) <ipython-input-1-417274a1ae6c> in <module>() 1 get_ipython().system(u'conda install seaborn') 2

How do I omit matplotlib printed output in Python / Jupyter notebook? [duplicate]

岁酱吖の 提交于 2021-02-06 10:14:53
问题 This question already has answers here : How to hide <matplotlib.lines.Line2D> in IPython notebook (2 answers) Closed 3 years ago . When I make a simple plot inside an IPython / Jupyter notebook, there is printed output, presumably generated from matplotlib standard output. For example, if I run the simple script below, the notebook will print a line like: <matplotlib.text.Text at 0x115ae9850> . import random import pandas as pd %matplotlib inline A = [random.gauss(10, 5) for i in range(20) ]

How do I omit matplotlib printed output in Python / Jupyter notebook? [duplicate]

ε祈祈猫儿з 提交于 2021-02-06 10:14:36
问题 This question already has answers here : How to hide <matplotlib.lines.Line2D> in IPython notebook (2 answers) Closed 3 years ago . When I make a simple plot inside an IPython / Jupyter notebook, there is printed output, presumably generated from matplotlib standard output. For example, if I run the simple script below, the notebook will print a line like: <matplotlib.text.Text at 0x115ae9850> . import random import pandas as pd %matplotlib inline A = [random.gauss(10, 5) for i in range(20) ]

Root access for Jupyter/iPython Notebook

落花浮王杯 提交于 2021-02-06 10:13:52
问题 I'm trying to use the bash kernel in iPython/Jupyter notebook, but I need sudo access within the notebook itself. I've tried $ sudo jupyter notebook to run the notebook as root, but that only returns: $ jupyter: 'notebook' is not a Jupyter command So, I'm left with running $ jupyter notebook (unless there's a way to run Jupyter notebook as root). I also can't do su root in the notebook itself because that requires an input and the notebook won't let me give an input. Finally, there is

Root access for Jupyter/iPython Notebook

北慕城南 提交于 2021-02-06 10:12:24
问题 I'm trying to use the bash kernel in iPython/Jupyter notebook, but I need sudo access within the notebook itself. I've tried $ sudo jupyter notebook to run the notebook as root, but that only returns: $ jupyter: 'notebook' is not a Jupyter command So, I'm left with running $ jupyter notebook (unless there's a way to run Jupyter notebook as root). I also can't do su root in the notebook itself because that requires an input and the notebook won't let me give an input. Finally, there is

How to display a graph in ipython notebook

耗尽温柔 提交于 2021-02-04 17:51:07
问题 Trying to do some plotting in SymPy - As per this video I have written : from sympy.plotting import plot, plot_parametric e = sin(2*sin(x**3)) plot(e, (x, 0, 5)); But after evaling that cell I don't get any output? There isn't an error or anything, it just doesn't display anything. Another test : from sympy import * from sympy.plotting import plot, plot_parametric import math import numpy as np import pandas as pd import matplotlib.pyplot as plt expr = x**2 + sqrt(3)*x - Rational(1, 3) lf =

Jupyter: Programmatically Clear Output from all Cells when Kernel is Ready

ε祈祈猫儿з 提交于 2021-01-28 04:45:31
问题 I have a question on how to programmatically clear\clean the output from all the Cells in my Jupyter notebook after notebook is done loading (when Kernel is ready), and prior to the user, myself, manually executing code. Basically, I would like the notebook to look clean when it is done loading, and I would like to do it automatically. How can I impose a command like clear_output() from a single initialization cell on to all other cells in the notebook? Thank you. 回答1: For a trusted notebook