python
ArthurBryant
积极的面对生活,人因梦想而伟大
展开
-
python trick
1. 时间日期处理def convert_date_to_seconds(date): #date example: 16/Nov/2010:16:12:29 dt = time.strptime(date, "%d/%b/%Y:%H:%M:%原创 2011-07-03 14:55:57 · 517 阅读 · 0 评论 -
python中的变长参数
python中的变长参数使用*或者**来表示*表示元组**表示字典调用如下,注意调用时候一定要加上*和**def p(*argv, **dict):for a in argv:print afor d in dict:print dm = ('a', 'b', 'c')n = {'name':'arthur', 'ag原创 2011-11-10 19:28:08 · 1322 阅读 · 0 评论 -
module: numpy
Install numpy1. Download numpy at http://sourceforge.net/projects/numpy/files/NumPy/2. untar and buildpython setup.py build --fcompiler=gnu953. installpython setup.py install原创 2012-02-20 20:58:32 · 619 阅读 · 0 评论