染头发记

因为各种原因,白发增多明显,并且成簇。同时本体毛发偏棕黄色。同时由于公司搬家几公里,去某家理发店不再方便。因此决定对头发做一下染色处理,同时正好耗尽余额以后换店。

(more…)

The short-circuiting in bash

Bash script writing is a import approach to configure the linux system. Suppose we wish to add a user if not exists, the command may seems as follow:

TARGET_USER=alice
if (! id -u $TARGET_USER > /dev/null 2>&1 ); then
    echo "creating user $TARGET_USER"
    # adduser $TARGET_USER
fi

However, it is kind of too long. In this case short-circuiting is a alternative solution. (more…)

A simple workflow to create a clean python library based on Anaconda

The open-source Anaconda Distribution is an easy way to perform Python/R data science and machine learning on Linux, Windows, and Mac OS X. We could easily prepare an isolated and constant environment on anywhere based on a configure file.

Considering the various kind of strange errors due to the different versions of python and python libraries, this management tool makes our life much more comfortable in deploying and cooperating.

(more…)