11个你可能不知道的Python库
Sunday, December 4, 2016
9:02 AM
IT程序猿
12/02/2016
【11个你可能不知道的Python库】现在有如此之多的Python包,几乎没有人能够全盘掌握。 http://t.cn/RyXsj1I(来自: 码农网 )![ifia , , , scikt-learn_Qnu mpy 95 , 1) delorean Delorean WhGe 'eve going, we don't need roads. from del orean import Delorean US/ Eastern EST — Delorean (timezone=EST) 2) prettytable GoogleCode , pretty FfiVI , prettytablefrfifiHTML **repr** from pretty table import Pretty Table sort _ key ("feroci t y") table table. table. table. table. table. table. table. table. table. — Pretty Table ( ["animal", "feroci t y"] add add add add add add add row ( ["wolverine 1001) row ( ["grizzly 871) row ( ["Rabbit of Caerbannog row (C" cat row ( ["platypus 231) row ( ["dolphin" 63]) row ( ["albatross 110 True reverses ort ani mal Rabbit of Caerbannog wolverine grizzly dolphin albatross platypus cat feroci ty 110 100 87 63 44 23 3) snowballstemmer _Slefiporter stemmero from snowball stemmer import English Stemmer Spani s h Stemmer Engl i s h Stemmer () . stemWord ("Gregory") Gregori Spani s h Stemmer () . stemWord ("amari 110") amarill 4) wget ( web crawler ) E5*Kirkland , , Facebook. ! import wget wget. download ("[http://www](http://www). cnn. com/") 100% [ .. ] 280385 / 280385 : from sh import wgeto , 5) PyMC scikit-learn from pymc. examples import disaster_model from p y mc import MCMC M = MCMC (disaster _ model) M. sample (i ter=10000, burn=1000, thin=10) -100%---- - 0000 of 10000 complete in 1.4 sec ( Bayesian analysis ) Davidson Pilonfi (Bayesian Methods for Hackers) , scikit-learnfiE_ 6) sh EGbash Python ( from sh import find find("/tmp") /tmp/foo /tmp/foo/filel. bon /tmp/foo/fi1e2. j son /tmp/foo/fi1e3. bon /tmp/foo/bar/fi1e3. bon 7 ) fuzzywuzzy fuzzywuzzy ( , fu z zywu z zyRSea t Gee k ( feature vectors ) from fuzzywuzzy import fuzz fuzz. ratio ("Hit me with your best shot" Hit me with your pet shark") 8) progressbar main fifo rfWf'BLfi print "still going..." , ( progress bar ) o , ätetfi , from progress bar import Progress Bar import time — Progress Bar (maxva1=10) p bar for i in range (l, pbar. update (i) time. sleep (l) pbar. finish ( ) 9) colorama Bf-Hfixha$iQH7GFä5i_-ER , from color ama import Fore print Fore. RED + 'some red text' ome red text 10) uuid : hashing. uuidfiH+Python ( universally unique ids , uuld ) import uuid print uuid. uuid4() e7bafa3d-274e-4boa-b9cc-d898957b4b61 DO you think we in the 11) bashplotlib æz—o $ pip install bashplotlib —file data/texas. txt $ scatter : http://t.cn/RyV8m2d ——pch x](/uploads/projects/wsbo@ekqhd3/aa03154be5cad0820ba477ad4bfe3eb2.jpeg)
查看源微博
已使用 Microsoft OneNote 2016 创建。
11个你可能不知道的Python库
Sunday, December 4, 2016
9:02 AM
IT程序猿
12/02/2016
【11个你可能不知道的Python库】现在有如此之多的Python包,几乎没有人能够全盘掌握。 http://t.cn/RyXsj1I(来自: 码农网 )![ifia , , , scikt-learn_Qnu mpy 95 , 1) delorean Delorean WhGe 'eve going, we don't need roads. from del orean import Delorean US/ Eastern EST — Delorean (timezone=EST) 2) prettytable GoogleCode , pretty FfiVI , prettytablefrfifiHTML **repr** from pretty table import Pretty Table sort _ key ("feroci t y") table table. table. table. table. table. table. table. table. table. — Pretty Table ( ["animal", "feroci t y"] add add add add add add add row ( ["wolverine 1001) row ( ["grizzly 871) row ( ["Rabbit of Caerbannog row (C" cat row ( ["platypus 231) row ( ["dolphin" 63]) row ( ["albatross 110 True reverses ort ani mal Rabbit of Caerbannog wolverine grizzly dolphin albatross platypus cat feroci ty 110 100 87 63 44 23 3) snowballstemmer _Slefiporter stemmero from snowball stemmer import English Stemmer Spani s h Stemmer Engl i s h Stemmer () . stemWord ("Gregory") Gregori Spani s h Stemmer () . stemWord ("amari 110") amarill 4) wget ( web crawler ) E5*Kirkland , , Facebook. ! import wget wget. download ("[http://www](http://www). cnn. com/") 100% [ .. ] 280385 / 280385 : from sh import wgeto , 5) PyMC scikit-learn from pymc. examples import disaster_model from p y mc import MCMC M = MCMC (disaster _ model) M. sample (i ter=10000, burn=1000, thin=10) -100%---- - 0000 of 10000 complete in 1.4 sec ( Bayesian analysis ) Davidson Pilonfi (Bayesian Methods for Hackers) , scikit-learnfiE_ 6) sh EGbash Python ( from sh import find find("/tmp") /tmp/foo /tmp/foo/filel. bon /tmp/foo/fi1e2. j son /tmp/foo/fi1e3. bon /tmp/foo/bar/fi1e3. bon 7 ) fuzzywuzzy fuzzywuzzy ( , fu z zywu z zyRSea t Gee k ( feature vectors ) from fuzzywuzzy import fuzz fuzz. ratio ("Hit me with your best shot" Hit me with your pet shark") 8) progressbar main fifo rfWf'BLfi print "still going..." , ( progress bar ) o , ätetfi , from progress bar import Progress Bar import time — Progress Bar (maxva1=10) p bar for i in range (l, pbar. update (i) time. sleep (l) pbar. finish ( ) 9) colorama Bf-Hfixha$iQH7GFä5i_-ER , from color ama import Fore print Fore. RED + 'some red text' ome red text 10) uuid : hashing. uuidfiH+Python ( universally unique ids , uuld ) import uuid print uuid. uuid4() e7bafa3d-274e-4boa-b9cc-d898957b4b61 DO you think we in the 11) bashplotlib æz—o $ pip install bashplotlib —file data/texas. txt $ scatter : http://t.cn/RyV8m2d ——pch x](/uploads/projects/wsbo@ekqhd3/aa03154be5cad0820ba477ad4bfe3eb2.jpeg)
查看源微博
已使用 Microsoft OneNote 2016 创建。
若有收获,就点个赞吧
0 人点赞
让时间为你证明