<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[echo $overboming &#62;&#62; here]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[Checked out at Revision 21]]></description>
<link>http://hi.baidu.com/overboming</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[考虑搬到yo2了]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/db69555537836bceb745ae9a.html]]></link>
        <description><![CDATA[
		
		新的地址是<a href="http://malic.yo2.cn/">http://malic.yo2.cn/</a><br>
还是Wordpress自由度大啊，yo2又适合我这样的懒人，唯一的顾虑是速度可能有些慢 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/db69555537836bceb745ae9a.html#comment">查看评论</a>]]></description>
        <pubDate>2009-10-29  23:48</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/db69555537836bceb745ae9a.html</guid>
</item>

<item>
        <title><![CDATA[用Gtalk的可以加一下 gtalkbotplus@appspot.com]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/68d83a38109cc72997ddd8ca.html]]></link>
        <description><![CDATA[
		
		目前能英汉互译，查天气，还原短地址。以后会慢慢整合toodledo.com twitter xiaonei.com等服务 </br>
这个作为PM project再合适不过了 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/68d83a38109cc72997ddd8ca.html#comment">查看评论</a>]]></description>
        <pubDate>2009-10-14  17:25</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/68d83a38109cc72997ddd8ca.html</guid>
</item>

<item>
        <title><![CDATA[好题啊]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/337bc8dd827dff3e5982ddf8.html]]></link>
        <description><![CDATA[
		
		直接给链接吧 </br>
<a href="http://www.javaeye.com/topic/15295?page=1">click me</a> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/337bc8dd827dff3e5982ddf8.html#comment">查看评论</a>]]></description>
        <pubDate>2009-10-13  00:28</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/337bc8dd827dff3e5982ddf8.html</guid>
</item>

<item>
        <title><![CDATA[How to find out all the FUN words]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/1141b4c4526862a38226acf5.html]]></link>
        <description><![CDATA[
		
		看汇编的时候看到0xdeadbeef这样的地址往往会忍俊不禁。 <br>
现在用几行Python就可以打出所有可以用a-f字母组成的单词。<br>
至于单词列表，看看Unix like系统下的/usr/share/dict/words 文件就知道了，这个文件收录了234936个合理的词汇<br>
<br>
<pre style="color:#000000;background:#ffffff;"><span style="color:#800000; font-weight:bold; ">import</span> re
<span style="color:#800000; font-weight:bold; ">def</span> main<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">:</span>
    <span style="color:#696969; ">"""main method"""</span>
    wordlist <span style="color:#808030; ">=</span> <span style="color:#e34adc; ">open</span><span style="color:#808030; ">(</span><span style="color:#0000e6; ">"allwords.txt"</span><span style="color:#808030; ">)</span><span style="color:#808030; ">.</span>readlines<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span><span style="color:#808030; ">;</span>
    r <span style="color:#808030; ">=</span> re<span style="color:#808030; ">.</span><span style="color:#e34adc; ">compile</span><span style="color:#808030; ">(</span><span style="color:#0000e6; ">r"^[a-f]{3,100}$"</span><span style="color:#808030; ">)</span>
    <span style="color:#800000; font-weight:bold; ">print</span> <span style="color:#0000e6; ">"\n"</span><span style="color:#808030; ">.</span>join<span style="color:#808030; ">(</span>word<span style="color:#808030; ">[</span><span style="color:#808030; ">:</span><span style="color:#808030; ">-</span><span style="color:#008c00; ">1</span><span style="color:#808030; ">]</span> <span style="color:#800000; font-weight:bold; ">for</span> word <span style="color:#800000; font-weight:bold; ">in</span> wordlist <span style="color:#800000; font-weight:bold; ">if</span> re<span style="color:#808030; ">.</span>match<span style="color:#808030; ">(</span>r<span style="color:#808030; ">,</span>word<span style="color:#808030; ">)</span><span style="color:#808030; ">)</span>

<span style="color:#800000; font-weight:bold; ">if</span> <span style="color:#e34adc; ">__name__</span> <span style="color:#808030; ">=</span><span style="color:#808030; ">=</span> <span style="color:#0000e6; ">"__main__"</span><span style="color:#808030; ">:</span>
    main<span style="color:#808030; ">(</span><span style="color:#808030; ">)</span>
</pre>
结果如下, 有不少以前不以为是单词的:<br>
aba<br>
abac<br>
abaca<br>
abaff<br>
abb<br>
abed<br>
acca<br>
accede<br>
ace<br>
adad<br>
add<br>
adda<br>
added<br>
ade<br>
adead<br>
aface<br>
affa<br>
baa<br>
baba<br>
babe<br>
bac<br>
bacaba<br>
bacca<br>
baccae<br>
bad<br>
bade<br>
bae<br>
baff<br>
bead<br>
beaded<br>
bebed<br>
bed<br>
bedad<br>
bedded<br>
bedead<br>
bedeaf<br>
bee<br>
beef<br>
cab<br>
caba<br>
cabda<br>
cad<br>
cade<br>
caeca<br>
caffa<br>
cede<br>
cee<br>
dab<br>
dabb<br>
dabba<br>
dace<br>
dad<br>
dada<br>
dade<br>
dae<br>
daff<br>
dead<br>
deaf<br>
deb<br>
decad<br>
decade<br>
dee<br>
deed<br>
deedeed<br>
deface<br>
ebb<br>
ecad<br>
edea<br>
efface<br>
facade<br>
face<br>
faced<br>
fad<br>
fade<br>
faded<br>
fae<br>
faff<br>
fed<br>
fee<br>
feed <a href="http://hi.baidu.com/overboming/blog/item/1141b4c4526862a38226acf5.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/1141b4c4526862a38226acf5.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-23  19:22</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/1141b4c4526862a38226acf5.html</guid>
</item>

<item>
        <title><![CDATA[无题]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/bc4fd582a75ca499f603a6a4.html]]></link>
        <description><![CDATA[
		
		今天一天从早上醒来的突然醒悟开始，忙忙碌碌一直持续到现在。 醒悟的是知道了是哪些事情，伤心的是其实那些破事情都是能改的。居然能比自己预计得早睡觉，双休日应该不能回家了 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/bc4fd582a75ca499f603a6a4.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-04  01:57</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/bc4fd582a75ca499f603a6a4.html</guid>
</item>

<item>
        <title><![CDATA[&#34;我&#34;太牛了]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/2440697af443a3e42f73b33e.html]]></link>
        <description><![CDATA[
		
		<p>实名邮箱收到如下邮件一封:</p>
<p>September 1, 2009 <br>
<br>
Title: &quot;Dissection of DEN-induced platelet proteome changes reveals the progressively dys-regulated pathways indicative of hepatocarcinogenesis&quot; (google translation result: 剖析登革诱导的血小板的变化揭示了蛋白质组的逐步发育不良调节途径的指示性肝癌)<br>
Tracking #: XXXXX</p>
<p>Author(s): <br>
XXX Leng (Fudan University)<br>
XXXX Liu (Fudan University)<br>
XXXX Yu (Fudan University)<br>
Chen Zhang (Fudan University)<br>
XXXX Du (Fudan University)<br>
XXXX Chen (University of North Carolina at Chapel Hill)<br>
<br>
<br>
Dear Dr. Zhang, <br>
<br>
&quot;Dissection of DEN-induced platelet proteome changes reveals the progressively dys-regulated pathways indicative of hepatocarcinogenesis,&quot; for which you participated as an author, was submitted by Dr. Chen and received in our office on August 29, 2009. The manuscript has been assigned tracking number XXXXX. <br>
<br>
You may check on the status of your manuscript at any time by clicking the link below and selecting the &quot;Check Status&quot; link:<br>
<br>
PNAS License to Publish is collected for most manuscripts at initial submission. The summary below reflects our records of the PNAS License to Publish type selected by the submitting author at that time. Please contact us immediately at <a title="mailto:PNASAuthorLicense@nas.edu?subject=PNAS License to Publish Inquiry" href="mailto:PNASAuthorLicense@nas.edu?subject=PNAS License to Publish Inquiry">PNASAuthorLicense@nas.edu</a> or 202-334-2679 if this information is incorrect or you have any questions. In the event that your manuscript is withdrawn or not accepted for publication in PNAS, the PNAS License to Publish will be terminated and all rights revert to the author(s).<br>
PNAS License to Publish Summary: PNAS License to Publish conveyed to the National Academy of Sciences. PNAS and all authors agree that this agreement will be executed electronically.<br>
PNAS License to Publish Complete: Yes<br>
Date PNAS License to Publish Completed: 2009-08-21<br>
<br>
Thank you for submitting to PNAS. <br>
<br>
Sincerely yours, <br>
<br>
PNAS Editorial Office <br>
(p) 202.334.2679<br>
(f) 202.334.2739<br>
(e) pnas@nas.edu</p>
<p>去掉了个人信息，看来这名字.. 还挺常见的.. 帮别人填邮箱要填对，说不定还是个前后鼻音的问题。</p> <a href="http://hi.baidu.com/overboming/blog/item/2440697af443a3e42f73b33e.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/2440697af443a3e42f73b33e.html#comment">查看评论</a>]]></description>
        <pubDate>2009-09-02  11:11</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/2440697af443a3e42f73b33e.html</guid>
</item>

<item>
        <title><![CDATA[因为需求要该framework的代码]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/c088a803ce1d78e508fa9391.html]]></link>
        <description><![CDATA[
		
		今天第二次碰到这种事情了.. 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/c088a803ce1d78e508fa9391.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-27  00:28</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/c088a803ce1d78e508fa9391.html</guid>
</item>

<item>
        <title><![CDATA[头晕]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/4785b8112fd1a2cfa7ef3fc5.html]]></link>
        <description><![CDATA[
		
		写了一上午的邮件和代码，中午到罗森草草了事，下午和n个人讨论HMM的事情还发了一堆email。快下班的时候感觉不对了，头晕，还是头晕。突然又惊闻阿里因为身体不适下午先回去了，被刮总称做被毒气毒倒了，于是更感不对，自己试了试额头，似乎还有点烧。<br>
悲剧了，要坚持住啊。 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/4785b8112fd1a2cfa7ef3fc5.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-25  17:45</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/4785b8112fd1a2cfa7ef3fc5.html</guid>
</item>

<item>
        <title><![CDATA[Welly private build 2]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/a3b16601992976077bec2c1d.html]]></link>
        <description><![CDATA[
		
		发信人: overboming (06SS), 信区: Mac<br>
标&#160; 题: Welly private build 2<br>
发信站: 日月光华 (2009年08月23日17:14:23 星期天), 站内信件<br>
<br>
主要对已有功能进行修正。<br>
1. 去掉了光华unsupported sequence的警告<br>
2. gif预览窗口能够用按esc退出<br>
3. 自动提示功能增加了Prefence以及一些改进<br>
<br>
下载地址还是老地方，Googlecode 这点改进不错<br>
http://attachbot.googlecode.com/files/Welly.zip 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/a3b16601992976077bec2c1d.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-23  17:18</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/a3b16601992976077bec2c1d.html</guid>
</item>

<item>
        <title><![CDATA[XCode 3.2 bug?]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/ad7c1da7f05c019cd14358b5.html]]></link>
        <description><![CDATA[
		
		If you use XCode 3.2 to open and compile project created on 3.1, and you are like to have following annoyed error with 'build and go'<br>
<br>
dyld: Library not loaded: @executable_path/../Frameworks/Growl-WithInstaller.framework/Versions/A/Growl-WithInstaller<br>
Referenced from: /Users/Malic/Documents/Code/Cocoa/welly/build/Debug/Welly.app/Contents/MacOS/Welly<br>
Reason: image not found<br>
sharedlibrary apply-load-rules all<br>
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)<br>
warning: Couldn't find minimal symbol for &quot;_sigtramp&quot; - backtraces may be unreliable<br>
Cannot access memory at address 0x0<br>
<br>
<br>
It says image not found. Where is our framework image anyway? It should be <br>
copied to the built app's framework directory and what the hell has happened?<br>
<br>
Then I tries to use otool to find the pointed path for the framework.<br>
<br>
Malic:MacOS Malic$ pwd<br>
/Users/Malic/code/cocoa/welly/build/Debug/Welly.app/Contents/MacOS<br>
Malic:MacOS Malic$ otool -L Welly | grep PSM<br>
@executable_path/../Frameworks/PSMTabBarControl.framework/Versions/A/PSMTabBarControl (compatibility version 1.0.0, current version 1.0.0)<br>
<br>
then we go to <br>
../Frameworks/PSMTabBarControl.framework/Versions/A/&#160;&#160; as suggested. <br>
and there is nothing? Hell, why?? I can only refer to it as a bug, you have to  manually copy the current framework alias and their contents to the pointed directory for now.<br>
<br>
<br>
p.s. After cleaning all targets and something 'magic' I don't even remember, it works fine now, I am still confused :(<br>
<br>
<br> <a href="http://hi.baidu.com/overboming/blog/item/ad7c1da7f05c019cd14358b5.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/ad7c1da7f05c019cd14358b5.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-21  21:18</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/ad7c1da7f05c019cd14358b5.html</guid>
</item>

<item>
        <title><![CDATA[找到个好东西: AppScript]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/2559fe8bd144ef769e2fb491.html]]></link>
        <description><![CDATA[
		
		<a target="_blank" href="http://appscript.sourceforge.net/">appscript.sourceforge.net/</a><br>
<br>
晚上回去研究一下，看来地址簿里全是只有个学号却没有@fudan.edu.cn的邮箱条目有救了。 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/2559fe8bd144ef769e2fb491.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-21  16:14</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/2559fe8bd144ef769e2fb491.html</guid>
</item>

<item>
        <title><![CDATA[An example of innovative and crappy SDK]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/731bf24bfeb6b4f983025c63.html]]></link>
        <description><![CDATA[
		
		<a href="http://lordhong.javaeye.com/blog/454207" target="_blank">http://lordhong.javaeye.com/blog/454207</a> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/731bf24bfeb6b4f983025c63.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-21  11:12</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/731bf24bfeb6b4f983025c63.html</guid>
</item>

<item>
        <title><![CDATA[土了， 还有ab这种彪悍的东西]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/0940c82bf381f6f3e6cd408c.html]]></link>
        <description><![CDATA[
		
		ab的全称是 Apache HTTP server benchmarking tool。<br>
<br>
ab&#160; is&#160; a&#160; tool&#160; for&#160; benchmarking your Apache Hypertext Transfer Protocol<br>
(HTTP) server. It is designed to give you an impression of how&#160; your&#160; cur-<br>
rent&#160; Apache&#160; installation&#160; performs.&#160; This&#160; especially shows you how many<br>
requests per second your Apache installation is capable of serving.<br>
<br>
注意OS X下的build不要用localhost, 而要直接用ip, 否则会报invalid argument<br>
<pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">ab <span style="color: rgb(128, 128, 48);">-</span>c <span style="color: rgb(0, 140, 0);">100</span> <span style="color: rgb(128, 128, 48);">-</span>t <span style="color: rgb(0, 140, 0);">10</span> http<span style="color: rgb(128, 0, 128);">:</span><span style="color: rgb(105, 105, 105);">//127.0.0.1/~Malic/<br>这里加的参数是保持100个连接的并行度并且持续10s的压力测试<br></span></pre>
现在是考验真家伙的时候了，Django自带的test server处理了几个请求就pipe error了，可能是用信号量实现的，信号的处理跟不上。贴上系统带的Apache的成绩，当然因为web server和ab都跑在同一个host上，如果能够分开两台机器比较公平。<br>
<br>
杂:<br>
前几天co了一个Webkit的Respository，进入目录svn log | less了一下，然后不小心G了一下，就如意料般的失去相应... 40000多的revision, 每次写个20行的change log. 80万行...<br>
<br>
<pre style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;">This is ApacheBench<span style="color: rgb(128, 128, 48);">,</span> Version <span style="color: rgb(0, 128, 0);">2.3</span> <span style="color: rgb(128, 128, 48);">&lt;</span>$Revision<span style="color: rgb(128, 0, 128);">:</span> <span style="color: rgb(0, 140, 0);">655654</span> $<span style="color: rgb(128, 128, 48);">&gt;</span><br>Copyright <span style="color: rgb(0, 140, 0);">1996</span> Adam Twiss<span style="color: rgb(128, 128, 48);">,</span> Zeus Technology Ltd<span style="color: rgb(128, 128, 48);">,</span> http<span style="color: rgb(128, 0, 128);">:</span><span style="color: rgb(105, 105, 105);">//</span><span style="color: rgb(85, 85, 221);">www.zeustech.net/</span><br>Licensed to The Apache Software Foundation<span style="color: rgb(128, 128, 48);">,</span> http<span style="color: rgb(128, 0, 128);">:</span><span style="color: rgb(105, 105, 105);">//</span><span style="color: rgb(85, 85, 221);">www.apache.org/</span><br><br>Benchmarking <span style="color: rgb(0, 128, 0);">192.168</span><span style="color: rgb(128, 128, 48);">.</span><span style="color: rgb(0, 128, 0);">11.4</span> <span style="color: rgb(128, 128, 48);">(</span>be patient<span style="color: rgb(128, 128, 48);">)</span><br>Finished <span style="color: rgb(0, 140, 0);">1123</span> requests<br><br><br>Server Software<span style="color: rgb(128, 0, 128);">:</span>        Apache<span style="color: rgb(128, 128, 48);">/</span><span style="color: rgb(0, 128, 0);">2.2</span><span style="color: rgb(128, 128, 48);">.</span><span style="color: rgb(0, 140, 0);">11</span><br>Server Hostname<span style="color: rgb(128, 0, 128);">:</span>        <span style="color: rgb(0, 128, 0);">192.168</span><span style="color: rgb(128, 128, 48);">.</span><span style="color: rgb(0, 128, 0);">11.4</span><br>Server Port<span style="color: rgb(128, 0, 128);">:</span>            <span style="color: rgb(0, 140, 0);">80</span><br><br>Document Path<span style="color: rgb(128, 0, 128);">:</span>          <span style="color: rgb(128, 128, 48);">/</span><span style="color: rgb(128, 128, 48);">~</span>Malic<span style="color: rgb(128, 128, 48);">/</span><br>Document Length<span style="color: rgb(128, 0, 128);">:</span>        <span style="color: rgb(0, 140, 0);">358</span> bytes<br><br>Concurrency Level<span style="color: rgb(128, 0, 128);">:</span>      <span style="color: rgb(0, 140, 0);">100</span><br>Time taken <span style="color: rgb(128, 0, 0); font-weight: bold;">for</span> tests<span style="color: rgb(128, 0, 128);">:</span>   <span style="color: rgb(0, 128, 0);">10.246</span> seconds<br>Complete requests<span style="color: rgb(128, 0, 128);">:</span>      <span style="color: rgb(0, 140, 0);">1123</span><br>Failed requests<span style="color: rgb(128, 0, 128);">:</span>        <span style="color: rgb(0, 140, 0);">0</span><br>Write errors<span style="color: rgb(128, 0, 128);">:</span>           <span style="color: rgb(0, 140, 0);">0</span><br>Non<span style="color: rgb(128, 128, 48);">-2xx</span> responses<span style="color: rgb(128, 0, 128);">:</span>      <span style="color: rgb(0, 140, 0);">1157</span><br>Total transferred<span style="color: rgb(128, 0, 128);">:</span>      <span style="color: rgb(0, 140, 0);">892047</span> bytes<br>HTML transferred<span style="color: rgb(128, 0, 128);">:</span>       <span style="color: rgb(0, 140, 0);">414206</span> bytes<br>Requests per second<span style="color: rgb(128, 0, 128);">:</span>    <span style="color: rgb(0, 128, 0);">109.60</span> <span style="color: rgb(128, 128, 48);">[</span><span style="color: rgb(128, 128, 48);">#</span><span style="color: rgb(128, 128, 48);">/</span>sec<span style="color: rgb(128, 128, 48);">]</span> <span style="color: rgb(128, 128, 48);">(</span>mean<span style="color: rgb(128, 128, 48);">)</span><br>Time per request<span style="color: rgb(128, 0, 128);">:</span>       <span style="color: rgb(0, 128, 0);">912.417</span> <span style="color: rgb(128, 128, 48);">[</span>ms<span style="color: rgb(128, 128, 48);">]</span> <span style="color: rgb(128, 128, 48);">(</span>mean<span style="color: rgb(128, 128, 48);">)</span><br>Time per request<span style="color: rgb(128, 0, 128);">:</span>       <span style="color: rgb(0, 128, 0);">9.124</span> <span style="color: rgb(128, 128, 48);">[</span>ms<span style="color: rgb(128, 128, 48);">]</span> <span style="color: rgb(128, 128, 48);">(</span>mean<span style="color: rgb(128, 128, 48);">,</span> across all concurrent requests<span style="color: rgb(128, 128, 48);">)</span><br>Transfer rate<span style="color: rgb(128, 0, 128);">:</span>          <span style="color: rgb(0, 128, 0);">85.02</span> <span style="color: rgb(128, 128, 48);">[</span>Kbytes<span style="color: rgb(128, 128, 48);">/</span>sec<span style="color: rgb(128, 128, 48);">]</span> received<br><br>Connection Times <span style="color: rgb(128, 128, 48);">(</span>ms<span style="color: rgb(128, 128, 48);">)</span><br>              <span style="color: rgb(96, 48, 0);">min</span>  mean<span style="color: rgb(128, 128, 48);">[</span><span style="color: rgb(128, 128, 48);">+</span><span style="color: rgb(128, 128, 48);">/</span><span style="color: rgb(128, 128, 48);">-</span>sd<span style="color: rgb(128, 128, 48);">]</span> median   <span style="color: rgb(96, 48, 0);">max</span><br><span style="color: rgb(227, 74, 220);">Connect:</span>        <span style="color: rgb(0, 140, 0);">0</span>   <span style="color: rgb(0, 140, 0);">47</span> <span style="color: rgb(0, 128, 0);">107.5</span>      <span style="color: rgb(0, 140, 0);">1</span>     <span style="color: rgb(0, 140, 0);">515</span><br><span style="color: rgb(227, 74, 220);">Processing:</span>    <span style="color: rgb(0, 140, 0);">41</span>  <span style="color: rgb(0, 140, 0);">807</span> <span style="color: rgb(0, 128, 0);">243.3</span>    <span style="color: rgb(0, 140, 0);">803</span>    <span style="color: rgb(0, 140, 0);">2419</span><br><span style="color: rgb(227, 74, 220);">Waiting:</span>       <span style="color: rgb(0, 140, 0);">24</span>  <span style="color: rgb(0, 140, 0);">776</span> <span style="color: rgb(0, 128, 0);">240.2</span>    <span style="color: rgb(0, 140, 0);">778</span>    <span style="color: rgb(0, 140, 0);">2419</span><br><span style="color: rgb(227, 74, 220);">Total:</span>         <span style="color: rgb(0, 140, 0);">55</span>  <span style="color: rgb(0, 140, 0);">854</span> <span style="color: rgb(0, 128, 0);">248.2</span>    <span style="color: rgb(0, 140, 0);">834</span>    <span style="color: rgb(0, 140, 0);">2420</span><br><br>Percentage of the requests served within a certain time <span style="color: rgb(128, 128, 48);">(</span>ms<span style="color: rgb(128, 128, 48);">)</span><br>  <span style="color: rgb(0, 140, 0);">50</span><span style="color: rgb(128, 128, 48);">%</span>    <span style="color: rgb(0, 140, 0);">834</span><br>  <span style="color: rgb(0, 140, 0);">66</span><span style="color: rgb(128, 128, 48);">%</span>    <span style="color: rgb(0, 140, 0);">910</span><br>  <span style="color: rgb(0, 140, 0);">75</span><span style="color: rgb(128, 128, 48);">%</span>    <span style="color: rgb(0, 140, 0);">989</span><br>  <span style="color: rgb(0, 140, 0);">80</span><span style="color: rgb(128, 128, 48);">%</span>   <span style="color: rgb(0, 140, 0);">1051</span><br>  <span style="color: rgb(0, 140, 0);">90</span><span style="color: rgb(128, 128, 48);">%</span>   <span style="color: rgb(0, 140, 0);">1134</span><br>  <span style="color: rgb(0, 140, 0);">95</span><span style="color: rgb(128, 128, 48);">%</span>   <span style="color: rgb(0, 140, 0);">1305</span><br>  <span style="color: rgb(0, 140, 0);">98</span><span style="color: rgb(128, 128, 48);">%</span>   <span style="color: rgb(0, 140, 0);">1421</span><br>  <span style="color: rgb(0, 140, 0);">99</span><span style="color: rgb(128, 128, 48);">%</span>   <span style="color: rgb(0, 140, 0);">1597</span><br> <span style="color: rgb(0, 140, 0);">100</span><span style="color: rgb(128, 128, 48);">%</span>   <span style="color: rgb(0, 140, 0);">2420</span> <span style="color: rgb(128, 128, 48);">(</span>longest request<span style="color: rgb(128, 128, 48);">)</span></pre>
跑ab跑多了记得清apache log，这样的log也没啥分析价值的。 <a href="http://hi.baidu.com/overboming/blog/item/0940c82bf381f6f3e6cd408c.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/0940c82bf381f6f3e6cd408c.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-19  22:06</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/0940c82bf381f6f3e6cd408c.html</guid>
</item>

<item>
        <title><![CDATA[统计长文章单词出现频率之defaultdict]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/0f3682c472a13fc239db49b9.html]]></link>
        <description><![CDATA[
		
		假设我们要打开一个名为big.txt的大文件做单词出现次数的统计。 <br>
千万别写出这样的代码:<br>
<pre style="background: rgb(246, 248, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 32); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"><span style="color: rgb(32, 0, 128); font-weight: bold;">import</span> re<br>word_dict <span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(64, 96, 128);">{</span><span style="color: rgb(64, 96, 128);">}</span><br>words <span style="color: rgb(48, 128, 128);">=</span> re<span style="color: rgb(48, 128, 128);">.</span>findall<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'[a-z]+'</span><span style="color: rgb(48, 128, 128);">,</span> <span style="color: rgb(227, 74, 220);">open</span><span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'big.txt'</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">.</span>read<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">.</span>lower<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">)</span> <br><span style="color: rgb(32, 0, 128); font-weight: bold;">for</span> w <span style="color: rgb(32, 0, 128); font-weight: bold;">in</span> words<span style="color: rgb(48, 128, 128);">:</span><br>  <span style="color: rgb(32, 0, 128); font-weight: bold;">if</span> w <span style="color: rgb(32, 0, 128); font-weight: bold;">not</span> <span style="color: rgb(32, 0, 128); font-weight: bold;">in</span> word_dict<span style="color: rgb(48, 128, 128);">.</span>keys<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">:</span><br>    word_dict<span style="color: rgb(48, 128, 128);">[</span>w<span style="color: rgb(48, 128, 128);">]</span> <span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(0, 140, 0);">1</span><br>  <span style="color: rgb(32, 0, 128); font-weight: bold;">else</span>:<br>    word_dict<span style="color: rgb(48, 128, 128);">[</span>w<span style="color: rgb(48, 128, 128);">]</span> <span style="color: rgb(48, 128, 128);">+</span><span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(0, 140, 0);">1</span></pre>
这样如果单词量为m, 词汇量为n的话，就是O(m * n / 2)的复杂度。也千万别为了少判断key是否存在而用try except 获取会出现的KeyError， 比较好的做法是用collections.defaultdict<br>
<br>
<pre style="background: rgb(246, 248, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 32); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"><span style="color: rgb(32, 0, 128); font-weight: bold;">import</span> re<span style="color: rgb(48, 128, 128);">,</span> collections<br>word_dict <span style="color: rgb(48, 128, 128);">=</span> collections<span style="color: rgb(48, 128, 128);">.</span>defaultdict<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(227, 74, 220);">int</span><span style="color: rgb(48, 128, 128);">)</span><br>words <span style="color: rgb(48, 128, 128);">=</span> re<span style="color: rgb(48, 128, 128);">.</span>findall<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'[a-z]+'</span><span style="color: rgb(48, 128, 128);">,</span> <span style="color: rgb(227, 74, 220);">open</span><span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'big.txt'</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">.</span>read<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">.</span>lower<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">)</span> <br><span style="color: rgb(32, 0, 128); font-weight: bold;">for</span> w <span style="color: rgb(32, 0, 128); font-weight: bold;">in</span> words<span style="color: rgb(48, 128, 128);">:</span><br>    word_dict<span style="color: rgb(48, 128, 128);">[</span>w<span style="color: rgb(48, 128, 128);">]</span> <span style="color: rgb(48, 128, 128);">+</span><span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(0, 140, 0);">1</span></pre>
这样所有出现的Key都会天生附带上一个默认值，不需要在引用前先行赋值。这样直接的好处就是复杂度直接变为O(n)， 当然defaultdict还有不少其它用法，有兴趣的话可以help之。 <a href="http://hi.baidu.com/overboming/blog/item/0f3682c472a13fc239db49b9.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/0f3682c472a13fc239db49b9.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-18  11:07</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/0f3682c472a13fc239db49b9.html</guid>
</item>

<item>
        <title><![CDATA[Real ssh session using pexpect]]></title>
        <link><![CDATA[http://hi.baidu.com/overboming/blog/item/d9ac55d1194841da572c8490.html]]></link>
        <description><![CDATA[
		
		<pre style="background: rgb(246, 248, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 32); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"><span style="color: rgb(32, 0, 128); font-weight: bold;">import</span> pexpect<br><br><span style="color: rgb(32, 0, 128); font-weight: bold;">class</span> sshSession<span style="color: rgb(48, 128, 128);">:</span><br>    <span style="color: rgb(32, 0, 128); font-weight: bold;">def</span> <span style="color: rgb(227, 74, 220);">__init__</span><span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">,</span> username<span style="color: rgb(48, 128, 128);">,</span> password<span style="color: rgb(48, 128, 128);">,</span> hostname<span style="color: rgb(48, 128, 128);">,</span> verbose<span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(48, 128, 128);">,</span> shell_promote<span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(16, 96, 182);">'\$'</span><span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">:</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>username <span style="color: rgb(48, 128, 128);">=</span> username<br>        self<span style="color: rgb(48, 128, 128);">.</span>password <span style="color: rgb(48, 128, 128);">=</span> password<br>        self<span style="color: rgb(48, 128, 128);">.</span>hostname <span style="color: rgb(48, 128, 128);">=</span> hostname<br>        self<span style="color: rgb(48, 128, 128);">.</span>child <span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(227, 74, 220);">None</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>verbose <span style="color: rgb(48, 128, 128);">=</span> verbose<br>        self<span style="color: rgb(48, 128, 128);">.</span>shell_promote <span style="color: rgb(48, 128, 128);">=</span> shell_promote<br>        <br>    <span style="color: rgb(32, 0, 128); font-weight: bold;">def</span> connect<span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">:</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child <span style="color: rgb(48, 128, 128);">=</span> pexpect<span style="color: rgb(48, 128, 128);">.</span>spawn<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'ssh %s@%s'</span> <span style="color: rgb(48, 128, 128);">%</span> <span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">.</span>username<span style="color: rgb(48, 128, 128);">,</span>self<span style="color: rgb(48, 128, 128);">.</span>hostname<span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">)</span><br>        index <span style="color: rgb(48, 128, 128);">=</span> self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>expect<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">[</span><span style="color: rgb(16, 96, 182);">'assword:'</span><span style="color: rgb(48, 128, 128);">,</span><span style="color: rgb(16, 96, 182);">'authenticity'</span><span style="color: rgb(48, 128, 128);">]</span><span style="color: rgb(48, 128, 128);">)</span><br>        <span style="color: rgb(32, 0, 128); font-weight: bold;">if</span> index <span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(0, 140, 0);">1</span><span style="color: rgb(48, 128, 128);">:</span><br>            self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>sendline<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'yes'</span><span style="color: rgb(48, 128, 128);">)</span><br>            self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>expect<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'assword'</span><span style="color: rgb(48, 128, 128);">)</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>sendline<span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">.</span>password<span style="color: rgb(48, 128, 128);">)</span><br>        index <span style="color: rgb(48, 128, 128);">=</span> self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>expect<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">[</span><span style="color: rgb(16, 96, 182);">'please try again.'</span><span style="color: rgb(48, 128, 128);">,</span>self<span style="color: rgb(48, 128, 128);">.</span>shell_promote<span style="color: rgb(48, 128, 128);">]</span><span style="color: rgb(48, 128, 128);">)</span><br>        <span style="color: rgb(32, 0, 128); font-weight: bold;">if</span> index <span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(48, 128, 128);">:</span><br>            <span style="color: rgb(32, 0, 128); font-weight: bold;">print</span> <span style="color: rgb(16, 96, 182);">'wrong password'</span><br>            <span style="color: rgb(32, 0, 128); font-weight: bold;">return</span><br>        <span style="color: rgb(32, 0, 128); font-weight: bold;">elif</span> index <span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(48, 128, 128);">=</span> <span style="color: rgb(0, 140, 0);">1</span><span style="color: rgb(48, 128, 128);">:</span><br>            <span style="color: rgb(32, 0, 128); font-weight: bold;">if</span> self<span style="color: rgb(48, 128, 128);">.</span>verbose<span style="color: rgb(48, 128, 128);">:</span><br>                <span style="color: rgb(32, 0, 128); font-weight: bold;">print</span> <span style="color: rgb(16, 96, 182);">'I am in'</span><br>    <br>    <span style="color: rgb(32, 0, 128); font-weight: bold;">def</span> exec_command<span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">,</span>command<span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">:</span><br>        <span style="color: rgb(32, 0, 128); font-weight: bold;">if</span> <span style="color: rgb(32, 0, 128); font-weight: bold;">not</span> self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">:</span><br>            <span style="color: rgb(32, 0, 128); font-weight: bold;">print</span> <span style="color: rgb(16, 96, 182);">'please first connect'</span><br>            <span style="color: rgb(32, 0, 128); font-weight: bold;">return</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>sendline<span style="color: rgb(48, 128, 128);">(</span>command<span style="color: rgb(48, 128, 128);">)</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>readline<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>expect<span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">.</span>username<span style="color: rgb(48, 128, 128);">)</span><br>        result <span style="color: rgb(48, 128, 128);">=</span> self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>before<br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>expect<span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">.</span>shell_promote<span style="color: rgb(48, 128, 128);">)</span><br>        <span style="color: rgb(32, 0, 128); font-weight: bold;">return</span> result<br>    <span style="color: rgb(32, 0, 128); font-weight: bold;">def</span> close<span style="color: rgb(48, 128, 128);">(</span>self<span style="color: rgb(48, 128, 128);">)</span><span style="color: rgb(48, 128, 128);">:</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>sendline<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'exit'</span><span style="color: rgb(48, 128, 128);">)</span><br>        self<span style="color: rgb(48, 128, 128);">.</span>child<span style="color: rgb(48, 128, 128);">.</span>expect<span style="color: rgb(48, 128, 128);">(</span>pexpect<span style="color: rgb(48, 128, 128);">.</span>EOF<span style="color: rgb(48, 128, 128);">)</span><br>        <span style="color: rgb(32, 0, 128); font-weight: bold;">if</span> self<span style="color: rgb(48, 128, 128);">.</span>verbose<span style="color: rgb(48, 128, 128);">:</span><br>            <span style="color: rgb(32, 0, 128); font-weight: bold;">print</span> <span style="color: rgb(16, 96, 182);">'quit'</span><br><br>foo <span style="color: rgb(48, 128, 128);">=</span> sshSession<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'username'</span><span style="color: rgb(48, 128, 128);">,</span><span style="color: rgb(16, 96, 182);">'password'</span><span style="color: rgb(48, 128, 128);">,</span><span style="color: rgb(16, 96, 182);">'someserverwithsshopen'</span><span style="color: rgb(48, 128, 128);">)</span><br>foo<span style="color: rgb(48, 128, 128);">.</span>connect<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span><br><span style="color: rgb(32, 0, 128); font-weight: bold;">print</span> foo<span style="color: rgb(48, 128, 128);">.</span>exec_command<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(16, 96, 182);">'echo hello'</span><span style="color: rgb(48, 128, 128);">)</span><br>foo<span style="color: rgb(48, 128, 128);">.</span>close<span style="color: rgb(48, 128, 128);">(</span><span style="color: rgb(48, 128, 128);">)</span></pre> <a href="http://hi.baidu.com/overboming/blog/item/d9ac55d1194841da572c8490.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/overboming/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/overboming/blog/item/d9ac55d1194841da572c8490.html#comment">查看评论</a>]]></description>
        <pubDate>2009-08-14  14:23</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[overboming]]></author>
		<guid>http://hi.baidu.com/overboming/blog/item/d9ac55d1194841da572c8490.html</guid>
</item>


</channel>
</rss>