Merge pull request #77 from lxyu/py3_fix_for_ipynb

fix for python3 compatibility
Merge pull request #78 from lxyu/data_keypairs_bug_fix

Data keypairs bug fix
add flake8 check for better coding style.