锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品国产亚洲av高清漫画,合区精品久久久中文字幕一区,18岁日韩内射颜射午夜久久成人http://www.shnenglu.com/xmli/category/10513.html銇烽洩椋樼粵姊呮槧孌嬬孩 <br> &nbsp;&nbsp; 銇瘋姳鑸為湝椋炴槧鑻嶆澗<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----- Do more,suffer lesszh-cnMon, 11 May 2009 10:30:17 GMTMon, 11 May 2009 10:30:17 GMT60Python Challenge lv5: peak hellhttp://www.shnenglu.com/xmli/archive/2009/05/11/82588.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 08:54:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82588.htmlhttp://www.shnenglu.com/xmli/comments/82588.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82588.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82588.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82588.htmlhttp://www.pythonchallenge.com/pc/def/peak.html
 榪欐槸鍙嶅簭鍒楀寲鐨勪竴閬撻pickle錛岄〉闈㈡簮鐮佷腑鐨刡anner.p鐨勫瓧鏍鳳紝 涓哄簭鍒楀寲鏂囦歡鍦板潃銆備絾瑙f瀽鐨勭粨鏋滃茍涓嶆槸鏈緇堢殑絳旀錛岃姳浜嗗崐澶╂椂闂寸粓浜庡紕鏄庣櫧緇撴灉鏄竴涓敤‘#’瀛楃粍鎴愮殑鍥懼艦錛屽憸鍛鹼細 紼嬪簭杈撳嚭錛?br>
import pickle
import urllib.request

if __name__ == '__main__':
    url 
= 'http://www.pythonchallenge.com/pc/def/banner.p'
    request
= urllib.request.Request(url)
    
# my pc must use proxy to connect
    request.set_proxy('172.16.0.252:80''http')
    
    
try:        
        response
= urllib.request.urlopen(request)
        banner
= pickle.load(response)
        response.close()
        
        
for line in banner:
            
print(''.join(map(lambda x: x[0]* x[1], line)))
              
    
except Exception as ex:
        
print(ex)

紼嬪簭杈撳嚭錛?br>
                                                                                              
              #####                                                                      #####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
               ####                                                                       ####
      ###      ####   ###         ###       #####   ###    #####   ###          ###       ####
   ###   ##    #### #######     ##  ###      #### #######   #### #######     ###  ###     ####
  ###     ###  #####    ####   ###   ####    #####    ####  #####    ####   ###     ###   ####
 ###           ####     ####   ###    ###    ####     ####  ####     ####  ###      ####  ####
 ###           ####     ####          ###    ####     ####  ####     ####  ###       ###  ####
####           ####     ####     ##   ###    ####     ####  ####     #### ####       ###  ####
####           ####     ####   ##########    ####     ####  ####     #### ##############  ####
####           ####     ####  ###    ####    ####     ####  ####     #### ####            ####
####           ####     #### ####     ###    ####     ####  ####     #### ####            ####
 ###           ####     #### ####     ###    ####     ####  ####     ####  ###            ####
  ###      ##  ####     ####  ###    ####    ####     ####  ####     ####   ###      ##   ####
   ###    ##   ####     ####   ###########   ####     ####  ####     ####    ###    ##    ####
      ###     ######    #####    ##    #### ######    ###########    #####      ###      ######
                                                                                              
寰楀埌涓嬩竴鍏沖湴鍧錛?channel

]]>
Python Challenge lv4: follow the chainhttp://www.shnenglu.com/xmli/archive/2009/05/11/82578.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 08:05:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82578.htmlhttp://www.shnenglu.com/xmli/comments/82578.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82578.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82578.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82578.htmlhttp://www.pythonchallenge.com/pc/def/linkedlist.php
   
  璇村疄璇濓紝濂戒笉瀹規槗閫氳繃google鎼炴竻妤氶鐩殑瑕佹眰錛?閫氳繃涓嶆柇鐨勪粠鏈嶅姟鍣ㄥ彇寰椾竴涓獁eb page錛岀劧鍚庝粠婧愮爜涓壘鍑轟笅涓涓摼鎺ョ殑鍦板潃銆傞渶瑕佹敞鎰忕殑鏄細铏界劧欏甸潰鐨勬簮鐮佸緢綆鍗曪紝浣嗗茍涓嶆槸鍏朵腑鎵鏈夌殑鏁板瓧閮芥槸鏈夋晥鐨勶紝闇瑕佷嬌鐢ㄦ鍒欒〃杈懼紡鎵懼嚭姝g‘鐨刾attern褰㈠紡鎵嶅彲浠ワ紝瀵規湰棰樿岃█r'nothing is (\d+)'鏄竴涓彲鐢ㄧ殑pattern錛屼嬌鐢?'.join([x for x in text if x.isdigit()] 灝嗘墍鏈夌殑鏁板瓧閮界矘榪炶搗鏉ヤ簡錛岀粨鏋滆窡韙埌4000澶氳繕娌$粨鏉燂紝鎵嶇煡閬撲笂褰撲簡銆傘傘?br> 
