This file contains 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
"""My contribution to your program.""" | |
import os | |
try: | |
input = raw_input # For backwards compatibility | |
except NameError: | |
pass | |
output = """ |
This file contains 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 django.db import models | |
class FetchManager(models.Manager): | |
""" | |
combines only, select_related, prefetch_related into a single function | |
Example models: | |
--------------- | |
This file contains 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 sys | |
import subprocess | |
from collections import defaultdict | |
fn, previous_head, current_head, is_branch = sys.argv | |
if not is_branch == '1': | |
sys.exit(0) | |
diff = defaultdict(list) |
This file contains 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 os | |
import sys | |
import shutil | |
import filecmp | |
from datetime import datetime | |
def get_outpath(path, to): | |
timestamp = os.path.getctime(path) | |
created = datetime.fromtimestamp(timestamp) |