- 博客(4)
- 收藏
- 关注
原创 多线程(LOCK之gLock and Condition)
Lock上锁方式 import threading import random import time gMoney=1000 gtotaltimes=10 gtimes=0 gLock=threading.Lock() class Producer(threading.Thread): def run(self): global gMoney global gtimes while ...
2019-04-22 21:31:06
364
原创 CSV文件的读写
字典方式的读取更为简单,最好都掌握,看情形而用 import csv def csv_reader_demo1(): with open(‘logo.csv’, ‘r’) as f: reader = csv.reader(f) for x in reader: print(x) def csv_reader_demo2(): with open(‘logo.csv’,‘r’) as f: rea...
2019-04-21 21:36:12
197
原创 Tencent hr Spider
腾讯招聘 相关代码实现: import requests from lxml import etree Base_domain=“https://hr.tencent.com/” headers={ ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ...
2019-04-21 16:41:45
104
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人