import re
import urllib.request


if __name__ == '__main__':
    url 
= 'http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing='
    index 
= '17675'
    counter 
= 1
    pattern 
= re.compile(r'nothing is (\d+)')
    
while True:
        
try:
            request
= urllib.request.Request(url+index)
            
# my pc must use proxy to connect
            request.set_proxy('172.16.0.252:80''http')
            response
= urllib.request.urlopen(request) 
            content
=str(response.read().decode())
            response.close()    
            
print(counter, content)
            
            result 
= pattern.search(content)
            
if not result:
                
break
            
            index 
= result.group(1)
            counter 
+= 1        
        
except Exception as ex:
            
print(ex)
            
break
  紼嬪簭杈撳嚭錛?br>1 and the next nothing is 8511
2 and the next nothing is 89456
3 and the next nothing is 43502
4 and the next nothing is 45605
5 and the next nothing is 12970
6 and the next nothing is 91060
7 and the next nothing is 27719
8 and the next nothing is 65667
9 peak.html

寰楀埌涓嬩竴涓鐩殑鍦板潃peak.html (娉細鎴戠殑index鍒濆鍊兼槸17675錛岄鐩腑鏈鏃╃粰鍑虹殑鍙笉鏄繖涓鹼紝 鎴戞槸浠庡湴鍧鍒楄〃鐨勫悗涓閮ㄥ垎閫変簡涓涓暟瀛楄屽凡錛屽洜姝や笉瑕佹媴蹇?

]]>
Python Challenge lv3: rehttp://www.shnenglu.com/xmli/archive/2009/05/11/82577.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:52:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82577.htmlhttp://www.shnenglu.com/xmli/comments/82577.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82577.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82577.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82577.htmlhttp://www.pythonchallenge.com/pc/def/equality.html

  One small letter, surrounded by EXACTLY three big bodyguards on each of its sides.  浣曚負big bodyguards? 鎴戜及璁℃槸澶у啓瀛楁瘝錛屽嵆瑕佹眰鎵懼埌鐢變笁涓ぇ鍐欏瓧姣嶅寘鍥寸潃鐨勫皬鍐欏瓧姣嶃備簨瀹炰笂錛岄鐩姹傜殑紜姝ゃ備笉榪囨垜鍦ㄤ竴寮濮嬬殑鏃跺欒蛋浜嗗集璺細鎴戞妸榪炵畫鐨勪竷涓瓧姣嶅叏閮ㄩ兘鎵撳嵃鍑烘潵浜嗭紙宸﹁竟涓変釜澶у啓瀛楁瘝錛屼腑闂翠竴涓皬鍐欏瓧姣嶏紝鍙寵竟涓変釜澶у啓瀛楁瘝錛夛紝璐逛簡鍗婂ぉ鎵嶆悶鏄庣櫧鍘熸潵瑕佹眰鐨勫彧鏄腑闂寸殑灝忓啓瀛楁瘝銆?br>  鍙﹀娉ㄦ剰EXACTLY 榪欎釜璇嶏紝鍗?#8220;褰撲笖浠呭綋”宸﹀彸涓よ竟鍧囦負“涓?#8221;涓ぇ鍐欏瓧姣嶇殑pattern鎵嶇畻銆?br>
  浠g爜鍒頒篃綆鍗曪細

import re

if __name__ == '__main__':    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        pattern 
= re.compile(r'[^A-Z][A-Z]{3}([a-z])[A-Z]{3}[^A-Z]')
        
print(''.join(pattern.findall(text)))

紼嬪簭杈撳嚭錛歭inkedlist

鍙傝冪瓟妗?/a>

]]>
Python Challenge lv2: ocrhttp://www.shnenglu.com/xmli/archive/2009/05/11/82574.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:40:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82574.htmlhttp://www.shnenglu.com/xmli/comments/82574.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82574.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82574.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82574.htmlhttp://www.pythonchallenge.com/pc/def/ocr.html
  鏍規嵁鎻愮ず錛岄鐩姹傛槸浠巋tml欏甸潰婧愭枃浠剁殑涓孌墊枃鏈腑鎵懼嚭rare characters銆?浣曚負rare錛屾殏鏃朵笉鐭ラ亾錛屼笉榪囦笉瑕佺揣錛屽厛鎶婃暣孌墊枃鏈瓨鏀句簬涓涓彨fin.txt鐨勬枃浠朵腑錛岄澶勭悊涓涓嬶細

if __name__ == '__main__':
    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        
        d
= {}
        
for c in text:
            d[c] 
= d.get(c, 0) +1
        
        
for k, v in d.items():
            
print(k, v)

