ipython

Setting iPython default profile

ぃ、小莉子 提交于 2020-01-05 10:07:07
问题 Right after installing IPython, I created a default profile with: $ ipython profile create Then, I created another one, this time I gave it the name testing : $ ipython profile create testing I have customized this testing profile (the prompt, and autoreload extension, etc) to my liking, and now I would like it to be my default profile, so it's started when I type: $ ipython I know that I can start it with: $ ipython --profile=testing But that is a lot of typing. I have already tried editing

IPython InteractiveShell fails to yield rich output when using `%matplotlib inline`

核能气质少年 提交于 2020-01-05 05:31:09
问题 I am writing a custom client (a web-based graph representation of an IPython Notebook) for an IPython application and the easiest way to manage IPython programmatically seems to be using the IPython.core.InteractiveShell instance. Consider this example: when a Jupyter Notebook cell that uses rich output is executed with inline magic, Notebook shows the appropriate rich representation (a plotted image) of plt.show() inline: %matplotlib inline import matplotlib.pyplot as plt import numpy as np

IPython Interactive Matplotlib Widgets Remote Server?

坚强是说给别人听的谎言 提交于 2020-01-05 04:40:27
问题 I am running an ipython server (for the notebook) on a remote linux machine. I have setup a profile that listens on the remote machine such that I can access locally using: https://myserver:9999 This launches the standard IPython notebook interface that you would expect to see (after authentication). Everything works as expected. Recently I have started using matplotlib widgets. These do not work in the notebook if using inline plots (the server just ships pngs). The simple fix on a local

Can PyCharm set breakpoints on ipython notebook?

随声附和 提交于 2020-01-05 03:09:13
问题 I'd like to know how to set breakpoints in IPython notebook on PyCharm. If it's possible, please let me know. 回答1: You must start IPython Notebook from Pycharm's run Find the IPython path (ex which ipython on linux). Copy the resulting path, we will need it! On PyCharm go to Run > Edit Configuration > + button on top left most corner (add configuration) > Choose Python. Give your configuration a name. On the configuration tab, in the Script textbox, paste the path from step 1. On the script,

Add thousands separator with comma at IPython.display HTML

牧云@^-^@ 提交于 2020-01-04 18:16:11
问题 My goal is to create a dataframe using Python.display that contains formatted values such that every value has a comma separator for every thousands. Like for example, I am trying to format all the values in the dataframe from these: into these: I have been looking at here and here, but I still can't make the formatting work. Does anyone have the solution to this? Here's the code so far: import pandas as pd from IPython.display import HTML styles = [ hover(), dict(selector = "th", props = [(

Can IHaskell and IPython coexist?

坚强是说给别人听的谎言 提交于 2020-01-04 14:01:48
问题 I have IPython and IPython Notbook installed and am working my way through the IHaskell installation instructions. I have all the IHaskell prerequisites installed, but before I commit to the final step of installing IHaskell itself with cabal install ihaskell --reorder-goals I want to confirm one — perhaps obvious — thing: Will I still be able to use Python Notebooks? The instructions following the step above seem to say that simply entering ipython notebook will run Haskell rather than

Can IHaskell and IPython coexist?

↘锁芯ラ 提交于 2020-01-04 14:01:17
问题 I have IPython and IPython Notbook installed and am working my way through the IHaskell installation instructions. I have all the IHaskell prerequisites installed, but before I commit to the final step of installing IHaskell itself with cabal install ihaskell --reorder-goals I want to confirm one — perhaps obvious — thing: Will I still be able to use Python Notebooks? The instructions following the step above seem to say that simply entering ipython notebook will run Haskell rather than

Widgets not showing in NBViewer

别说谁变了你拦得住时间么 提交于 2020-01-04 05:19:09
问题 I have an iPython Notebook with an interactive slider widget: To share the notebook, I would like to use the link provided by NBViewer. This would allow me to share the notebook with people that don't use Python. Unfortunately, the widget does not show when viewing the NBViewer link: Is there something I need to do to make widgets work with NBViewer? 回答1: Widgets are not shown in nbviewer with current ipython 2.x. IPython 3 is supposed to add persistent widgets that can be shown by nbviewer.

Python Embedding with IPython: WindowsError: [Error 193] %1 is not a valid Win32 application

北慕城南 提交于 2020-01-04 04:24:09
问题 Trying to run: #include <Python.h> int main(int argc, char *argv[]) { Py_SetProgramName(argv[0]); /* optional but recommended */ Py_Initialize(); PyRun_SimpleString("import IPython\n" "IPython.embed()\n"); Py_Finalize(); return 0; } compiled with mignw64 gcc 4.6.0 ( g++ -I /c/prog64/Python27/include t.cpp /c/prog64/Python27/libs/libpython27.a ) under Windwos 7 I get the error: $ a.exe Traceback (most recent call last): File "<string>", line 2, in <module> File "c:\prog64\python27\lib\site

Center align outputs in ipython notebook

旧巷老猫 提交于 2020-01-04 02:15:07
问题 I want to center align the outputs (which includes text and plots) in my ipython notebook . Is there a way in which I can add styling in the same notebook for the same? Code or screenshot examples would greatly help. 回答1: Try running this in a code-cell to override the default CSS for an output cell: from IPython.display import display, HTML CSS = """ .output { align-items: center; } """ HTML('<style>{}</style>'.format(CSS)) Example You can see here that the right side of the table is cut-off