每个人都知道,如果你想要发送电子邮件,你可以使用Jamie Zawinski的算法.但这是一个新世纪,还有一种新的消息传递服务.
Twitter上发布的线程状态更新的最佳算法是什么?
我绝对喜欢它应对的事情:
简单的部分:使用in_reply_to_status_id,
in_reply_to_user_id和in_reply_to_screen_name.(顺便说一句,找到这些值的正确文档本身就很有用!例如,这些文档显然与此处没有关联
.)
用于从提及具有@约定的用户但未明确回复特定消息的消息推断"回复"关系的良好启发式.
如果您要求,这些"提及" 现在在状态的"实体"元素中提供.这些启发式方法可能会考虑(a)两个状态更新之间的时间,(b)两个用户之间是否存在后续回复等.(回复包含带有附加注释的旧式转发,如user85509所述以下
只是这种回复方式的一个例子.)
在两个以上用户之间进行的对话.
使用给出算法的一组推文,或推特上的所有推文.
......但也许你可以想到更多.
如何告诉Selenium使用HTMLUnit?
我在后台运行selenium-server-standalone-2.0b1.jar作为Selenium服务器,并使用"pip install -U selenium"安装最新的Python绑定.
一切都适用于Firefox.但我想使用HTMLUnit,因为它重量更轻,不需要X.这是我尝试这样做的:
>>> import selenium
>>> s = selenium.selenium("localhost", 4444, "*htmlunit", "http://localhost/")
>>> s.start()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/selenium/selenium/selenium.py", line 189, in start
result = self.get_string("getNewBrowserSession", start_args)
File "/usr/local/lib/python2.6/dist-packages/selenium/selenium/selenium.py", line 223, in get_string
result = self.do_command(verb, args)
File "/usr/local/lib/python2.6/dist-packages/selenium/selenium/selenium.py", line 217, in do_command
raise Exception, data
Exception: Failed to start new browser session: Browser not supported: *htmlunit
Supported browsers include:
*firefox
*mock
*firefoxproxy
*pifirefox
*chrome
*iexploreproxy
*iexplore
*firefox3 …Run Code Online (Sandbox Code Playgroud) 我们在相当复杂的项目中使用S3,SimpleDB和SQS.
我希望能够自动跟踪他们的使用情况,以确保我们不打算在我们不打算花费大量资金时(可能是因为一个错误).
有没有办法从脚本中读取所有亚马逊网络服务的使用数据和/或帐户的当前实时美元成本?
或者基于此提供警报的任何服务或脚本?
algorithm ×1
amazon-ec2 ×1
amazon-s3 ×1
heuristics ×1
htmlunit ×1
python ×1
selenium-rc ×1
twitter ×1