杈撳嚭緇撴灉錛?br>
! 6079
# 6115
% 6104
$ 6046
& 6043
) 6186
( 6154
+ 6066
* 6034
@ 6157
[ 6108
] 6152
_ 6112
^ 6030
a 1
e 1
i 1
l 1
q 1
u 1
t 1
y 1
{ 6046
} 6105

  濂戒簡錛屽緢鏄劇劧浜嗭紝 rare characters鎸囩殑灝辨槸涓暟涓?鐨勮繖鍑犱釜瀛楁瘝錛?浜庢槸灝嗕唬鐮佺◢寰敼涓涓嬪嵆鍙墦鍗板緱鍒扮粨鏋滐細

if __name__ == '__main__':
    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        
        d
= {}
        
for c in text:
            d[c] 
= d.get(c, 0) +1
            
        
print(''.join([c for c in text if d[c] ==1]))

  紼嬪簭杈撳嚭錛?equality
  
  鑰冭檻鍒扮粨鏋滈泦涓湭杈撳嚭鐨勯兘鏄潪瀛楁瘝錛屽洜姝ゅ彲浠ヨ冭檻濡備笅鏂規硶姹傝В錛?br>
if __name__ == '__main__':
    
    finpath 
= 'fin.txt'
    with open(finpath) as fin:
        
# translate text into a single string
        text = ''.join([line.rstrip() for line in fin.read()])
        
# only print letters
        print(''.join([c for c in text if c.isalpha()]))
        
# another method
        print(''.join(filter(lambda x: x.isalpha(), text)))

  鍙傝冪瓟妗?/a>



]]>
Python Challenge lv1: What about making trans?http://www.shnenglu.com/xmli/archive/2009/05/11/82567.html鏉庣幇姘?/dc:creator>鏉庣幇姘?/author>Mon, 11 May 2009 07:05:00 GMThttp://www.shnenglu.com/xmli/archive/2009/05/11/82567.htmlhttp://www.shnenglu.com/xmli/comments/82567.htmlhttp://www.shnenglu.com/xmli/archive/2009/05/11/82567.html#Feedback0http://www.shnenglu.com/xmli/comments/commentRss/82567.htmlhttp://www.shnenglu.com/xmli/services/trackbacks/82567.htmlhttp://www.pythonchallenge.com/pc/def/map.html
  鐢變簬浠呬粎鏄浜岄亾棰橈紝鎵浠ラ鐩繕鏄緢鏄撴噦鐨勶紝鎸夊浘鐗囦腑鐨勬寚紺猴紝灝嗘瘡涓瓧姣嶆浛鎹㈡垚瀹冨湪瀛楁瘝琛ㄤ腑欏哄歡涓や綅鐨勯偅涓瓧姣嶅氨鍙互浜嗭紝瑙g瓟濡備笅錛氥?br>
def trans(char):
    
'''Translate a letter as the one two places after it'''
    
if char.isalpha():
        
return chr((ord(char)- ord('a'+ 2)%26 + ord('a'))
    
return char

if __name__ == '__main__':
    text 
= '''g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj. '''
    
print(''.join(map(trans, text)))

  鎵撳嵃緇撴灉錛?i hope you didnt translate it by hand. thats what computers are for. doing it in by hand is inefficient and that's why this text is so long. using string.maketrans() is recommended. now apply on the url.


  鍙傝冪瓟妗堥摼鎺?/a>



]]>
国产精品久久久久9999高清| 国内精品久久久久久久久电影网| 国产精品久久久久久久人人看| 久久亚洲精品国产亚洲老地址| 国产精品久久久久jk制服| 一级做a爱片久久毛片| 亚洲∧v久久久无码精品| 久久国产精品偷99| 国产成人精品免费久久久久| 亚洲精品WWW久久久久久| 777久久精品一区二区三区无码 | 精品熟女少妇av免费久久| 亚洲精品WWW久久久久久| 久久综合久久综合久久| 亚洲va中文字幕无码久久| 婷婷久久精品国产| 久久e热在这里只有国产中文精品99| 国内精品久久久人妻中文字幕| 午夜精品久久影院蜜桃| 久久se这里只有精品| 久久精品国产亚洲欧美| 久久夜色精品国产欧美乱| 久久精品国产99久久久古代| 久久亚洲国产精品五月天婷| 亚洲国产成人久久精品动漫| 国产精品久久久久影院色| 日日噜噜夜夜狠狠久久丁香五月 | 久久青青草原精品影院| 91精品国产综合久久精品| 国产婷婷成人久久Av免费高清| 亚洲va久久久噜噜噜久久男同| 大香伊人久久精品一区二区 | 久久精品免费网站网| 久久93精品国产91久久综合| 国产69精品久久久久99| 久久国产三级无码一区二区| 国产精品免费久久| 久久天天躁狠狠躁夜夜av浪潮| 国产精品内射久久久久欢欢| 国产精品久久久久久久午夜片| 久久精品国产精品亚洲艾草网美妙|