V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  aec4d  ›  全部回复第 18 页 / 共 29 页
回复总数  566
1 ... 14  15  16  17  18  19  20  21  22  23 ... 29  
2015-07-15 22:42:11 +08:00
回复了 sbmzhcn 创建的主题 Python python 多线程在 while True:里的操作方式
想到一个笑话 一个50行的程序大家都会来指指点点 一个500行的程序大家都会说好好好~~
估计楼主最开始不是写python的
这应该是一个生产者消费者模型,使用一个线程不断的查询可以注册的域名 添加到Queue队列,然后消费者线程不断的循环 就能后在queuq有数据的时候消耗掉它
thread <ParseCommand(Thread-85, initial)> 会不停的从Thread-1增加
至于这里
self.workers.qsize()返回的总是2 然后你每次从queue中get一个出来之后都会在put一个进去一模一样的,当然会不间断的死循环了
这个例子比较有趣~~
http://stackoverflow.com/questions/20783337/concurrent-futures-usage-guide-a-simple-example-of-using-both-threading-and-pr
2015-07-15 00:48:37 +08:00
回复了 RIcter 创建的主题 天黑以后 20150715 午夜俱乐部
PYQT有趣也伴随着折磨T_T
我也搜了好久。。。搜索 所有人 支持分页 就可以找到了
http://lax.v2ex.com/t/173440
2015-07-13 10:28:03 +08:00
回复了 heaton_nobu 创建的主题 Python 请问 lxml 的正确安装方式应该是怎样?
装这个确实麻烦 装多了 装烦了就做了个记录。。。
https://gist.github.com/Ficapy/bfbaf37fabc66cc807c9
https://gist.github.com/Ficapy/08b0000d73e9cb019e25
win上最简单的办法就是6楼 ubuntu上最简单的办法就是sudo apt-get build-dep -y python-lxml
2015-07-13 09:11:24 +08:00
回复了 pythonee 创建的主题 深圳 深夜牙痛怎么办
十多年牙痛患者告诉你。。。。现在不要怕花钱 赶紧去正规的牙科医院 越拖延越严重耗费的资金越大
2015-07-12 16:11:44 +08:00
回复了 gaotongfei 创建的主题 Python 推荐一个关于 Python 的 Podcast, Talk Python To Me
还写过使用transcription生成Lrc的脚本....不知道现在还能不能正常用~~
https://github.com/Ficapy/single/blob/master/talkpythontome.py
2015-07-12 10:56:41 +08:00
回复了 razios 创建的主题 分享发现 office365 家庭高级版只要 66 元
如果每年都可以以这个价格续费就好了
2015-07-10 14:12:32 +08:00
回复了 darkmatter 创建的主题 Python 自学 Python 找工作, Python 需要掌握到什么程度?
@JakeWendao 你这不是没头像的默认头像状态么
2015-07-10 13:05:12 +08:00
回复了 darkmatter 创建的主题 Python 自学 Python 找工作, Python 需要掌握到什么程度?
本来想说说的 看到头像呵呵了
2015-07-08 11:53:17 +08:00
回复了 zippera 创建的主题 程序员 关于双层代理上网的问题?
https://github.com/formencode/formencode 用的这个 感觉不是很好用-_-
可以自己写规则,当然也内置了很多规则
应该有更好的方案吧
2015-07-07 22:06:43 +08:00
回复了 latteczy 创建的主题 Python Python 多线程问题
这TM关GIL毛事 简直躺枪
要记住 断然给你提GIL的 要么是高手 要么是SB 有GIL还有multiprocessing呢 多线程最需要注意的应该是线程安全
这是threading.join的文档
join([timeout])
Wait until the thread terminates. This blocks the calling thread until the thread whose join() method is called terminates – either normally or through an unhandled exception – or until the optional timeout occurs.

When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call isAlive() after join() to decide whether a timeout happened – if the thread is still alive, the join() call timed out.

When the timeout argument is not present or None, the operation will block until the thread terminates.

A thread can be join()ed many times.

join() raises a RuntimeError if an attempt is made to join the current thread as that would cause a deadlock. It is also an error to join() a thread before it has been started and attempts to do so raises the same exception.

看了之后你就发现 在上面加上t.join就和下面遍历的写法实质上是一模一样的.
一般网上很多教程给你加上setDaemon 加上join 你可以试着不加看是什么样的。等你熟悉了之后你就晓得那时候该用这些 哪时候不该用
2015-07-06 22:37:47 +08:00
回复了 powtop 创建的主题 新手求助 如何优雅的下载国外视频,比如 VIMEO Y2B!?
下载到vps然后上传到国内CDN 然后下载 提供一个web界面 当然 这些东西需要有一定动手能力自造轮子
2015-07-05 19:23:36 +08:00
回复了 JayFang1993 创建的主题 程序员 你们的博客都放在哪里?
没有用全站静态 然后全站CDN的么。。。
加个好友呗 我是做python开发的,请教swift比较好的学习路径 不开玩笑 0_0
2015-06-30 18:45:12 +08:00
回复了 SoloCompany 创建的主题 macOS Dash 3 出来了,值得花 10 刀重新购买么
@ThomasZ @kyyych 4月27买的 厚脸皮发了个邮件被告知5月15后买的才能免费升级~~
Hi,

Only users that purchased after the 15th of May get to upgrade for free. Sorry.

Regards,
Bogdan

我猜想有可能在升级购买的时候就会查询数据库进行判断可不可以免费升级
2015-06-30 10:40:28 +08:00
回复了 0bit 创建的主题 macOS Dash 3 发布了,还好没有再换 icon
①文档占用更小的空间→→即使只有256GB我也完全不会去关注那些文档占用了多少
②重启标签还原→→挺实用一功能,然而有很多人压根是不会重启电脑的
③配置同步→→穷人就一台MAC....
④打开在线页→→或许有用?
⑤标注→→如果能看到很多有价值的公共标注没有什么垃圾信息一概会很棒
⑥远程到其他设备观看→→私以为屏幕太小根本不适合看文档
⑦暗模式→→护眼?多一个选择也是好的。或许还可以来个自定义背景色
总结:
根本算不上大版本更新,只能说更加人性化了。标注功能应该算是一个比较大的亮点。
2015-06-29 19:35:55 +08:00
回复了 hr6r 创建的主题 git 乃们如何管理敏感信息的提交?
https://github.com/AGWA/git-crypt 将敏感信息放在一个文件里面加密 基本够用 短板是仅仅加密文件不加密其他信息。另外git diff第三方无法使用 详细见文档
@cc7756789 列表推导式 还不是翻译过来的 主要是便于理解嘛 http://encyclopedia.thefreedictionary.com/List+comprehension#History
1 ... 14  15  16  17  18  19  20  21  22  23 ... 29  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5380 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 51ms · UTC 06:25 · PVG 14:25 · LAX 23:25 · JFK 02:25
Developed with CodeLauncher
♥ Do have faith in what you're doing.