sintrb's recent timeline updates
sintrb

sintrb

V2EX member #66361, joined on 2014-06-27 14:18:40 +08:00
sintrb's recent replies
@sintrb 把下划线换成空格

import time, random, datetime, io

def read():
__return random.random()

with io.open('/tmp/t.csv', 'a', encoding='utf8') as f:
__while True:
____v = read()
____l = '%f,%f\n' % (time.time(), v)
____if type(l) != type(u''):
______l = l.decode('utf8')
____f.write(l)
____f.flush()
____time.sleep(1)
@sintrb 把下划线换成空格
用 csv 吧,csv 有个好处是格式简单,能够直接用 excel 打开。
用追加模式打开 csv 文件,不停的往里面写入数据就行,写了之后 flush 一下,防止掉电丢失,类似下面的:

import time, random, datetime, io
def read():
return random.random()
with io.open('/tmp/t.csv', 'a', encoding='utf8') as f:
while True:
v = read()
l = '%f,%f\n' % (time.time(), v)
if type(l) != type(u''):
l = l.decode('utf8')
f.write(l)
f.flush()
time.sleep(1)
多个显示器就不存在 80 的概念了。。
@arloor 赞一个!
@itsjoke 那就不清楚了,CDN没配过
建议还是clone一下吧
海迷顶一个
是不是因为你的主机多网卡,因此在查询DNS的时候不同的网卡都向各自的DNS服务器提出了查询请求,因此就回来很多了。
Aug 5, 2014
Replied to a topic by sanp 问与答 一个诡异的爬虫,求分析。
这爬虫好可怜。。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5061 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 18ms · UTC 09:48 · PVG 17:48 · LAX 02:48 · JFK 05:48
♥ Do have faith in what you're doing.