ipython-notebook

ipython notebook on remote server peculiarity

左心房为你撑大大i 提交于 2019-12-03 20:29:32
I am taking my first steps with ipython notebook and I installed it successfully on a remote server of mine (over SSH) and I started it using the following command: ipython notebook --ip='*' ---pylab=inline --port=7777 I then checked on http://myserver.sth:7777/ and the notebook was running just fine. I then wanted to close the SSH connection with the server and keep ipython running in the background. When I did this, I couldn't connect to myserver.sth:7777 anymore. Once I connected again to the remote server by SSH, I could connect again to the notebook. I then tried to use screen to start

suppress section numberings in nbconvert to latex?

情到浓时终转凉″ 提交于 2019-12-03 20:18:46
Is it possible with nbconvert --> latex --> PDF to suppress section numberings? Essentially I would like to keep the simple font size distinctions that the markdown header syntax (#, ##, etc.), and ipynb section headings provide (nbconvert --to latex appears to treat these same), and still use these to define section headings, but without the numberings. Then I also have the option of adding my own numbers manually. I can cope with losing some aspects of general latex document structuring and functionality. Ideally though I would like to keep that information, and just suppress the numberings

Insert a link inside a pandas table

。_饼干妹妹 提交于 2019-12-03 19:19:07
问题 I'd like to insert a link (to a web page) inside a pandas table, so when it is displayed in ipython notebook, I could press the link. I tried the following: In [1]: import pandas as pd In [2]: df = pd.DataFrame(range(5), columns=['a']) In [3]: df['b'] = df['a'].apply(lambda x: 'http://example.com/{0}'.format(x)) In [4]: df Out[4]: a b 0 0 http://example.com/0 1 1 http://example.com/1 2 2 http://example.com/2 3 3 http://example.com/3 4 4 http://example.com/4 but the url is just displayed as

how to execute scrapy shell “URL” with notebook

半世苍凉 提交于 2019-12-03 17:37:16
问题 i am trying to scrapy and there is scrapy shell "URL" command, executing console ipython with a response object from the URL. but i want to do that thing with notebook. is there any way to execute scrapy shell with notebook, or how can i get the same response object of the URL in ipython manually? 回答1: Stumbled across this unanswered question looking for the same answer. The closest thing I can come up right now is this: import requests from scrapy.http import TextResponse r = requests.get(

IPython Notebook: Open/select file with GUI (Qt Dialog)

放肆的年华 提交于 2019-12-03 17:22:40
问题 When you perform the same analysis in a notebook on different data files, may be handy to graphically select a data file. In my python scripts I usually implement a QT dialog that returns the file-name of the selected file: from PySide import QtCore, QtGui def gui_fname(dir=None): """Select a file via a dialog and return the file name. """ if dir is None: dir ='./' fname = QtGui.QFileDialog.getOpenFileName(None, "Select data file...", dir, filter="All files (*);; SM Files (*.sm)") return

What tools are available to export an ipython notebook to a PDF file? [closed]

纵然是瞬间 提交于 2019-12-03 16:58:31
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I have a nicely-formatted ipython notebook complete with markdown cells and whatnot. I'm wondering what my options are in terms of exporting to a PDF file. So far, I've been going to File > Print View and printing the resulting page to PDF with chromium's "save to file" function. This technically works , but it

Error loading IPython notebook

天大地大妈咪最大 提交于 2019-12-03 16:49:23
问题 Once I opened a notebook file with Jupyter (it asks me to convert the file) I never can open it in the standard IPython notebook anymore. I get the following error: Error loading notebook Bad Request 2014-12-21 04:13:03.203 [NotebookApp] WARNING | Unreadable Notebook: /FunIT experiment.ipynb global name 'NBFormatError' is not defined WARNING:tornado.access:400 GET /api/notebooks/FunIT%20experiment.ipynb?_=1419153182928 (::1) 3.11ms referer=http://localhost:8888/notebooks/FunIT%20experiment

Edit IPython cell in an external editor

谁说胖子不能爱 提交于 2019-12-03 14:02:12
问题 It would be great to have a keyboard short-cut in IPython notebook, which would allow to edit the content of the current cell in an external editor (e.g. gvim). Maybe just copy the content of the current cell into a temporary file, launch gvim on it, and update the current cell each time the file is saved (and delete the temporary file when exiting gvim). Also, maybe update the temporary file if the cell is edited from the browser, so that gvim knows the file has changed. I am aware of

ipython notebook: how to toggle header invisible by default

戏子无情 提交于 2019-12-03 13:33:05
I want to save some space for my 14 inch screen. What should I write in e.g. ipython_notebook_config.py to trigger this? If it doesn't already exist, create a file named custom.js in /Users/YOURUSERNAME/.ipython/profile_default/static/custom/ (You may have to run ipython profile create , if you have never run this command.) In custom.js , put the following lines of JavaScript $([IPython.events]).on("app_initialized.NotebookApp", function () { $('div#header').hide(); }); If you would like to also hide the toolbar by default, use these lines of JavaScript instead $([IPython.events]).on("app

“Zebra Tables” in IPython Notebook?

北战南征 提交于 2019-12-03 12:25:16
问题 I'm building some interactive workflows in IPython using the fantastic Notebook for interactive analysis and Pandas. Some of the tables I'm displaying would be much easier to read with a little bit of formatting. I'd really like something like "zebra tables" where every other row is shaded. I read here about how this formatting can be implemented via css. Is there a really straight forward way to apply a css to an IPython Notebook and then have tables rendered using the style sheet? 回答1: You