rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
configfile = configall
def new(self): m = self.model l = self.layout v = self.variant if v == "Standard": v = '""'
fce5b05c1bfe24c5fbda0f7fb5b1fba8f8d32bf5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2375/fce5b05c1bfe24c5fbda0f7fb5b1fba8f8d32bf5/xkmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 4672, 312, 273, 365, 18, 2284, 328, 273, 365, 18, 6741, 331, 273, 365, 18, 8688, 309, 331, 422, 315, 8336, 6877, 331, 273, 2119, 5187, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 12, 2890, 4672, 312, 273, 365, 18, 2284, 328, 273, 365, 18, 6741, 331, 273, 365, 18, 8688, 309, 331, 422, 315, 8336, 6877, 331, 273, 2119, 5187, 2, -100, -100, -100, -100, -100, ...
%s+(?:\.%s*)*
%s+(\.%s*)*
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
72a0c19a34dcc90353f2d799116ebcadd510f22a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/72a0c19a34dcc90353f2d799116ebcadd510f22a/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
author = "James Taylor, Bob Harris, David King, Brent Pederson, and others",
author = "James Taylor, Bob Harris, David King, Brent Pedersen, and others",
def main(): setup( name = "bx-python", version = "0.5.0", py_modules = [ 'psyco_full' ], packages = find_packages( 'lib' ), package_dir = { '': 'lib' }, package_data = { '': ['*.ps'] }, scripts = glob( "scripts/*.py" ), ext_modules = get_extension_modules(), test_suite = 'nose.collector', setup_requires = ['nose>=0.10.4'], author = "James Taylor, Bob Harris, David King, Brent Pederson, and others", author_email = "james@jamestaylor.org", description = "Tools for manipulating biological data, particularly multiple sequence alignments", url = "http://bx-python.trac.bx.psu.edu", zip_safe = False, dependency_links = [], cmdclass=command_classes )
a0280ddb8c643abce799a82aa7cb1dbb2280f872 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2104/a0280ddb8c643abce799a82aa7cb1dbb2280f872/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3875, 12, 225, 508, 273, 315, 70, 92, 17, 8103, 3113, 1177, 273, 315, 20, 18, 25, 18, 20, 3113, 2395, 67, 6400, 273, 306, 296, 1121, 93, 2894, 67, 2854, 11, 308, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3875, 12, 225, 508, 273, 315, 70, 92, 17, 8103, 3113, 1177, 273, 315, 20, 18, 25, 18, 20, 3113, 2395, 67, 6400, 273, 306, 296, 1121, 93, 2894, 67, 2854, 11, 308, 16, 5...
if self.debug >= 4: _mesg('> %r' % o) else: _log('> %r' % data)
if self.debug >= 4: self._mesg('> %r' % o) else: self._log('> %r' % data)
def _command(self, name, arg1=None, arg2=None, *options): """ Returns (typ, data) with typ = response type data = list of lists of strings read (only meaningfull if OK)
462597f79dfd214c27990197f9e742d00e0c9fed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9777/462597f79dfd214c27990197f9e742d00e0c9fed/managesieve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3076, 12, 2890, 16, 508, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 16, 380, 2116, 4672, 3536, 2860, 261, 12846, 16, 501, 13, 598, 3815, 225, 273, 766, 618, 501, 273, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3076, 12, 2890, 16, 508, 16, 1501, 21, 33, 7036, 16, 1501, 22, 33, 7036, 16, 380, 2116, 4672, 3536, 2860, 261, 12846, 16, 501, 13, 598, 3815, 225, 273, 766, 618, 501, 273, 666, ...
if 0 : buildPackage( "gettext",
if 1 : buildPackage( "gettext",
def buildPackage(name, uri, checkVersion, downloadUri, tarballName, buildCommand, srcdir=None, deps="", pinnedVersion = None, ) : print "Module:", name subst = dict( sandbox = sandbox, prefix = prefix, target = target, sfmirror = sfmirror, apachemirror = apachemirror, name = name, pinned = pinnedVersion if pinnedVersion else "None", ) availableVersion = output(checkVersion).strip() availableVersion or die("No online version found for the package\n Command used:\n%s" % checkVersion) print "Found version: '%s'" % availableVersion if (pinnedVersion and pinnedVersion != availableVersion) : warning("Package: Pinning to version %s, although version %s is available" % (pinnedVersion, availableVersion)) version = pinnedVersion if pinnedVersion else availableVersion subst.update ( version = version, majorversion = ".".join(version.split(".")[:1]), minorversion = ".".join(version.split(".")[:2]), ) subst.update( tarball = tarballName % subst, srcdir = ("%(sandbox)s/src/" + (srcdir or "%(name)s-%(version)s/")) % subst, ) print "srcdir:", subst['srcdir'] download(downloadUri % subst) extractSource(subst['tarball']) patches = glob.glob(scriptRelative("mingw-"+name+"*")) patches.sort() print patches for patch in patches : applyPatch(subst['srcdir'], patch, level=1) run(buildCommand % subst)
9516624bdaf457fb48cb287da6115af5d509bbca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1456/9516624bdaf457fb48cb287da6115af5d509bbca/setup_mingw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 529, 16, 2003, 16, 866, 1444, 16, 4224, 3006, 16, 29441, 461, 16, 1361, 2189, 16, 1705, 1214, 33, 7036, 16, 8740, 1546, 3113, 26193, 1444, 273, 599, 16, 262, 294, 1172,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 529, 16, 2003, 16, 866, 1444, 16, 4224, 3006, 16, 29441, 461, 16, 1361, 2189, 16, 1705, 1214, 33, 7036, 16, 8740, 1546, 3113, 26193, 1444, 273, 599, 16, 262, 294, 1172,...
def __init__(self, child_command): self.transport = EnsembleTransport(self.connect(child_command))
def __init__(self, child_command, debug=False): """ if debug is True, all communication will be logged to sys.stderr """ self.transport = EnsembleTransport( self.connect(child_command, debug))
def __init__(self, child_command): self.transport = EnsembleTransport(self.connect(child_command)) ServerProxy.__init__(self, "http://ensemble/", # just to avoid error transport=self.transport)
cb11ac177f915d8adfd23ff077bb54df1316bb37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/cb11ac177f915d8adfd23ff077bb54df1316bb37/ensemble.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1151, 67, 3076, 16, 1198, 33, 8381, 4672, 3536, 309, 1198, 353, 1053, 16, 777, 18279, 903, 506, 7545, 358, 2589, 18, 11241, 3536, 365, 18, 13049, 273, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1151, 67, 3076, 16, 1198, 33, 8381, 4672, 3536, 309, 1198, 353, 1053, 16, 777, 18279, 903, 506, 7545, 358, 2589, 18, 11241, 3536, 365, 18, 13049, 273, 13...
K = number_field.QuadraticField(D, 'a')
def satisfies_heegner_hypothesis(self, D): """ Returns True precisely when D is a fundamental discriminant that satisfies the Heegner hypothesis for this elliptic curve. """ if not number_field.is_fundamental_discriminant(D): return False if arith.GCD(D, self.conductor()) != 1: return False K = number_field.QuadraticField(D, 'a') for p, _ in factor(self.conductor()): if len(K.factor_integer(p)) != 2: return False return True
1823d4b8d3abd1f8c640918eefb96d10f36c5d7f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/1823d4b8d3abd1f8c640918eefb96d10f36c5d7f/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17917, 67, 580, 1332, 1224, 67, 76, 879, 10370, 16786, 12, 2890, 16, 463, 4672, 3536, 2860, 1053, 13382, 291, 2357, 1347, 463, 353, 279, 284, 1074, 14773, 287, 29649, 20030, 716, 17917, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17917, 67, 580, 1332, 1224, 67, 76, 879, 10370, 16786, 12, 2890, 16, 463, 4672, 3536, 2860, 1053, 13382, 291, 2357, 1347, 463, 353, 279, 284, 1074, 14773, 287, 29649, 20030, 716, 17917, ...
self.characters(item[1])
self._data(item[1])
def replay (self, waitbuf): """call the handler functions again with buffer data""" for item in waitbuf: if item[0]==DATA: self.characters(item[1]) elif item[0]==STARTTAG: self.startElement(item[1], item[2]) elif item[0]==ENDTAG: self.endElement(item[1]) elif item[0]==COMMENT: self.comment(item[1])
475def66113a258d59f287a283585f27e07dd77a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/475def66113a258d59f287a283585f27e07dd77a/Rewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16033, 261, 2890, 16, 2529, 4385, 4672, 3536, 1991, 326, 1838, 4186, 3382, 598, 1613, 501, 8395, 364, 761, 316, 2529, 4385, 30, 309, 761, 63, 20, 65, 631, 4883, 30, 365, 6315, 892, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16033, 261, 2890, 16, 2529, 4385, 4672, 3536, 1991, 326, 1838, 4186, 3382, 598, 1613, 501, 8395, 364, 761, 316, 2529, 4385, 30, 309, 761, 63, 20, 65, 631, 4883, 30, 365, 6315, 892, 12,...
exit = 'Use Ctrl-D (i.e. EOF) to exit.' __builtin__.quit = __builtin__.exit = exit
eof = 'Ctrl-D (i.e. EOF)' class Quitter(object): def __init__(self, name): self.name = name def __repr__(self): return 'Use %s() or %s to exit' % (self.name, eof) def __call__(self, code=None): raise SystemExit(code) __builtin__.quit = Quitter('quit') __builtin__.exit = Quitter('exit')
def setquit(): """Define new built-ins 'quit' and 'exit'. These are simply strings that display a hint on how to exit. """ if os.sep == ':': exit = 'Use Cmd-Q to quit.' elif os.sep == '\\': exit = 'Use Ctrl-Z plus Return to exit.' else: exit = 'Use Ctrl-D (i.e. EOF) to exit.' __builtin__.quit = __builtin__.exit = exit
4bc0b4081e9cc68686f9d8545c6e85fb9716d0f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4bc0b4081e9cc68686f9d8545c6e85fb9716d0f6/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 27176, 13332, 3536, 11644, 394, 6650, 17, 2679, 296, 27176, 11, 471, 296, 8593, 10332, 8646, 854, 8616, 2064, 716, 2562, 279, 7380, 603, 3661, 358, 2427, 18, 225, 3536, 309, 1140, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 27176, 13332, 3536, 11644, 394, 6650, 17, 2679, 296, 27176, 11, 471, 296, 8593, 10332, 8646, 854, 8616, 2064, 716, 2562, 279, 7380, 603, 3661, 358, 2427, 18, 225, 3536, 309, 1140, 1...
for line,num in checkwhite(fname):
for line,num in checkwhite(repo.wjoin(fname)):
def prompt(name, fixonly=None): result = ui.prompt("(a)bort, (i)gnore, or (f)ix?", "^[aif]$", "a") if result == 'a': return True elif result == 'i': pass elif result == 'f': fixwhite(repo.wjoin(name), tabsize, fixonly) else: raise RepoError, "Invalid response: '%s'" % result
2019238f66200e92b605b4d4602c15fe92bf6068 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/2019238f66200e92b605b4d4602c15fe92bf6068/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6866, 12, 529, 16, 2917, 3700, 33, 7036, 4672, 563, 273, 5915, 18, 13325, 2932, 12, 69, 13, 70, 499, 16, 261, 77, 13, 1732, 16, 578, 261, 74, 13, 697, 35, 3113, 15017, 63, 69, 430,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6866, 12, 529, 16, 2917, 3700, 33, 7036, 4672, 563, 273, 5915, 18, 13325, 2932, 12, 69, 13, 70, 499, 16, 261, 77, 13, 1732, 16, 578, 261, 74, 13, 697, 35, 3113, 15017, 63, 69, 430,...
"could not write to %s: %s" % (dst, errstr)
"could not write to '%s': %s" % (dst, errstr)
def _copy_file_contents (src, dst, buffer_size=16*1024): """Copy the file 'src' to 'dst'; both must be filenames. Any error opening either file, reading from 'src', or writing to 'dst', raises DistutilsFileError. Data is read/written in chunks of 'buffer_size' bytes (default 16k). No attempt is made to handle anything apart from regular files.""" # Stolen from shutil module in the standard library, but with # custom error-handling added. fsrc = None fdst = None try: try: fsrc = open(src, 'rb') except os.error, (errno, errstr): raise DistutilsFileError, "could not open %s: %s" % (src, errstr) try: fdst = open(dst, 'wb') except os.error, (errno, errstr): raise DistutilsFileError, "could not create %s: %s" % (dst, errstr) while 1: try: buf = fsrc.read (buffer_size) except os.error, (errno, errstr): raise DistutilsFileError, \ "could not read from %s: %s" % (src, errstr) if not buf: break try: fdst.write(buf) except os.error, (errno, errstr): raise DistutilsFileError, \ "could not write to %s: %s" % (dst, errstr) finally: if fdst: fdst.close() if fsrc: fsrc.close()
43b44a023f76e9f81e05b84e217f22174be6ede7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/43b44a023f76e9f81e05b84e217f22174be6ede7/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 768, 67, 3980, 261, 4816, 16, 3046, 16, 1613, 67, 1467, 33, 2313, 14, 2163, 3247, 4672, 3536, 2951, 326, 585, 296, 4816, 11, 358, 296, 11057, 13506, 3937, 1297, 506, 906...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 768, 67, 3980, 261, 4816, 16, 3046, 16, 1613, 67, 1467, 33, 2313, 14, 2163, 3247, 4672, 3536, 2951, 326, 585, 296, 4816, 11, 358, 296, 11057, 13506, 3937, 1297, 506, 906...
self.assertEqual(transaction.log_set.filter(type='Rec').count(), 1)
self.assertEqual(transaction.log_set.filter(type='Reg').count(), 1)
def testRegisteredLogEntry(self): """Check that a registered log entry is created"""
f794a61b7b2d094545cd1a6187122fa6a5a6823b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12178/f794a61b7b2d094545cd1a6187122fa6a5a6823b/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 10868, 25548, 12, 2890, 4672, 3536, 1564, 716, 279, 4104, 613, 1241, 353, 2522, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 10868, 25548, 12, 2890, 4672, 3536, 1564, 716, 279, 4104, 613, 1241, 353, 2522, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
"""Delete the Adobe PDF Reader Cache""" def get_description(self): return _("Delete the Adobe PDF Reader Cache")
"""Delete the Adobe Reader cache""" def get_description(self): return _("Delete the Adobe Reader cache")
def set_option(self, option_id, value): """Enable or disable an option""" assert self.options.has_key(option_id) self.options[option_id] = (self.options[option_id][0], \ value, self.options[option_id][2])
79c5bc0ddb8d04db73b82fdeabfaf113cf930a22 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/79c5bc0ddb8d04db73b82fdeabfaf113cf930a22/CleanerBackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3482, 12, 2890, 16, 1456, 67, 350, 16, 460, 4672, 3536, 8317, 578, 4056, 392, 1456, 8395, 1815, 365, 18, 2116, 18, 5332, 67, 856, 12, 3482, 67, 350, 13, 365, 18, 2116, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3482, 12, 2890, 16, 1456, 67, 350, 16, 460, 4672, 3536, 8317, 578, 4056, 392, 1456, 8395, 1815, 365, 18, 2116, 18, 5332, 67, 856, 12, 3482, 67, 350, 13, 365, 18, 2116, 63, ...
each node. (Returns a single value if only one input node).
each vertex. (Returns a single value if only one input vertex).
def cliques_node_clique_number(self, nodes=None, with_labels=False, cliques=None): r""" Returns a list of sizes of the largest maximal cliques containing each node. (Returns a single value if only one input node). Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. (See examples below). INPUT: -- nodes - the nodes to inspect (default is entire graph) -- with_labels - (boolean) default False returns list as above True returns a dictionary keyed by node labels -- cliques - list of cliques (if already computed) EXAMPLES: sage: C = Graph('DJ{') sage: C.cliques_node_clique_number() [2, 4, 4, 4, 4] sage: E = C.cliques() sage: E [[4, 1, 2, 3], [4, 0]] sage: C.cliques_node_clique_number(cliques=E) [2, 4, 4, 4, 4] sage: F = graphs.Grid2dGraph(2,3) sage: F.cliques_node_clique_number(with_labels=True) {(0, 1): 2, (1, 2): 2, (0, 0): 2, (1, 1): 2, (1, 0): 2, (0, 2): 2} sage: F.cliques_node_clique_number(nodes=[(0, 1), (1, 2)]) [2, 2] sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D.cliques_node_clique_number() Traceback (most recent call last): ... TypeError: Function defined for undirected graphs only. See documentation. sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.cliques_node_clique_number() [3, 3, 3, 3] """ if (self.is_directed()): raise TypeError('Function defined for undirected graphs only. See documentation.') else: import networkx.cliques return networkx.cliques.node_clique_number(self._nxg, nodes, with_labels, cliques)
7d819cbf1df622e9f76b4801233dbb334f44d362 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/7d819cbf1df622e9f76b4801233dbb334f44d362/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 2159, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 2199, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, 2860, 279, 666, 434, 8453, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 29896, 67, 2159, 67, 4857, 1857, 67, 2696, 12, 2890, 16, 2199, 33, 7036, 16, 598, 67, 5336, 33, 8381, 16, 4942, 29896, 33, 7036, 4672, 436, 8395, 2860, 279, 666, 434, 8453, 434, ...
translationFile = open('%s/%s.po' % (directory, localeName), 'ru')
translationFile = open(filename, 'ru')
def loadLocale(self, localeName=None):
97f51ab08e1066f46820a68ab94fe7a5241219a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12790/97f51ab08e1066f46820a68ab94fe7a5241219a9/i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 3916, 12, 2890, 16, 2573, 461, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 3916, 12, 2890, 16, 2573, 461, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
domain = "[%s]"%self.domain
domain = "(%s)"%self.domain
def __str__(self): if self.role: basename = "%s{%s}"%(self.name, self.role) else: basename = self.name
81be0c8520a788305fa28235ccddf4d25cef43e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4427/81be0c8520a788305fa28235ccddf4d25cef43e5/depend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 365, 18, 4615, 30, 4882, 273, 2213, 87, 95, 9, 87, 1532, 17105, 2890, 18, 529, 16, 365, 18, 4615, 13, 469, 30, 4882, 273, 365, 18, 529, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 309, 365, 18, 4615, 30, 4882, 273, 2213, 87, 95, 9, 87, 1532, 17105, 2890, 18, 529, 16, 365, 18, 4615, 13, 469, 30, 4882, 273, 365, 18, 529, 2, -100...
print "* model path:", getModelPath() print "* texture path:", getTexturePath() print "* sound path:", getSoundPath()
print "* model path:" print getModelPath() print "* texture path:" print getTexturePath() print "* sound path:" print getSoundPath()
def printEnvDebugInfo(self): """ Print some information about the environment that we are running in. Stuff like the model paths and other paths. Feel free to add stuff to this. """ if self.config.GetBool('want-env-debug-info', 0): print "\n\nEnvironment Debug Info {" print "* model path:", getModelPath() print "* texture path:", getTexturePath() print "* sound path:", getSoundPath() print "}"
6893156b4cca9a2ab81eabd5633861d0c19808ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/6893156b4cca9a2ab81eabd5633861d0c19808ce/ShowBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 3491, 2829, 966, 12, 2890, 4672, 3536, 3038, 2690, 1779, 2973, 326, 3330, 716, 732, 854, 3549, 316, 18, 225, 934, 3809, 3007, 326, 938, 2953, 471, 1308, 2953, 18, 225, 5782, 292, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 3491, 2829, 966, 12, 2890, 4672, 3536, 3038, 2690, 1779, 2973, 326, 3330, 716, 732, 854, 3549, 316, 18, 225, 934, 3809, 3007, 326, 938, 2953, 471, 1308, 2953, 18, 225, 5782, 292, ...
ref = {} done_move_ids = [] for move in complete: done_move_ids.append(move.id) return done_move_ids
return [move.id for move in complete]
def do_partial(self, cr, uid, ids, partial_datas, context=None): """ Makes partial pickings and moves done. @param partial_datas: Dictionary containing details of partial picking like partner_id, address_id, delivery_date, delivery moves with product_id, product_qty, uom """ res = {} picking_obj = self.pool.get('stock.picking') product_obj = self.pool.get('product.product') currency_obj = self.pool.get('res.currency') users_obj = self.pool.get('res.users') uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') sequence_obj = self.pool.get('ir.sequence') wf_service = netsvc.LocalService("workflow") partner_id = partial_datas.get('partner_id', False) address_id = partial_datas.get('address_id', False) delivery_date = partial_datas.get('delivery_date', False) new_moves = []
9f6c10ca2a1258aae7d418c26f5083177e38b1a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9f6c10ca2a1258aae7d418c26f5083177e38b1a6/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 11601, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4702, 67, 13178, 16, 819, 33, 7036, 4672, 3536, 490, 3223, 4702, 6002, 899, 471, 13934, 2731, 18, 632, 891, 4702, 67, 13178,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 11601, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 4702, 67, 13178, 16, 819, 33, 7036, 4672, 3536, 490, 3223, 4702, 6002, 899, 471, 13934, 2731, 18, 632, 891, 4702, 67, 13178,...
if debug: print 'No table found' pass
return
def get_table(text): pos = 0 # find first start tag first_start_tag = re.search(startR, text) if not first_start_tag: if debug: print 'No table found' pass else: if debug: print 'First start tag found at ' + str(first_start_tag.start()) pos = first_start_tag.end() table_level = 1 remaining_text = text while table_level != 0: remaining_text = text[pos:] next_start_tag = re.search(startR, remaining_text, pos) next_end_tag = re.search(endR, remaining_text, pos) if not next_end_tag: if debug: print 'Error: missing end tag' pass if next_start_tag and next_start_tag.start() < next_end_tag.start(): if debug: print 'Next start tag found at ' + str(pos + next_start_tag.start()) pos += next_start_tag.end() table_level += 1 if debug: print 'Table level is ' + str(table_level) else: if debug: print 'Next end tag found at ' + str(pos + next_end_tag.start()) pos += next_end_tag.end() table_level -= 1 if debug: print 'Table level is ' + str(table_level) if debug: print 'Table starts at ' + str(first_start_tag.start()) + ' and ends at ' + str(pos) if debug: print text[first_start_tag.start():pos] return text[first_start_tag.start():pos]
4fdfce26072f0411d6e124ab82fef024a3154034 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/4fdfce26072f0411d6e124ab82fef024a3154034/copy_table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2121, 12, 955, 4672, 949, 273, 374, 468, 1104, 1122, 787, 1047, 1122, 67, 1937, 67, 2692, 273, 283, 18, 3072, 12, 1937, 54, 16, 977, 13, 309, 486, 1122, 67, 1937, 67, 2692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2121, 12, 955, 4672, 949, 273, 374, 468, 1104, 1122, 787, 1047, 1122, 67, 1937, 67, 2692, 273, 283, 18, 3072, 12, 1937, 54, 16, 977, 13, 309, 486, 1122, 67, 1937, 67, 2692, ...
lastts = Trims2ts[i-1][1]
def main(): p = optparse.OptionParser(description='Grabs avisynth trims and outputs chapter file, qpfile and/or cuts audio (works with cfr and vfr input)', version='VFR Chapter Creator 0.7.1', usage='%prog [options] infile.avs{}'.format(" [outfile.avs]" if chapparseExists else "")) p.add_option('--label', '-l', action="store", help="Look for a trim() statement only on lines matching LABEL, interpreted as a regular expression. Default: case insensitive trim", dest="label") p.add_option('--input', '-i', action="store", help='Audio file to be cut', dest="input") p.add_option('--output', '-o', action="store", help='Cut audio from MKVMerge', dest="output") p.add_option('--fps', '-f', action="store", help='Frames per second (for cfr input)', dest="fps") p.add_option('--ofps', action="store", help='Output frames per second', dest="ofps") p.add_option('--timecodes', '-t', action="store", help='Timecodes file from the vfr video (v1 needs tcConv)', dest="timecodes") p.add_option('--chapters', '-c', action="store", help='Chapters file [.%s/.txt]' % "/.".join(exts.keys()), dest="chapters") p.add_option('--qpfile', '-q', action="store", help='QPFile for x264 (frame-accurate only if used with final framecount)', dest="qpfile") p.add_option('--verbose', '-v', action="store_true", help='Verbose', dest="verbose") p.add_option('--merge', '-m', action="store_true", help='Merge cut files', dest="merge") p.add_option('--remove', '-r', action="store_true", help='Remove cut files', dest="remove") p.add_option('--frames', action="store", help='Number of frames for v1 conversion', dest="frames") p.add_option('--test', action="store_true", help="Test mode (do not create new files)", dest="test") (o, a) = p.parse_args() if len(a) < 1: p.error("No avisynth script specified.") elif not o.timecodes and os.path.isfile(a[0] + ".tc.txt"): o.timecodes = a[0] + ".tc.txt" elif o.timecodes and o.fps: p.error("Can't use vfr input AND cfr input") elif o.timecodes and o.ofps: p.error("Can't use ofps with vfr input") elif o.timecodes and os.path.isfile(o.timecodes): o.timecodes = o.timecodes else: o.timecodes = o.fps #Determine chapter type if o.chapters: cExt = re.search("\.(%s)" % "|".join(exts.keys()),o.chapters,re.I) chapType = exts[cExt.group(1).lower()] if cExt else "OGM" else: chapType = '' if not o.output and o.input: o.output = '%s.cut.mka' % re.search("(.*)\.\w*$",o.input).group(1) quiet = '' if o.verbose else '-q' audio = [] Trims = [] with open(a[0], "r") as avsfile: # use only the first non-commented line with trims avs = avsfile.readlines() findTrims = re.compile("(?<!#)[^#]*\s*\.?\s*%s\((\d+)\s*,\s*(\d+)\)%s" % (o.label if o.label else "trim","" if o.label else "(?i)")) trimre = re.compile("(?<!#)trim\((\d+)\s*,\s*(\d+)\)(?i)") for line in avs: if findTrims.match(line): Trims = trimre.findall(line) break if len(Trims) < 1: sys.exit("Error: Avisynth script has no uncommented trims") # Look for AssumeFPS if not o.timecodes: for line in avs: if fpsre.search(line): o.timecodes = '/'.join([i for i in fpsre.search(line).groups()]) if o.verbose: print("\nFound AssumeFPS, setting CFR (%s)" % o.timecodes) break if not o.timecodes: o.timecodes = defaultFps if o.verbose: status = "Avisynth file: %s\n" % a[0] status += "Label: %s\n" % o.label if o.label else "" status += "Audio file: %s\n" % o.input if o.input else "" status += "Cut Audio file: %s\n" % o.output if o.output else "" status += "Timecodes/FPS: %s%s\n" % (o.timecodes," to "+o.ofps if o.ofps else "") if o.ofps != o.timecodes else "" status += "Chapters file: %s%s\n" % (o.chapters," (%s)" % chapType if chapType else "") if o.chapters else "" status += "QP file: %s\n" % o.qpfile if o.qpfile else "" status += "\n" status += "Merge/Rem files: %s/%s\n" % (o.merge,o.remove) if o.merge or o.remove else "" status += "Verbose: %s\n" % o.verbose if o.verbose else "" status += "Test Mode: %s\n" % o.test if o.test else "" print(status) print('In trims: %s' % ', '.join(['(%s,%s)' % (i[0],i[1]) for i in Trims])) # trims' offset calculation Trims2 = [] Trims2ts = [] tcType = determineFormat(o.timecodes) tc = o.timecodes if tcType == 2: nTrims = int(o.frames) if o.frames else int(Trims[-1][1])+2 if not os.path.isfile(tc+"v2.txt"): tcConv = call('"%s" "%s" "%s" %d' % (tcConv, tc, tc+"v2.txt", nTrims)) if tcConv > 0: sys.exit("Failed to execute tcConv: %d; Please put it in your path" % tcConv) o.timecodes = tc+"v2.txt" tcType = 3 for i in range(len(Trims)): fn1 = int(Trims[i][0]) # first frame fn1ts = Ts(fn1,tc,tcType)[0] # first frame timestamp fn2 = int(Trims[i][1]) # last frame fn2ts = Ts(fn2,tc,tcType)[0] # last frame timestamp if o.input: fn2tsaud = Ts(fn2+1,tc,tcType) # last frame timestamp for audio if i != 0: # if it's not the first trim last = int(Trims[i-1][1]) lastts = Trims2ts[i-1][1] offset += fn1-(last+1) offsetts += fn1ts-lastts if fn1-(last+1) != 0 else 0 elif fn1 > 0: # if the first trim doesn't start at 0 offset = fn1 offsetts = fn1ts else: offset = 0 offsetts = 0 if o.input: # make list with timecodes to cut audio audio.append(formatTime(fn1ts)) if len(fn2tsaud) == 1: audio.append(formatTime(fn2tsaud[0])) # apply the offset to the trims fn1 -= offset fn2 -= offset fn1ts -= offsetts fn2ts -= offsetts # convert fps if --ofps if o.ofps and o.timecodes != o.ofps: fn1 = unTs(fn1ts,o.ofps) fn2 = unTs(fn2ts,o.ofps) # add trims and their timestamps to list Trims2.append([fn1,fn2]) Trims2ts.append([fn1ts,fn2ts]) if o.verbose: print('Out trims: %s\n' % ', '.join(['(%s,%s)' % (i[0],i[1]) for i in Trims2])) if o.verbose: print('Out timecodes: %s\n' % ', '.join(['(%s,%s)' % (formatTime(Trims2ts[i][0]), formatTime(Trims2ts[i][1])) for i in range(len(Trims2ts))])) if o.verbose and o.input: print('Audio cuts timecodes: %s\n' % ', '.join(['(%s,%s)' % (audio[i], audio[i+1]) for i in range(len(audio)//2)])) # make qpfile if o.qpfile: if not o.test: with open(o.qpfile, "w") as qpf: for trim in Trims2[1:]: qpf.write('%s K\n' % trim[0]) if o.verbose: print('Writing keyframes to %s\n' % o.qpfile) # make audio cuts if o.input: delayRe = re.search('DELAY ([-]?\d+)',o.input) delay = delayRe.group(1) if delayRe else '0' if Trims[0][0] == 0: includefirst = True audio = audio[1:] else: includefirst = False cuttimes = ','.join(audio) cutCmd = '"%s" -o "%s" --sync 0:%s "%s" --split timecodes:%s %s' % (mkvmerge, o.output + '.split.mka', delay, o.input, cuttimes, quiet) if o.verbose: print('Cutting: %s\n' % cutCmd) if not o.test: cutExec = call(cutCmd) if cutExec == 1: print("Mkvmerge exited with warnings: %d" % cutExec) elif cutExec == 2: sys.exit("Failed to execute mkvmerge: %d" % cutExec) if o.merge: merge = [] for i in range(1,len(audio)+2): if (includefirst == True and i % 2 != 0) or (includefirst == False and i % 2 == 0): merge.append('"%s.split-%03d.mka"' % (o.output, i)) mergeCmd = '"%s" -o "%s" %s %s' % (mkvmerge,o.output, ' +'.join(merge), quiet) if o.verbose: print('\nMerging: %s\n' % mergeCmd) if not o.test: mergeExec = call(mergeCmd) if mergeExec == 1: print("Mkvmerge exited with warnings: %d" % mergeExec) elif mergeExec == 2: sys.exit("Failed to execute mkvmerge: %d" % mergeExec) if o.remove: remove = ['%s.split-%03d.mka' % (o.output, i) for i in range(1,len(audio)+2)] if o.verbose: print('\nDeleting: %s\n' % ', '.join(remove)) if not o.test: [os.unlink(i) if os.path.exists(i) else True for i in remove] # make offseted avs if chapparseExists and len(a) > 1: fNum = [i[0] for i in Trims2] set = {'avs':'"'+a[1]+'"','input':'','resize':''} writeAvisynth(set,fNum) # write chapters if chapType: if chapType == 'MKV': EditionUID = random.randint(10**5,10**6) matroskaXmlHeader = '<?xml version="1.0" encoding="UTF-8"?>\n<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->\n<Chapters>' matroskaXmlEditionHeader = """ <EditionEntry> <EditionFlagHidden>{}</EditionFlagHidden> <EditionFlagDefault>{}</EditionFlagDefault> <EditionFlagOrdered>{}</EditionFlagOrdered> <EditionUID>{}</EditionUID>
cd8b105bfee7958caa5f9d65a4424af63c30b14f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14863/cd8b105bfee7958caa5f9d65a4424af63c30b14f/vfr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 293, 273, 2153, 2670, 18, 1895, 2678, 12, 3384, 2218, 14571, 2038, 1712, 291, 878, 451, 2209, 87, 471, 6729, 23580, 585, 16, 22859, 768, 471, 19, 280, 6391, 87, 7447, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 293, 273, 2153, 2670, 18, 1895, 2678, 12, 3384, 2218, 14571, 2038, 1712, 291, 878, 451, 2209, 87, 471, 6729, 23580, 585, 16, 22859, 768, 471, 19, 280, 6391, 87, 7447, ...
"restore the default (built-in) lighting preferences (but don't save them)."
""" restore the default (built-in) lighting preferences (but don't save them). """
def restoreDefaultLighting(self, gl_update = True): "restore the default (built-in) lighting preferences (but don't save them)." # Restore light color prefs keys. env.prefs.restore_defaults([ light1Color_prefs_key, light2Color_prefs_key, light3Color_prefs_key, ]) self.setLighting( self._default_lights, gl_update = gl_update ) return True
9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 1868, 12128, 310, 12, 2890, 16, 5118, 67, 2725, 273, 1053, 4672, 3536, 5217, 326, 805, 261, 12406, 17, 267, 13, 9052, 310, 12750, 261, 12885, 2727, 1404, 1923, 2182, 2934, 3536, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 1868, 12128, 310, 12, 2890, 16, 5118, 67, 2725, 273, 1053, 4672, 3536, 5217, 326, 805, 261, 12406, 17, 267, 13, 9052, 310, 12750, 261, 12885, 2727, 1404, 1923, 2182, 2934, 3536, 46...
<body onload="__init__()">
<body onload="QuiX.__init__()">
def execute(self, item, context): if isPage: script_name = context.request.serverVariables["SCRIPT_NAME"] no_cookies_url = '%s/{%s}%s%s' % ( script_name, context.session.sessionid, context.request.serverVariables['PATH_INFO'], context.request.getQueryString() ) vars = (script_name, script_name, script_name, script_name, no_cookies_url, script_name) context.response.content_type = 'text/html' context.response.write(('''
4997e371b17a7ab22b1e6ca22f180e9004f74ae5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2504/4997e371b17a7ab22b1e6ca22f180e9004f74ae5/webmethods.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 761, 16, 819, 4672, 309, 353, 1964, 30, 2728, 67, 529, 273, 819, 18, 2293, 18, 3567, 6158, 9614, 10885, 67, 1985, 11929, 1158, 67, 16240, 67, 718, 273, 1995, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 761, 16, 819, 4672, 309, 353, 1964, 30, 2728, 67, 529, 273, 819, 18, 2293, 18, 3567, 6158, 9614, 10885, 67, 1985, 11929, 1158, 67, 16240, 67, 718, 273, 1995, 87, ...
self.exportAttributes(outfile, level, namespace_, name_='AbstractMapping')
self.exportAttributes(outfile, level, [], namespace_, name_='AbstractSet')
def export(self, outfile, level, namespace_='', name_='AbstractMapping', namespacedef_=''): showIndent(outfile, level) outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', )) self.exportAttributes(outfile, level, namespace_, name_='AbstractMapping') outfile.write(' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"') outfile.write(' xsi:type="AbstractMapping"') outfile.write('>') self.exportChildren(outfile, level + 1, namespace_, name_) outfile.write('</%s%s>\n' % (namespace_, name_))
10f2a4b3101435822c472af9b202a5a0bb496366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/10f2a4b3101435822c472af9b202a5a0bb496366/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 12, 2890, 16, 8756, 16, 1801, 16, 1981, 67, 2218, 2187, 508, 67, 2218, 7469, 3233, 2187, 1981, 536, 67, 2218, 11, 4672, 2405, 7790, 12, 26050, 16, 1801, 13, 8756, 18, 2626, 2668,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 12, 2890, 16, 8756, 16, 1801, 16, 1981, 67, 2218, 2187, 508, 67, 2218, 7469, 3233, 2187, 1981, 536, 67, 2218, 11, 4672, 2405, 7790, 12, 26050, 16, 1801, 13, 8756, 18, 2626, 2668,...
for item in self.items.values():
for item in self.ids.values():
def to_opf1(self, parent=None): elem = element(parent, 'manifest') for item in self.items.values(): media_type = item.media_type if media_type == XHTML_MIME: media_type = OEB_DOC_MIME elif media_type == CSS_MIME: media_type = OEB_CSS_MIME attrib = {'id': item.id, 'href': item.href, 'media-type': media_type} if item.fallback: attrib['fallback'] = item.fallback element(elem, 'item', attrib=attrib) return elem
738349151c5b10851b0a51e0b4410b0263902986 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/738349151c5b10851b0a51e0b4410b0263902986/oeb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 556, 74, 21, 12, 2890, 16, 982, 33, 7036, 4672, 3659, 273, 930, 12, 2938, 16, 296, 14357, 6134, 364, 761, 316, 365, 18, 2232, 18, 2372, 13332, 3539, 67, 723, 273, 761, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 556, 74, 21, 12, 2890, 16, 982, 33, 7036, 4672, 3659, 273, 930, 12, 2938, 16, 296, 14357, 6134, 364, 761, 316, 365, 18, 2232, 18, 2372, 13332, 3539, 67, 723, 273, 761, 18, ...
for d in self.lib_dirs: sys.path.insert(0, os.path.join(root, d))
sys.path.append(root)
def configure(self, options, config): super(NoseGAE, self).configure(options, config) if not self.enabled: return self.config = config if options.gae_app is not None: self._path = options.gae_app else: self._path = config.workingDir if options.gae_lib_root is not None: root = self._gae_path = options.gae_lib_root for d in self.lib_dirs: sys.path.insert(0, os.path.join(root, d)) else: self._gae_path = None if options.gae_data is not None: self._data_path = options.gae_data self._temp_data = False else: self._data_path = os.path.join(tempfile.gettempdir(), 'nosegae.datastore') self._temp_data = True self.sandbox_enabled = options.sandbox_enabled try: from google.appengine.tools import dev_appserver from google.appengine.tools.dev_appserver_main import \ DEFAULT_ARGS, ARG_CLEAR_DATASTORE, ARG_LOG_LEVEL, \ ARG_DATASTORE_PATH, ARG_HISTORY_PATH self._gae = {'dev_appserver': dev_appserver, 'ARG_LOG_LEVEL': ARG_LOG_LEVEL, 'ARG_CLEAR_DATASTORE': ARG_CLEAR_DATASTORE, 'ARG_DATASTORE_PATH': ARG_DATASTORE_PATH, 'ARG_HISTORY_PATH': ARG_HISTORY_PATH, 'DEFAULT_ARGS': DEFAULT_ARGS} # prefill these into sys.modules import webob import yaml import django except ImportError, e: self.enabled = False warn("Google App Engine not found in %s" % options.gae_lib_root, RuntimeWarning) if sys.version_info[0:2] < (2,5): raise EnvironmentError( "Python version must be 2.5 or greater, like the Google App Engine environment. " "Tests are running with: %s" % sys.version) # As of SDK 1.2.5 the dev_appserver.py aggressively adds some logging handlers. # This removes the handlers but note that Nose will still capture logging and # report it during failures. See Issue 25 for more info. rootLogger = logging.getLogger() for handler in rootLogger.handlers: if isinstance(handler, logging.StreamHandler): rootLogger.removeHandler(handler)
f492a3f5888c368f17ceeefc01f54f9322c3c59f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7673/f492a3f5888c368f17ceeefc01f54f9322c3c59f/nosegae.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 702, 16, 642, 4672, 2240, 12, 2279, 307, 43, 16985, 16, 365, 2934, 14895, 12, 2116, 16, 642, 13, 309, 486, 365, 18, 5745, 30, 327, 365, 18, 1425, 273, 642, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 12, 2890, 16, 702, 16, 642, 4672, 2240, 12, 2279, 307, 43, 16985, 16, 365, 2934, 14895, 12, 2116, 16, 642, 13, 309, 486, 365, 18, 5745, 30, 327, 365, 18, 1425, 273, 642, 309, ...
if os.path.exists(inputFileName): inputFile = open(inputFileName,'r')
if os.path.exists( inputFileName ): inputFile = open( inputFileName, 'r' )
def usage(): print 'Usage: %s [<options>] <lfn|fileContainingLFNs> SE Status' % (Script.scriptName) print ' This will set the status of the replicas at the provided SE with the given status' print ' Type "%s --help" for the available options and syntax' % Script.scriptName DIRAC.exit(2)
04ed498e9f2324d5b78ccfadf29d3f5236487f1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/04ed498e9f2324d5b78ccfadf29d3f5236487f1f/dirac-dms-set-replica-status.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 32, 2116, 34, 65, 411, 80, 4293, 96, 768, 24344, 9105, 10386, 34, 3174, 2685, 11, 738, 261, 3651, 18, 4263, 461, 13, 1172, 296, 1220, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 32, 2116, 34, 65, 411, 80, 4293, 96, 768, 24344, 9105, 10386, 34, 3174, 2685, 11, 738, 261, 3651, 18, 4263, 461, 13, 1172, 296, 1220, ...
if self.reverse: frame = self.endFrame - frame else: frame = self.startFrame + frame
def privStep(self, t): # Calc integer frame number absFrame = int(math.floor(t * self.frameRate + 0.0001))
c2ecc922d3e6a1de36529427562cc49b7ed7a5f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/c2ecc922d3e6a1de36529427562cc49b7ed7a5f6/ActorInterval.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6015, 4160, 12, 2890, 16, 268, 4672, 468, 29128, 3571, 2623, 1300, 2417, 3219, 273, 509, 12, 15949, 18, 74, 5807, 12, 88, 380, 365, 18, 3789, 4727, 397, 374, 18, 13304, 3719, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6015, 4160, 12, 2890, 16, 268, 4672, 468, 29128, 3571, 2623, 1300, 2417, 3219, 273, 509, 12, 15949, 18, 74, 5807, 12, 88, 380, 365, 18, 3789, 4727, 397, 374, 18, 13304, 3719, 2, -100, ...
if connector.obj.get_output(connector.port)==InvalidOutput:
if connector.obj.get_output(connector.port) is InvalidOutput:
def updateUpstream(self): """ updateUpstream() -> None Go upstream from the current module, then update its upstream modules and check input connection based on upstream modules results """ for connectorList in self.inputPorts.itervalues(): for connector in connectorList: connector.obj.update() for iport, connectorList in copy.copy(self.inputPorts.items()): for connector in connectorList: if connector.obj.get_output(connector.port)==InvalidOutput: self.removeInputConnector(iport, connector)
c98692e306ffb72b67c948135b6c88090d0091d6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/c98692e306ffb72b67c948135b6c88090d0091d6/vistrails_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1211, 3256, 12, 2890, 4672, 3536, 1089, 1211, 3256, 1435, 317, 599, 4220, 13505, 628, 326, 783, 1605, 16, 1508, 1089, 2097, 13505, 4381, 471, 866, 810, 1459, 2511, 603, 13505, 4381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1211, 3256, 12, 2890, 4672, 3536, 1089, 1211, 3256, 1435, 317, 599, 4220, 13505, 628, 326, 783, 1605, 16, 1508, 1089, 2097, 13505, 4381, 471, 866, 810, 1459, 2511, 603, 13505, 4381, ...
f = lambda k: k.attributes[XMLSchemaComponent.xsd]['name'] ns = lambda k: k.attributes[XMLSchemaComponent.xsd]['namespace']
f = lambda k: k.attributes['name'] ns = lambda k: k.attributes['namespace']
def __init__(self, parent=None): """parent -- instance variables: targetNamespace -- schema's declared targetNamespace, or empty string. _imported_schemas -- namespace keyed dict of schema dependencies, if a schema is provided instance will not resolve import statement. _included_schemas -- schemaLocation keyed dict of component schemas, if schema is provided instance will not resolve include statement. _base_url -- needed for relative URLs support, only works with URLs relative to initial document. includes -- collection of include statements imports -- collection of import statements elements -- collection of global element declarations types -- collection of global type definitions attr_decl -- collection of global attribute declarations attr_groups -- collection of global attribute group definitions model_groups -- collection of model group definitions notations -- collection of notations
36f34bdb62c4299586877f31abafd4a91e255843 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/36f34bdb62c4299586877f31abafd4a91e255843/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 3536, 2938, 1493, 791, 3152, 30, 1018, 3402, 1493, 1963, 1807, 7886, 1018, 3402, 16, 578, 1008, 533, 18, 389, 29266, 67, 17928, 1493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 3536, 2938, 1493, 791, 3152, 30, 1018, 3402, 1493, 1963, 1807, 7886, 1018, 3402, 16, 578, 1008, 533, 18, 389, 29266, 67, 17928, 1493, ...
os.execle(sys.executable, executable, *argv)
if do_execl: os.execle(sys.executable, executable, *argv)
def spawnNewChandler(self, argv): windows = os.name == 'nt' mac = sys.platform == 'darwin' linux = sys.platform.startswith('linux')
bd7746ceb53b9ce0a317cb479bc54346138e603b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9228/bd7746ceb53b9ce0a317cb479bc54346138e603b/Application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12560, 1908, 782, 464, 749, 12, 2890, 16, 5261, 4672, 9965, 273, 1140, 18, 529, 422, 296, 496, 11, 5318, 273, 2589, 18, 9898, 422, 296, 28076, 11, 19725, 273, 2589, 18, 9898, 18, 17514...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12560, 1908, 782, 464, 749, 12, 2890, 16, 5261, 4672, 9965, 273, 1140, 18, 529, 422, 296, 496, 11, 5318, 273, 2589, 18, 9898, 422, 296, 28076, 11, 19725, 273, 2589, 18, 9898, 18, 17514...
if pkg in sources['testing']:
if pkg in sources['testing'] and 'fake' not in sources['testing'][pkg]:
def write_excuses(self): """Produce and write the update excuses
f03b6261a211bc414fe8b6d0504fff93d04acc06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/f03b6261a211bc414fe8b6d0504fff93d04acc06/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 10075, 6117, 12, 2890, 4672, 3536, 25884, 471, 1045, 326, 1089, 3533, 6117, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 10075, 6117, 12, 2890, 4672, 3536, 25884, 471, 1045, 326, 1089, 3533, 6117, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
while len(received) < size: chunk = self.recv(size - len(received)) if not chunk: self.readBuffer = received return None received += chunk self.readBuffer = received[size:] return received[:size]
self.readBuffer = self.readBuffer[size:] return received
def read(self, size=None, bufferSize=64*1024): """High level interface for reading from the socket, includes a buffering scheme that works well for receiving fixed size messages. """ if size is None: # Keep reading until there's no more to read received = self.readBuffer self.readBuffer = '' try: while 1: received += self.recv(bufferSize) except Errors.ConnectionLost: pass return received elif size != 0: # Read the amount specified, first from our # local read buffer then from the socket itself. # If we can't read the complete packet, return # None and keep the partial packet buffered. received = self.readBuffer[:size] while len(received) < size: chunk = self.recv(size - len(received)) if not chunk: self.readBuffer = received return None received += chunk self.readBuffer = received[size:] return received[:size] else: # Zero size return ''
afc1744b0410de15b01ce2c3231079d09a4f262f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/afc1744b0410de15b01ce2c3231079d09a4f262f/Network.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 16, 16939, 33, 1105, 14, 2163, 3247, 4672, 3536, 8573, 1801, 1560, 364, 6453, 628, 326, 2987, 16, 6104, 279, 25056, 4355, 716, 6330, 5492, 364, 15847, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 963, 33, 7036, 16, 16939, 33, 1105, 14, 2163, 3247, 4672, 3536, 8573, 1801, 1560, 364, 6453, 628, 326, 2987, 16, 6104, 279, 25056, 4355, 716, 6330, 5492, 364, 15847, ...
for mk,mv in mDict.items():
for mk, mv in mDict.items():
def __expandMetaDictionary(self,metaDict,credDict): """ Expand the dictionary with metadata query """ result = self.getMetadataFields(credDict) if not result['OK']: return result metaTypeDict = result['Value'] resultDict = {} for key,value in metaDict.items(): if not key in metaTypeDict: return S_ERROR('Unknown metadata field %s' % key) keyType = metaTypeDict[key] if keyType != "MetaSet": resultDict[key] = value else: result = self.getMetadataSet(value,True,credDict) if not result['OK']: return result mDict = result['Value'] for mk,mv in mDict.items(): if mk in resultDict: return S_ERROR('Contradictory query for key %s' % mk) else: resultDict[mk] = mv return S_OK(resultDict)
127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12320, 2781, 10905, 12, 2890, 16, 3901, 5014, 16, 20610, 5014, 4672, 3536, 16429, 326, 3880, 598, 1982, 843, 3536, 563, 273, 365, 18, 588, 2277, 2314, 12, 20610, 5014, 13, 309, 486...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12320, 2781, 10905, 12, 2890, 16, 3901, 5014, 16, 20610, 5014, 4672, 3536, 16429, 326, 3880, 598, 1982, 843, 3536, 563, 273, 365, 18, 588, 2277, 2314, 12, 20610, 5014, 13, 309, 486...
raise xml.dom.HierarchyRequestErr("two document elements disallowed")
raise xml.dom.HierarchyRequestErr( "two document elements disallowed")
def appendChild(self, node): if node.nodeType not in self.childNodeTypes: raise HierarchyRequestErr, \ "%s cannot be child of %s" % (repr(node), repr(self) ) if node.parentNode is not None: node.parentNode.removeChild(node)
9e1fe1ec675386a4be12471a8b785a385d326316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9e1fe1ec675386a4be12471a8b785a385d326316/minidom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 2890, 16, 756, 4672, 309, 756, 18, 2159, 559, 486, 316, 365, 18, 3624, 907, 2016, 30, 1002, 670, 6000, 691, 2524, 16, 521, 2213, 87, 2780, 506, 1151, 434, 738, 87, 6, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 2890, 16, 756, 4672, 309, 756, 18, 2159, 559, 486, 316, 365, 18, 3624, 907, 2016, 30, 1002, 670, 6000, 691, 2524, 16, 521, 2213, 87, 2780, 506, 1151, 434, 738, 87, 6, 738, ...
map('gn', fm.cd('/mnt'))
map('gM', fm.cd('/mnt'))
def insert_before_filename(arg): append_to_filename(arg) arg.fm.ui.console.move(right=len('rename '), absolute=True)
e03f5494e6f3fbb66b3d2f62909c64c017adaf2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/e03f5494e6f3fbb66b3d2f62909c64c017adaf2a/keys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 5771, 67, 3459, 12, 3175, 4672, 714, 67, 869, 67, 3459, 12, 3175, 13, 1501, 18, 25089, 18, 4881, 18, 8698, 18, 8501, 12, 4083, 33, 1897, 2668, 18539, 296, 3631, 4967, 33, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 5771, 67, 3459, 12, 3175, 4672, 714, 67, 869, 67, 3459, 12, 3175, 13, 1501, 18, 25089, 18, 4881, 18, 8698, 18, 8501, 12, 4083, 33, 1897, 2668, 18539, 296, 3631, 4967, 33, 5...
self.status()
def __repr__(self): self.status() return "Hg repository '%s' in directory %s"%(self.__name, self.__dir)
b2a1c87733cedabacafe0a7e864d2694da68488e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/b2a1c87733cedabacafe0a7e864d2694da68488e/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 315, 44, 75, 3352, 1995, 87, 11, 316, 1867, 738, 87, 6, 17105, 2890, 16186, 529, 16, 365, 16186, 1214, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 315, 44, 75, 3352, 1995, 87, 11, 316, 1867, 738, 87, 6, 17105, 2890, 16186, 529, 16, 365, 16186, 1214, 13, 2, -100, -100, -100, -100, -100, -100,...
print>>sys.__stderr__, "Idle accepted connection from ", address
def accept(self): working_sock, address = self.listening_sock.accept() if address[0] == '127.0.0.1': print>>sys.__stderr__, "Idle accepted connection from ", address SocketIO.__init__(self, working_sock) else: print>>sys.__stderr__, "Invalid host: ", address raise socket.error
b2e63be799ebc5f040ce733e7530210b91131af4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b2e63be799ebc5f040ce733e7530210b91131af4/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 4672, 5960, 67, 15031, 16, 1758, 273, 365, 18, 18085, 310, 67, 15031, 18, 9436, 1435, 309, 1758, 63, 20, 65, 422, 296, 14260, 18, 20, 18, 20, 18, 21, 4278, 8758, 4294...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 4672, 5960, 67, 15031, 16, 1758, 273, 365, 18, 18085, 310, 67, 15031, 18, 9436, 1435, 309, 1758, 63, 20, 65, 422, 296, 14260, 18, 20, 18, 20, 18, 21, 4278, 8758, 4294...
if doResize: rad = rad / float(gim.zoomFac)
def __init__(self, gim, annType, imPos, rad, tags = None, doResize = True,
95c8599a62e1e1e570a237ed60eab194f3d5337f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/95c8599a62e1e1e570a237ed60eab194f3d5337f/GrayImageDispWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 381, 16, 8226, 559, 16, 709, 1616, 16, 6719, 16, 2342, 273, 599, 16, 741, 12182, 273, 1053, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 381, 16, 8226, 559, 16, 709, 1616, 16, 6719, 16, 2342, 273, 599, 16, 741, 12182, 273, 1053, 16, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._fixupNAT(m, addr)
def datagramReceived(self, data, addr): self.parser.dataReceived(data) self.parser.dataDone() for m in self.messages: if self.debug: log.msg("Received %r from %r" % (m, addr)) self._fixupNAT(m, addr) if isinstance(m, Request): self.handle_request(m, addr) else: self.handle_response(m, addr) self.messages[:] = []
1f67509adf202464a7462d4d3d134cd1773eb90a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1f67509adf202464a7462d4d3d134cd1773eb90a/sip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1150, 17049, 8872, 12, 2890, 16, 501, 16, 3091, 4672, 365, 18, 4288, 18, 892, 8872, 12, 892, 13, 365, 18, 4288, 18, 892, 7387, 1435, 364, 312, 316, 365, 18, 6833, 30, 309, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1150, 17049, 8872, 12, 2890, 16, 501, 16, 3091, 4672, 365, 18, 4288, 18, 892, 8872, 12, 892, 13, 365, 18, 4288, 18, 892, 7387, 1435, 364, 312, 316, 365, 18, 6833, 30, 309, 365, 18, ...
textListRemovedEndLen=len(textList)
textListBlankLen=len(textList)
def speakTextInfo(info,useCache=True,extraDetail=False,handleSymbols=False,reason=REASON_QUERY,index=None): textList=[] #Fetch the last controlFieldStack, or make a blank one controlFieldStackCache=getattr(info.obj,'_speakTextInfo_controlFieldStackCache',[]) if useCache else {} formatFieldAttributesCache=getattr(info.obj,'_speakTextInfo_formatFieldAttributesCache',{}) if useCache else {} #Make a new controlFieldStack from the textInfo's initialControlFieldAncestry newControlFieldStack=info.initialControlFieldAncestry #Calculate how many fields in the old and new controlFieldStacks are the same commonFieldCount=0 for count in range(min(len(newControlFieldStack),len(controlFieldStackCache))): if newControlFieldStack[count]==controlFieldStackCache[count]: commonFieldCount+=1 else: break #Get speech text for any fields in the old controlFieldStack that are not in the new controlFieldStack for count in reversed(range(commonFieldCount,len(controlFieldStackCache))): text=getControlFieldSpeech(controlFieldStackCache[count],"end_removedFromControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) textListRemovedEndLen=len(textList) #Get speech text for any fields that are in both controlFieldStacks, if extra detail is not requested if not extraDetail: for count in range(commonFieldCount): text=getControlFieldSpeech(newControlFieldStack[count],"start_inControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) #Get speech text for any fields in the new controlFieldStack that are not in the old controlFieldStack for count in range(commonFieldCount,len(newControlFieldStack)): text=getControlFieldSpeech(newControlFieldStack[count],"start_addedToControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) commonFieldCount+=1 #Fetch the text for format field attributes that have changed between what was previously cached, and this textInfo's initialFormatField. text=getFormatFieldSpeech(info.initialFormatField,formatFieldAttributesCache) if text: textList.append(text) if handleSymbols: text=" ".join(textList) if text: speakText(text,index=index) text=info.text if text: if len(text)==1: speakSpelling(text) else: speakText(text,index=index) info.obj._speakTextInfo_controlFieldStackCache=list(newControlFieldStack) info.obj._speakTextInfo_formatFieldAttributesCache=formatFieldAttributesCache return #Fetch a command list for the text and fields for this textInfo commandList=info.textWithFields #Move through the command list, getting speech text for all controlStarts, controlEnds and formatChange commands #But also keep newControlFieldStack up to date as we will need it for the ends # Add any text to a separate list, as it must be handled differently. relativeTextList=[] for count in range(len(commandList)): if isinstance(commandList[count],basestring): text=commandList[count] if text: relativeTextList.append(text) elif isinstance(commandList[count],textHandler.FieldCommand) and commandList[count].command=="controlStart": text=getControlFieldSpeech(commandList[count].field,"start_relative",extraDetail,reason=reason) if text: relativeTextList.append(text) newControlFieldStack.append(commandList[count].field) elif isinstance(commandList[count],textHandler.FieldCommand) and commandList[count].command=="controlEnd": text=getControlFieldSpeech(newControlFieldStack[-1],"end_relative",extraDetail,reason=reason) if text: relativeTextList.append(text) del newControlFieldStack[-1] if commonFieldCount>len(newControlFieldStack): commonFieldCount=len(newControlFieldStack) elif isinstance(commandList[count],textHandler.FieldCommand) and commandList[count].command=="formatChange": text=getFormatFieldSpeech(commandList[count].field,formatFieldAttributesCache) if text: relativeTextList.append(text) text=" ".join(relativeTextList) if text and not text.isspace(): textList.append(text) #Finally get speech text for any fields left in new controlFieldStack that are common with the old controlFieldStack (for closing), if extra detail is not requested if not extraDetail: for count in reversed(range(min(len(newControlFieldStack),commonFieldCount))): text=getControlFieldSpeech(newControlFieldStack[count],"end_inControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) # If we are handling content and we are only exiting fields (i.e. we aren't entering any new fields and there is no text), blank should be reported, unless we are doing a say all. if len(relativeTextList)>0 and reason != REASON_SAYALL and len(textList)==textListRemovedEndLen: textList.append(_("blank")) #Cache a copy of the new controlFieldStack for future use if useCache: info.obj._speakTextInfo_controlFieldStackCache=list(newControlFieldStack) info.obj._speakTextInfo_formatFieldAttributesCache=formatFieldAttributesCache text=" ".join(textList) # Only speak if there is speakable text. Reporting of blank text is handled above. if text and not text.isspace(): speakText(text,index=index)
da9eabcfcb63d139eec7f21cd4e3822bd1902d0f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/da9eabcfcb63d139eec7f21cd4e3822bd1902d0f/speech.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 1528, 966, 12, 1376, 16, 1202, 1649, 33, 5510, 16, 7763, 6109, 33, 8381, 16, 4110, 14821, 33, 8381, 16, 10579, 33, 29416, 1413, 67, 10753, 16, 1615, 33, 7036, 4672, 977, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 1528, 966, 12, 1376, 16, 1202, 1649, 33, 5510, 16, 7763, 6109, 33, 8381, 16, 4110, 14821, 33, 8381, 16, 10579, 33, 29416, 1413, 67, 10753, 16, 1615, 33, 7036, 4672, 977, 68...
except OSError: pass try: del sys.modules[self.imported] except KeyError: pass try:
if prep: self.imported_module = sys.modules.get(self.imported) if self.imported_module: del sys.modules[self.imported] else: if self.imported_module: sys.modules[self.imported] = self.imported_module if os.path.exists(self.good_dir_path):
def cleanup(self): """Make sure that the .pth file is deleted, self.imported is not in sys.modules, and that both self.good_dirname and self.bad_dirname are not existing directories.""" try: os.remove(self.file_path) except OSError: pass try: del sys.modules[self.imported] except KeyError: pass try: os.rmdir(self.good_dir_path) except OSError: pass try: os.rmdir(self.bad_dir_path) except OSError: pass
e235021f403a7f5f981168683032ef931c8a9f92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e235021f403a7f5f981168683032ef931c8a9f92/test_site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 12, 2890, 4672, 3536, 6464, 3071, 716, 326, 263, 2397, 585, 353, 4282, 16, 365, 18, 29266, 353, 486, 316, 2589, 18, 6400, 16, 471, 716, 3937, 365, 18, 19747, 67, 12287, 471, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6686, 12, 2890, 4672, 3536, 6464, 3071, 716, 326, 263, 2397, 585, 353, 4282, 16, 365, 18, 29266, 353, 486, 316, 2589, 18, 6400, 16, 471, 716, 3937, 365, 18, 19747, 67, 12287, 471, 365,...
if sys.platform=='win32' and ('install' in sys.argv or 'install_ext' in sys.argv):
if sys.hexversion<0x2030000 and sys.platform=='win32' and ('install' in sys.argv or 'install_ext' in sys.argv):
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg)
78fc70c06d0c9e0d72d4389ab9f0b2666df8997e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/78fc70c06d0c9e0d72d4389ab9f0b2666df8997e/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 809, 668, 12, 3576, 4672, 1930, 4798, 667, 1903, 668, 12, 11855, 18, 503, 4672, 1342, 1002, 1903, 668, 12, 3576, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1002, 809, 668, 12, 3576, 4672, 1930, 4798, 667, 1903, 668, 12, 11855, 18, 503, 4672, 1342, 1002, 1903, 668, 12, 3576, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'''This starts the given command in a child process. This does
"""This starts the given command in a child process. This does
def __spawn(self): '''This starts the given command in a child process. This does all the fork/exec type of stuff for a pty. This is called by __init__. The args parameter is a list, command is a string. ''' # The pid and child_fd of this object get set by this method. # Note that it is difficult for this method to fail. # You cannot detect if the child process cannot start. # So the only way you can tell if the child process started # or not is to try to read from the file descriptor. If you get # EOF immediately then it means that the child is already dead. # That may not necessarily be bad, because you may spawn a child # that performs some operator, creates no stdout output, and then dies. # It is a fuzzy edge case. Any child process that you are likely to # want to interact with Pexpect would probably not fall into this # category. # FYI, This essentially does a fork/exec operation.
a6436229531e4cc3cceb58c0322f4ecc258e53d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/a6436229531e4cc3cceb58c0322f4ecc258e53d4/pexpect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1752, 9533, 12, 2890, 4672, 3536, 2503, 2542, 326, 864, 1296, 316, 279, 1151, 1207, 18, 1220, 1552, 777, 326, 12515, 19, 4177, 618, 434, 10769, 364, 279, 293, 4098, 18, 1220, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1752, 9533, 12, 2890, 4672, 3536, 2503, 2542, 326, 864, 1296, 316, 279, 1151, 1207, 18, 1220, 1552, 777, 326, 12515, 19, 4177, 618, 434, 10769, 364, 279, 293, 4098, 18, 1220, 353, ...
stripehead = conditionals[conditional] + " (" \ + test + "){\n" \ + " " + stripehead stripefoot = stripefoot + "\n}"
stripehead = stripehead \ + conditionals[conditional] + " (" \ + test + "):\n" \ + stripehead
def flatten(self, stripeset, depth=0, context="show"): """Converts a stripe or stripeset into a string"""
8c93e382b626c0486b37cfec0506f7e5eeed2350 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8821/8c93e382b626c0486b37cfec0506f7e5eeed2350/PyGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5341, 12, 2890, 16, 2569, 281, 278, 16, 3598, 33, 20, 16, 819, 1546, 4500, 6, 4672, 3536, 5692, 279, 14268, 578, 2569, 281, 278, 1368, 279, 533, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5341, 12, 2890, 16, 2569, 281, 278, 16, 3598, 33, 20, 16, 819, 1546, 4500, 6, 4672, 3536, 5692, 279, 14268, 578, 2569, 281, 278, 1368, 279, 533, 8395, 2, -100, -100, -100, -100, -100, ...
fmode = lstat(entry.attrib['name'])
fmode = lstat(entry.get('name'))
def InstallDirectory(self, entry): try: fmode = lstat(entry.attrib['name']) if not S_ISDIR(fmode[0]): try: unlink(entry.attrib['name']) except: return False except OSError: pass try: mkdir(entry.attrib['name']) except OSError: return False try: chown(entry.attrib['name'], getpwnam(entry.attrib['owner'])[2], getgrnam(entry.attrib['group'])[2]) chmod(entry.attrib['name'], entry.attrib['perms']) except: return False
7f96b6e6c21e510fb73ea66f3c3e52b21d089e3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/7f96b6e6c21e510fb73ea66f3c3e52b21d089e3e/Toolset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 2853, 12, 2890, 16, 1241, 4672, 775, 30, 284, 3188, 273, 328, 5642, 12, 4099, 18, 588, 2668, 529, 26112, 309, 486, 348, 67, 5127, 4537, 12, 74, 3188, 63, 20, 65, 4672, 775, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 2853, 12, 2890, 16, 1241, 4672, 775, 30, 284, 3188, 273, 328, 5642, 12, 4099, 18, 588, 2668, 529, 26112, 309, 486, 348, 67, 5127, 4537, 12, 74, 3188, 63, 20, 65, 4672, 775, 30...
params['subnetId'] = subnet_id
params['SubnetId'] = subnet_id
def run_instances(self, image_id, min_count=1, max_count=1, key_name=None, security_groups=None, user_data=None, addressing_type=None, instance_type='m1.small', placement=None, kernel_id=None, ramdisk_id=None, monitoring_enabled=False, subnet_id=None): """ Runs an image on EC2. :type image_id: string :param image_id: The ID of the image to run :type min_count: int :param min_count: The minimum number of instances to launch :type max_count: int :param max_count: The maximum number of instances to launch :type key_name: string :param key_name: The name of the key pair with which to launch instances :type security_groups: list of strings :param security_groups: The names of the security groups with which to associate instances :type user_data: string :param user_data: The user data passed to the launched instances :type instance_type: string :param instance_type: The type of instance to run (m1.small, m1.large, m1.xlarge) :type placement: string :param placement: The availability zone in which to launch the instances :type kernel_id: string :param kernel_id: The ID of the kernel with which to launch the instances :type ramdisk_id: string :param ramdisk_id: The ID of the RAM disk with which to launch the instances :type monitoring_enabled: bool :param monitoring_enabled: Enable CloudWatch monitoring on the instance. :type subnet_id: string :param subnet_id: The subnet ID within which to launch the instances for VPC. :rtype: Reservation :return: The :class:`boto.ec2.instance.Reservation` associated with the request for machines """ params = {'ImageId':image_id, 'MinCount':min_count, 'MaxCount': max_count} if key_name: params['KeyName'] = key_name if security_groups: l = [] for group in security_groups: if isinstance(group, SecurityGroup): l.append(group.name) else: l.append(group) self.build_list_params(params, l, 'SecurityGroup') if user_data: params['UserData'] = base64.b64encode(user_data) if addressing_type: params['AddressingType'] = addressing_type if instance_type: params['InstanceType'] = instance_type if placement: params['Placement.AvailabilityZone'] = placement if kernel_id: params['KernelId'] = kernel_id if ramdisk_id: params['RamdiskId'] = ramdisk_id if monitoring_enabled: params['Monitoring.Enabled'] = 'true' if subnet_id: params['subnetId'] = subnet_id return self.get_object('RunInstances', params, Reservation, verb='POST')
ac3ea53e2c1bfd7c7d9269eb8e2ed7a122091c1b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/ac3ea53e2c1bfd7c7d9269eb8e2ed7a122091c1b/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 10162, 12, 2890, 16, 1316, 67, 350, 16, 1131, 67, 1883, 33, 21, 16, 943, 67, 1883, 33, 21, 16, 498, 67, 529, 33, 7036, 16, 4373, 67, 4650, 33, 7036, 16, 729, 67, 892, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 10162, 12, 2890, 16, 1316, 67, 350, 16, 1131, 67, 1883, 33, 21, 16, 943, 67, 1883, 33, 21, 16, 498, 67, 529, 33, 7036, 16, 4373, 67, 4650, 33, 7036, 16, 729, 67, 892, 3...
origr = math.pow(size*2.3561944901923448, 0.333333)
origr = math.pow(size*0.23561944901923448, 0.333333)
def createObjectAt(self, imageData, x0, y0, z0, size): """ Create an object in the image at the give position @param imageData the image to modify @param x0, y0, z0 the coordinates of the object @param size the size of the object in pixels """ origr = math.pow(size*2.3561944901923448, 0.333333) #r = int(1+math.sqrt(size/math.pi)) r = int(origr) maxx,maxy,maxz = imageData.GetDimensions() minx,miny,minz = [0 for i in range(3)] maxx -= 1 maxy -= 1 maxz -= 1 xs = int(x0-r) ys = int(y0-r) zs = int(z0-r) xe = int(x0+r) ye = int(y0+r) ze = int(z0+r)
b23cf9117065fb863e61cb5faab5ad9ae47fcd09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2877/b23cf9117065fb863e61cb5faab5ad9ae47fcd09/TestData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17109, 861, 12, 2890, 16, 26229, 16, 619, 20, 16, 677, 20, 16, 998, 20, 16, 963, 4672, 3536, 1788, 392, 733, 316, 326, 1316, 622, 326, 8492, 1754, 632, 891, 26229, 326, 1316, 358, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17109, 861, 12, 2890, 16, 26229, 16, 619, 20, 16, 677, 20, 16, 998, 20, 16, 963, 4672, 3536, 1788, 392, 733, 316, 326, 1316, 622, 326, 8492, 1754, 632, 891, 26229, 326, 1316, 358, 56...
sage: F4 = WeylCharacterRing("F4",style="coroots")
sage: F4 = WeylCharacterRing("F4",style="coroots")
def branch_weyl_character(chi, R, S, rule="default"): r""" A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429-449, Howe, Tan and Willenbring, Stable branching rules for classical symmetric pairs, Trans. Amer. Math. Soc. 357 (2005), no. 4, 1601-1626, McKay and Patera, Tables of Dimensions, Indices and Branching Rules for Representations of Simple Lie Algebras (Marcel Dekker, 1981), and Fauser, Jarvis, King and Wybourne, New branching rules induced by plethysm. J. Phys. A 39 (2006), no. 11, 2611--2655. INPUT: - ``chi`` - a character of G - ``R`` - the Weyl Character Ring of G - ``S`` - the Weyl Character Ring of H - ``rule`` - a set of r dominant weights in H where r is the rank of G. You may use a predefined rule by specifying rule = one of"levi", "automorphic", "symmetric", "extended", "triality" or "miscellaneous". The use of these rules will be explained next. After the examples we will explain how to write your own branching rules for cases that we have omitted. To explain the predefined rules we survey the most important branching rules. These may be classified into several cases, and once this is understood, the detailed classification can be read off from the Dynkin diagrams. Dynkin classified the maximal subgroups of Lie groups in Mat. Sbornik N.S. 30(72):349-462 (1952). We will list give predefined rules that cover most cases where the branching rule is to a maximal subgroup. For convenience, we also give some branching rules to subgroups that are not maximal. For example, a Levi subgroup may or may not be maximal. LEVI TYPE. These can be read off from the Dynkin diagram. If removing a node from the Dynkin diagram produces another Dynkin diagram, there is a branching rule. Currently we require that the smaller diagram be connected. For these rules use the option rule="levi":: ['A',r] => ['A',r-1] ['B',r] => ['A',r-1] ['B',r] => ['B',r-1] ['C',r] => ['A',r-1] ['C',r] => ['C',r-1] ['D',r] => ['A',r-1] ['D',r] => ['D',r-1] ['E',r] => ['A',r-1] r = 7,8 ['E',r] => ['D',r-1] r = 6,7,8 ['E',r] => ['E',r-1] F4 => B3 F4 => C3 G2 => A1 (short root) Not all Levi subgroups are maximal subgroups. If the Levi is not maximal there may or may not be a preprogrammed rule="levi" for it. If there is not, the branching rule may still be obtained by going through an intermediate subgroup that is maximal using rule="extended". Thus the other Levi branching rule from G2 => A1 corresponding to the long root is available by first branching G2 => A_2 then A2 => A1. Similarly the branching rules to the Levi subgroup:: ['E',r] => ['A',r-1] r = 6,7,8 may be obtained by first branching E6=>A5xA1, E7=>A7 or E8=>A8. AUTOMORPHIC TYPE. If the Dynkin diagram has a symmetry, then there is an automorphism that is a special case of a branching rule. There is also an exotic "triality" automorphism of D4 having order 3. Use rule="automorphic" or (for D4) rule="triality":: ['A',r] => ['A',r] ['D',r] => ['D',r] E6 => E6 SYMMETRIC TYPE. Related to the automorphic type, when either the Dynkin diagram or the extended diagram has a symmetry there is a branching rule to the subalgebra (or subgroup) of invariants under the automorphism. Use rule="symmetric". The last branching rule, D4=>G2 is not to a maximal subgroup since D4=>B3=>G2, but it is included for convenience. :: ['A',2r+1] => ['B',r] ['A',2r] => ['C',r] ['A',2r] => ['D',r] ['D',r] => ['B',r-1] E6 => F4 D4 => G2 EXTENDED TYPE. If removing a node from the extended Dynkin diagram results in a Dynkin diagram, then there is a branching rule. Use rule="extended" for these. We will also use this classification for some rules that are not of this type, mainly involving type B, such as D6 => B3xB3. Here is the extended Dynkin diagram for D6:: 0 6 O O | | | | O---O---O---O---O 1 2 3 4 6 Removing the node 3 results in an embedding D3xD3 -> D6. This corresponds to the embedding SO(6)xSO(6) -> SO(12), and is of extended type. On the other hand the embedding SO(5)xSO(7)-->SO(12) (e.g. B2xB3 -> D6) cannot be explained this way but for uniformity is implemented under rule="extended". Using rule="extended" you can get any branching rule SO(n) => SO(a) x SO(b) x SO(c) x ... where n = a+b+c+ ... Sp(2n) => Sp(2a) x Sp(2b) x Sp(2c) x ... where n = a+b+c+ ... where O(a) = ['D',r] (a=2r) or ['B',r] (a=2r+1) and Sp(2r)=['C',r]. The following rules are implemented as special cases of rule="extended". :: E6 => A5xA1, A2xA2xA2 E7 => A7, D6xA1, A3xA3xA1 E8 => A8, D8, E7xA1, A4xA4, D5xA3, E6xA2 F4 => B4, C3xA1, A2xA2, A3xA1 G2 => A1xA1 Note that E8 has only a limited number of representations of reasonably low degree. TENSOR: There are branching rules: :: ['A', rs-1] => ['A',r-1] x ['A',s-1] ['B',2rs+r+s] => ['B',r] x ['B',s] ['D',2rs+s] => ['B',r] x ['D',s] ['D',2rs] => ['D',r] x ['D',s] ['D',2rs] => ['C',r] x ['C',s] ['C',2rs+s] => ['B',r] x ['C',s] ['C',2rs] => ['C',r] x ['D',s]. corresponding to the tensor product homomorphism. For type A, the homomorphism is GL(r) x GL(s) -> GL(rs). For the classical types, the relevant fact is that if V,W are orthogonal or symplectic spaces, that is, spaces endowed with symmetric or skew-symmetric bilinear forms, then V tensor W is also an orthogonal space (if V and W are both orthogonal or both symplectic) or symplectic (if one of V and W is orthogonal and the other symplectic). The corresponding branching rules are obtained using rule="tensor". SYMMETRIC POWER: The k-th symmetric and exterior power homomorphisms map GL(n) --> GL(binomial(n+k-1,k)) and GL(binomial(n,k)). The corresponding branching rules are not implemented but a special case is. The k-th symmetric power homomorphism SL(2) --> GL(k+1) has its image inside of SO(2r+1) if k=2r and inside of Sp(2r) if k=2r-1. Hence there are branching rules:: ['B',r] => A1 ['C',r] => A1 and these may be obtained using the rule "symmetric_power". MISCELLANEOUS: Use rule="miscellaneous" for the following rules:: B3 => G2 F4 => G2xA1 (not implemented yet) BRANCHING RULES FROM PLETHYSMS Nearly all branching rules G => H where G is of type A,B,C or D are covered by the preceding rules. The function branching_rules_from_plethysm covers the remaining cases. ISOMORPHIC TYPE: Although not usually referred to as a branching rule, the effects of the accidental isomorphisms may be handled using rule="isomorphic":: B2 => C2 C2 => B2 A3 => D3 D3 => A3 D2 => A1xA1 B1 => A1 C1 => A1 EXAMPLES: (Levi type) :: sage: A1 = WeylCharacterRing("A1") sage: A2 = WeylCharacterRing("A2") sage: A3 = WeylCharacterRing("A3") sage: A4 = WeylCharacterRing("A4") sage: A5 = WeylCharacterRing("A5") sage: B2 = WeylCharacterRing("B2") sage: B3 = WeylCharacterRing("B3") sage: B4 = WeylCharacterRing("B4") sage: C2 = WeylCharacterRing("C2") sage: C3 = WeylCharacterRing("C3") sage: D3 = WeylCharacterRing("D3") sage: D4 = WeylCharacterRing("D4") sage: D5 = WeylCharacterRing("D5") sage: G2 = WeylCharacterRing("G2") sage: F4 = WeylCharacterRing("F4",style="coroots") # long time sage: E6=WeylCharacterRing("E6",style="coroots") sage: D5=WeylCharacterRing("D5",style="coroots") sage: [B3(w).branch(A2,rule="levi") for w in B3.fundamental_weights()] [A2(0,0,-1) + A2(0,0,0) + A2(1,0,0), A2(0,-1,-1) + A2(0,0,-1) + A2(0,0,0) + A2(1,0,-1) + A2(1,0,0) + A2(1,1,0), A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)] The last example must be understood as follows. The representation of B3 being branched is spin, which is not a representation of SO(7) but of its double cover spin(7). The group A2 is really GL(3) and the double cover of SO(7) induces a cover of GL(3) that is trivial over SL(3) but not over the center of GL(3). The weight lattice for this GL(3) consists of triples (a,b,c) of half integers such that a-b and b-c are in `\ZZ`, and this is reflected in the last decomposition. :: sage: [C3(w).branch(A2,rule="levi") for w in C3.fundamental_weights()] [A2(0,0,-1) + A2(1,0,0), A2(0,-1,-1) + A2(1,0,-1) + A2(1,1,0), A2(-1,-1,-1) + A2(1,-1,-1) + A2(1,1,-1) + A2(1,1,1)] sage: [D4(w).branch(A3,rule="levi") for w in D4.fundamental_weights()] [A3(0,0,0,-1) + A3(1,0,0,0), A3(0,0,-1,-1) + A3(0,0,0,0) + A3(1,0,0,-1) + A3(1,1,0,0), A3(1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,-1/2), A3(-1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,1/2)] sage: [B3(w).branch(B2,rule="levi") for w in B3.fundamental_weights()] [2*B2(0,0) + B2(1,0), B2(0,0) + 2*B2(1,0) + B2(1,1), 2*B2(1/2,1/2)] sage: C3 = WeylCharacterRing(['C',3]) sage: [C3(w).branch(C2,rule="levi") for w in C3.fundamental_weights()] [2*C2(0,0) + C2(1,0), C2(0,0) + 2*C2(1,0) + C2(1,1), C2(1,0) + 2*C2(1,1)] sage: [D5(w).branch(D4,rule="levi") for w in D5.fundamental_weights()] [2*D4(0,0,0,0) + D4(1,0,0,0), D4(0,0,0,0) + 2*D4(1,0,0,0) + D4(1,1,0,0), D4(1,0,0,0) + 2*D4(1,1,0,0) + D4(1,1,1,0), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2)] sage: G2(1,0,-1).branch(A1,rule="levi") A1(0,-1) + A1(1,-1) + A1(1,0) sage: E6=WeylCharacterRing("E6",style="coroots") # long time sage: D5=WeylCharacterRing("D5",style="coroots") # long time sage: fw = E6.fundamental_weights() # long time sage: [E6(fw[i]).branch(D5,rule="levi") for i in [1,2,6]] # long time [D5(0,0,0,0,0) + D5(0,0,0,0,1) + D5(1,0,0,0,0), D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(0,0,0,0,1) + D5(0,1,0,0,0), D5(0,0,0,0,0) + D5(0,0,0,1,0) + D5(1,0,0,0,0)] sage: E7=WeylCharacterRing("E7",style="coroots") # long time sage: D6=WeylCharacterRing("D6",style="coroots") # long time sage: fw = E7.fundamental_weights() # long time sage: [E7(fw[i]).branch(D6,rule="levi") for i in [1,2,7]] # long time [3*D6(0,0,0,0,0,0) + 2*D6(0,0,0,0,1,0) + D6(0,1,0,0,0,0), 3*D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0) + 2*D6(0,0,1,0,0,0) + D6(1,0,0,0,1,0), D6(0,0,0,0,0,1) + 2*D6(1,0,0,0,0,0)] sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time sage: E8=WeylCharacterRing("E8",style="coroots",cache=True) # long time sage: D7=WeylCharacterRing("D7",style="coroots",cache=True) # long time sage: E8(1,0,0,0,0,0,0,0).branch(D7,rule="levi") # long time 3*D7(0,0,0,0,0,0,0) + 2*D7(0,0,0,0,0,1,0) + 2*D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) + 2*D7(0,0,1,0,0,0,0) + D7(0,0,0,1,0,0,0) + D7(1,0,0,0,0,1,0) + D7(1,0,0,0,0,0,1) + D7(2,0,0,0,0,0,0) sage: E8(0,0,0,0,0,0,0,1).branch(D7,rule="levi") # long time D7(0,0,0,0,0,0,0) + D7(0,0,0,0,0,1,0) + D7(0,0,0,0,0,0,1) + 2*D7(1,0,0,0,0,0,0) + D7(0,1,0,0,0,0,0) sage: [F4(fw).branch(B3,rule="levi") for fw in F4.fundamental_weights()] # long time [B3(0,0,0) + 2*B3(1/2,1/2,1/2) + 2*B3(1,0,0) + B3(1,1,0), B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 5*B3(1,0,0) + 7*B3(1,1,0) + 3*B3(1,1,1) + 6*B3(3/2,1/2,1/2) + 2*B3(3/2,3/2,1/2) + B3(2,0,0) + 2*B3(2,1,0) + B3(2,1,1), 3*B3(0,0,0) + 6*B3(1/2,1/2,1/2) + 4*B3(1,0,0) + 3*B3(1,1,0) + B3(1,1,1) + 2*B3(3/2,1/2,1/2), 3*B3(0,0,0) + 2*B3(1/2,1/2,1/2) + B3(1,0,0)] sage: [F4(fw).branch(C3,rule="levi") for fw in F4.fundamental_weights()] # long time [3*C3(0,0,0) + 2*C3(1,1,1) + C3(2,0,0), 3*C3(0,0,0) + 6*C3(1,1,1) + 4*C3(2,0,0) + 2*C3(2,1,0) + 3*C3(2,2,0) + C3(2,2,2) + C3(3,1,0) + 2*C3(3,1,1), 2*C3(1,0,0) + 3*C3(1,1,0) + C3(2,0,0) + 2*C3(2,1,0) + C3(2,1,1), 2*C3(1,0,0) + C3(1,1,0)] sage: A1xA1 = WeylCharacterRing("A1xA1") sage: [A3(hwv).branch(A1xA1,rule="levi") for hwv in A3.fundamental_weights()] [A1xA1(0,0,1,0) + A1xA1(1,0,0,0), A1xA1(0,0,1,1) + A1xA1(1,0,1,0) + A1xA1(1,1,0,0), A1xA1(1,0,1,1) + A1xA1(1,1,1,0)] sage: A1xB1=WeylCharacterRing("A1xB1",style="coroots") sage: [B3(x).branch(A1xB1,rule="levi") for x in B3.fundamental_weights()] [A1xB1(0,2) + 2*A1xB1(1,0), 3*A1xB1(0,0) + A1xB1(0,2) + 2*A1xB1(1,2) + A1xB1(2,0), 2*A1xB1(0,1) + A1xB1(1,1)] EXAMPLES: (Automorphic type, including D4 triality) :: sage: [A3(chi).branch(A3,rule="automorphic") for chi in A3.fundamental_weights()] [A3(0,0,0,-1), A3(0,0,-1,-1), A3(0,-1,-1,-1)] sage: [D4(chi).branch(D4,rule="automorphic") for chi in D4.fundamental_weights()] [D4(1,0,0,0), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2)] sage: [D4(chi).branch(D4,rule="triality") for chi in D4.fundamental_weights()] [D4(1/2,1/2,1/2,-1/2), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1,0,0,0)] EXAMPLES: (Symmetric type) :: sage: [w.branch(B2,rule="symmetric") for w in [A4(1,0,0,0,0),A4(1,1,0,0,0),A4(1,1,1,0,0),A4(2,0,0,0,0)]] [B2(1,0), B2(1,1), B2(1,1), B2(0,0) + B2(2,0)] sage: [A5(w).branch(C3,rule="symmetric") for w in A5.fundamental_weights()] [C3(1,0,0), C3(0,0,0) + C3(1,1,0), C3(1,0,0) + C3(1,1,1), C3(0,0,0) + C3(1,1,0), C3(1,0,0)] sage: [A5(w).branch(D3,rule="symmetric") for w in A5.fundamental_weights()] [D3(1,0,0), D3(1,1,0), D3(1,1,-1) + D3(1,1,1), D3(1,1,0), D3(1,0,0)] sage: [D4(x).branch(B3,rule="symmetric") for x in D4.fundamental_weights()] [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)] sage: [D4(x).branch(G2,rule="symmetric") for x in D4.fundamental_weights()] [G2(0,0,0) + G2(1,0,-1), 2*G2(1,0,-1) + G2(2,-1,-1), G2(0,0,0) + G2(1,0,-1), G2(0,0,0) + G2(1,0,-1)] sage: [E6(fw).branch(F4,rule="symmetric") for fw in E6.fundamental_weights()] # long time [F4(0,0,0,0) + F4(0,0,0,1), F4(0,0,0,1) + F4(1,0,0,0), F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), F4(1,0,0,0) + 2*F4(0,0,1,0) + F4(1,0,0,1) + F4(0,1,0,0), F4(0,0,0,1) + F4(1,0,0,0) + F4(0,0,1,0), F4(0,0,0,0) + F4(0,0,0,1)] EXAMPLES: (Extended type) :: sage: [B3(x).branch(D3,rule="extended") for x in B3.fundamental_weights()] [D3(0,0,0) + D3(1,0,0), D3(1,0,0) + D3(1,1,0), D3(1/2,1/2,-1/2) + D3(1/2,1/2,1/2)] sage: [G2(w).branch(A2, rule="extended") for w in G2.fundamental_weights()] [A2(0,0,0) + A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3), A2(1/3,1/3,-2/3) + A2(2/3,-1/3,-1/3) + A2(1,0,-1)] sage: [F4(fw).branch(B4,rule="extended") for fw in F4.fundamental_weights()] # long time [B4(1/2,1/2,1/2,1/2) + B4(1,1,0,0), B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2) + B4(3/2,3/2,1/2,1/2) + B4(2,1,1,0), B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0) + B4(1,1,0,0) + B4(1,1,1,0) + B4(3/2,1/2,1/2,1/2), B4(0,0,0,0) + B4(1/2,1/2,1/2,1/2) + B4(1,0,0,0)] sage: E6 = WeylCharacterRing("E6", style="coroots") # long time sage: A2xA2xA2=WeylCharacterRing("A2xA2xA2",style="coroots") sage: A5xA1=WeylCharacterRing("A5xA1",style="coroots") sage: G2 = WeylCharacterRing("G2", style="coroots") sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: F4 = WeylCharacterRing("F4",style="coroots") sage: A3xA1 = WeylCharacterRing("A3xA1", style="coroots") sage: A2xA2 = WeylCharacterRing("A2xA2", style="coroots") sage: A1xC3 = WeylCharacterRing("A1xC3",style="coroots") sage: E6(1,0,0,0,0,0).branch(A5xA1,rule="extended") # long time A5xA1(0,0,0,1,0,0) + A5xA1(1,0,0,0,0,1) sage: E6(1,0,0,0,0,0).branch(A2xA2xA2, rule="extended") # long time A2xA2xA2(0,0,0,1,1,0) + A2xA2xA2(0,1,1,0,0,0) + A2xA2xA2(1,0,0,0,0,1) sage: E7=WeylCharacterRing("E7",style="coroots") # long time sage: A7=WeylCharacterRing("A7",style="coroots") # long time sage: E7(1,0,0,0,0,0,0).branch(A7,rule="extended") # long time A7(0,0,0,1,0,0,0) + A7(1,0,0,0,0,0,1) sage: E8=WeylCharacterRing("E8",cache=true,style="coroots") # long time sage: D8=WeylCharacterRing("D8",cache=true,style="coroots") # long time sage: E8(0,0,0,0,0,0,0,1).branch(D8,rule="extended") # long time D8(0,0,0,0,0,0,1,0) + D8(0,1,0,0,0,0,0,0) sage: F4(1,0,0,0).branch(A1xC3,rule="extended") # long time A1xC3(0,2,0,0) + A1xC3(1,0,0,1) + A1xC3(2,0,0,0) sage: G2(0,1).branch(A1xA1, rule="extended") A1xA1(0,2) + A1xA1(2,0) + A1xA1(3,1) sage: F4(0,0,0,1).branch(A2xA2, rule="extended") # long time A2xA2(0,0,1,1) + A2xA2(0,1,0,1) + A2xA2(1,0,1,0) sage: F4(0,0,0,1).branch(A3xA1,rule="extended") # long time A3xA1(0,0,0,0) + A3xA1(0,0,0,2) + A3xA1(0,0,1,1) + A3xA1(0,1,0,0) + A3xA1(1,0,0,1) sage: D4=WeylCharacterRing("D4",style="coroots") sage: D2xD2=WeylCharacterRing("D2xD2",style="coroots") # We get D4 => A1xA1xA1xA1 by remembering that A1xA1 = D2. sage: [D4(fw).branch(D2xD2, rule="extended") for fw in D4.fundamental_weights()] [D2xD2(0,0,1,1) + D2xD2(1,1,0,0), D2xD2(0,0,2,0) + D2xD2(0,0,0,2) + D2xD2(2,0,0,0) + D2xD2(1,1,1,1) + D2xD2(0,2,0,0), D2xD2(1,0,0,1) + D2xD2(0,1,1,0), D2xD2(1,0,1,0) + D2xD2(0,1,0,1)] EXAMPLES: (Tensor type) :: sage: A5=WeylCharacterRing("A5", style="coroots") sage: A2xA1=WeylCharacterRing("A2xA1", style="coroots") sage: [A5(hwv).branch(A2xA1, rule="tensor") for hwv in A5.fundamental_weights()] [A2xA1(1,0,1), A2xA1(0,1,2) + A2xA1(2,0,0), A2xA1(0,0,3) + A2xA1(1,1,1), A2xA1(1,0,2) + A2xA1(0,2,0), A2xA1(0,1,1)] sage: B4=WeylCharacterRing("B4",style="coroots") sage: B1xB1=WeylCharacterRing("B1xB1",style="coroots") sage: [B4(f).branch(B1xB1,rule="tensor") for f in B4.fundamental_weights()] [B1xB1(2,2), B1xB1(0,2) + B1xB1(2,0) + B1xB1(2,4) + B1xB1(4,2), B1xB1(0,2) + B1xB1(0,6) + B1xB1(2,0) + B1xB1(2,2) + B1xB1(2,4) + B1xB1(4,2) + B1xB1(4,4) + B1xB1(6,0), B1xB1(1,3) + B1xB1(3,1)] sage: D4=WeylCharacterRing("D4",style="coroots") sage: C2xC1=WeylCharacterRing("C2xC1",style="coroots") sage: [D4(f).branch(C2xC1,rule="tensor") for f in D4.fundamental_weights()] [C2xC1(1,0,1), C2xC1(0,0,2) + C2xC1(0,1,2) + C2xC1(2,0,0), C2xC1(1,0,1), C2xC1(0,0,2) + C2xC1(0,1,0)] sage: C3=WeylCharacterRing("C3",style="coroots") sage: B1xC1=WeylCharacterRing("B1xC1",style="coroots") sage: [C3(f).branch(B1xC1,rule="tensor") for f in C3.fundamental_weights()] [B1xC1(2,1), B1xC1(2,2) + B1xC1(4,0), B1xC1(0,3) + B1xC1(4,1)] EXAMPLES: (Symmetric Power) :: sage: A1=WeylCharacterRing("A1",style="coroots") sage: B3=WeylCharacterRing("B3",style="coroots") sage: C3=WeylCharacterRing("C3",style="coroots") sage: [B3(fw).branch(A1,rule="symmetric_power") for fw in B3.fundamental_weights()] [A1(6), A1(2) + A1(6) + A1(10), A1(0) + A1(6)] sage: [C3(fw).branch(A1,rule="symmetric_power") for fw in C3.fundamental_weights()] [A1(5), A1(4) + A1(8), A1(3) + A1(9)] EXAMPLES: (Miscellaneous type) :: sage: G2 = WeylCharacterRing("G2") sage: [fw1, fw2, fw3] = B3.fundamental_weights() sage: B3(fw1+fw3).branch(G2, rule="miscellaneous") G2(1,0,-1) + G2(2,-1,-1) + G2(2,0,-2) EXAMPLES: (Isomorphic type) :: sage: [B2(x).branch(C2, rule="isomorphic") for x in B2.fundamental_weights()] [C2(1,1), C2(1,0)] sage: [C2(x).branch(B2, rule="isomorphic") for x in C2.fundamental_weights()] [B2(1/2,1/2), B2(1,0)] sage: [A3(x).branch(D3,rule="isomorphic") for x in A3.fundamental_weights()] [D3(1/2,1/2,1/2), D3(1,0,0), D3(1/2,1/2,-1/2)] sage: [D3(x).branch(A3,rule="isomorphic") for x in D3.fundamental_weights()] [A3(1/2,1/2,-1/2,-1/2), A3(1/4,1/4,1/4,-3/4), A3(3/4,-1/4,-1/4,-1/4)] Here A3(x,y,z,w) can be understood as a representation of SL(4). The weights x,y,z,w and x+t,y+t,z+t,w+t represent the same representation of SL(4) - though not of GL(4) - since A3(x+t,y+t,z+t,w+t) is the same as A3(x,y,z,w) tensored with `det^t`. So as a representation of SL(4), A3(1/4,1/4,1/4,-3/4) is the same as A3(1,1,1,0). The exterior square representation SL(4) -> GL(6) admits an invariant symmetric bilinear form, so is a representation SL(4) -> SO(6) that lifts to an isomorphism SL(4) -> Spin(6). Conversely, there are two isomorphisms SO(6) -> SL(4), of which we've selected one. In cases like this you might prefer style="coroots". :: sage: A3 = WeylCharacterRing("A3",style="coroots") sage: D3 = WeylCharacterRing("D3",style="coroots") sage: [D3(fw) for fw in D3.fundamental_weights()] [D3(1,0,0), D3(0,1,0), D3(0,0,1)] sage: [D3(fw).branch(A3,rule="isomorphic") for fw in D3.fundamental_weights()] [A3(0,1,0), A3(0,0,1), A3(1,0,0)] sage: D2 = WeylCharacterRing("D2", style="coroots") sage: A1xA1 = WeylCharacterRing("A1xA1", style="coroots") sage: [D2(fw).branch(A1xA1,rule="isomorphic") for fw in D2.fundamental_weights()] [A1xA1(1,0), A1xA1(0,1)] EXAMPLES: (Branching rules from plethysms) This is a general rule that includes any branching rule from types A,B,C or D as a special case. Thus it could be used in place of the above rules and would give the same results. However it is most useful when branching from G to a maximal subgroup H such that rank(H) < rank(G)-1. We consider a homomorphism H --> G where G is one of SL(r+1), SO(2r+1), Sp(2r) or SO(2r). The function branching_rule_from_plethysm produces the corresponding branching rule. The main ingredient is the character chi of the representation of H that is the homomorphism to GL(r+1), GL(2r+1) or GL(2r). This rule is so powerful that it contains the other rules implemented above as special cases. First let us consider the symmetric fifth power representation of SL(2). :: sage: A1=WeylCharacterRing("A1",style="coroots") sage: chi=A1([5]) sage: chi.degree() 6 sage: chi.frobenius_schur_indicator() -1 This confirms that the character has degree 6 and is symplectic, so it corresponds to a homomorphism SL(2) --> Sp(6), and there is a corresponding branching rule C3 => A1. :: sage: C3 = WeylCharacterRing("C3",style="coroots") sage: sym5rule = branching_rule_from_plethysm(chi,"C3") sage: [C3(hwv).branch(A1,rule=sym5rule) for hwv in C3.fundamental_weights()] [A1(5), A1(4) + A1(8), A1(3) + A1(9)] This is identical to the results we would obtain using rule="symmetric_power". The next example gives a branching not available by other standard rules. :: sage: G2 = WeylCharacterRing("G2",style="coroots") sage: D7 = WeylCharacterRing("D7",style="coroots") sage: ad=G2(0,1); ad.degree(); ad.frobenius_schur_indicator() 14 1 sage: spin = D7(0,0,0,0,0,1,0); spin.degree() 64 sage: spin.branch(G2, rule=branching_rule_from_plethysm(ad, "D7")) G2(1,1) We have confirmed that the adjoint representation of G2 gives a homomorphism into SO(14), and that the pullback of the one of the two 64 dimensional spin representations to SO(14) is an irreducible representation of G2. BRANCHING FROM A REDUCIBLE ROOT SYSTEM If you are branching from a reducible root system, the rule is a list of rules, one for each component type in the root system. The rules in the list are given in pairs [type, rule], where type is the root system to be branched to, and rule is the branching rule. :: sage: D4 = WeylCharacterRing("D4",style="coroots") sage: D2xD2 = WeylCharacterRing("D2xD2",style="coroots") sage: A1xA1xA1xA1 = WeylCharacterRing("A1xA1xA1xA1",style="coroots") sage: rr = [["A1xA1","isomorphic"],["A1xA1","isomorphic"]] sage: [D4(fw) for fw in D4.fundamental_weights()] [D4(1,0,0,0), D4(0,1,0,0), D4(0,0,1,0), D4(0,0,0,1)] sage: [D4(fw).branch(D2xD2,rule="extended").branch(A1xA1xA1xA1,rule=rr) for fw in D4.fundamental_weights()] [A1xA1xA1xA1(0,0,1,1) + A1xA1xA1xA1(1,1,0,0), A1xA1xA1xA1(0,0,0,2) + A1xA1xA1xA1(0,0,2,0) + A1xA1xA1xA1(0,2,0,0) + A1xA1xA1xA1(1,1,1,1) + A1xA1xA1xA1(2,0,0,0), A1xA1xA1xA1(0,1,1,0) + A1xA1xA1xA1(1,0,0,1), A1xA1xA1xA1(0,1,0,1) + A1xA1xA1xA1(1,0,1,0)] WRITING YOUR OWN RULES Suppose you want to branch from a group G to a subgroup H. Arrange the embedding so that a Cartan subalgebra U of H is contained in a Cartan subalgebra T of G. There is thus a mapping from the weight spaces Lie(T)* --> Lie(U)*. Two embeddings will produce identical branching rules if they differ by an element of the Weyl group of H. The RULE is this map Lie(T)* = G.space() to Lie(U)* = H.space(), which you may implement as a function. As an example, let us consider how to implement the branching rule A3 => C2. Here H = C2 = Sp(4) embedded as a subgroup in A3 = GL(4). The Cartan subalgebra U consists of diagonal matrices with eigenvalues u1, u2, -u2, -u1. The C2.space() is the two dimensional vector spaces consisting of the linear functionals u1 and u2 on U. On the other hand Lie(T) is RR^4. A convenient way to see the restriction is to think of it as the adjoint of the map [u1,u2] -> [u1,u2,-u2,-u1], that is, [x0,x1,x2,x3] -> [x0-x3,x1-x2]. Hence we may encode the rule: :: def rule(x): return [x[0]-x[3],x[1]-x[2]] or simply: :: rule = lambda x : [x[0]-x[3],x[1]-x[2]] EXAMPLES:: sage: A3 = WeylCharacterRing(['A',3]) sage: C2 = WeylCharacterRing(['C',2]) sage: rule = lambda x : [x[0]-x[3],x[1]-x[2]] sage: branch_weyl_character(A3([1,1,0,0]),A3,C2,rule) C2(0,0) + C2(1,1) sage: A3(1,1,0,0).branch(C2, rule) == C2(0,0) + C2(1,1) True """ if type(rule) == str: rule = get_branching_rule(R._cartan_type, S._cartan_type, rule) elif R._cartan_type.is_compound(): Rtypes = R._cartan_type.component_types() Stypes = [CartanType(l[0]) for l in rule] rules = [l[1] for l in rule] ntypes = len(Rtypes) rule_list = [get_branching_rule(Rtypes[i], Stypes[i], rules[i]) for i in range(ntypes)] shifts = R._cartan_type._shifts def rule(x): yl = [] for i in range(ntypes): yl.append(rule_list[i](x[shifts[i]:shifts[i+1]])) return flatten(yl) mdict = {} for k in chi._mdict: if S._style == "coroots": if S._cartan_type.is_atomic() and S._cartan_type[0] == 'E': if S._cartan_type[1] == 6: h = S._space(rule(list(k.to_vector()))) h = S.coerce_to_e6(h) elif S._cartan_type[1] == 7: h = S.coerce_to_e7(S._space(rule(list(k.to_vector())))) else: h = S.coerce_to_sl(S._space(rule(list(k.to_vector())))) else: h = S._space(rule(list(k.to_vector()))) if h in mdict: mdict[h] += chi._mdict[k] else: mdict[h] = chi._mdict[k] hdict = S.char_from_weights(mdict) return WeylCharacter(S, hdict, mdict)
18e17f56d0c583cdb129ede5947113fbc43df9f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/18e17f56d0c583cdb129ede5947113fbc43df9f1/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 436, 8395, 432, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 436, 8395, 432, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041,...
if set([codon[2] for codon in codons]).issuperset(set(meanings))]
if set([codon[2] for codon in codons]).issuperset(set(meanings)))
def list_ambiguous_codons(codons, ambiguous_nucleotide_values): """Extends a codon list to include all possible ambigous codons. e.g. ['TAG', 'TAA'] -> ['TAG', 'TAA', 'TAR'] ['UAG', 'UGA'] -> ['UAG', 'UGA', 'URA'] Note that ['TAG', 'TGA'] -> ['TAG', 'TGA'], this does not add 'TRR'. Thus only two more codons are added in the following: e.g. ['TGA', 'TAA', 'TAG'] -> ['TGA', 'TAA', 'TAG', 'TRA', 'TAR'] Returns a new (longer) list of codon strings. """ #Note ambiguous_nucleotide_values['R'] = 'AG' (etc) #This will generate things like 'TRR' from ['TAG', 'TGA'], which #we don't want to include: c1_list = [letter for (letter, meanings) \ in ambiguous_nucleotide_values.iteritems() \ if set([codon[0] for codon in codons]).issuperset(set(meanings))] c2_list = [letter for (letter, meanings) \ in ambiguous_nucleotide_values.iteritems() \ if set([codon[1] for codon in codons]).issuperset(set(meanings))] c3_list = [letter for (letter, meanings) \ in ambiguous_nucleotide_values.iteritems() \ if set([codon[2] for codon in codons]).issuperset(set(meanings))] #candidates is a list (not a set) to preserve the iteration order candidates = [] for c1 in c1_list : for c2 in c2_list : for c3 in c3_list : codon = c1+c2+c3 if codon not in candidates and codon not in codons : candidates.append(codon) answer = codons[:] #copy #print "Have %i new candidates" % len(candidates) for ambig_codon in candidates : wanted = True #e.g. 'TRR' -> 'TAA', 'TAG', 'TGA', 'TGG' for codon in [c1+c2+c3 \ for c1 in ambiguous_nucleotide_values[ambig_codon[0]] \ for c2 in ambiguous_nucleotide_values[ambig_codon[1]] \ for c3 in ambiguous_nucleotide_values[ambig_codon[2]]]: if codon not in codons : #This ambiguous codon can code for a non-stop, exclude it! wanted=False #print "Rejecting %s" % ambig_codon continue if wanted : answer.append(ambig_codon) return answer
ff565fe076cab638a28a188d593f19bafdbc1827 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/ff565fe076cab638a28a188d593f19bafdbc1827/CodonTable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2536, 10623, 67, 1559, 7008, 12, 1559, 7008, 16, 20399, 67, 13053, 23165, 67, 2372, 4672, 3536, 19581, 279, 25349, 666, 358, 2341, 777, 3323, 13232, 360, 1481, 11012, 7008, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2536, 10623, 67, 1559, 7008, 12, 1559, 7008, 16, 20399, 67, 13053, 23165, 67, 2372, 4672, 3536, 19581, 279, 25349, 666, 358, 2341, 777, 3323, 13232, 360, 1481, 11012, 7008, 18, ...
def CleanAllFunc(ModuleFile, PlatformFile, ewb, Target, ToolChain, Arch):
def OtherFunc(ModuleFile, PlatformFile, ewb, Target, ToolChain, Arch, t):
def CleanAllFunc(ModuleFile, PlatformFile, ewb, Target, ToolChain, Arch): for d in ewb.DscDatabase[PlatformFile].Defines.DefinesDictionary['OUTPUT_DIRECTORY']: if ModuleFile == None: DestDir = os.environ["WORKSPACE"] + '\\' + d.replace('/','\\') + '\\' + Target + '_' + ToolChain else: (filename, ext) = os.path.splitext(os.environ["WORKSPACE"] + '\\' + d.replace('/','\\') + '\\' + Target + '_' + ToolChain + '\\' + Arch + '\\' + ModuleFile) DestDir = filename FileList = glob.glob(DestDir + '\\makefile') FileNum = len(FileList) if FileNum > 0: SameTypeFileInDir(FileNum, 'makefile', DestDir, StartTime) p = Popen(["nmake", "/nologo", "-f", FileList[0], 'cleanall'], env=os.environ, cwd=os.path.dirname(FileList[0])) p.communicate() if p.returncode != None: return p.returncode else: return 1
f6fa8f13c92899402ca363e2f27f994ff988148c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/f6fa8f13c92899402ca363e2f27f994ff988148c/Bld.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4673, 2622, 12, 3120, 812, 16, 11810, 812, 16, 22722, 70, 16, 5916, 16, 13288, 3893, 16, 16959, 16, 268, 4672, 364, 302, 316, 22722, 70, 18, 40, 1017, 4254, 63, 8201, 812, 8009, 15109,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4673, 2622, 12, 3120, 812, 16, 11810, 812, 16, 22722, 70, 16, 5916, 16, 13288, 3893, 16, 16959, 16, 268, 4672, 364, 302, 316, 22722, 70, 18, 40, 1017, 4254, 63, 8201, 812, 8009, 15109,...
yield ('rss', _('RSS Feed'), 'xml',
yield ('rss', _("RSS Feed"), 'xml',
def get_supported_conversions(self): yield ('csv', _('Comma-delimited Text'), 'csv', 'trac.ticket.Ticket', 'text/csv', 8) yield ('tab', _('Tab-delimited Text'), 'tsv', 'trac.ticket.Ticket', 'text/tab-separated-values', 8) yield ('rss', _('RSS Feed'), 'xml', 'trac.ticket.Ticket', 'application/rss+xml', 8)
a8a6442302dc21bfc63206a71113b0375cb3c946 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/a8a6442302dc21bfc63206a71113b0375cb3c946/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4127, 67, 591, 10169, 12, 2890, 4672, 2824, 7707, 6715, 2187, 389, 2668, 15594, 17, 3771, 1038, 329, 3867, 19899, 296, 6715, 2187, 296, 313, 1077, 18, 16282, 18, 13614, 2187, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4127, 67, 591, 10169, 12, 2890, 4672, 2824, 7707, 6715, 2187, 389, 2668, 15594, 17, 3771, 1038, 329, 3867, 19899, 296, 6715, 2187, 296, 313, 1077, 18, 16282, 18, 13614, 2187, 29...
"""Called by QtGL when the drawing window is resized.
""" Called by QtGL when the drawing window is resized.
def resizeGL(self, width, height): """Called by QtGL when the drawing window is resized. """ self.width = width self.height = height glViewport(0, 0, self.width, self.height) self.trackball.rescale(width, height) if not self.initialised: self.initialised = True
7828cbef13f84d50298938f6ae339289db2ec006 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/7828cbef13f84d50298938f6ae339289db2ec006/ThumbView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7041, 11261, 12, 2890, 16, 1835, 16, 2072, 4672, 3536, 11782, 635, 7354, 11261, 1347, 326, 16327, 2742, 353, 21615, 18, 3536, 365, 18, 2819, 273, 1835, 365, 18, 4210, 273, 2072, 225, 511...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7041, 11261, 12, 2890, 16, 1835, 16, 2072, 4672, 3536, 11782, 635, 7354, 11261, 1347, 326, 16327, 2742, 353, 21615, 18, 3536, 365, 18, 2819, 273, 1835, 365, 18, 4210, 273, 2072, 225, 511...
toggle_button.connect("toggled", self.on_button_toggled, field)
def create_widgets(self): Group.create_widgets(self) self.container = gtk.Table(1, 3) self.container.set_row_spacings(6) self.container.set_col_spacings(6) self.container.set_border_width(self.table_border_width) last_row = 0 first_edit = 0 if self.label is not None: self.container.resize(1, self.container.get_property("n-columns")+1) self.container.attach(self.label, 0, 3, 0, 1, xoptions=gtk.FILL, yoptions=0) first_edit += 1 last_row += 1 if self.buttons != NO_BUTTONS: self.container.resize(1, self.container.get_property("n-columns")+1) first_edit += 1 first_radio_button = None for field in self.fields: if field.get_active(): self.container.resize(last_row + 1, 3) container_left = first_edit container_right = first_edit + 3 if not field.self_containing: if field.label is not None: self.container.attach(field.label, first_edit, first_edit+1, last_row, last_row+1, xoptions=gtk.FILL, yoptions=0) container_left += 1 if isinstance(field, EditMixin) and field.bu_popup is not None: container_right -= 1 self.container.attach(field.bu_popup, first_edit+2, first_edit+3, last_row, last_row+1, xoptions=0, yoptions=0) self.container.attach(field.container, container_left, container_right, last_row, last_row+1, xoptions=field.xoptions, yoptions=field.yoptions) if self.buttons == CHECK_BUTTONS: toggle_button = gtk.CheckButton() elif self.buttons == RADIO_BUTTONS: if first_radio_button is None: toggle_button = gtk.RadioButton() first_radio_button = toggle_button else: toggle_button = gtk.RadioButton(first_radio_button) #toggle_button.remove(toggle_button.get_child()) toggle_button.set_alignment(1.0, 0.0) self.container.attach(toggle_button, first_edit-1, first_edit, last_row, last_row+1, xoptions=gtk.FILL, yoptions=gtk.FILL) toggle_button.connect("toggled", self.on_button_toggled, field) field.old_representation = ambiguous field.sensitive_button = toggle_button last_row += 1 if self.label is not None: da = gtk.DrawingArea() da.set_size_request(10, 0) self.container.attach(da, 0, 1, 1, last_row+1, xoptions=0)
d9bfd211cda8d202f054a5b43cdb7bfbd44948de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11052/d9bfd211cda8d202f054a5b43cdb7bfbd44948de/group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 18148, 12, 2890, 4672, 3756, 18, 2640, 67, 18148, 12, 2890, 13, 365, 18, 3782, 273, 22718, 18, 1388, 12, 21, 16, 890, 13, 365, 18, 3782, 18, 542, 67, 492, 67, 1752, 1077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 18148, 12, 2890, 4672, 3756, 18, 2640, 67, 18148, 12, 2890, 13, 365, 18, 3782, 273, 22718, 18, 1388, 12, 21, 16, 890, 13, 365, 18, 3782, 18, 542, 67, 492, 67, 1752, 1077, ...
self.tree.openElements.pop() self.tree.clearActiveFormattingElements() self.parser.phase = self.parser.phases["inTable"] else: assert self.parser.innerHTML
self.tree.clearActiveFormattingElements() self.parser.phase = self.parser.phases["inTable"] else: assert self.parser.innerHTML self.parser.parseError() def endTagTable(self, token):
def endTagCaption(self, token): if not self.ignoreEndTagCaption(): # AT this code is quite similar to endTagTable in "InTable" self.tree.generateImpliedEndTags() if self.tree.openElements[-1].name != "caption": self.parser.parseError("expected-one-end-tag-but-got-another", {"gotName": "caption", "expectedName": self.tree.openElements[-1].name}) while self.tree.openElements[-1].name != "caption": self.tree.openElements.pop() self.tree.openElements.pop() self.tree.clearActiveFormattingElements() self.parser.phase = self.parser.phases["inTable"] else: # innerHTML case assert self.parser.innerHTML self.parser.parseError()
5cc56a5db432ce478d90ee0dd744811935854947 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10463/5cc56a5db432ce478d90ee0dd744811935854947/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 21158, 12, 2890, 16, 1147, 4672, 309, 486, 365, 18, 6185, 25633, 21158, 13332, 468, 14464, 333, 981, 353, 25102, 7281, 358, 29765, 1388, 316, 315, 382, 1388, 6, 365, 18, 3413, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 21158, 12, 2890, 16, 1147, 4672, 309, 486, 365, 18, 6185, 25633, 21158, 13332, 468, 14464, 333, 981, 353, 25102, 7281, 358, 29765, 1388, 316, 315, 382, 1388, 6, 365, 18, 3413, 18,...
order, context=context)
order, context=context, count=count)
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None): if context is None: context = {}
5b43b63c4d4a41c2bb96c6c48ca4030d5899e7e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/5b43b63c4d4a41c2bb96c6c48ca4030d5899e7e3/account_analytic_line.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 4555, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 2, -100, -10...
..........
----------
def sobel_edges(sobel_edge_image, sobel_stats, mode=1, sobel_threshold=0.3): """ sobel_edge = sobel_edges(sobel_edge_image, sobel_stats, mode=1, sobel_threshold=0.3) take sobel-filtered image and return binary edges Parameters .......... sobel_edge_image : {nd_array} edge-filtered image from sobel_image() method sobel_stats : {dictionary} mean and nonzero min, max of sobel filtering mode : {0, 1}, optional threshold based on histogram mean(0) or mode(1) sobel_threshold : {float}, optional low threshold applied to edge filtered image for edge generation Returns .......... sobel_edge : {nd_array} binary edge-image """ [rows, cols] = sobel_edge_image.shape sobel_edge = NP.zeros(rows*cols, dtype=NP.uint16).reshape(rows, cols) S.sobel_edges(sobel_edge_image, sobel_edge, sobel_stats['ave_gt0'], sobel_stats['min_gt0'], sobel_stats['max_gt0'], mode, sobel_threshold) return sobel_edge
2e15b86a5b91fd399ef0d981713b1fbce76051f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/2e15b86a5b91fd399ef0d981713b1fbce76051f1/_segmenter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 947, 292, 67, 8746, 12, 87, 947, 292, 67, 7126, 67, 2730, 16, 272, 947, 292, 67, 5296, 16, 1965, 33, 21, 16, 272, 947, 292, 67, 8699, 33, 20, 18, 23, 4672, 3536, 272, 947, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 947, 292, 67, 8746, 12, 87, 947, 292, 67, 7126, 67, 2730, 16, 272, 947, 292, 67, 5296, 16, 1965, 33, 21, 16, 272, 947, 292, 67, 8699, 33, 20, 18, 23, 4672, 3536, 272, 947, 2...
self.ui.scrollAreaContent.layout().insertWidget(i, button)
self.ui.scrollAreaContent.layout().insertWidget(pos, button)
def _insert_load_button(self, pos): button = QPushButton(self.tr('More messages...')) self.connect(button, SIGNAL('clicked()'), lambda: self._load_button_pressed(button)) if pos >= 0: self.ui.scrollAreaContent.layout().insertWidget(i, button) else: self.ui.scrollAreaContent.layout().addWidget(button)
b9f759849b0e8de23d29a3c93d88217fc2ab9d8f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/b9f759849b0e8de23d29a3c93d88217fc2ab9d8f/contacts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 67, 945, 67, 5391, 12, 2890, 16, 949, 4672, 3568, 273, 2238, 7621, 3616, 12, 2890, 18, 313, 2668, 7417, 2743, 7821, 3719, 365, 18, 3612, 12, 5391, 16, 12057, 1013, 2668, 747...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6387, 67, 945, 67, 5391, 12, 2890, 16, 949, 4672, 3568, 273, 2238, 7621, 3616, 12, 2890, 18, 313, 2668, 7417, 2743, 7821, 3719, 365, 18, 3612, 12, 5391, 16, 12057, 1013, 2668, 747...
if self.auto_store_token:
if self.auto_store_tokens:
def SetAuthSubToken(self, token, scopes=None): """Sets the token sent in requests to an AuthSub token.
f61d1fd297f5544155c3c4b383b98acd9810d57f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6580/f61d1fd297f5544155c3c4b383b98acd9810d57f/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1730, 1676, 1345, 12, 2890, 16, 1147, 16, 8124, 33, 7036, 4672, 3536, 2785, 326, 1147, 3271, 316, 3285, 358, 392, 3123, 1676, 1147, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1730, 1676, 1345, 12, 2890, 16, 1147, 16, 8124, 33, 7036, 4672, 3536, 2785, 326, 1147, 3271, 316, 3285, 358, 392, 3123, 1676, 1147, 18, 2, -100, -100, -100, -100, -100, -100, -100,...
try: (num_of_bugs, header, self.bugs_list) = debianbts.get_reports(PackageName) except socket.timeout: return False
try: (num_of_bugs, header, self.bugs_list) = debianbts.get_reports(PackageName) except socket.timeout: return False
def FetchBugsDebian(self, PackageName, Filename=None): if Filename != None: try: file_handle = open(Filename, 'a') except IOError: sys.exit(1)
c43abb841433e2df9a861d16d24ed8d706c68c7d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12499/c43abb841433e2df9a861d16d24ed8d706c68c7d/pypt_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 31559, 758, 70, 2779, 12, 2890, 16, 7508, 461, 16, 16671, 33, 7036, 4672, 225, 309, 16671, 480, 599, 30, 775, 30, 585, 67, 4110, 273, 1696, 12, 5359, 16, 296, 69, 6134, 1335, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 31559, 758, 70, 2779, 12, 2890, 16, 7508, 461, 16, 16671, 33, 7036, 4672, 225, 309, 16671, 480, 599, 30, 775, 30, 585, 67, 4110, 273, 1696, 12, 5359, 16, 296, 69, 6134, 1335, 8...
print ' '*level, sym_name[ast[0]]
print ' '*level, sym_name[ast[0]], '(%s)' % ast[0]
def pret(ast, level=0): if ISTERMINAL(ast[0]): print ' '*level, ast[1] else: print ' '*level, sym_name[ast[0]] for a in ast[1:]: pret(a,level+1)
3be8ce4ebc596294c6a10003f033bf946c199ebb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/3be8ce4ebc596294c6a10003f033bf946c199ebb/gparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 88, 12, 689, 16, 1801, 33, 20, 4672, 309, 467, 22857, 6236, 1013, 12, 689, 63, 20, 65, 4672, 1172, 296, 225, 14609, 2815, 16, 3364, 63, 21, 65, 469, 30, 1172, 296, 225, 14609, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 88, 12, 689, 16, 1801, 33, 20, 4672, 309, 467, 22857, 6236, 1013, 12, 689, 63, 20, 65, 4672, 1172, 296, 225, 14609, 2815, 16, 3364, 63, 21, 65, 469, 30, 1172, 296, 225, 14609, ...
from esp.program.templatetags.class_render import cache_key_func, core_cache_key_func cache.delete(cache_key_func(self)) cache.delete(core_cache_key_func(self))
def update_cache(self): from esp.program.templatetags.class_render import cache_key_func, core_cache_key_func cache.delete(cache_key_func(self)) cache.delete(core_cache_key_func(self)) from esp.program.templatetags.class_manage_row import cache_key as class_manage_row_cache_key cache.delete(class_manage_row_cache_key(self, None)) # this cache_key doesn't actually care about the program, as classes can only be associated with one program. If we ever change this, update this function call.
e65266491ed8f776b8426469391fe561974a439b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12041/e65266491ed8f776b8426469391fe561974a439b/class_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2493, 12, 2890, 4672, 628, 5001, 84, 18, 12890, 18, 27380, 270, 278, 1341, 18, 1106, 67, 12633, 67, 492, 1930, 1247, 67, 856, 487, 667, 67, 12633, 67, 492, 67, 2493, 67, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2493, 12, 2890, 4672, 628, 5001, 84, 18, 12890, 18, 27380, 270, 278, 1341, 18, 1106, 67, 12633, 67, 492, 1930, 1247, 67, 856, 487, 667, 67, 12633, 67, 492, 67, 2493, 67, 85...
raise DataError("Data source '%s' does not exist." % path)
raise DataError("Data source does not exist.")
def _open(self, path): if not os.path.isfile(path): raise DataError("Data source '%s' does not exist." % path) try: return open(path, 'rb') except: raise DataError(utils.get_error_message())
a2674d7547fb371d4318f8d5ed9f29e47a39e30e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/a2674d7547fb371d4318f8d5ed9f29e47a39e30e/datareader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3190, 12, 2890, 16, 589, 4672, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 803, 4672, 1002, 1910, 668, 2932, 751, 1084, 1552, 486, 1005, 1199, 13, 775, 30, 327, 1696, 12, 803, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3190, 12, 2890, 16, 589, 4672, 309, 486, 1140, 18, 803, 18, 291, 768, 12, 803, 4672, 1002, 1910, 668, 2932, 751, 1084, 1552, 486, 1005, 1199, 13, 775, 30, 327, 1696, 12, 803, 16...
(r'<<([a-zA-Z_][a-zA-Z0-9_]*)\n.*?\n\1\n', String),
(r'<<([a-zA-Z_][a-zA-Z0-9_]*);?\n.*?\n\1\n', String),
def get_tokens_unprocessed(self, text): rblexer = RubyLexer(**self.options)
b2edaf8104893a9b2a9e5f3eeb1880ee074f6e2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2885/b2edaf8104893a9b2a9e5f3eeb1880ee074f6e2a/agile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7860, 67, 318, 11005, 12, 2890, 16, 977, 4672, 7138, 31731, 273, 19817, 13356, 12, 636, 2890, 18, 2116, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7860, 67, 318, 11005, 12, 2890, 16, 977, 4672, 7138, 31731, 273, 19817, 13356, 12, 636, 2890, 18, 2116, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
of Jove, from whatsoever source you may know them.
of Jove, from whatsoever source you<super>1</super> may know them.
def parse(self, text, style): """Given a formatted string will return a list of ParaFrag objects with their calculated widths. If errors occur None will be returned and the self.errors holds a list of the error messages. """
fb31c922497891b8ad98204ce2fce8be3ea66367 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/fb31c922497891b8ad98204ce2fce8be3ea66367/paraparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 2154, 4672, 3536, 6083, 279, 4955, 533, 903, 327, 279, 666, 434, 2280, 69, 19509, 2184, 598, 3675, 8894, 15801, 18, 971, 1334, 3334, 599, 903, 506, 2106, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 2154, 4672, 3536, 6083, 279, 4955, 533, 903, 327, 279, 666, 434, 2280, 69, 19509, 2184, 598, 3675, 8894, 15801, 18, 971, 1334, 3334, 599, 903, 506, 2106, 4...
print 'Future:', (dum1, dum2, dum3)
print 'Future:', dummy
def prstatus(player): state, track, min, sec, frame, abs_min, abs_sec, abs_frame, \ total_min, total_sec, total_frame, first, last, scsi_audio, \ cur_block, dum1, dum2, dum3 = player.getstatus() print 'Status:', if 0 <= state < len(statedict): print statedict[state] else: print state print 'Track: ', track print 'Time: ', triple(min, sec, frame) print 'Abs: ', triple(abs_min, abs_sec, abs_frame) print 'Total: ', triple(total_min, total_sec, total_frame) print 'First: ', first print 'Last: ', last print 'SCSI: ', scsi_audio print 'Block: ', cur_block print 'Future:', (dum1, dum2, dum3)
c0043be8082881ee61e725accffc2d7f40d1d9b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c0043be8082881ee61e725accffc2d7f40d1d9b5/sendcd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 2327, 12, 14872, 4672, 919, 16, 3298, 16, 1131, 16, 1428, 16, 2623, 16, 2417, 67, 1154, 16, 2417, 67, 3321, 16, 2417, 67, 3789, 16, 521, 2078, 67, 1154, 16, 2078, 67, 3321, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 2327, 12, 14872, 4672, 919, 16, 3298, 16, 1131, 16, 1428, 16, 2623, 16, 2417, 67, 1154, 16, 2417, 67, 3321, 16, 2417, 67, 3789, 16, 521, 2078, 67, 1154, 16, 2078, 67, 3321, 16, ...
<argument> argument being passed to function (NOT ACTIVE)
<argument> argument being passed to function (NOT ACTIVE)
def fl_set_object_callback(obj, py_callback, argument): """ fl_set_object_callback(obj, py_callback, argument) -> c_callback func. Calls a callback function bound to an object, if a condition is met. <obj> an object reference (form, button, etc..) <py_callback> a python function to use as callback <argument> argument being passed to function (NOT ACTIVE) """ c_callback = FL_CALLBACKPTR(py_callback) _cfunc_refs[get_rand_dictkey()] = c_callback retval = _fl_set_object_callback(obj, c_callback, argument) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1612, 67, 3394, 12, 2603, 16, 2395, 67, 3394, 16, 1237, 4672, 3536, 1183, 67, 542, 67, 1612, 67, 3394, 12, 2603, 16, 2395, 67, 3394, 16, 1237, 13, 317, 276, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 1612, 67, 3394, 12, 2603, 16, 2395, 67, 3394, 16, 1237, 4672, 3536, 1183, 67, 542, 67, 1612, 67, 3394, 12, 2603, 16, 2395, 67, 3394, 16, 1237, 13, 317, 276, 67, ...
self.widget.see(self.startindex) x, y, cx, cy = self.widget.bbox(self.startindex) acw.wm_geometry("+%d+%d" % (x + self.widget.winfo_rootx(), y + self.widget.winfo_rooty() \ -acw.winfo_height()))
acw_width, acw_height = acw.winfo_width(), acw.winfo_height() text_width, text_height = text.winfo_width(), text.winfo_height() new_x = text.winfo_rootx() + min(x, max(0, text_width - acw_width)) new_y = text.winfo_rooty() + y if (text_height - (y + cy) >= acw_height or y < acw_height): new_y += cy else: new_y -= acw_height acw.wm_geometry("+%d+%d" % (new_x, new_y))
def winconfig_event(self, event): if not self.is_active(): return # Position the completion list window acw = self.autocompletewindow self.widget.see(self.startindex) x, y, cx, cy = self.widget.bbox(self.startindex) acw.wm_geometry("+%d+%d" % (x + self.widget.winfo_rootx(), y + self.widget.winfo_rooty() \ -acw.winfo_height()))
628eeb4f14f1c51bef5c05ee253320c0aa8f9b8c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/628eeb4f14f1c51bef5c05ee253320c0aa8f9b8c/AutoCompleteWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5657, 1425, 67, 2575, 12, 2890, 16, 871, 4672, 309, 486, 365, 18, 291, 67, 3535, 13332, 327, 468, 11010, 326, 8364, 666, 2742, 1721, 91, 273, 365, 18, 5854, 9970, 1469, 359, 1700, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5657, 1425, 67, 2575, 12, 2890, 16, 871, 4672, 309, 486, 365, 18, 291, 67, 3535, 13332, 327, 468, 11010, 326, 8364, 666, 2742, 1721, 91, 273, 365, 18, 5854, 9970, 1469, 359, 1700, 365,...
log( "Producing the reports..." )
log( 'Producing the reports...' )
def make_result_pages( test_results_file , expected_results_file , failures_markup_file , source , run_date , comment_file , results_dir , result_prefix , xslt_proc_name , reports ): log( "Producing the reports..." ) __log__ = 1 output_dir = os.path.join( results_dir, result_prefix ) if not os.path.exists( output_dir ): os.makedirs( output_dir ) xslt_proc = registered_xsltprocs[ xslt_proc_name ] if comment_file != "": comment_file = os.path.abspath( comment_file ) if expected_results_file != "": expected_results_file = os.path.abspath( expected_results_file ) else: expected_results_file = os.path.abspath( map_path( "empty_expected_results.xml" ) ) extended_test_results = os.path.join( output_dir, "extended_test_results.xml" ) if "x" in reports: log( " Merging with expected results..." ) xslt_proc( test_results_file , xsl_path( "add_expected_results.xsl" ) , extended_test_results , { "expected_results_file": expected_results_file, "failures_markup_file" : failures_markup_file } ) links = os.path.join( output_dir, "links.html" ) test_output_dir = os.path.join( output_dir, "output" ) if not os.path.exists( test_output_dir ): os.makedirs( test_output_dir ) if "l" in reports: log( " Making test output files..." ) xslt_proc( extended_test_results , xsl_path( "links_page.xsl" ) , links , { "source": source , "run_date": run_date , "comment_file": comment_file , "explicit_markup_file" : failures_markup_file } ) issues = os.path.join( output_dir, "issues.html" ) if "i" in reports: log( " Making issues list..." ) xslt_proc( extended_test_results , xsl_path( "issues_page.xsl" ) , issues , { "source": source , "run_date": run_date , "comment_file": comment_file , "explicit_markup_file" : failures_markup_file } ) for mode in ( "developer", "user" ): if mode[0] + "d" in reports: log( " Making detailed %s report..." % mode ) xslt_proc( extended_test_results , xsl_path( "result_page.xsl" ) , os.path.join( output_dir, "%s_%s" % ( mode, "result_page.html" ) ) , { "links_file": "links.html" , "mode": mode , "source": source , "run_date": run_date , "comment_file": comment_file , "expected_results_file": expected_results_file , "explicit_markup_file" : failures_markup_file } ); for mode in ( "developer", "user" ): if mode[0] + "s" in reports: log( " Making summary %s report..." % mode ) xslt_proc( extended_test_results , xsl_path( "summary_page.xsl" ) , os.path.join( output_dir, "%s_%s" % ( mode, "summary_page.html" ) ) , { "mode" : mode , "source": source , "run_date": run_date , "comment_file": comment_file , "explicit_markup_file" : failures_markup_file } ); if "e" in reports: log( " Generating expected_results ..." ) xslt_proc( extended_test_results , xsl_path( "produce_expected_results.xsl" ) , os.path.join( output_dir, "expected_results.xml" ) ) shutil.copyfile( xsl_path( "master.css" ), os.path.join( output_dir, "master.css" ) )
032bc19415907e1c169b60349b3cd5a706b5789e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/032bc19415907e1c169b60349b3cd5a706b5789e/report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2088, 67, 7267, 12, 1842, 67, 4717, 67, 768, 269, 2665, 67, 4717, 67, 768, 269, 11720, 67, 15056, 67, 768, 269, 1084, 269, 1086, 67, 712, 269, 2879, 67, 768, 269, 1686, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 2088, 67, 7267, 12, 1842, 67, 4717, 67, 768, 269, 2665, 67, 4717, 67, 768, 269, 11720, 67, 15056, 67, 768, 269, 1084, 269, 1086, 67, 712, 269, 2879, 67, 768, 269, 1686, 67,...
global number_sites, number_keys, number_persons, number_nodes, number_slices
global number_keys, number_sites, number_persons, number_nodes, number_slices
def huge(): global number_sites, number_keys, number_persons, number_nodes, number_slices normal() (number_sites,number_keys,number_persons,number_nodes,number_slices) = [ huge_factor * x for x in (number_sites,number_keys,number_persons,number_nodes,number_slices)]
e12b56d5b3d0bf32ad1d930f36276184dea09d45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/e12b56d5b3d0bf32ad1d930f36276184dea09d45/TestPeers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 21627, 13332, 2552, 1300, 67, 2452, 16, 1300, 67, 12180, 16, 1300, 67, 12479, 87, 16, 1300, 67, 4690, 16, 1300, 67, 21562, 2212, 1435, 261, 2696, 67, 12180, 16, 2696, 67, 2452, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 21627, 13332, 2552, 1300, 67, 2452, 16, 1300, 67, 12180, 16, 1300, 67, 12479, 87, 16, 1300, 67, 4690, 16, 1300, 67, 21562, 2212, 1435, 261, 2696, 67, 12180, 16, 2696, 67, 2452, 16...
return l
return sz - 1
def decr(self, table): if not (table in self.__tables): raise omero.ApiUsageException(None, None, "Unknown table") self.__tables.remove(table) l = len(self.__tables) if l == 0: self.cleanup() return l
ddbb1453bea3c9ad0980e1b34265999c32dbed30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/ddbb1453bea3c9ad0980e1b34265999c32dbed30/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2109, 86, 12, 2890, 16, 1014, 4672, 309, 486, 261, 2121, 316, 365, 16186, 9373, 4672, 1002, 8068, 2439, 18, 3064, 5357, 503, 12, 7036, 16, 599, 16, 315, 4874, 1014, 7923, 365, 16186, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2109, 86, 12, 2890, 16, 1014, 4672, 309, 486, 261, 2121, 316, 365, 16186, 9373, 4672, 1002, 8068, 2439, 18, 3064, 5357, 503, 12, 7036, 16, 599, 16, 315, 4874, 1014, 7923, 365, 16186, 9...
print 'validando PROCESAMIENTO:'
def procesar_producto(self, cr, uid, ids, prod_id, Dict, loc_ids, inter_loc_ids, prod_loc_ids, pending=False): ''' Concepto de prueba de Humberto Arocha para procesamiento recursivo de de stock card line ''' rpp_obj = self.pool.get('report.profit.picking') sc_line_obj = self.pool.get('stock.card.line') product = Dict[prod_id] sml_x_pd_id = product['sml'] no_cump = product['no_cump'] total = product['total'] avg = product['avg'] qda = product['qda'] cont = product['cont'] seq = product['seq'] def_code = self.pool.get('product.product').browse(cr,uid,prod_id).default_code.strip() if pending: print '@'*10 print 'procesando: ',self.pool.get('product.product').browse(cr,uid,prod_id).name #~ time.sleep(10) while sml_x_pd_id: sml_id = sml_x_pd_id.pop(0) value={} if not cont: cont = True q = 0.0 subtotal = 0.0 qda = 0.0 #se debe buscar el costo inicial cr.execute('SELECT standard_price,product_qty FROM lst_cost ' \ 'WHERE default_code=%s', (def_code,)) res = cr.fetchall() if res and res[0][1]: print 'encontre costo inicccc' avg,q = res[0] else: rpp = rpp_obj.browse(cr,uid,sml_id) if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': q = rpp.picking_qty print 'cantidad inicialxxxxx: ',q avg = rpp.invoice_price_unit else: no_cump.append(sml_id) continue #avg = 1430.96 #q = 5.0 print 'cantidad inicial: ',q print 'costo inicial: ',avg total = avg*q subtotal = avg*q qda = q seq += 1 value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':0.0, 'stk_aft_cor':qda, 'sequence':seq } scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) sc_line_obj.write(cr, uid, scl_id, value) print 'q inicial: ',q print 'avg: ',avg print 'qda inicial: ',qda print 'seq inicial: ',seq else: rpp = rpp_obj.browse(cr,uid,sml_id) q = rpp.picking_qty scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) scl = sc_line_obj.browse(cr,uid,scl_id)[0] print 'viene operac: ',sml_id print 'packing: ',rpp.picking_id.name print 'seq antes operac: ',seq #VENTA if rpp.location_id.id == loc_ids and rpp.invoice_id.type == 'out_invoice': print 'validando VENTA:' qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #NC COMPRA if rpp.location_id.id == loc_ids and (rpp.invoice_id.type == 'in_refund' or rpp.invoice_id.type == 'in_invoice'): print 'validando NC compra:' qda,total,avg,no_cump,seq= \ self.validate_nc_compra(cr,uid,ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #COMPRA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': print 'procesooo compra:' q_bef = qda qda,subtotal,total,avg = self.compute_compra(cr, uid, ids,scl,q,total,avg,qda) #REALIZAR EL WRITE DE LA LINEA value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':q_bef, 'stk_aft_cor':qda } seq=self.write_data(cr, uid, ids, scl.id, value, seq) print 'seq despues operac: ',seq if no_cump: print 'agregando nuevamente las vta:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #NC VENTA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'out_refund': print 'validando NC VENTA:' qda,total,avg,no_cump,seq= \ self.validate_nc_vta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq if no_cump and not scl.parent_id: print 'agregando nuevamente los movimientos:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #DESTINO USO INTERNO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == inter_loc_ids: print 'validando USO INTERNO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id acc_mov_id = self.write_aml(cr, uid, ids, scl, q, avg, acc_src, acc_dest) acc_mov_obj = self.pool.get('account.move').browse(cr,uid,acc_mov_id) for aml in acc_mov_obj.line_id: valores.update({ 'aml_cost_qty':aml.quantity or 0.0, 'aml_cost_price_unit':avg, 'aml_inv_qty':aml.quantity or 0.0, 'aml_inv_price_unit':avg}) if aml.debit: valores.update({'aml_cost_id':aml.id}) if aml.credit: valores.update({'aml_inv_id':aml.id}) sc_line_obj.write(cr, uid, scl.id, valores) #~ else: #~ id1=scl.aml_cost_id.id #~ id2=scl.aml_inv_id.id #~ if not scl.aml_cost_id.credit: #~ valores.update({'aml_cost_id':id2, 'aml_inv_id':id1}) #~ sc_line_obj.write(cr, uid, scl.id, valores) #~ #DESTINO PROCESAMIENTO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == prod_loc_ids: print 'validando PROCESAMIENTO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id
62ca858ba796453e95db5d16001d237fb203c2e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/62ca858ba796453e95db5d16001d237fb203c2e9/stock_card.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 450, 764, 297, 67, 5896, 83, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10791, 67, 350, 16, 9696, 16, 1515, 67, 2232, 16, 1554, 67, 1829, 67, 2232, 16, 10791, 67, 1829, 67, 2232, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 450, 764, 297, 67, 5896, 83, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 10791, 67, 350, 16, 9696, 16, 1515, 67, 2232, 16, 1554, 67, 1829, 67, 2232, 16, 10791, 67, 1829, 67, 2232, ...
def _hasFileConflict(self, pkg1, pkg2, filename, pkg1_fi, operation=OP_INSTALL):
def _hasFileConflict(self, pkg1, pkg2, filename, pkg1_fi):
def _getConflicts(self, pkg, dep, list, operation=OP_INSTALL): """RpmPackage pkg Conflicts: or Obsoletes: (name, RPMSENSE_* flag, EVR string) dep, with RpmPackage's in list matching that.
efef11aae58f2bceb029f0b6812cd5e55e5f40ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/efef11aae58f2bceb029f0b6812cd5e55e5f40ff/resolver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 30897, 12, 2890, 16, 3475, 16, 5993, 16, 666, 16, 1674, 33, 3665, 67, 28865, 4672, 3536, 54, 7755, 2261, 3475, 23460, 87, 30, 578, 531, 2038, 355, 278, 281, 30, 261, 529, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 30897, 12, 2890, 16, 3475, 16, 5993, 16, 666, 16, 1674, 33, 3665, 67, 28865, 4672, 3536, 54, 7755, 2261, 3475, 23460, 87, 30, 578, 531, 2038, 355, 278, 281, 30, 261, 529, 1...
if f == 1:
if f <= 4:
def getchangegroup(self, remote): tip = remote.branches([]) cl = self.changelog unknown = tip search = [] fetch = []
eb43bc39e29877343a30c9f57cdb3624905974b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/eb43bc39e29877343a30c9f57cdb3624905974b8/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3427, 1655, 12, 2890, 16, 2632, 4672, 9529, 273, 2632, 18, 18078, 3816, 5717, 927, 273, 365, 18, 24083, 12970, 5917, 273, 9529, 1623, 273, 5378, 2158, 273, 5378, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3427, 1655, 12, 2890, 16, 2632, 4672, 9529, 273, 2632, 18, 18078, 3816, 5717, 927, 273, 365, 18, 24083, 12970, 5917, 273, 9529, 1623, 273, 5378, 2158, 273, 5378, 2, -100, -100, -100...
("--%s--" % (boundary)).encode("utf_8")
("\r\n--%s--" % (boundary)).encode("utf_8")
def upload(self, filename=None, imageData=None, **arg): """Upload a file to flickr.
a3c7c43ec6f2e835bd0743496e41b11599a4450e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11023/a3c7c43ec6f2e835bd0743496e41b11599a4450e/flickrapi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 1544, 33, 7036, 16, 26229, 33, 7036, 16, 2826, 3175, 4672, 3536, 4777, 279, 585, 358, 1183, 16254, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3617, 12, 2890, 16, 1544, 33, 7036, 16, 26229, 33, 7036, 16, 2826, 3175, 4672, 3536, 4777, 279, 585, 358, 1183, 16254, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY id LIMIT 26""" % (email_user_pattern, ))
users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY email LIMIT %s""" % (email_user_pattern, MAXPAGEUSERS+1))
def perform_userarea(req, email_user_pattern=''): """create area to show info about users. """ if not is_adminuser(req): return mustloginpage(req) subtitle = 'step 1 - search for users' output = """ <p> search for users to display. </p> """ # remove letters not allowed in an email email_user_pattern = cleanstring_email(email_user_pattern) text = ' <span class="adminlabel">1. search pattern </span>\n' text += ' <input class="admin_wvar" type="text" name="email_user_pattern" value="%s" />\n' % (email_user_pattern, ) output += createhiddenform(action="userarea", text=text, button="search for users") if email_user_pattern: users1 = run_sql("""SELECT id, email FROM user WHERE email RLIKE '%s' ORDER BY id LIMIT 26""" % (email_user_pattern, )) if not users1: output += '<p>no matching users</p>' else: subtitle = 'step 2 - select what to do with user' users = [] for (id, email) in users1[:25]: users.append([id, email]) for col in [(('add', 'addroleuser'), ('remove', 'deleteuserrole')), (('show details', 'showuserdetails'), )]: users[-1].append('<a href="%s?email_user_pattern=%s&amp;id_user=%s">%s</a>' % (col[0][1], email_user_pattern, id, col[0][0])) for (str, function) in col[1:]: users[-1][-1] += ' / <a href="%s?email_user_pattern=%s&amp;id_user=%s&amp;reverse=1">%s</a>' % (function, email_user_pattern, id, str) output += '<p>found <strong>%s</strong> matching users</p>' % (len(users1), ) output += tupletotable(header=['id', 'email', 'roles', ''], tuple=users) if len(users1) > 25: output += '<p><strong>only showing the first 25 users, narrow your search...</strong></p>' return index(req=req, title='User Administration', subtitle=subtitle, body=[output], adminarea=2)
d5c421bd0fb517578e6a485b6cc1f60455de2c85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/d5c421bd0fb517578e6a485b6cc1f60455de2c85/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1355, 5036, 12, 3658, 16, 2699, 67, 1355, 67, 4951, 2218, 11, 4672, 3536, 2640, 5091, 358, 2405, 1123, 2973, 3677, 18, 3536, 225, 309, 486, 353, 67, 3666, 1355, 12, 3658, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 1355, 5036, 12, 3658, 16, 2699, 67, 1355, 67, 4951, 2218, 11, 4672, 3536, 2640, 5091, 358, 2405, 1123, 2973, 3677, 18, 3536, 225, 309, 486, 353, 67, 3666, 1355, 12, 3658, 467...
print ds.GetMetadata( 'xml:ESRI' )
print(ds.GetMetadata( 'xml:ESRI' ))
def tiff_write_86(): gdal.SetConfigOption( 'ESRI_XML_PAM', 'YES' ) ds = gdaltest.tiff_drv.Create( 'tmp/tiff_write_86.tif', 100, 100, 1, gdal.GDT_Byte ) ds.SetMetadata( ['<abc></abc>'], 'xml:ESRI' ) ds.SetMetadataItem( 'BaseTest', 'Value' ) ds = None # Is the xml:ESRI data available? ds = gdal.Open( 'tmp/tiff_write_86.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != [ '<abc />\n' ]: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'did not get expected xml:ESRI metadata.' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(1)' ) return 'fail' ds = None # After removing the pam file is it gone, but the conventional # metadata still available? os.rename( 'tmp/tiff_write_86.tif.aux.xml', 'tmp/tiff_write_86.tif.aux.xml.hidden' ) ds = gdal.Open( 'tmp/tiff_write_86.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != None: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'unexpectedly got xml:ESRI metadata' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(2)' ) return 'fail' ds = None # now confirm that CreateCopy also preserves things similarly. os.rename( 'tmp/tiff_write_86.tif.aux.xml.hidden', 'tmp/tiff_write_86.tif.aux.xml' ) ds_src = gdal.Open( 'tmp/tiff_write_86.tif' ) ds = gdaltest.tiff_drv.CreateCopy( 'tmp/tiff_write_86_cc.tif', ds_src ) ds_src = None ds = None # Is the xml:ESRI data available? ds = gdal.Open( 'tmp/tiff_write_86_cc.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != [ '<abc />\n' ]: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'did not get expected xml:ESRI metadata (cc).' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(1cc)' ) return 'fail' ds = None # After removing the pam file is it gone, but the conventional # metadata still available? os.remove( 'tmp/tiff_write_86_cc.tif.aux.xml' ) ds = gdal.Open( 'tmp/tiff_write_86_cc.tif' ) if ds.GetMetadata( 'xml:ESRI' ) != None: print ds.GetMetadata( 'xml:ESRI' ) gdaltest.post_reason( 'unexpectedly got xml:ESRI metadata(2)' ) return 'fail' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value( 'missing metadata(2cc)' ) return 'fail' ds = None # Cleanup gdal.SetConfigOption( 'ESRI_XML_PAM', 'NO' ) gdaltest.tiff_drv.Delete( 'tmp/tiff_write_86.tif' ) gdaltest.tiff_drv.Delete( 'tmp/tiff_write_86_cc.tif' ) return 'success'
b95e13613b7ed3e312be5240b6ad629d356a8bb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/b95e13613b7ed3e312be5240b6ad629d356a8bb7/tiff_write.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 3048, 67, 2626, 67, 5292, 13332, 225, 15551, 287, 18, 694, 809, 1895, 12, 296, 3991, 2259, 67, 4201, 67, 52, 2192, 2187, 296, 29081, 11, 262, 225, 3780, 273, 15551, 2390, 395, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 3048, 67, 2626, 67, 5292, 13332, 225, 15551, 287, 18, 694, 809, 1895, 12, 296, 3991, 2259, 67, 4201, 67, 52, 2192, 2187, 296, 29081, 11, 262, 225, 3780, 273, 15551, 2390, 395, 18,...
""" fl_add_spinner(type, x, y, w, h, label) -> object ref.
""" fl_add_spinner(type, x, y, w, h, label) -> object
def fl_add_spinner(type, x, y, w, h, label): """ fl_add_spinner(type, x, y, w, h, label) -> object ref. """ retval = _fl_add_spinner(type, x, y, w, h, label) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 1752, 7872, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 1752, 7872, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 1289, 67, 1752, 7872, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 1289, 67, 1752, 7872, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, ...
while self._peek("'[ \\t]*and[ \\t]*'", "'[ \\t]*or[ \\t]*'", 'CLOSE_DIRECTIVE', 'CLOSE_BRACKET', 'END', 'COMMA_DELIMITER', 'COLON_DELIMITER', 'ASSIGN_OPERATOR', 'CLOSE_PAREN', 'CLOSE_BRACE') == "'[ \\t]*and[ \\t]*'":
while self._peek("'[ \\t]*and[ \\t]*'", "'[ \\t]*or[ \\t]*'", 'CLOSE_DIRECTIVE', 'END', 'COMMA_DELIMITER', 'COLON_DELIMITER', 'CLOSE_BRACKET', 'ASSIGN_OPERATOR', 'CLOSE_PAREN', 'CLOSE_BRACE') == "'[ \\t]*and[ \\t]*'":
def and_test(self): not_test = self.not_test() _test = not_test while self._peek("'[ \\t]*and[ \\t]*'", "'[ \\t]*or[ \\t]*'", 'CLOSE_DIRECTIVE', 'CLOSE_BRACKET', 'END', 'COMMA_DELIMITER', 'COLON_DELIMITER', 'ASSIGN_OPERATOR', 'CLOSE_PAREN', 'CLOSE_BRACE') == "'[ \\t]*and[ \\t]*'": self._scan("'[ \\t]*and[ \\t]*'") not_test = self.not_test() _test = BinOpExpressionNode('and', _test, not_test) return _test
e8f7feb442c80298d78241db158193ff8c364929 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4381/e8f7feb442c80298d78241db158193ff8c364929/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 471, 67, 3813, 12, 2890, 4672, 486, 67, 3813, 273, 365, 18, 902, 67, 3813, 1435, 389, 3813, 273, 486, 67, 3813, 1323, 365, 6315, 347, 3839, 29823, 63, 1736, 88, 5772, 464, 63, 1736, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 471, 67, 3813, 12, 2890, 4672, 486, 67, 3813, 273, 365, 18, 902, 67, 3813, 1435, 389, 3813, 273, 486, 67, 3813, 1323, 365, 6315, 347, 3839, 29823, 63, 1736, 88, 5772, 464, 63, 1736, ...
raise ValueError, "%r IPv6 Address with less than 8 hexletts and without '::'" % (ipstr)
raise ValueError, "%r IPv6 Address with less than 8 hextets and without '::'" % (ipstr)
0x0123456789abcdef # IPv4 if <= 0xffffffff else IPv6
beeb5ca0480c8d1ae505244beb56772f807ba70e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/beeb5ca0480c8d1ae505244beb56772f807ba70e/IPy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 374, 92, 26684, 28953, 6647, 468, 7853, 24, 309, 1648, 374, 28857, 469, 7853, 26, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 374, 92, 26684, 28953, 6647, 468, 7853, 24, 309, 1648, 374, 28857, 469, 7853, 26, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
{1/6, 1/5, 1/3, 1/2, 11/30, 1/9, 2/3, 1/30, Infinity, 5/6, 1/45, 0, 1/18, 1/10, 1/15, 2/15}
{0, 1/3, 11/30, 5/6, 1/15, 1/10, 2/3, 1/9, Infinity, 1/2, 1/45, 1/18, 1/5, 2/15, 1/6, 1/30}
def _find_cusps(self): r""" Return a set of inequivalent cusps for self, i.e. a set of representatives for the orbits of self on $\mathbf{P}^1(\mathbf{Q})$. These are returned in a reduced form; see self.reduce_cusp for the definition of reduced. ALGORITHM: Uses explicit formulae specific to $\Gamma_0(N)$: a reduced cusp on $\Gamma_0(N)$ is always of the form $a/d$ where $d | N$, and $a_1/d \sim a_2/d$ if and only if $a_1 \cong a_2 \bmod {\rm gcd}(d, N/d)$. EXAMPLES: sage: Gamma0(90)._find_cusps() {1/6, 1/5, 1/3, 1/2, 11/30, 1/9, 2/3, 1/30, Infinity, 5/6, 1/45, 0, 1/18, 1/10, 1/15, 2/15} sage: Gamma0(1).cusps() {Infinity} sage: Gamma0(180).cusps() == Gamma0(180).cusps(algorithm='modsym') True """ N = self.level() s = [] for d in divisors(N): w = arith.gcd(d, N/d) if w == 1: if d == 1: s.append(cusps.Cusp(1,0)) elif d == N: s.append(cusps.Cusp(0,1)) else: s.append(cusps.Cusp(1,d)) else: for a in xrange(1, w): if arith.gcd(a, w) == 1: while arith.gcd(a, d/w) != 1: a += w s.append(cusps.Cusp(a,d)) return Set(s)
53362b0caf2b36e6e5b2a421539f8059e09a5140 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/53362b0caf2b36e6e5b2a421539f8059e09a5140/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 71, 407, 1121, 12, 2890, 4672, 436, 8395, 2000, 279, 444, 434, 316, 14298, 6505, 27964, 1121, 364, 365, 16, 277, 18, 73, 18, 279, 444, 434, 2406, 8785, 364, 326, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 71, 407, 1121, 12, 2890, 4672, 436, 8395, 2000, 279, 444, 434, 316, 14298, 6505, 27964, 1121, 364, 365, 16, 277, 18, 73, 18, 279, 444, 434, 2406, 8785, 364, 326, 578, ...
raise FormError, \ 'link "%s" value "%s" not a designator'%(key, entry)
raise FormError, self._('link "%(key)s" ' 'value "%(value)s" not a designator') % locals()
propdef = all_propdef[cn]
b7e0b3ed6412d17921124a07b91ee81dde8e7ed7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b7e0b3ed6412d17921124a07b91ee81dde8e7ed7/form_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2270, 536, 273, 777, 67, 5986, 536, 63, 10305, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2270, 536, 273, 777, 67, 5986, 536, 63, 10305, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
res = self.__getReplicaStatus(fileIDs.keys(), connection=connection) if not res['OK']: return res for fileID,se,status in res['Value']:
res = self.__getReplicaStatus( fileIDs.keys(), connection = connection ) if not res['OK']: return res for fileID, se, status in res['Value']:
def getReplicaStatus(self,replicaTuples,connection=False): """ Get the status for the supplied file replicas """ gLogger.info("TransformationDB.getReplicaStatus: Attempting to get statuses of file replicas.") failed = {} successful = {} lfns = [] for lfn,pfn,se in replicaTuples: lfns.append(lfn) connection = self.__getConnection(connection) res = self.__getFileIDsForLfns(lfns,connection=connection) if not res['OK']: return res fileIDs,lfnFilesIDs = res['Value'] for lfn in lfns: if not lfnFilesIDs.has_key(lfn): failed[lfn] = 'File did not exist' res = self.__getReplicaStatus(fileIDs.keys(), connection=connection) if not res['OK']: return res for fileID,se,status in res['Value']: lfn = fileIDs[fileID] if not successful.has_key(lfn): successful[lfn] = {} successful[lfn][se] = status for lfn in fileIDs.values(): if not successful.has_key(lfn): failed[lfn] = "TransformationDB.getReplicaStatus: No replicas found." resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 6996, 1482, 12, 2890, 16, 30065, 25813, 16, 4071, 33, 8381, 4672, 3536, 968, 326, 1267, 364, 326, 4580, 585, 21545, 3536, 314, 3328, 18, 1376, 2932, 15292, 2290, 18, 588, 14222, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 6996, 1482, 12, 2890, 16, 30065, 25813, 16, 4071, 33, 8381, 4672, 3536, 968, 326, 1267, 364, 326, 4580, 585, 21545, 3536, 314, 3328, 18, 1376, 2932, 15292, 2290, 18, 588, 14222, 14...
..........
----------
def get_blobs(binary_edge_image): """ labeled_edge_image, groups = get_blobs(binary_edge_image) get the total number of blobs in a 2D image and convert the binary image to labelled regions Parameters .......... binary_edge_image : {nd_array} an binary image Returns .......... label_image : {nd_array} an image with labeled regions from get_blobs() method groups : {int} number of blobs in image determined by get_blobs() method """ [rows, cols] = binary_edge_image.shape labeled_edge_image = NP.zeros(rows*cols, dtype=NP.uint16).reshape(rows, cols) groups = S.get_blobs(binary_edge_image, labeled_edge_image) return labeled_edge_image, groups
2e15b86a5b91fd399ef0d981713b1fbce76051f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/2e15b86a5b91fd399ef0d981713b1fbce76051f1/_segmenter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10721, 87, 12, 8578, 67, 7126, 67, 2730, 4672, 3536, 225, 23585, 67, 7126, 67, 2730, 16, 3252, 273, 336, 67, 10721, 87, 12, 8578, 67, 7126, 67, 2730, 13, 225, 336, 326, 2078...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10721, 87, 12, 8578, 67, 7126, 67, 2730, 4672, 3536, 225, 23585, 67, 7126, 67, 2730, 16, 3252, 273, 336, 67, 10721, 87, 12, 8578, 67, 7126, 67, 2730, 13, 225, 336, 326, 2078...
self.bmovl.screen.blit(self.cbg, (self.x0 + self.width - 200, self.y0 + 65))
self.bmovl.screenblit(self.cbg, (self.x0 + self.width - 200, self.y0 + 78))
def elapsed(self, timer): """ update osd """ if not self.bmovl: self.bmovl = OSDbmovl(self.width, self.height) if self.osd_visible: start = self.start end = self.start + int(self.item.info['length'])
3489fc1ad1f871f05615c51ddeca3e4a586b5982 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/3489fc1ad1f871f05615c51ddeca3e4a586b5982/bmovl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9613, 12, 2890, 16, 5441, 4672, 3536, 1089, 1140, 72, 3536, 309, 486, 365, 18, 25709, 1527, 80, 30, 365, 18, 25709, 1527, 80, 273, 5932, 4331, 81, 1527, 80, 12, 2890, 18, 2819, 16, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9613, 12, 2890, 16, 5441, 4672, 3536, 1089, 1140, 72, 3536, 309, 486, 365, 18, 25709, 1527, 80, 30, 365, 18, 25709, 1527, 80, 273, 5932, 4331, 81, 1527, 80, 12, 2890, 18, 2819, 16, 3...
finally: fileobj.close() os.unlink(name)
def readerAssertEqual(self, input, expected_result): fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: fileobj.write(input) fileobj.seek(0) reader = csv.reader(fileobj, dialect = self.dialect) fields = list(reader) self.assertEqual(fields, expected_result) finally: fileobj.close() os.unlink(name)
3372cde256bb490026e8a5e8c2502a82d2e6c5a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3372cde256bb490026e8a5e8c2502a82d2e6c5a0/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2949, 8213, 5812, 12, 2890, 16, 810, 16, 2665, 67, 2088, 4672, 5194, 16, 508, 273, 13275, 18, 24816, 19781, 84, 1435, 17041, 273, 1140, 18, 8313, 3190, 12, 8313, 16, 315, 91, 15, 70, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2949, 8213, 5812, 12, 2890, 16, 810, 16, 2665, 67, 2088, 4672, 5194, 16, 508, 273, 13275, 18, 24816, 19781, 84, 1435, 17041, 273, 1140, 18, 8313, 3190, 12, 8313, 16, 315, 91, 15, 70, ...
packages = find_packages(),
packages = find_packages('src'),
def read_file(*path): base_dir = os.path.dirname(__file__) file_path = (base_dir, ) + tuple(path) return file(os.path.join(*file_path)).read()
6cc7b937e9dbf06ab83ece8d0da5d4a7d85c2773 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10048/6cc7b937e9dbf06ab83ece8d0da5d4a7d85c2773/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 768, 30857, 803, 4672, 1026, 67, 1214, 273, 1140, 18, 803, 18, 12287, 12, 972, 768, 972, 13, 585, 67, 803, 273, 261, 1969, 67, 1214, 16, 262, 397, 3193, 12, 803, 13, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 768, 30857, 803, 4672, 1026, 67, 1214, 273, 1140, 18, 803, 18, 12287, 12, 972, 768, 972, 13, 585, 67, 803, 273, 261, 1969, 67, 1214, 16, 262, 397, 3193, 12, 803, 13, 327, ...
if package.isSiblingClone() and saneBranch:
if package.isSiblingClone():
def _getOldChangeSets(self): """ Fetch old versions of each trove, where they can be found and are suitably sane. """ oldSpecs = [] targetLabel = self.helper.plan.targetLabel for job in self.jobs: version = macro.expand(job.package.getBaseVersion(), job.package) oldSpecs.append((job.package.getName(), '%s/%s' % (targetLabel, version), None))
0b3844d7fdbca9fd9cb1cb32f3fe2900496f23ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7644/0b3844d7fdbca9fd9cb1cb32f3fe2900496f23ce/shadow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 7617, 3043, 2785, 12, 2890, 4672, 3536, 8065, 1592, 5244, 434, 1517, 23432, 537, 16, 1625, 2898, 848, 506, 1392, 471, 854, 1597, 305, 6906, 30426, 18, 3536, 1592, 15999, 273, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 7617, 3043, 2785, 12, 2890, 4672, 3536, 8065, 1592, 5244, 434, 1517, 23432, 537, 16, 1625, 2898, 848, 506, 1392, 471, 854, 1597, 305, 6906, 30426, 18, 3536, 1592, 15999, 273, 5...
self.info_text = wx.TextCtrl(self.toolbar, -1, 'Observation Info', size=(300,20),style=wx.TE_READONLY|wx.TE_CENTRE)
self.info_text = wx.TextCtrl(self.toolbar, -1, 'Observation Info', pos=(80,0), size=(300,20),style=wx.TE_READONLY|wx.TE_CENTRE)
def InitControlHandles(self):
d77d6b83213e4b7444795cc81c3f99d02221c76c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2711/d77d6b83213e4b7444795cc81c3f99d02221c76c/tracking_settings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 3367, 8788, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 3367, 8788, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.hboxlayout25.addWidget(self.dnaDefaultSegmentColorPushButton) self.gridlayout16.addLayout(self.hboxlayout25,0,1,1,1)
self.hboxlayout26.addWidget(self.dnaDefaultSegmentColorPushButton) self.gridlayout23.addLayout(self.hboxlayout26,0,1,1,1)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
def _expand(self, *attrs): config_vars = self.get_finalized_command('install').config_vars from distutils.util import subst_vars for attr in attrs: val = getattr(self, attr) if val is not None: if os.name == 'posix': val = os.path.expanduser(val) val = subst_vars(val, config_vars) setattr(self, attr, val)
def _expand(self, *attrs): config_vars = self.get_finalized_command('install').config_vars from distutils.util import subst_vars for attr in attrs: val = getattr(self, attr) if val is not None: if os.name == 'posix': val = os.path.expanduser(val) val = subst_vars(val, config_vars) setattr(self, attr, val)
7057a529d083522066a6d8706e669627ec11bcf9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/7057a529d083522066a6d8706e669627ec11bcf9/easy_install.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12320, 12, 2890, 16, 380, 7039, 4672, 642, 67, 4699, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 16063, 1425, 67, 4699, 628, 2411, 5471, 18, 1367, 1930, 27750, 67, 46...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12320, 12, 2890, 16, 380, 7039, 4672, 642, 67, 4699, 273, 365, 18, 588, 67, 6385, 1235, 67, 3076, 2668, 5425, 16063, 1425, 67, 4699, 628, 2411, 5471, 18, 1367, 1930, 27750, 67, 46...
ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp')
ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp')
def ogr_vrt_14(): if gdaltest.vrt_ds is None: return 'skip' try: ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp') except: pass shp_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test.shp') shp_lyr = shp_ds.CreateLayer('test') feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat.Destroy() shp_ds.ExecuteSQL('CREATE SPATIAL INDEX on test'); shp_ds.Destroy() vrt_xml = """
334e0eceee48f2d7233a943cc61920823bd1a90a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/334e0eceee48f2d7233a943cc61920823bd1a90a/ogr_vrt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 90, 3797, 67, 3461, 13332, 309, 15551, 2390, 395, 18, 90, 3797, 67, 2377, 353, 599, 30, 327, 296, 7457, 11, 775, 30, 320, 3197, 18, 967, 4668, 5911, 2668, 3991, 2259, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 90, 3797, 67, 3461, 13332, 309, 15551, 2390, 395, 18, 90, 3797, 67, 2377, 353, 599, 30, 327, 296, 7457, 11, 775, 30, 320, 3197, 18, 967, 4668, 5911, 2668, 3991, 2259, ...
if self.__pool._should_log_info: self.__pool.log("Closing connection %r", self.connection)
if self.__pool._should_log_debug: self.__pool.logger.debug("Closing connection %r", self.connection)
def __close(self): try: if self.__pool._should_log_info: self.__pool.log("Closing connection %r", self.connection) self.connection.close() except Exception, e: if self.__pool._should_log_info: self.__pool.log("Connection %r threw an error on close: %s" % (self.connection, e)) if isinstance(e, (SystemExit, KeyboardInterrupt)): raise
56f64add8195f35961f67cf1baebda476dfb03ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1074/56f64add8195f35961f67cf1baebda476dfb03ec/pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4412, 12, 2890, 4672, 775, 30, 309, 365, 16186, 6011, 6315, 13139, 67, 1330, 67, 4148, 30, 365, 16186, 6011, 18, 4901, 18, 4148, 2932, 15745, 1459, 738, 86, 3113, 365, 18, 4071, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4412, 12, 2890, 4672, 775, 30, 309, 365, 16186, 6011, 6315, 13139, 67, 1330, 67, 4148, 30, 365, 16186, 6011, 18, 4901, 18, 4148, 2932, 15745, 1459, 738, 86, 3113, 365, 18, 4071, ...
if mline.date_from < today and mline.date_to < today and mline.date_from<=mline.date_to and mline.account_invoice_line.invoice_id.state == 'paid':
if mline.date_from < today and mline.date_to < today and mline.date_from<=mline.date_to and (mline.account_invoice_line and mline.account_invoice_line.invoice_id.state) == 'paid':
def _membership_state(self, cr, uid, ids, name, args, context=None): res = {} for id in ids: res[id] = 'none' today = time.strftime('%Y-%m-%d') for id in ids: partner_data = self.browse(cr,uid,id) if partner_data.membership_cancel and today > partner_data.membership_cancel: res[id] = 'canceled' continue if partner_data.membership_stop and today > partner_data.membership_stop: res[id] = 'old' continue s = 4 if partner_data.member_lines: for mline in partner_data.member_lines: if mline.date_from <= today and mline.date_to >= today: if mline.account_invoice_line and mline.account_invoice_line.invoice_id: mstate = mline.account_invoice_line.invoice_id.state if mstate == 'paid': s = 0 break elif mstate == 'open' and s!=0: s = 1 elif mstate == 'cancel' and s!=0 and s!=1: s = 2 elif (mstate == 'draft' or mstate == 'proforma') and s!=0 and s!=1: s = 3 if s==4: for mline in partner_data.member_lines: if mline.date_from < today and mline.date_to < today and mline.date_from<=mline.date_to and mline.account_invoice_line.invoice_id.state == 'paid': s = 5 else: s = 6 if s==0: res[id] = 'paid' elif s==1: res[id] = 'invoiced' elif s==2: res[id] = 'canceled' elif s==3: res[id] = 'waiting' elif s==5: res[id] = 'old' elif s==6: res[id] = 'none' if partner_data.free_member and s!=0: res[id] = 'free' if partner_data.associate_member: res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context) res[id] = res_state[partner_data.associate_member.id] return res
4dc6cc8698b8f238a5d8c039433b29028e3d54ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/4dc6cc8698b8f238a5d8c039433b29028e3d54ff/membership.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19679, 67, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 400, 273, 2618, 364, 612, 316, 3258, 30, 400, 63, 350, 65, 273, 296, 6102, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19679, 67, 2019, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 33, 7036, 4672, 400, 273, 2618, 364, 612, 316, 3258, 30, 400, 63, 350, 65, 273, 296, 6102, ...
Source can be an iterable, a dictionary, or another Counter.instance().
Source can be an iterable, a dictionary, or another Counter instance.
def update(self, iterable=None): '''Like dict.update() but add counts instead of replacing them.
ecf592b1d3dbb37597b9c478af625a05cee2aeba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/ecf592b1d3dbb37597b9c478af625a05cee2aeba/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 6087, 33, 7036, 4672, 9163, 8804, 2065, 18, 2725, 1435, 1496, 527, 6880, 3560, 434, 13993, 2182, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 6087, 33, 7036, 4672, 9163, 8804, 2065, 18, 2725, 1435, 1496, 527, 6880, 3560, 434, 13993, 2182, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if e.errno <> errno.EEXIST: raise
if e.errno != errno.EEXIST: raise
def setUp(self): if verbose: dbutils._deadlock_VerboseFile = sys.stdout
f693ea807b40d0c1b7d9e6b7e988d8f4947b51a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/f693ea807b40d0c1b7d9e6b7e988d8f4947b51a0/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 309, 3988, 30, 1319, 5471, 6315, 22097, 739, 67, 14489, 812, 273, 2589, 18, 10283, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 309, 3988, 30, 1319, 5471, 6315, 22097, 739, 67, 14489, 812, 273, 2589, 18, 10283, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'type' : 'Vehicle'
'type' : 'Vehicle', 'sensor_board_file' : '/dev/DOESNOTEXIST'
def testSubsystemMaker(self): # Test the existing C++ Vehicle if 'Vehicle' in core.SubsystemMaker.getRegisteredKeys(): cfg = { 'depthCalibSlope': 33.01, 'depthCalibIntercept': 94, 'name' : 'TestVehicle', 'type' : 'Vehicle' } cfg = core.ConfigNode.fromString(str(cfg)) veh = core.SubsystemMaker.newObject(cfg, core.SubsystemList())
1d64cce7ace1eb8ae91841fc28c7da0bf25cbb0f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10608/1d64cce7ace1eb8ae91841fc28c7da0bf25cbb0f/TestIVehicle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28150, 12373, 12, 2890, 4672, 468, 7766, 326, 2062, 385, 9904, 776, 73, 18870, 309, 296, 58, 73, 18870, 11, 316, 2922, 18, 28150, 12373, 18, 588, 10868, 2396, 13332, 2776, 273, 288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28150, 12373, 12, 2890, 4672, 468, 7766, 326, 2062, 385, 9904, 776, 73, 18870, 309, 296, 58, 73, 18870, 11, 316, 2922, 18, 28150, 12373, 18, 588, 10868, 2396, 13332, 2776, 273, 288...
logger.Error("'%s' is not a directory" % old_file_storage_dir)
logging.error("'%s' is not a directory", old_file_storage_dir)
def RenameFileStorageDir(old_file_storage_dir, new_file_storage_dir): """Rename the file storage directory. Args: old_file_storage_dir: string containing the old path new_file_storage_dir: string containing the new path Returns: tuple with first element a boolean indicating wheter dir rename was successful or not """ old_file_storage_dir = _TransformFileStorageDir(old_file_storage_dir) new_file_storage_dir = _TransformFileStorageDir(new_file_storage_dir) result = True, if not old_file_storage_dir or not new_file_storage_dir: result = False, else: if not os.path.exists(new_file_storage_dir): if os.path.isdir(old_file_storage_dir): try: os.rename(old_file_storage_dir, new_file_storage_dir) except OSError, err: logger.Error("Cannot rename '%s' to '%s': %s" % (old_file_storage_dir, new_file_storage_dir, err)) result = False, else: logger.Error("'%s' is not a directory" % old_file_storage_dir) result = False, else: if os.path.exists(old_file_storage_dir): logger.Error("Cannot rename '%s' to '%s'. Both locations exist." % old_file_storage_dir, new_file_storage_dir) result = False, return result
18682bca5711b7b492aeb3cd3a550087f1413e0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/18682bca5711b7b492aeb3cd3a550087f1413e0b/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19996, 812, 3245, 1621, 12, 1673, 67, 768, 67, 5697, 67, 1214, 16, 394, 67, 768, 67, 5697, 67, 1214, 4672, 3536, 16019, 326, 585, 2502, 1867, 18, 225, 6634, 30, 1592, 67, 768, 67, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19996, 812, 3245, 1621, 12, 1673, 67, 768, 67, 5697, 67, 1214, 16, 394, 67, 768, 67, 5697, 67, 1214, 4672, 3536, 16019, 326, 585, 2502, 1867, 18, 225, 6634, 30, 1592, 67, 768, 67, 56...
log('Creating table %s', table_name, sender=self) columns = ', '.join(' '.join(f) for f in fields) sql = "CREATE TABLE %s (%s)" % (table_name, columns) cur.execute(sql)
self.create_table(cur, table_name, fields)
def upgrade_table(self, table_name, fields, index_list): """ Creates a table or adds fields to it. """ cur = self.cursor(lock=True)
eea03796de0b4a86eda8dbe4d99049d68a907f9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/eea03796de0b4a86eda8dbe4d99049d68a907f9a/dbsqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 67, 2121, 12, 2890, 16, 1014, 67, 529, 16, 1466, 16, 770, 67, 1098, 4672, 3536, 10210, 279, 1014, 578, 4831, 1466, 358, 518, 18, 3536, 662, 273, 365, 18, 9216, 12, 739, 33, 551...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 67, 2121, 12, 2890, 16, 1014, 67, 529, 16, 1466, 16, 770, 67, 1098, 4672, 3536, 10210, 279, 1014, 578, 4831, 1466, 358, 518, 18, 3536, 662, 273, 365, 18, 9216, 12, 739, 33, 551...
index = self.index_list[self.id] return self.playlist[index]
return self.playlist[self.index_list[self.id]]
def get_next_media(self):
e5ceb2dd324130917f21293db926c014038e4702 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12047/e5ceb2dd324130917f21293db926c014038e4702/deefuzz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 5829, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4285, 67, 5829, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
body = tools.html2plaintext(content)
body = tools.ustr(tools.html2plaintext(content))
def create_record(msg): if hasattr(model_pool, 'message_new'): res_id = model_pool.message_new(cr, uid, msg, context) else: data = { 'name': msg.get('subject'), 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'user_id': False, 'description': msg.get('body'), 'state' : 'draft', } data.update(self.get_partner(cr, uid, msg.get('from'), context=context)) res_id = model_pool.create(cr, uid, data, context=context)
41a15f72a02613fc823e32c36f48444d555f1bb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/41a15f72a02613fc823e32c36f48444d555f1bb6/mail_gateway.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3366, 12, 3576, 4672, 309, 3859, 12, 2284, 67, 6011, 16, 296, 2150, 67, 2704, 11, 4672, 400, 67, 350, 273, 938, 67, 6011, 18, 2150, 67, 2704, 12, 3353, 16, 4555, 16, 1234, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3366, 12, 3576, 4672, 309, 3859, 12, 2284, 67, 6011, 16, 296, 2150, 67, 2704, 11, 4672, 400, 67, 350, 273, 938, 67, 6011, 18, 2150, 67, 2704, 12, 3353, 16, 4555, 16, 1234, ...