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
#!/usr/bin/env python | |
import time | |
from contextlib import contextmanager | |
from datetime import timedelta | |
@contextmanager | |
def time_cost(): | |
begin = time.time() |
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
/* Design and Copyright by 千秋,請追蹤噗浪以獲得佈景主題的更新資訊:Plurk@akira02 | |
佈景主題官方網站: https://github.com/akira02/Zero-Memo | |
Zero-Memo模糊背景產生器·改beta:https://chiaki.uk/Zero-Memo/ | |
*/ | |
/* 根元素 */ | |
body { | |
/* △未模糊背景圖片 */ | |
/*# BACKGROUND timeline #*/ |
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
# Yes: | |
if x == 4: print x, y; x, y = y, x | |
# No: | |
if x == 4 : print x , y ; x , y = y , x |
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
# Yes: | |
spam(ham[1], {eggs: 2}) | |
# No: | |
spam( ham[ 1 ], { eggs: 2 } ) |
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
"""This is the example module. | |
This module does stuff. | |
""" | |
from __future__ import barry_as_FLUFL | |
__all__ = ['a', 'b', 'c'] | |
__version__ = '0.1' | |
__author__ = 'Cardinal Biggles' |
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
from subprocess import Popen, PIPE |
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
# Yes: 更容易把運算元和運算子連結起來 | |
income = (gross_wages | |
+ taxable_interest | |
+ (dividends - qualified_dividends) | |
- ira_deduction | |
- student_loan_interest) |
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
# No: 運算子離運算元很遠 | |
income = (gross_wages + | |
taxable_interest + | |
(dividends - qualified_dividends) - | |
ira_deduction - | |
student_loan_interest) |
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
# No: operators sit far away from their operands | |
income = (gross_wages + | |
taxable_interest + | |
(dividends - qualified_dividends) - | |
ira_deduction - | |
student_loan_interest) |
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
with open('/path/to/some/file/you/want/to/read') as file_1, \ | |
open('/path/to/some/file/being/written', 'w') as file_2: | |
file_2.write(file_1.read()) |
NewerOlder