Skip to content

Instantly share code, notes, and snippets.

View rotoglup's full-sized avatar

Nicolas Lelong rotoglup

View GitHub Profile
@rotoglup
rotoglup / svn-import.py
Created February 14, 2012 16:52
svn-import python script meant as a replacement for svn_load_dirs.pl (from http://svn.haxx.se/users/archive-2006-10/0857.shtml) - changed to prevent window popups on windows + performance optimisation for 'add' phase
#!/usr/bin/env python
# -*-mode: python; coding: utf-8 -*-
#
# svn-import - Import a new release, such as a vendor drop.
#
# The "Vendor branches" chapter of "Version Control with Subversion"
# describes how to do a new vendor drop with:
#
# >The goal here is to make our current directory contain only the
# >libcomplex 1.1 code, and to ensure that all that code is under version
@rotoglup
rotoglup / python_assert_debug_logging.py
Created July 19, 2011 18:34
python_assert_debug_logging - benchmark, using python assert to discard function calls and arguments evaluation
import contextlib
import time
@contextlib.contextmanager
def time_print(prefix):
t0 = time.time()
yield
t1 = time.time()
print "'%s' time: %fmsec" % (prefix, (t1-t0)*1000)