See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
简明 Python 教程: http://woodpecker.org.cn/abyteofpython_cn/chinese/
一开始通读一遍这个很不错,是最简单明确的 Python 教程,最适合快速了解。
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # This script helps removing Git branches. | |
| # Run it from a git repo dir. It will open the Git branches list | |
| # in your favorite editor. Delete some branches from the list. | |
| # Save and close the file. The script applies the changes to the repo. | |
| from subprocess import call, Popen, PIPE | |
| from os import getenv |
| import SimpleHTTPServer | |
| class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
| def send_head(self): | |
| """Common code for GET and HEAD commands. | |
| This sends the response code and MIME headers. | |
| Return value is either a file object (which has to be copied | |
| to the outputfile by the caller unless the command was HEAD, | |
| and must be closed by the caller under all circumstances), or |
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
| // See comments below. | |
| // This code sample and justification brought to you by | |
| // Isaac Z. Schlueter, aka isaacs | |
| // standard style | |
| var a = "ape", | |
| b = "bat", | |
| c = "cat", | |
| d = "dog", |