Friday, April 22, 2016

ein ipython notebook

ein does not work when the system variables http_proxy and https_proxy are set.

ein:notebooklist-open

gives the error

REQUEST [error] Error (error) while connecting to http://127.0.0.1:8888/api/contents.
REQUEST [error] Callback is not called when stopping process! Explicitly calling from timer.
ein: [error] Content list call http://127.0.0.1:8888/api/contents/ failed with status timeout.

remove the variables and set the proxies manually.

For ELPA:
(setq url-proxy-services '(("no_proxy" . "127.0.0.1")
                           ("http" . "myproxy.com:8080")))

For erc:
(setq socks-noproxy '("localhost"))
(require 'socks)
(setq erc-server-connect-function 'socks-open-network-stream)
(setq socks-server (list "proxyIdentifier" "myproxy.com" 8080 5))

where 5 is the SOCKS version (can be 4)

to have inline images in emacs, libraries for the images are required, otherwise the following error is reported

Error (websocket): in callback `on-message': error: "Not an image: nil"

in windows
copy bin/libpng16-16.dll and bin/zlib1.dll of
https://sourceforge.net/projects/ezwinports/files/libpng-1.6.12-w32-bin.zip/download

to emacs's bin directory

To enable / disable transparent plots:

import matplotlib
matplotlib.rcParams["figure.facecolor"]=(1,1,1,x)
matplotlib.rcParams["axes.facecolor"]=(1,1,1,x)
where x is the alpha (0 for transparent, 1 for fully opaque)


sources:
 https://www.emacswiki.org/emacs/UrlPackage
https://www.emacswiki.org/emacs/ErcProxy
http://stackoverflow.com/questions/2650041/emacs-under-windows-and-png-files

No comments:

Post a Comment