摘要:
尽量使用grid而不是pack 也不要在同一个窗口中混用pack和grid, 不同窗口是可以使用不同的组织方式的 https://blog.csdn.net/wangyiyan315/article/details/16821381 阅读全文
摘要:
from browsermobproxy import Serverfrom selenium import webdriverimport refrom bs4 import BeautifulSoupfrom pprint import pprintimport timeimport tkint 阅读全文
摘要:
1、假如查询 SELECT userid AS userid , ordersource, ROUND(AVG(ticket_num),0) AS ticket_num, ROUND(AVG(totalamont),0) AS totalamont FROM dwd_store_trade_orde 阅读全文
摘要:
可以动态执行语句 for i in range(len(line)): exec("k{}=sympy.symbols('k{}')".format(i,i)) 阅读全文
摘要:
1、安装 pip install beautifulsoup4 2、 from bs4 import BeautifulSoup html = BeautifulSoup(page_source,features='html.parser')这个parser取决于我们要解析哪种网页,比如xml, l 阅读全文
摘要:
现在大部分网页内容都是由js动态加载得到,我们如果要使用scrapy静态爬取是爬取不到内容的,所以需要引入js渲染引擎去加载js,也就是splash。 然后还要使用一个包scrapy-splash,这个包调用了splash实例的接口,用来支持scrapy做爬虫。 Scrapy-Splash uses 阅读全文
摘要:
一般使用3.6版本 virtualenv -p /usr/bin/python3.6 py36env source py36env/bin/activate 推出deactivate 阅读全文
摘要:
dic.update容易造成垃圾无法回收 例如 1 self.all_customer_dic.update(all_customer_dic) del all_customer_dicgc.collect()依然占用1.55GB但是使用 2、self.all_customer_dic = {**a 阅读全文
摘要:
python版的redis是封装了redis的一些常见指令,而且就算不装redis也可以直接使用(为什么?) 但是会有一些命令用不了,比如r.memory_stats() 我们还是需要先装一个redis,然后使用python的redis接口 装好之后,可以使用redis-cli.exe, linux 阅读全文