文章分类 -  python学习

摘要:在使用matplotlib画图时,出现了程序无错误但画图窗口无法显示的问题>>> from pylab import plot;>>> plot([1,2,3],[1,2,3])[]解决办法使用import pylabpylab.show()或者在启用ipython时使用该参数:ipython -p... 阅读全文
posted @ 2015-11-15 16:05 程序猿进化之路 阅读(932) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*-__author__ = 'li'c = []d = [0, 1, 2, 3, 4]print(d[:2]) # 该数据指的为下标=3的子集,输出为[3,4]a = [5, 6]d.extend(a)print dc.append(d)print c ... 阅读全文
posted @ 2015-11-12 14:25 程序猿进化之路 阅读(148) 评论(0) 推荐(0)
摘要:http://old.sebug.net/paper/books/scipydoc/numpy_intro.htmlnumpy.sum()使用方法介绍Examples>>>>>> np.sum([0.5, 1.5])2.0>>> np.sum([0.5, 0.7, 0.2, 1.5], dtype=... 阅读全文
posted @ 2015-11-10 22:04 程序猿进化之路 阅读(94) 评论(0) 推荐(0)
摘要:在未关闭消息的ack机制的情况下, 当消息被Consuming从队列中提取后, 在未明确获取确认信息之前, 队列中的消息是不会被删除的. 这样, 流程上就变成, 当消息被提取之后, 队列中的这条消息处于"等待确认"的状态. 如果Consuming反馈"成功"给队列, 则消息可以安全地被删除了. 如果... 阅读全文
posted @ 2015-09-07 21:14 程序猿进化之路 阅读(620) 评论(0) 推荐(0)
摘要:http://coolshell.cn/articles/11265.html解释的很清楚__author__ = 'li'import sysfrom functools import wrapsimport MySQLdbclass DBConfiguration(object): def... 阅读全文
posted @ 2015-08-18 23:38 程序猿进化之路 阅读(123) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/suwei19870312/article/details/23258495 阅读全文
posted @ 2015-08-18 21:15 程序猿进化之路 阅读(92) 评论(0) 推荐(0)
摘要:__author__ = 'li'import requests, random, threadingurl = "http://118.123.173.106/manager/picture/pictureUpload/upload"cookies = dict(JSESSIONID='003C7... 阅读全文
posted @ 2015-08-17 17:34 程序猿进化之路 阅读(1681) 评论(0) 推荐(1)
摘要:1)问题:_mysql.c(34) : fatal error C1083: Cannot open include file: ‘config-win.h’: No such file or directory error: command ‘”C:\Program Files\Microsoft... 阅读全文
posted @ 2015-07-22 22:11 程序猿进化之路 阅读(488) 评论(0) 推荐(0)
摘要:启用一个Item Pipeline组件为了启用一个Item Pipeline组件,你必须将它的类添加到ITEM_PIPELINES配置,就像下面这个例子:ITEM_PIPELINES = { 'myproject.pipelines.PricePipeline': 300, 'mypro... 阅读全文
posted @ 2015-07-22 00:41 程序猿进化之路 阅读(147) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/12553117/how-to-filter-duplicate-requests-based-on-url-in-scrapy 阅读全文
posted @ 2015-07-20 16:56 程序猿进化之路 阅读(1001) 评论(0) 推荐(0)
摘要:http://scrapy-chs.readthedocs.org/zh_CN/latest/topics/spiders.html 阅读全文
posted @ 2015-07-18 16:27 程序猿进化之路 阅读(73) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-03-17 11:06 程序猿进化之路 阅读(75) 评论(0) 推荐(0)