-
tqdm
tqdm(读音:taqadum, تقدّم)在阿拉伯语中的意思是进展。在西班牙语中是“我很爱你”的缩写。tqdm可以在长循环中添加一个进度提示信息,用户只需要封装任意的迭代器 tqdm(iterator),是一个快速、扩展性强的进度条工具库
https://pypi.python.org/pypi/tqdm
#ncols control the width of 进度条
#total equal to the len(data_loader)/total
#position is the line number of output print
progress = tqdm(range(100), ncols=100, total=100, desc='Inferencing ', leave=True, position=None)
较详细教程:http://blog.csdn.net/langb2014/article/details/54798823?locationnum=8&fps=1
2.colorama
colorama库用于彩色化命令行,多用于凸显参数信息
https://pypi.python.org/pypi/colorama
plus,一些Python concepts 深入探究
http://nvie.com/posts/iterators-vs-generators/
~~~~~~~~~~~~~~~Python tricks~~~~~~~~~
因为工作需要,我们常常需要使用不同的 Python 或其它学习框架 版本,这时就会用到了 virtualenv 啦,它能有效的创建多个相互隔离的虚拟环境,但是有些 IDE 是无法自动识别出虚拟 Python 路径的(版本问题??),例如 vscode。
解决方法:
使用 workon ×××(你的虚拟环境名称)进入虚拟环境,根据虚拟环境使用的Python 版本号分别使用
chuchienshu@Vision:~$ workon cv (cv) chuchienshu@Vision:~$ which python /home/chuchienshu/.virtualenvs/cv/bin/python (cv) chuchienshu@Vision:~$ which python3 /usr/bin/python3