THE PERSONAL NOTEBOOK OF SHELPER
So I write.
Ideas, projects, and things
learned along the way.
Latest writing
28 ENTRIESmatplotlib backend issue
using different backends for matplotlib might cause some unexpected issues: today, i am trying to run a program that uses the following function: plt.figure() figManager = plt.get_current_fig_manager() figManager.window.showMaximized() however, i found when using the backend of Tk, it gives error, saying get_current_fig_manager is not available, so when i switch to qt4egg, everything works well. how to switch the backend for matplotlib? first find the configure directory for matplotlib on your computer
python module and packaging
several things: when using setuptools.find_packages, only packages with __init__.py in its folder will be found only modules imported in the __init__.py will be indexed, means the modules will be added into the dir(module) and accessable by .module_name for python 3, if one modules(py file) in the same folder of another module and relies on that module, you need to put from . import module at the top package name is specified in the setup.
ipython and pip issues
so I am trying to use ipython as my python shell under emacs, since i started using python in emacs, i always encounter different issues, again and again, so i will use this post as a collection of issues and solutions. issue1: ipython shell imports quite some packages/modules/functions and as you may know, import searches current folder as well as the subfolders of the registered module, if there are file with the same name under the current folder, it overrides the file in the registered module, apparently, this causes problems of “import error, could not find …”
setup babun on windows for git and ssh
remove %HOME% (you can put it back later) download and install babun setup ssh, if you already have ssh keys in the ~/.ssh, copy to the ~ of babun shell and do eval `ssh-agent -s` ssh-add if not, copy the ssh pub and private keys to ~/.ssh or use ssh-add path/to/keys if you are using proxy behind firewall you need: add proxy for babun and change the user -agent (dont know why, but works) export http_proxy=http://gateway.
design of a framework for scientific data processing
I have beening thinking of building such a framework for a while, I started a little project called pypeline. The code on github is not up-to-date. And I have some new thoughts on the framework design. So this article serves as a design documents and welcomes any comments or suggestions. Based on my own experience, I often want to process some data or image at multiple stage. Often, I want to change some parameters of certian algorithm to see how the outcomes are changed.
Thanks for stopping by.
Feel free to share anything you find useful.