ipython-notebook

How to suppress “Build Progress” bar when training an h2o model?

梦想的初衷 提交于 2020-01-14 09:50:30
问题 I'm tuning my parameters by testing many models, and I'm fairly annoyed that I can't do much about the "Build Progress" bars that are cluttering up my iPython Notebook. I've skimmed the docs looking for some sort of "verbose" setting to turn off, but can't find it. Is there any way to turn this off when I want to train and evaluate dozens of models at once? 回答1: The function you're looking for is called h2o.no_progress() and it shuts off all progress bars in your session. If you search the

IPython/Jupyter notebook 3 - hide headers by default

試著忘記壹切 提交于 2020-01-14 09:47:08
问题 Before IPython notebook version 3.0 the notebook headers could be hidden by default by adding this to ".ipython\profile_default\static\custom\custom.js" (on Windows): $([IPython.events]).on("app_initialized.NotebookApp", function () { $('div#header').hide(); $('div#maintoolbar').hide(); }); or for Jupyter, "~/.jupyter/custom/custom.js", with IPython replaced by Jupyter . also see this question This does not seem to work anymore. It hides the headers, but it also leaves a big gap on the page's

ipython notebook anchor link to refer a cell directly from outside

空扰寡人 提交于 2020-01-12 15:31:38
问题 I am writing documentation for a notebook-based framework. When referring to important cells in a demo-notebook, can I point to a particular cell by using some sort of anchor? For example if I have the demo-notebook at 127.0.0.1/mydemo, is it possible to refer to the input cell In[10] by some anchor tag like 127.0.0.1/mydemo#In10 回答1: Not on stable, and only on Header(1-6) cell on master. Just click on the header cell and it will put the right anchor in the url bar, wich is usually #header

ipython notebook anchor link to refer a cell directly from outside

旧城冷巷雨未停 提交于 2020-01-12 15:27:50
问题 I am writing documentation for a notebook-based framework. When referring to important cells in a demo-notebook, can I point to a particular cell by using some sort of anchor? For example if I have the demo-notebook at 127.0.0.1/mydemo, is it possible to refer to the input cell In[10] by some anchor tag like 127.0.0.1/mydemo#In10 回答1: Not on stable, and only on Header(1-6) cell on master. Just click on the header cell and it will put the right anchor in the url bar, wich is usually #header

How to change attributes of a networkx / matplotlib graph drawing?

懵懂的女人 提交于 2020-01-12 05:32:07
问题 NetworkX includes functions for drawing a graph using matplotlib. This is an example using the great IPython Notebook (started with ipython3 notebook --pylab inline ): Nice, for a start. But how can I influence attributes of the drawing, like coloring, line width and labelling? I have not worked with matplotlib before. 回答1: IPython is a great tool for finding out what functions (and objects) can do. If you type [1]: import networkx as nx [2]: nx.draw? you see Definition: nx.draw(G, pos=None,

Jupyter: Write a custom magic that modifies the contents of the cell it's in

限于喜欢 提交于 2020-01-12 02:20:28
问题 In a Jupyter notebook there are some built-in magics that change the contents of a notebook cell. For example, the %load magic replaces the contents of the current cell with the contents of a file on the file system. How can I write a custom magic command that does something similar? What I have so far prints something to stdout def tutorial_asset(line): print('hello world') def load_ipython_extension(ipython): ipython.register_magic_function(tutorial_asset, 'line') And I can load it with

Jupyter: Write a custom magic that modifies the contents of the cell it's in

倾然丶 夕夏残阳落幕 提交于 2020-01-12 02:20:04
问题 In a Jupyter notebook there are some built-in magics that change the contents of a notebook cell. For example, the %load magic replaces the contents of the current cell with the contents of a file on the file system. How can I write a custom magic command that does something similar? What I have so far prints something to stdout def tutorial_asset(line): print('hello world') def load_ipython_extension(ipython): ipython.register_magic_function(tutorial_asset, 'line') And I can load it with

Display multiple output tables in IPython notebook using Pandas

落爺英雄遲暮 提交于 2020-01-11 05:11:05
问题 I now know that I can output multiple charts from IPython pandas by embedding them in one plot space which will appear in a single output cell in the notebook. Can I do something similar with Pandas HTML Tables? I am getting data from multiple tabs (about 15-20) on a spreadsheet and running them though a set of regressions and I'd like to display the results together, perhaps 2 up.. But since the function to display the table only displays one, the last one, not sure how to approach. Ideas? I

ValueError: index must be monotonic increasing or decreasing

余生颓废 提交于 2020-01-10 05:38:06
问题 ser3 = Series(['USA','Mexico','Canada'],index = ['0','5','10']) here ranger = range(15) I get an error while using Forward fill in iPython ser3.reindex(ranger,method = 'ffill') /Users/varun/anaconda/lib/python2.7/site-packages/pandas/core/index.pyc in _searchsorted_monotonic(self, label, side) 2395 return len(self) - pos 2396 -> 2397 raise ValueError('index must be monotonic increasing or decreasing') 2398 2399 def get_slice_bound(self, label, side, kind): ValueError: index must be monotonic

Run parts of a ipython notebook in a loop / with different input parameter

北城以北 提交于 2020-01-09 10:35:35
问题 I have written a ipython notebook, which analyses a dataset. Now I want to use this code to loop over different datasets. The code is split into about 50 cells (including comments, markdown explanations,...). Is there a way to run parts of a notebook in a loop or running a whole notebook with different input parameters? I don't want to merge all cells into one function or download the code as a python script, as I really like to run (and experimenting with) parts of the analysis by executing