- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #doubansite.py | |
| #抓取豆瓣音乐人小站的音乐并下载 | |
| #2013/09/20 | |
| import requests | |
| import re | |
| import os | |
| import json | |
| def GETdata(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding: utf-8 | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| import requests | |
| url = 'http://pan.baidu.com/share/link?shareid=1268793885&uk=2989926935' | |
| r = requests.get(url) | |
| print len(r.text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| referers = [ | |
| '', | |
| 'https://www.v2ex.com/', | |
| 'https://www.xxoo.com/', | |
| 'https://www.google.com/', | |
| 'http://www.baidu.com/', | |
| 'http://www.sogou.com/', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
SED单行脚本快速参考(Unix 流编辑器) 2005年12月29日
英文标题:USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) 原标题:HANDY ONE-LINERS FOR SED (Unix stream editor)
整理:Eric Pement - 电邮:pemente[at]northpark[dot]edu 版本5.5 译者:Joe Hong - 电邮:hq00e[at]126[dot]com
在以下地址可找到本文档的最新(英文)版本:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| before: | |
| something = get_something() | |
| if something: | |
| do_something(something) | |
| after: | |
| if get_something() as something: | |
| do_something(something) |
I hereby claim:
- I am phyng on github.
- I am phyng (https://keybase.io/phyng) on keybase.
- I have a public key whose fingerprint is 31E7 1639 C374 3CD2 5100 4975 7F4C B647 8FE4 854E
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # subfolder: dist | |
| # ref: https://gist.github.com/cobyism/4730490 | |
| # save the last commit id | |
| old_commit=$(git log -1 --pretty=format:"%h") | |
| # force add dist and commit | |
| git add dist -f && git commit -m "build: build prod" |
OlderNewer