Star 1.9k Watch 223 Fork 1.7k 中文
廖老師的 Python 入門教程中的實踐項目的代碼,教程在線閱讀
2、Minos
Star 666 Watch 46 Fork 190 中文
一個基於 Tornado/MongoDB/Redis 的社區系統
推薦學習《Python教程》
3、tushare
Star 9.1k Watch 962 Fork 3.6k 中文
TuShare 是一個免費、開源的 Python 財經數據接口包,TuShare 文檔
Star 314 Watch 28 Fork 68 中文
北京實時公交,可以顯示查詢的公交到達某站還需多久
Star 262 Watch 24 Fork 120 中文
Python Tornado 寫的開源網站——螺殼網,訪問,如圖:
6、ssbc
Star 1.3k Watch 78 Fork 770 中文
Python Django 寫的種子搜索網站——手撕包菜,如圖:
Star 510 Watch 27 Fork 132
有趣的 Pyhton 代碼片段集合
Star 2.7k Watch 231 Fork 955 中文
老齊的 Python 算法教程
Star 3.5k Watch 197 Fork 751 中文
Goose 用於文章提取器,提取中文內容的示例代碼:
>>> from goose import Goose >>> from goose.text import StopWordsChinese >>> url = 'http://www.bbc.co.uk/zhongwen/simp/chinese_news/2012/12/121210_hongkong_politics.shtml' >>> g = Goose({'stopwords_class': StopWordsChinese}) >>> article = g.extract(url=url) >>> print article.cleaned_text[:150] 香港行政長官樑振英在各方壓力下就其大宅的違章建築(僭建)問題到立法會接受質詢,並向香港民衆道歉。
樑振英在星期二(12月10日)的答問大會開始之際在其演說中道歉,但強調他在違章建築問題上沒有隱瞞的意圖和動機。
一些親北京陣營議員歡迎樑振英道歉,且認爲應能獲得香港民衆接受,但這些議員也質問樑振英有
10、mincss
Star 848 Watch 44 Fork 82
Python 寫的用來找到 CSS 中沒有用到的代碼片段,並刪除。適用於:想要做一個頁面,但是不會寫 CSS 人。示例代碼如下:
#coding:utf-8
#!/usr/bin/env python
from future import print_function
import sys, os
sys.path.insert(0, os.path.abspath(’.’))
from mincss.processor import Processor
# 這裏改成想要參考的頁面
URL = ‘http://localhost:9000/page.html’
def run():
p = Processor()
p.process(URL)
# 輸出INlink的css的簡化前和簡化後的css代碼
print("INLINES ".ljust(79, ‘-’))
for each in p.inlines:
print(“On line %s” % each.line)
print(’- ’ 40)
print(“BEFORE”)
print(each.before)
print(’- ’ 40)
print(“AFTER:”)
print(each.after)
# 輸出link引用的css的簡化前和簡化後的css代碼
print("LINKS ".ljust(79, ‘-’))
for each in p.links:
print(“On href %s” % each.href)
print(’- ’ 40)
print(“BEFORE”)
print(each.before)
print(’- ’ 40)
print(“AFTER:”)
print(each.after)
if name == ‘main’:
run()
本文轉載自:https://www.hellogithub.com/periodical/category/Python%20%E9%A1%B9%E7%9B%AE/
- 上一篇:python可視化數據分析常用圖大集合(收藏)
- 下一篇:沒有了
- 相關文章
- python如何模擬登錄Github
- Python爬蟲之利用Github搜索資源的小技巧
- Python3爬蟲實戰:以GitHub爲例來實現模擬登錄和爬取
- Github上值得推薦的Python工具
- 相關視頻章節
- 運行簡單的 Python 程序
- 安裝 Python
- 安裝 Python、pip 和 venv
- virtualenv使用技巧大全(python新手必備知識)
- 使用pycharm創建自己的第一個django項目