jupyter-notebook

What does the '[notebook]' in 'pip install ipython[notebook]' mean?

天大地大妈咪最大 提交于 2019-12-24 00:56:28
问题 The '[notebook]' appears to be some kind of modifier, but as I was installing Jupyter rather than ipython I suddenly wondered what other variants of this modifier I've been missing out on, perhaps something that would install specific kernels or configurations for me. Unfortunately, I don't know what the '[notebook]' is: pip search '[notebook]' finds nothing, and I don't know what this modifier is or is called. I've looked at the PyPI naming convention pep, etc, but I couldn't find anything

Creating vector space

…衆ロ難τιáo~ 提交于 2019-12-24 00:46:35
问题 I've got a question: I have a lot of documents and each line built by some pattern. Of course, I have this array of patterns. I want to create some vector space, then to vector this patterns by some rule (I have no ideas about what is this rule yet..) - i.e. to make this patterns like "centroids" of my vector space. Then to vector each line of the current document (again by this rule) and to count the closet centroid to this line (i.e. minimum of the distance between two vectors). I don't

Is there a way to redirect stderr to file in Jupyter?

本秂侑毒 提交于 2019-12-24 00:38:13
问题 There was a redirect_output function in IPython.utils, and there was a %%capture magic function, but these are now gone, and this thread on the topic is now outdated. I'd like to do something like the following: from IPython.utils import io from __future__ import print_function with io.redirect_output(stdout=False, stderr="stderr_test.txt"): while True: print('hello!', file=sys.stderr) Thoughts? For more context, I am trying to capture the output of some ML functions that run for hours or

Python conda - How to upgrade package not available on anaconda

纵然是瞬间 提交于 2019-12-24 00:37:49
问题 If I am looking at the Anaconda Packages (http://docs.continuum.io/anaconda/pkg-docs), there is a package named "nbconvert" in version 4.0.0 . On the github site of nbconvert (https://github.com/jupyter/nbconvert/releases) there is a newer version (i need this one) 4.1.0 . Now how to install this version on my machine? If i try to conda install nbconvert It will install version 4.0.0. but I need this new one If I try to search for this package with anaconda search -t conda nbconvert It only

HTTPError: HTTP Error 403: urlib3 while using smopy

假如想象 提交于 2019-12-23 20:45:12
问题 I'm trying to generate an osm map while using smopy but I keep getting the forbidden error, this is the set of the code : box = (lat[region].min(), lon[region].min(), lat[region].max(), lon[region].max()) m = smopy.Map(box, z=12) m.show_ipython() and then I get the following error : HTTPError Traceback (most recent call last) <ipython-input-48-1060c6eba6aa> in <module> 1 box = (lat[region].min(), lon[region].min(), 2 lat[region].max(), lon[region].max()) ----> 3 m = smopy.Map(box, z=12) 4 m

Plotly Value error - Invalid property for colour

心不动则不痛 提交于 2019-12-23 19:35:07
问题 I have been experiencing errors while generating charts using Plotly and it seems to be affecting most of the charts I try producing on it. The error also seems to be a duplicate across all the failures. I am using Jupyter notebook (Anaconda 3, Python 3.6). Code that fails to generate output is found below (but my data table and everything else is correct). ** I am unsure if there's some problem with the Plotly library (I'm using Plotly's latest that I installed using "Pip install Plotly")

Behavior of matplotlib inline plots in Jupyter notebook based on the cell content

╄→гoц情女王★ 提交于 2019-12-23 19:20:35
问题 I am curious to understand the below explained behavior of inline matplotlib plots in the Jupyter notebook. I will show three cases: Case 1: Importing and plotting in separate cells. In this case, the plot appears after executing both the cells once consecutively. Case 2: Importing and plotting in the same cell. In this case, the plot doesn't appear when the cell [1] is executed once (no figure in the image below). The plot however appears when the same cell [1] is executed again. This is the

How can I import one Jupyter notebook into another

送分小仙女□ 提交于 2019-12-23 19:15:11
问题 Apparently it's possible to import one Jupyter notebook into another. The linked page has quite a bit of code to do it. Am I supposed to add that code to the importing notebook? The page isn't clear about it. It's supposed to be a general solution, so it doesn't make sense to add all that code to all notebooks that import other notebooks. Any help would be appreciated. Thanks. 回答1: Yes, you can add all of that code to a notebook if you want. And yes, you shouldn't do so as a general solution.

Scoping of environment variables when using Jupyter cell magics

為{幸葍}努か 提交于 2019-12-23 17:43:14
问题 I would like to understand how variable scoping works in Jupyter notebooks. When I create a bash notebook with two cells, environment variables that are exported are visible across cell boundaries: In [1]: export PATH=$PATH:~/samplepath In [2]: echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/myuser/samplepath But if I create a Python notebook and use cell magics to achieve the same result, variables do not seem to be visible across cell boundaries any more: In [1