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....

June 13, 2016 · 1 min · Shelper

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 …”...

June 9, 2016 · 2 min · Shelper

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....

June 9, 2016 · 1 min · Shelper

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....

May 29, 2016 · 3 min · Shelper

the sword of wisdom

It is quite often that sometimes you just could not stop yourself doing something. for instance, I often sit in chair and do not want to go the bathroom until i could not hold it any more… that happens especially when i try to solve a problem, resolving a program bug… so, how can we change this? use the sword of wisdom! the sword of wisdom, is a keen and sharp mind state that can penetrate in to your mind stream....

May 24, 2016 · 2 min · Shelper