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 python3 | |
'''Fix PEP-8 E128. | |
function(argument1, argument2, | |
argument3, argument4) | |
-> | |
function( | |
argument1, argument2, |
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
#!/bin/bash | |
set -e | |
onto=origin/master | |
git fetch --prune | |
git branch --remotes --list 'origin/*' |grep -vE 'HEAD|master|gh-pages' |cut -d/ -f2 |while read -r b; do | |
printf "\nRebasing $b\n\n" | |
git checkout -B $b origin/$b | |
git rebase $onto && continue |
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 | |
from __future__ import print_function | |
import argparse | |
import collections | |
import re | |
import subprocess | |
import sys | |
KNOWN_IMPORT_PACKAGE_MAP = { |
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
// Moved to https://github.com/temoto/meetup |
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
''' | |
Generate data: | |
strace -qf -ttt -s10000 -e trace=process -o build-strace-0 program | |
7744 1380876635.688736 execve("./build.sh", ["./build.sh"], [/* 19 vars */]) = 0 | |
7744 1380876635.702388 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f8c267e79d0) = 7745 | |
7744 1380876635.702780 wait4(-1, <unfinished ...> | |
7745 1380876635.702992 execve("/bin/mkdir", ["mkdir", "-p", "packages/common/etc"], [/* 20 vars */]) = 0 | |
7745 1380876635.721350 exit_group(0) = ? | |
7744 1380876635.721609 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 7745 |
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
repo1=~/dev/github.com/eventlet/eventlet | |
repo2=~/dev/bitbucket.org/eventlet/eventlet | |
diff -ru <(cd $repo1; git ls-files |sort |xargs md5sum) <(cd $repo2; hg locate |sort |xargs md5sum) |
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
#!/bin/bash | |
set -e | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". |
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
def namedlist(typename, field_names): | |
"""Returns a new subclass of list with named fields. | |
>>> Point = namedlist('Point', ('x', 'y')) | |
>>> Point.__doc__ # docstring for the new class | |
'Point(x, y)' | |
>>> p = Point(11, y=22) # instantiate with positional args or keywords | |
>>> p[0] + p[1] # indexable like a plain list | |
33 | |
>>> x, y = p # unpack like a regular 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
#!/usr/bin/env python | |
__author__ = 'Sergey Shepelev <temotor@gmail.com>' | |
__version__ = '1' | |
import argparse | |
import codecs | |
import functools | |
import logging | |
import os | |
import re | |
import subprocess |
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 eventlet | |
from eventlet.timeout import Timeout | |
import gc | |
import sys | |
import time | |
def do_with(tt, ts): | |
ok = False | |
with Timeout(tt, False): |