03 2016 档案

摘要:res00是一张rgb图 [x for sub1 in res00 for sub2 in sub1 for x in sub2] 列出所有像素值 阅读全文
posted @ 2016-03-27 21:04 龟窝 阅读(792) 评论(0) 推荐(0)
摘要:>>> import urllib >>> a = "PythonTab中文网" >>> a 'PythonTab\xe4\xb8\xad\xe6\x96\x87\xe7\xbd\x91' >>> urllib.quote(a) 'PythonTab%E4%B8%AD%E6%96%87%E7%BD% 阅读全文
posted @ 2016-03-27 02:33 龟窝 阅读(307) 评论(0) 推荐(0)
摘要:参考 http://www.cnblogs.com/pzxbc/archive/2012/03/18/2404715.html python的pickle模块实现了基本的数据序列和反序列化。通过pickle模块的序列化操作我们能够将程序中运行的对象信息保存到文件中去,永久存储;通过pickle模块的 阅读全文
posted @ 2016-03-24 02:01 龟窝 阅读(176) 评论(0) 推荐(0)
摘要:sys.stdout.write('\r'+str) sys.stdout.flush() time.sleep(1) 阅读全文
posted @ 2016-03-23 18:11 龟窝 阅读(1079) 评论(0) 推荐(0)
摘要:Python在往文件里写东西的时候,如果ascii码报错 参考 http://stackoverflow.com/questions/19833440/unicodeencodeerror-ascii-codec-cant-encode-character-u-xe9-in-position-7 Y 阅读全文
posted @ 2016-03-23 17:41 龟窝 阅读(1238) 评论(0) 推荐(0)
摘要:json.loads(s) returns error message like this: According to http://docs.python.org/2/library/json.html "If strict is False (True is the default), then 阅读全文
posted @ 2016-03-20 22:05 龟窝 阅读(314) 评论(0) 推荐(0)
摘要:Bad Request (#400) 阅读全文
posted @ 2016-03-18 02:34 龟窝 阅读(447) 评论(0) 推荐(0)
摘要:brew link --overwrite python 阅读全文
posted @ 2016-03-14 11:03 龟窝 阅读(148) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/xiongqiangcs/p/4914049.html 阅读全文
posted @ 2016-03-14 10:06 龟窝 阅读(377) 评论(0) 推荐(0)
摘要:https://jjyap.wordpress.com/2014/05/24/installing-opencv-2-4-9-on-mac-osx-with-python-support/ 参照以上blog brew install opencv cd /usr/local/Cellar/openc 阅读全文
posted @ 2016-03-14 09:25 龟窝 阅读(179) 评论(0) 推荐(0)