rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
os.spawnlp(os.P_NOWAIT, "nautilus", "nautilus", "file://" + filename)
os.spawnlp(os.P_NOWAIT, "gnome-open", "gnome-open", "file://" + filename)
def open_file(self, filename): if resources.check_kde(): os.spawnlp(os.P_NOWAIT, "kfmclient", "kfmclient", "exec", "file://" + filename) else: os.spawnlp(os.P_NOWAIT, "nautilus", "nautilus", "file://" + filename)
cb6177a197f0a29bc74a610ce024ff122bb9309e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/cb6177a197f0a29bc74a610ce024ff122bb9309e/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 768, 12, 2890, 16, 1544, 4672, 309, 2703, 18, 1893, 67, 79, 323, 13332, 1140, 18, 1752, 9533, 9953, 12, 538, 18, 52, 67, 3417, 19046, 16, 315, 79, 25089, 2625, 3113, 315, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1696, 67, 768, 12, 2890, 16, 1544, 4672, 309, 2703, 18, 1893, 67, 79, 323, 13332, 1140, 18, 1752, 9533, 9953, 12, 538, 18, 52, 67, 3417, 19046, 16, 315, 79, 25089, 2625, 3113, 315, 7...
c.ConnectNode(c, node)
c.ConnectNode(node)
def _StaticSingleNodeCall(cls, node, procedure, args): """Helper for making a single-node static call
3097c8588ea94b5263e78025a19949c293975218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/3097c8588ea94b5263e78025a19949c293975218/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5788, 5281, 907, 1477, 12, 6429, 16, 756, 16, 12131, 16, 833, 4672, 3536, 2276, 364, 10480, 279, 2202, 17, 2159, 760, 745, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5788, 5281, 907, 1477, 12, 6429, 16, 756, 16, 12131, 16, 833, 4672, 3536, 2276, 364, 10480, 279, 2202, 17, 2159, 760, 745, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print '
def _parseTags(self): wlib = weblib.getMainBm()
e49b534e611c5a0c38bfe6d7f08d0ecc27a3cf96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/e49b534e611c5a0c38bfe6d7f08d0ecc27a3cf96/weblib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 3453, 12, 2890, 4672, 341, 2941, 273, 3311, 2941, 18, 588, 6376, 38, 81, 1435, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 3453, 12, 2890, 4672, 341, 2941, 273, 3311, 2941, 18, 588, 6376, 38, 81, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
tlsout_path = self.write_tlsout_file(chain, cpartition) phenixout_path = self.write_phenixout_file(chain, cpartition)
if conf.RENDER_SKIP: png_file = "" pml_file = "" else: try: basename = "%s_CHAIN%s_NTLS%d" % (self.struct_id, chain.chain_id, cpartition.num_tls_segments()) png_file = "%s.png" % (basename) pml_file = "" gen_r3d_body_cmd = "%s < %s > %s 2> /dev/null" % (conf.TLSANIM2R3D, raw_r3d_file, r3d_body_file) os.system(gen_r3d_body_cmd) if os.path.isfile("../bases.r3d"): render_cmd = "cat %s ../struct.r3d %s %s ../bases.r3d ../sugars.r3d | %s > %s 2> /dev/null" % ( self.r3d_header_file, r3d_body_file, conf.GREY_R3D_FILE, conf.RENDER, png_file) else: render_cmd = "cat %s ../struct.r3d %s | %s > %s 2> /dev/null" % ( self.r3d_header_file, r3d_body_file, conf.RENDER, png_file) os.system(render_cmd) except: console.stdoutln(" Warning: failure to render PNG image") console.stdoutln("ERROR: Unexpected error:", sys.exc_info()[0]) raw_r3d_file = "" r3d_body_file = "" png_file = "" pass if conf.REFMAC_SKIP: tlsout_file = "" phenixout_file = "" console.stdoutln("NOTE: Skipping Refmac/Phenix section") else: try: tlsout_file = self.write_tlsout_file(chain, cpartition) phenixout_file = self.write_phenixout_file(chain, cpartition) except: console.stdoutln(" Warning: failed to create Refmac/Phenix files") console.stdoutln("ERROR: Unexpected error:", sys.exc_info()[0]) tlsout_file = "" phenixout_file = "" pass
def html_tls_graph_path(self, chain, ntls): """Generates the HTML table describing the path (set of tls groups) for the given number of segments(h, or ntls) """ cpartition = chain.partition_collection.get_chain_partition(ntls) if cpartition == None: return None
81092918682cb3b404793cc6abd4020f9621498a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10674/81092918682cb3b404793cc6abd4020f9621498a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1729, 67, 17116, 67, 4660, 67, 803, 12, 2890, 16, 2687, 16, 9513, 3251, 4672, 3536, 6653, 326, 3982, 1014, 16868, 326, 589, 261, 542, 434, 6871, 3252, 13, 364, 326, 864, 1300, 434, 515...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1729, 67, 17116, 67, 4660, 67, 803, 12, 2890, 16, 2687, 16, 9513, 3251, 4672, 3536, 6653, 326, 3982, 1014, 16868, 326, 589, 261, 542, 434, 6871, 3252, 13, 364, 326, 864, 1300, 434, 515...
if gc.collect() != 2: raise TestFailed
expect(gc.collect(), 2, "function")
exec("def f(): pass\n") in d
eb8bf3f036b5b5fcb801af1133b74458aef5a195 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/eb8bf3f036b5b5fcb801af1133b74458aef5a195/test_gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1196, 2932, 536, 284, 13332, 1342, 64, 82, 7923, 316, 302, 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, 1196, 2932, 536, 284, 13332, 1342, 64, 82, 7923, 316, 302, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
strip_dir=python_build,
strip_dir=0,
def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra): """Process arguments and decide which source files to compile.
64ee342fce31c098d6ed67a33bd99f187ca55715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/64ee342fce31c098d6ed67a33bd99f187ca55715/ccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 67, 11100, 12, 2890, 16, 15398, 16, 24302, 16, 7290, 8291, 16, 5550, 16, 10935, 16, 2870, 4672, 3536, 2227, 1775, 471, 16288, 1492, 1084, 1390, 358, 4074, 18, 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, 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, 389, 8401, 67, 11100, 12, 2890, 16, 15398, 16, 24302, 16, 7290, 8291, 16, 5550, 16, 10935, 16, 2870, 4672, 3536, 2227, 1775, 471, 16288, 1492, 1084, 1390, 358, 4074, 18, 2, -100, -100, ...
op.add_option('--jitflags', dest='jitflags', default='j,m,mj',
op.add_option('--jitflags', dest='jitflags', default='j',
def parse_jitflags(): jitflags = [ [ '-' + flag for flag in flags ] for flags in OPTIONS.jitflags.split(',') ] for flags in jitflags: for flag in flags: if flag not in ('-j', '-m'): print('Invalid jit flag: "%s"'%flag) sys.exit(1) return jitflags
68b2131f4fc9c980c70951702b6aeab6b7fc95bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/68b2131f4fc9c980c70951702b6aeab6b7fc95bb/trace-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 78, 305, 7133, 13332, 525, 305, 7133, 273, 306, 306, 4014, 397, 2982, 364, 2982, 316, 2943, 308, 364, 2943, 316, 16726, 18, 78, 305, 7133, 18, 4939, 12, 2187, 6134, 308, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1109, 67, 78, 305, 7133, 13332, 525, 305, 7133, 273, 306, 306, 4014, 397, 2982, 364, 2982, 316, 2943, 308, 364, 2943, 316, 16726, 18, 78, 305, 7133, 18, 4939, 12, 2187, 6134, 308, 364,...
for bit in user.userbit_set.all().filter(Q(startdate__isnull=True) | Q(startdate__gt=now), Q(enddate__isnull=True) | Q(enddate__lt=now)): if bit.qsc.is_descendant(qsc) & bit.verb.is_antecedent(verb):
for bit in user.userbit_set.all().filter(Q(startdate__isnull=True) | Q(startdate__lte=now), Q(enddate__isnull=True) | Q(enddate__gt=now)): if bit.qsc.is_descendant(qsc) and bit.verb.is_antecedent(verb):
def UserHasPerms(user, qsc, verb, now = datetime.now()): """ Given a user, a permission, and a subject, return True if the user, or all users, has been Granted [subject] on [permission]; False otherwise """ if user != None: for bit in user.userbit_set.all().filter(Q(startdate__isnull=True) | Q(startdate__gt=now), Q(enddate__isnull=True) | Q(enddate__lt=now)): if bit.qsc.is_descendant(qsc) & bit.verb.is_antecedent(verb): return True
5f31212f51cbb6dd33692b91926447d101850f1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12041/5f31212f51cbb6dd33692b91926447d101850f1d/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2177, 5582, 27256, 12, 1355, 16, 1043, 1017, 16, 6405, 16, 2037, 273, 3314, 18, 3338, 1435, 4672, 3536, 16803, 279, 729, 16, 279, 4132, 16, 471, 279, 3221, 16, 327, 1053, 309, 326, 729...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2177, 5582, 27256, 12, 1355, 16, 1043, 1017, 16, 6405, 16, 2037, 273, 3314, 18, 3338, 1435, 4672, 3536, 16803, 279, 729, 16, 279, 4132, 16, 471, 279, 3221, 16, 327, 1053, 309, 326, 729...
self.pwmfile=open(path.format(*pins[number])) def setwidth(self,width):
if not os.path.exists(pwmpath.format(*pins[number])): os.system('echo MULTC > /sys/devices/bone_capemgr.8/slots') self.pwmfile=open(pwmpath.format(*pins[number])) def set_width(self,width):
def __init__(self,number): self.pwmfile=open(path.format(*pins[number]))
921662d85b3dc3a424dac2567619f9ebe5fcaa2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8751/921662d85b3dc3a424dac2567619f9ebe5fcaa2e/pwm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2696, 4672, 365, 18, 14921, 81, 768, 33, 3190, 12, 803, 18, 2139, 30857, 84, 2679, 63, 2696, 22643, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2696, 4672, 365, 18, 14921, 81, 768, 33, 3190, 12, 803, 18, 2139, 30857, 84, 2679, 63, 2696, 22643, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.current = self.connections[index-1]
self.current = self._connections[index-1] self.current_index = index
def switch(self, index_or_alias): """Switches to the connection specified by given index or alias. If alias is given it must be a string. Indexes can be either integers or strings that can be converted into integer. Raises a DataError if no connection with given index or alias found. """ try: index = self._get_index(index_or_alias) except ValueError: raise DataError("Non-existing index or alias '%s'" % index_or_alias) self.current = self.connections[index-1] return self.current
af959cb080815162dfaa581798ee4a3fd27510e9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/af959cb080815162dfaa581798ee4a3fd27510e9/connectioncache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1620, 12, 2890, 16, 770, 67, 280, 67, 4930, 4672, 3536, 10200, 281, 358, 326, 1459, 1269, 635, 864, 770, 578, 2308, 18, 225, 971, 2308, 353, 864, 518, 1297, 506, 279, 533, 18, 3340, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1620, 12, 2890, 16, 770, 67, 280, 67, 4930, 4672, 3536, 10200, 281, 358, 326, 1459, 1269, 635, 864, 770, 578, 2308, 18, 225, 971, 2308, 353, 864, 518, 1297, 506, 279, 533, 18, 3340, ...
session.push("\033[8m\xff\373\001")
session.push("\xff\373\001")
def echo_off(self, session): session.push("\033[8m\xff\373\001") # ECHO OFF
8db77f47bb977612d7cbbebde2b51ca82b4297f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5020/8db77f47bb977612d7cbbebde2b51ca82b4297f3/login.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3376, 67, 3674, 12, 2890, 16, 1339, 4672, 225, 1339, 18, 6206, 31458, 5297, 64, 6418, 23, 64, 11664, 7923, 468, 512, 22213, 17511, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3376, 67, 3674, 12, 2890, 16, 1339, 4672, 225, 1339, 18, 6206, 31458, 5297, 64, 6418, 23, 64, 11664, 7923, 468, 512, 22213, 17511, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import re
def __init__(self, err, position=(None, None)): if isinstance(err, Exception): self.type = err.__class__ self.value = err else: self.type = err self.value = None self.lineno = position[0] self.offset = position[1]
cf225d2ddb707c3444af0be9f145190fa89df258 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9834/cf225d2ddb707c3444af0be9f145190fa89df258/taldefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 393, 16, 1754, 28657, 7036, 16, 599, 3719, 30, 309, 1549, 12, 370, 16, 1185, 4672, 365, 18, 723, 273, 393, 16186, 1106, 972, 365, 18, 1132, 273, 393, 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, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 393, 16, 1754, 28657, 7036, 16, 599, 3719, 30, 309, 1549, 12, 370, 16, 1185, 4672, 365, 18, 723, 273, 393, 16186, 1106, 972, 365, 18, 1132, 273, 393, 4...
warning={ 'title':'No Pricelist !',
warning = { 'title': 'No Pricelist !',
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False): if not partner_id: raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.')) warning={} product_uom_obj = self.pool.get('product.uom') partner_obj = self.pool.get('res.partner') product_obj = self.pool.get('product.product') if partner_id: lang = partner_obj.browse(cr, uid, partner_id).lang context = {'lang': lang, 'partner_id': partner_id}
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 16, 26667, 33, 20, 16, 582, 362, 33, 8381, 16, 26667, 67, 89, 538, 33, 20, 16, 582, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3017, 67, 350, 67, 3427, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 846, 335, 5449, 16, 3017, 16, 26667, 33, 20, 16, 582, 362, 33, 8381, 16, 26667, 67, 89, 538, 33, 20, 16, 582, ...
self.compare_lists_of_dicts(
self.assertEqual(
def test_languages_facet(self): # What options do we expect? languages_option_python = {u'name': u'Python', u'count': 2, u'is_active': True, u'query_string': u'q=&language=Python'} languages_option_perl = {u'name': u'Perl', u'count': 1, u'is_active': False, u'query_string': u'q=&language=Perl'} languages_option_c = {u'name': u'C', u'count': 1, u'is_active': False, u'query_string': u'q=&language=C'} languages_option_any = {u'name': u'any', u'count': 4, u'is_active': False, u'query_string': u'q=&language='} expected_languages_facet_options = [ languages_option_python, languages_option_perl, languages_option_c, ]
b04ebcb789062a0e99b68d94e74dc093b600661c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/b04ebcb789062a0e99b68d94e74dc093b600661c/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 14045, 67, 21568, 12, 2890, 4672, 468, 18734, 702, 741, 732, 4489, 35, 8191, 67, 3482, 67, 8103, 273, 288, 89, 11, 529, 4278, 582, 11, 15774, 2187, 582, 11, 1883, 4278, 576, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 14045, 67, 21568, 12, 2890, 4672, 468, 18734, 702, 741, 732, 4489, 35, 8191, 67, 3482, 67, 8103, 273, 288, 89, 11, 529, 4278, 582, 11, 15774, 2187, 582, 11, 1883, 4278, 576, ...
sess.query(User).select_from(select([users]).offset(2).alias()).join(
sess.query(User).select_from(select([users]).order_by(User.id).offset(2).alias()).join(
def test_clause_onclause(self): sess = create_session()
1227a7674f915cc2080104fa769e3e71254316b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/1227a7674f915cc2080104fa769e3e71254316b9/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 18128, 67, 265, 18128, 12, 2890, 4672, 8451, 273, 752, 67, 3184, 1435, 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...
[ 1, 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, 1842, 67, 18128, 67, 265, 18128, 12, 2890, 4672, 8451, 273, 752, 67, 3184, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
P=pyRXP.Parser(**kw)
P=_pyRXP.Parser(**kw)
def goodTest(x,t,tb=0,**kw): try: P=pyRXP.Parser(**kw) r = P(x) rb = 0 except: et, ev, None = sys.exc_info() r = '%s %s' % (et.__name__, str(ev)) rb = 1 s = '' for k,v in kw.items(): s = s+', %s=%s' % (k,str(v)) if type(t) is type(''): t = t.replace('\r','\\r') t = t.replace('\n','\\n') if type(r) is type(''): r = r.replace('\r','\\r') r = r.replace('\n','\\n') print 'Parser(%s)(%s)-->'%(s[2:],repr(x)),r, if r==t and rb==tb: print 'OK' else: print '!!!!!BAD!!!!! should --> ', t
5968710b4c84f6d8e4d6f53f0baa2916c7342c36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5968710b4c84f6d8e4d6f53f0baa2916c7342c36/t.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7494, 4709, 12, 92, 16, 88, 16, 18587, 33, 20, 16, 636, 9987, 4672, 775, 30, 453, 33, 67, 2074, 54, 60, 52, 18, 2678, 12, 636, 9987, 13, 436, 273, 453, 12, 92, 13, 7138, 273, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7494, 4709, 12, 92, 16, 88, 16, 18587, 33, 20, 16, 636, 9987, 4672, 775, 30, 453, 33, 67, 2074, 54, 60, 52, 18, 2678, 12, 636, 9987, 13, 436, 273, 453, 12, 92, 13, 7138, 273, 374...
for time, note in self.guitar.playedNotes: if not note.tappable: break else: if not self.guitar.getRequiredNotes(self.song, pos): return
def doPick(self): if not self.song: return
456186de788401ed6519229b509c223799653eaa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7946/456186de788401ed6519229b509c223799653eaa/GuitarScene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 17968, 12, 2890, 4672, 309, 486, 365, 18, 816, 75, 30, 327, 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...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 17968, 12, 2890, 4672, 309, 486, 365, 18, 816, 75, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
""" Compute a canonical form for the cusp $uu/vv$. INPUT: cusp OUTPUT: cusp OUTPUT: bool -- True if self and other are equivalent int -- $1$, $0$, or $-1$, If the two cusps are $u1/v1$ and $u2/v2$, then they are equivalent modulo Gamma_H(N) if and only if $v1 = h*v2 (mod N)$ and $u1 = h^(-1)*u2 (mod gcd(v1,N))$ or $v1 = -h*v2 (mod N)$ and $u1 = -h^(-1)*u2 (mod gcd(v1,N))$ where $h \in H$. In the first case we return $1$, and in the second we return $-1$. We return $0$ if the two cusps are not equivalent.
r""" Compute a canonical form for the given cusp c. Returns a pair (c', t), where c' is the canonical form for the given cusp, and t is either 1 or -1, as explained below. Two cusps $u1/v1$ and $u2/v2$ are equivalent modulo Gamma_H(N) if and only if $v1 = h*v2 (mod N)$ and $u1 = h^(-1)*u2 (mod gcd(v1,N))$ or $v1 = -h*v2 (mod N)$ and $u1 = -h^(-1)*u2 (mod gcd(v1,N))$ for some $h \in H$. Then t is 1 or -1 as c and c' fall into the first or second case, respectively.
def _reduce_cusp(self, c): """ Compute a canonical form for the cusp $uu/vv$. INPUT: cusp OUTPUT: cusp
7a1f047b64336e2196553d74196aafe4f02190df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7a1f047b64336e2196553d74196aafe4f02190df/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12498, 67, 71, 407, 84, 12, 2890, 16, 276, 4672, 3536, 8155, 279, 7378, 646, 364, 326, 27964, 84, 271, 24286, 19, 15530, 8, 18, 225, 12943, 30, 27964, 84, 11550, 30, 27964, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 12498, 67, 71, 407, 84, 12, 2890, 16, 276, 4672, 3536, 8155, 279, 7378, 646, 364, 326, 27964, 84, 271, 24286, 19, 15530, 8, 18, 225, 12943, 30, 27964, 84, 11550, 30, 27964, 84, ...
d_som6.attr_list["config"] = config hlr_utils.write_file(config.output, "text/rmd", d_som6,
d_som5.attr_list["config"] = config hlr_utils.write_file(config.output, "text/rmd", d_som5,
def run(config, tim): """ This method is where the data reduction process gets done. @param config: Object containing the data reduction configuration information. @type config: L{hlr_utils.Configure} @param tim: Object that will allow the method to perform timing evaluations. @type tim: C{sns_time.DiffTime} """ import common_lib import dr_lib import DST import SOM import math if tim is not None: tim.getTime(False) old_time = tim.getOldTime() if config.data is None: raise RuntimeError("Need to pass a data filename to the driver "\ +"script.") # Read in sample data geometry if one is provided if config.data_inst_geom is not None: if config.verbose: print "Reading in sample data instrument geometry file" data_inst_geom_dst = DST.getInstance("application/x-NxsGeom", config.data_inst_geom) else: data_inst_geom_dst = None # Perform Steps 1-2 on sample data d_som1 = dr_lib.process_reflp_data(config.data, config, None, timer=tim) # Perform Steps 1-3 on normalization data if config.norm is not None: n_som1 = dr_lib.process_reflp_data(config.norm, config, config.norm_roi_file, timer=tim) else: n_som1 = None # Step 4: Divide data by normalization if config.verbose and config.norm is not None: print "Scale data by normalization" if tim is not None: tim.getTime(False) if config.norm is not None: d_som2 = common_lib.div_ncerr(d_som1, n_som1, length_one_som=True) else: d_som2 = d_som1 if tim is not None and config.norm is not None: tim.getTime(msg="After normalizing signal spectra") del d_som1, n_som1 if config.dump_rtof_comb: d_som2_1 = dr_lib.sum_all_spectra(d_som2) d_som2_2 = dr_lib.data_filter(d_som2_1) del d_som2_1 hlr_utils.write_file(config.output, "text/Spec", d_som2_2, output_ext="crtof", verbose=config.verbose, data_ext=config.ext_replacement, path_replacement=config.path_replacement, message="combined R(TOF) information") del d_som2_2 if config.dump_rtof: d_som2_1 = dr_lib.filter_ref_data(d_som2) hlr_utils.write_file(config.output, "text/Spec", d_som2_1, output_ext="rtof", verbose=config.verbose, data_ext=config.ext_replacement, path_replacement=config.path_replacement, message="R(TOF) information") del d_som2_1 # Override geometry if necessary if data_inst_geom_dst is not None: data_inst_geom_dst.setGeometry(config.data_paths.toPath(), d_som2) data_inst_geom_dst.release_resource() # Step 5: Convert TOF to Wavelength if config.verbose: print "Converting TOF to wavelength" if tim is not None: tim.getTime(False) d_som3 = common_lib.tof_to_wavelength(d_som2) if tim is not None: tim.getTime(msg="After converting TOF to wavelength ") del d_som2 # Step 6: Scale wavelength axis by sin(theta) to make lambda_T if config.verbose: print "Scaling wavelength axis by sin(theta)" # Make a fake SO so = SOM.SO() # Get the detector angle try: theta = hlr_utils.get_special(d_som3.attr_list["Theta"], so) except KeyError: theta = no_info if theta[0] is not None: if theta[2] == "degrees" or theta[2] == "degree": theta_rads = (theta[0] * (math.pi / 180.0), 0.0) else: theta_rads = (theta[0], 0.0) else: theta_rads = (float('nan'), float('nan')) print "A:", theta_rads if tim is not None: tim.getTime(False) d_som4 = common_lib.div_ncerr(d_som3, theta_rads, axis="x") if tim is not None: tim.getTime(msg="After scaling wavelength axis ") del d_som3 # Step 7: Rebin to lambda_T axis if config.verbose: print "Rebinning spectra" if config.lambdap_bins is None: # Create a binning scheme delta_TOF = d_som4[0].axis[0].val[1] - d_som4[0].axis[0].val[0] try: pathlength = d_som4.attr_list["det_pathlength"] except KeyError: if config.inst == "REF_L": pathlength = (14.85, 0.0) elif config.inst == "REF_M": pathlength = (21.0353, 0.0) else: raise RuntimeError("Do not know how to handle pathlength for "\ +"%s" % config.inst) delta_lambda = common_lib.tof_to_wavelength((delta_TOF, 0.0), pathlength=pathlength) print "B:", delta_lambda delta_lambdap = common_lib.div_ncerr(delta_lambda, (math.sin(theta_rads[0]), 0.0)) print "C:", delta_lambdap config.lambdap_bins = dr_lib.create_axis_from_data(d_som4, width=delta_lambdap[0]) print "D:", config.lambdap_bins else: # Do nothing, got the binning scheme pass if tim is not None: tim.getTime(False) d_som5 = common_lib.rebin_axis_1D_frac(d_som4, config.lambdap_bins.toNessiList()) if tim is not None: tim.getTime(msg="After rebinning spectra ") del d_som4 # Step 8: Write out all spectra to a file hlr_utils.write_file(config.output, "text/Spec", d_som6, replace_ext=False, replace_path=False, verbose=config.verbose, message="Reflectivity information") d_som6.attr_list["config"] = config hlr_utils.write_file(config.output, "text/rmd", d_som6, output_ext="rmd", verbose=config.verbose, data_ext=config.ext_replacement, path_replacement=config.path_replacement, message="metadata") if tim is not None: tim.setOldTime(old_time) tim.getTime(msg="Total Running Time")
f0ea5d41832fc9f0a684d3f226f806ee86a4e0bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/f0ea5d41832fc9f0a684d3f226f806ee86a4e0bc/refred_lp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1425, 16, 1658, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 723, 642, 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, 12, 1425, 16, 1658, 4672, 3536, 1220, 707, 353, 1625, 326, 501, 20176, 1207, 5571, 2731, 18, 225, 632, 891, 642, 30, 1033, 4191, 326, 501, 20176, 1664, 1779, 18, 632, 723, 642, 3...
if top_r >= bottom_r: top_r = top_r - tool_r bottom_r = bottom_r - tool_r if top_r < bottom_r: top_r = top_r + tool_r bottom_r = bottom_r + tool_r
bottom_r = top_r - (math.tan(angle * math.pi / 180) * depth)
def cone(x_cen, y_cen, z_cen, tool_id, tooldiameter, spindle_speed, horizontal_feedrate, vertical_feedrate, depth, diameter, angle, z_safe, step_over, step_down):
7b1f7adcc50a8d0dbd3214cd964d89735652e76a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12576/7b1f7adcc50a8d0dbd3214cd964d89735652e76a/cut-cone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 356, 73, 12, 92, 67, 71, 275, 16, 677, 67, 71, 275, 16, 998, 67, 71, 275, 16, 5226, 67, 350, 16, 358, 1673, 77, 16986, 16, 1694, 728, 298, 67, 13871, 16, 10300, 67, 7848, 5141, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 356, 73, 12, 92, 67, 71, 275, 16, 677, 67, 71, 275, 16, 998, 67, 71, 275, 16, 5226, 67, 350, 16, 358, 1673, 77, 16986, 16, 1694, 728, 298, 67, 13871, 16, 10300, 67, 7848, 5141, 1...
coords = self.renderer.get3DCoordinates(hitStack[0], hits[0], hits[1], hits[2], hits[3], hits[4])
coords = self.renderer.get3DCoordinates(int(hitStack[0]), hits[0], hits[1], hits[2], hits[3], hits[4])
def getClickCoordinates(self, hitStack): hits = [-1,-1,-1,-1,-1] for i in range(5): if(len(hitStack) > i+1): hits[i] = hitStack[i+1]
a2490655497f377b1d3fc8bdd99ef1bd8dfdd01d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/a2490655497f377b1d3fc8bdd99ef1bd8dfdd01d/base_viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13674, 1200, 13431, 12, 2890, 16, 6800, 2624, 4672, 11076, 273, 23059, 21, 16, 17, 21, 16, 17, 21, 16, 17, 21, 16, 17, 21, 65, 364, 277, 316, 1048, 12, 25, 4672, 309, 12, 1897, 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, 13674, 1200, 13431, 12, 2890, 16, 6800, 2624, 4672, 11076, 273, 23059, 21, 16, 17, 21, 16, 17, 21, 16, 17, 21, 16, 17, 21, 65, 364, 277, 316, 1048, 12, 25, 4672, 309, 12, 1897, 12,...
set.append_rrule(self._parse_rfc_rrule(value,
set.rrule(self._parse_rfc_rrule(value,
def _parse_rfc(self, s, dtstart=None, cache=False, unfold=False, forceset=False, compatible=False, ignoretz=False): global parser if compatible: forceset = True s = s.upper() lines = s.splitlines() if not lines: raise ValueError, "empty string" if unfold: i = 0 while i < len(lines): line = lines[i].rstrip() if not line: del lines[i] elif i > 0 and line[0] == " ": lines[i-1] += line[1:] del lines[i] else: i += 1 else: i = 0 while i < len(lines): line = lines[i].strip() if not line: del lines[i] else: lines[i] = line i += 1 if (not forceset and len(lines) == 1 and (not s.find(':') or s.startswith('RRULE:'))): return self._parse_rfc_rrule(s, cache=cache) else: rrulevals = [] rdatevals = [] exrulevals = [] exdatevals = [] for line in lines: if not line: continue name, value = line.split(':', 1) parms = name.split(';') if not parms: raise ValueError, "empty property name" name = parms[0] parms = parms[1:] if name == "RRULE": for parm in parms: raise ValueError, "unsupported RRULE parm: "+parm rrulevals.append(value) elif name == "RDATE": for parm in parms: if parm != "VALUE=DATE-TIME": raise ValueError, "unsupported RDATE parm: "+parm rdatevals.append(value) elif name == "EXRULE": for parm in parms: raise ValueError, "unsupported EXRULE parm: "+parm exrulevals.append(value) elif name == "EXDATE": for parm in parms: if parm != "VALUE=DATE-TIME": raise ValueError, "unsupported RDATE parm: "+parm exdatevals.append(value) elif name == "DTSTART": for parm in parms: raise ValueError, "unsupported DTSTART parm: "+parm if not parser: from dateutil import parser dtstart = parser.parse(value, ignoretz=ignoretz) else: raise ValueError, "unsupported property: "+name if (forceset or len(rrulevals) > 1 or rdatevals or exrulevals or exdatevals): if not parser and (rdatevals or exdatevals): from dateutil import parser set = rruleset(cache=cache) for value in rrulevals: set.append_rrule(self._parse_rfc_rrule(value, dtstart=dtstart)) for value in rdatevals: for datestr in value.split(','): set.append_rdate(parser.parse(datestr, ignoretz=ignoretz)) for value in exrulevals: set.append_exrule(self._parse_rfc_rrule(value, dtstart=dtstart)) for value in exdatevals: for datestr in value.split(','): set.append_exdate(parser.parse(datestr, ignoretz=ignoretz)) if compatible and dtstart: set.append_rdate(dtstart) return set else: return self._parse_rfc_rrule(rrulevals[0], dtstart=dtstart, cache=cache)
b3c88411265904f5f13de2fe4210eefdaea843f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8441/b3c88411265904f5f13de2fe4210eefdaea843f5/rrule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 16784, 12, 2890, 16, 272, 16, 3681, 1937, 33, 7036, 16, 1247, 33, 8381, 16, 640, 16007, 33, 8381, 16, 26376, 278, 33, 8381, 16, 7318, 33, 8381, 16, 2305, 12994, 33, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 67, 16784, 12, 2890, 16, 272, 16, 3681, 1937, 33, 7036, 16, 1247, 33, 8381, 16, 640, 16007, 33, 8381, 16, 26376, 278, 33, 8381, 16, 7318, 33, 8381, 16, 2305, 12994, 33, 83...
return output.strip()
return output.strip(), loc
def get_pydoc_text(module): "Returns pydoc generated output as text" output = pydoc.TextDoc().docmodule(module) # cleanup the extra text formatting that pydoc preforms patt = re.compile('\b.') output = patt.sub('', output) return output.strip()
d73fc87a2bd8c29397cb8e8be32193ff2e74ac95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/d73fc87a2bd8c29397cb8e8be32193ff2e74ac95/test_pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2074, 2434, 67, 955, 12, 2978, 4672, 315, 1356, 2395, 2434, 4374, 876, 487, 977, 6, 876, 273, 2395, 2434, 18, 1528, 1759, 7675, 2434, 2978, 12, 2978, 13, 225, 468, 6686, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2074, 2434, 67, 955, 12, 2978, 4672, 315, 1356, 2395, 2434, 4374, 876, 487, 977, 6, 876, 273, 2395, 2434, 18, 1528, 1759, 7675, 2434, 2978, 12, 2978, 13, 225, 468, 6686, 326, ...
if self.dnaStyleStrandsShape>0 or \ self.dnaStyleBasesShape>0 or \ self.dnaStyleStrutsShape>0: n_bases = chunk.ladder.baselength() if chunk==chunk.ladder.strand_rails[0].baseatoms[0].molecule: chunk_strand = 0 else: chunk_strand = 1 for pos in range(0,n_bases): atom1 = chunk.ladder.strand_rails[chunk_strand].baseatoms[pos] atom2 = chunk.ladder.axis_rail.baseatoms[pos] vz = glpane.out v2 = norm(atom1.posn()-atom2.posn()) a = angleBetween(vz,v2) if abs(a)<dnaBaseOrientationThreshold: drawer.drawsphere( lightgreen,atom1.posn()-chunk.center,1.5,2)
if chunk.ladder.axis_rail: if self.dnaStyleStrandsShape>0 or \ self.dnaStyleBasesShape>0 or \ self.dnaStyleStrutsShape>0: n_bases = chunk.ladder.baselength() if chunk==chunk.ladder.strand_rails[0].baseatoms[0].molecule: chunk_strand = 0 else: chunk_strand = 1 for pos in range(0,n_bases): atom1 = chunk.ladder.strand_rails[chunk_strand].baseatoms[pos] atom2 = chunk.ladder.axis_rail.baseatoms[pos] vz = glpane.out v2 = norm(atom1.posn()-atom2.posn()) a = angleBetween(vz,v2) if abs(a)<dnaBaseOrientationThreshold: drawer.drawsphere( lightgreen,atom1.posn()-chunk.center,1.5,2)
def drawchunk_realtime(self, glpane, chunk): """ Draws the chunk style that may depend on a current view. These are experimental features, work in progress as of 080319. For the DNA style, draws base orientation indicators and strand labels. 080321 piotr: added better label positioning and """ from utilities.constants import lightgreen from PyQt4.Qt import QFont, QString, QColor, QFontMetrics from widgets.widget_helpers import RGBf_to_QColor from dna.model.DnaLadderRailChunk import DnaStrandChunk
7e0c1c9be14d055be856b2130bc5ab5ecdb8c235 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/7e0c1c9be14d055be856b2130bc5ab5ecdb8c235/DnaCylinderChunks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 6551, 67, 7688, 957, 12, 2890, 16, 5118, 29009, 16, 2441, 4672, 3536, 10184, 87, 326, 2441, 2154, 716, 2026, 2447, 603, 279, 783, 1476, 18, 8646, 854, 23070, 4467, 16, 1440, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3724, 6551, 67, 7688, 957, 12, 2890, 16, 5118, 29009, 16, 2441, 4672, 3536, 10184, 87, 326, 2441, 2154, 716, 2026, 2447, 603, 279, 783, 1476, 18, 8646, 854, 23070, 4467, 16, 1440, 316, ...
res = self.timeshift(f, [4, 5], [0, 1], policy=P_NOVIRTUAL)
res = self.timeshift(f, [4, 5], [0, 1], policy=P_NOVIRTUAL, backendoptimize=True)
def f(a, b): d1 = hint(d, deepfreeze=True) return d1[a, b]
52a7c539d2f08b4c46d8d29e2af8987a0930bf21 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/52a7c539d2f08b4c46d8d29e2af8987a0930bf21/test_timeshift.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 12, 69, 16, 324, 4672, 302, 21, 273, 7380, 12, 72, 16, 4608, 29631, 33, 5510, 13, 327, 302, 21, 63, 69, 16, 324, 65, 2, 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, 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, 284, 12, 69, 16, 324, 4672, 302, 21, 273, 7380, 12, 72, 16, 4608, 29631, 33, 5510, 13, 327, 302, 21, 63, 69, 16, 324, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
test = triangulation_test_case(elliptic(), grid_size, lazzy_normals=False)
test = triangulation_test_case(elliptic(), grid_size, lazy_normals=False)
def run(args): verbose = "--verbose" in args grid_size = (50, 40, 30) """ For this one, the iso-surface passes through points at corners of the map, e.g. (1, 1, 0). That makes it interesting for that corner vertex ends up being part of only one triangle which is degenerate and the normal associated to that vertex is therefore undefined """ test = triangulation_test_case(elliptic(), grid_size, lazzy_normals=False) test.run(iso_level=3, verbose=verbose) assert test.degenerate_edges == [(2973, 2912)] test = triangulation_test_case(elliptic(), grid_size, lazzy_normals=True) test.run(iso_level=2.9, verbose=verbose) assert test.degenerate_edges == [] test = triangulation_test_case(hyperbolic(), grid_size, lazzy_normals=True) test.run(iso_level=3, verbose=verbose) assert test.degenerate_edges == [] test = triangulation_test_case(sinusoidal(), grid_size, lazzy_normals=False) test.run(iso_level=3, verbose=verbose) assert test.degenerate_edges == [] print format_cpu_times()
a856525aec7b6ad926456049bd8ac6baa89f0a53 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/a856525aec7b6ad926456049bd8ac6baa89f0a53/tst_iso_surface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 1968, 4672, 3988, 273, 5238, 11369, 6, 316, 833, 3068, 67, 1467, 273, 261, 3361, 16, 8063, 16, 5196, 13, 225, 3536, 2457, 333, 1245, 16, 326, 8702, 17, 18266, 11656, 3059, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 1968, 4672, 3988, 273, 5238, 11369, 6, 316, 833, 3068, 67, 1467, 273, 261, 3361, 16, 8063, 16, 5196, 13, 225, 3536, 2457, 333, 1245, 16, 326, 8702, 17, 18266, 11656, 3059, 31...
print("{0} Shownotes scaned. {1} Trackback links discovered. {2} skipped. {3} failed to use. {4} ignored".\
print("{0} Shownotes scaned. {4} ignored. {1} Trackback links discovered. {2} skipped. {3} failed to use.".\
def main(): log = "" links_count, tb_count, skip_count, error_count, ign_count = 0, 0, 0, 0, 0 git_test = getoutput("git log --format=%n") if "fatal" in git_test or "--format" in git_test: print("ERROR: your git version is to old.") os.system("git --version") exit(1) if not os.path.exists("cweb.git"): print("* no c3d2-web git repository found") os.mkdir("cweb.git") git("init") git("remote add web git://194.77.75.60/c3d2-web/git.git") if git("fetch web master") == 0: git("branch --track master FETCH_HEAD") print("* get filenames from log") log = git("log --name-only --format=%n",1) else: print("* an error occured during fetch") exit(1) else: print("* fetching updates") createbranch = "master" not in git("branch",1) if createbranch: print("* guessing error at initial fetch") fulllog, old = False, "" else: fulllog, old = git("log -1 --format=%h",2) fulllog = fulllog != 0 if not fulllog: print("* current revision is",old) else: print("* no revisions available") if git("fetch web master") != 0: print("* an error occured during fetch") exit(1) if createbranch: git("branch --track master FETCH_HEAD") git("update-ref HEAD FETCH_HEAD") new = git("log -1 --format=%h",1) if not fulllog: print("* fetched revision is",new) if old != new or fulllog: print("* get filenames from log") if fulllog:log = git("log --name-only --format=%n",1) else: log = git("log --name-only --format=%n {0}..{1}".\ format(old,new),1) else: print("* no new updates") if not update_all: exit() while "\n\n" in log: log = log.replace("\n\n","\n").split("\n") files = [] for line in log: m = re_news.match(line) if m is not None: filename = m.group('file') if filename not in files: files.append(filename) if files: print("* load files from git") git("checkout --merge master -- "+" ".join(files)) else: files = list(map(lambda fn:"content/news/"+fn, os.listdir("content/news/"))) for filename in files: if debug: print("* try to add to db: ",filename) data = load_file(filename) else: try: data = load_file(filename) except: data = None print("\033[31m* errör during parsing: ",filename,"\033[m") if data: olds = Episode.find().filter_by(filename = filename).all() for old in olds: try: File.find().filter_by(episode = old.id).delete() Link.find().filter_by(episode = old.id).delete() except Exception as e: print("\033[31merrör 1:\033[m",e) episode = Episode(filename=filename, **data['episode']) episode.save() if olds: for old in olds: try: Comment.find().filter_by(episode=old.id).update({'episode':episode.id}) Episode.find().filter_by(id = old.id).delete() except Exception as e: print("\033[31merrör 2:\033[m",e) print("\033[32m* update db: ",filename,"\033[m") else: print("\033[32m* add to db: ",filename,"\033[m") list(map(lambda kwargs: File(episode=episode.id, **kwargs).add(), data['files'])) list(map(lambda kwargs: Link(episode=episode.id, **kwargs).add(), data['links'])) if trackback: links_count += len(data['links']) pb = Progressbar(0, len(data['links']), 42, True) for n, linkdata in enumerate(data['links']): link = linkdata['url'] blacklisted = False for site in blacklist: if site in link: blacklisted = True break if not blacklisted: pb.update(n, link) used = ShownoteTrackback.find().filter_by(url = link).count() if not blacklisted and not used: response = trackback_client(link, pentamediaportal+"/{0}/{1}".\ format(episode.category, episode.link), title = episode.name, excerpt = episode.short ) if response: response = response.replace(" ","") response = response.replace("\n","") response = response.lower() print(link, response) tb_count += 1 if "<error>0</error>" in response: ShownoteTrackback( filename = filename, url = link).add() else: error_count += 1 else: tb_count += 1 if blacklisted: ign_count += 1 else: skip_count += 1 if not blacklisted: pb.draw() pb.clear() session().commit() if trackback: print("{0} Shownotes scaned. {1} Trackback links discovered. {2} skipped. {3} failed to use. {4} ignored".\ format(links_count, tb_count, skip_count, error_count, ign_count)) print("done.")
619b6c6a979803fe95d24700dc33536569665d8b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11349/619b6c6a979803fe95d24700dc33536569665d8b/cwebfetcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 613, 273, 1408, 4716, 67, 1883, 16, 8739, 67, 1883, 16, 2488, 67, 1883, 16, 555, 67, 1883, 16, 9750, 67, 1883, 273, 374, 16, 374, 16, 374, 16, 374, 16, 374, 225, 5071, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 613, 273, 1408, 4716, 67, 1883, 16, 8739, 67, 1883, 16, 2488, 67, 1883, 16, 555, 67, 1883, 16, 9750, 67, 1883, 273, 374, 16, 374, 16, 374, 16, 374, 16, 374, 225, 5071, ...
raise IOError, "link could not be created"
raise IOError("link could not be created")
def makelink(self, tarinfo, targetpath): """Make a (symbolic) link called targetpath. If it cannot be created (platform limitation), we try to make a copy of the referenced file instead of a link. """ linkpath = tarinfo.linkname try: if tarinfo.issym(): os.symlink(linkpath, targetpath) else: # See extract(). os.link(tarinfo._link_target, targetpath) except AttributeError: if tarinfo.issym(): linkpath = os.path.join(os.path.dirname(tarinfo.name), linkpath) linkpath = normpath(linkpath)
b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b4f9e5b91e72c3fe0ed21adc8fcc43e75b037e05/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 27269, 12, 2890, 16, 8232, 1376, 16, 1018, 803, 4672, 3536, 6464, 279, 261, 9009, 12164, 13, 1692, 2566, 1018, 803, 18, 971, 518, 2780, 506, 2522, 261, 9898, 17732, 3631, 732, 775...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 29796, 27269, 12, 2890, 16, 8232, 1376, 16, 1018, 803, 4672, 3536, 6464, 279, 261, 9009, 12164, 13, 1692, 2566, 1018, 803, 18, 971, 518, 2780, 506, 2522, 261, 9898, 17732, 3631, 732, 775...
orderer.RpmRelations relations to start of list.
orderer.RpmRelations relations to start of list2.
def separatePostLeafNodes(self, list): """Move topologically sorted "trailing" packages from orderer.RpmRelations relations to start of list.
e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9004, 3349, 9858, 3205, 12, 2890, 16, 666, 4672, 3536, 7607, 1760, 3966, 6478, 3115, 315, 26453, 6, 5907, 628, 29843, 18, 54, 7755, 10666, 7467, 358, 787, 434, 666, 18, 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, 1, 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, 9004, 3349, 9858, 3205, 12, 2890, 16, 666, 4672, 3536, 7607, 1760, 3966, 6478, 3115, 315, 26453, 6, 5907, 628, 29843, 18, 54, 7755, 10666, 7467, 358, 787, 434, 666, 18, 2, -100, -100, ...
if pos >= len(record.list): loops+=1 pos = 0
def getNextRecordedData(self, record): if len(record.list) == 0: return (None, 0.1) notfound = True pos = record.playbackposition loops=0 pos += 1 while True: if record.list[pos].command in [MSG2_VEHICLE_DATA]: # , MSG2_CHAT break else: self.logger.debug("command not suitable, left out: %s" % commandNames[record.list[pos].command]) pos += 1 if pos >= len(record.list): loops+=1 pos = 0 if loops > 2: # would loop forever otherwise self.runCond=False return record.playbackposition = pos #self.logger.debug("played back position %d" % pos) packet = record.list[pos] nextpos = pos+1 t = 0.2 if nextpos >= len(record.list): nextpos = 0 t = 2 nextpacket = record.list[nextpos] if nextpos < len(record.list): t = nextpacket.time - packet.time if t > 1: t = 0.2 if t < 0: t = 1
0820ccc07825ea805377bac81051b53ca9fce439 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5557/0820ccc07825ea805377bac81051b53ca9fce439/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6927, 426, 3850, 785, 751, 12, 2890, 16, 1409, 4672, 309, 562, 12, 3366, 18, 1098, 13, 422, 374, 30, 327, 261, 7036, 16, 374, 18, 21, 13, 486, 7015, 273, 1053, 949, 273, 1409, 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, 6927, 426, 3850, 785, 751, 12, 2890, 16, 1409, 4672, 309, 562, 12, 3366, 18, 1098, 13, 422, 374, 30, 327, 261, 7036, 16, 374, 18, 21, 13, 486, 7015, 273, 1053, 949, 273, 1409, 18, ...
print"<!-- $Revision: 1.29 $ -->" print"<!-- $Date: 2004/11/28 17:31:34 $ -->"
print"<!-- $Revision: 1.30 $ -->" print"<!-- $Date: 2004/12/02 01:02:48 $ -->"
def printHeader(linein): global styleSheet, inlineStyle print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" print "<html><head><title>" + linein + "</title>" print"<!-- $Revision: 1.29 $ -->" print"<!-- $Date: 2004/11/28 17:31:34 $ -->" print"<!-- $Author: noel $ -->" file = open(styleSheet,"r") if (styleSheet != "" and inlineStyle == 0): print "<link href=\"" + styleSheet + "\" rel=\"stylesheet\" type=\"text/css\">" if (styleSheet != "" and inlineStyle == 1): print "<style type=\"text/css\">" csslinein = file.readline() while csslinein != "": print csslinein, csslinein = file.readline() file.close() print "</style></head>" print "<body>" print "<div class=\"DocTitle\">" print "<h1>" + rstrip(lstrip(linein)) +"</h1>" print "</div>" print "<div class=\"MainPage\">"
fc16136abe0e486a37c93cf3944efd4ef14901d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6154/fc16136abe0e486a37c93cf3944efd4ef14901d9/otl2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 1864, 12, 1369, 267, 4672, 2552, 2154, 8229, 16, 6370, 2885, 1172, 3532, 5, 29824, 3982, 17187, 1239, 17, 759, 59, 23, 39, 759, 25728, 3982, 1059, 18, 1611, 759, 1157, 2412, 1239, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1864, 12, 1369, 267, 4672, 2552, 2154, 8229, 16, 6370, 2885, 1172, 3532, 5, 29824, 3982, 17187, 1239, 17, 759, 59, 23, 39, 759, 25728, 3982, 1059, 18, 1611, 759, 1157, 2412, 1239, ...
EXECVE_WRAPPER = """\ import os from sys import argv, executable resources = os.path.join(os.path.dirname(os.path.dirname(argv[0])), "Resources") mainprogram = os.path.join(resources, "%(mainprogram)s") assert os.path.exists(mainprogram) argv.insert(1, mainprogram) os.environ["PYTHONPATH"] = resources %(setexecutable)s os.execve(executable, argv, os.environ)
BOOTSTRAP_SCRIPT = """\ execdir=$(dirname ${0}) executable=${execdir}/%(executable)s resdir=$(dirname ${execdir})/Resources main=${resdir}/%(mainprogram)s PYTHONPATH=$resdir export PYTHONPATH exec ${executable} ${main} ${1}
def report(self): # XXX something decent import pprint pprint.pprint(self.__dict__)
16e4a168d924c411e3864ddc6a8fc757a465a6a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/16e4a168d924c411e3864ddc6a8fc757a465a6a6/bundlebuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 4672, 468, 11329, 5943, 2109, 319, 1930, 18771, 18771, 18, 84, 1188, 12, 2890, 16186, 1576, 972, 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, 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, 2605, 12, 2890, 4672, 468, 11329, 5943, 2109, 319, 1930, 18771, 18771, 18, 84, 1188, 12, 2890, 16186, 1576, 972, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
x |--> x^2 - 2
x^2 - 2
def equify(f, variables = None): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x |--> x^2 - 2 sage: equify(x^2 > 2) x |--> -x^2 + 2 sage: equify(x*y > 1) (x, y) |--> -x*y + 1 sage: equify(y > 0, (x,y)) (x, y) |--> -y """ import operator from sage.calculus.all import symbolic_expression op = f.operator() if variables == None: variables = f.variables() if op is operator.gt or op is operator.ge: s = symbolic_expression(f.rhs() - f.lhs()).function(*variables) return s else: s = symbolic_expression(f.lhs() - f.rhs()).function(*variables) return s
d4235734e2435a6828f66583a85001debae436ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d4235734e2435a6828f66583a85001debae436ae/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1298, 1164, 12, 74, 16, 3152, 273, 599, 4672, 3536, 2860, 326, 15778, 26768, 487, 279, 16754, 445, 358, 8492, 6092, 924, 1347, 1053, 16, 6895, 1347, 1083, 18, 225, 5675, 8900, 11386, 286...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1298, 1164, 12, 74, 16, 3152, 273, 599, 4672, 3536, 2860, 326, 15778, 26768, 487, 279, 16754, 445, 358, 8492, 6092, 924, 1347, 1053, 16, 6895, 1347, 1083, 18, 225, 5675, 8900, 11386, 286...
return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 3 a(n-2)." def _precompute(self, how_many=50): try: f = self._f except AttributeError: self._f = recur_gen2(0,1,4,3) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A015531(SloaneSequence): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 4 a(n-1) + 5 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015531;a Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(2) 4 sage: a.offset 0 sage: a(8) 65104 sage: a(60) 144560289664733924534327040115992228190104 sage: a.list(9) [0, 1, 4, 21, 104, 521, 2604, 13021, 65104] AUTHOR: -- Jaap Spies (2007-01-19) """ def __init__(self):
""" EXAMPLES: sage: sloane.A015531._repr_() 'Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2).' """ return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 5 a(n-2)." class A015551(RecurrenceSequence2): def __init__(self): r""" Linear 2nd order recurrence, $a(0)=0$, $a(1)=1$ and $a(n) = 6 a(n-1) + 5 a(n-2)$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A015551;a Linear 2nd order recurrence, a(n) = 6 a(n-1) + 5 a(n-2). sage: a(0) 0 sage: a(1) 1 sage: a(2) 6 sage: a.offset 0 sage: a(8) 570216 sage: a(60) 7110606606530059736761484557155863822531970573036 sage: a.list(9) [0, 1, 6, 41, 276, 1861, 12546, 84581, 570216] AUTHOR: -- Jaap Spies (2007-01-19) """
def _repr_(self): return "Linear 2nd order recurrence, a(n) = 4 a(n-1) + 3 a(n-2)."
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 327, 315, 15982, 576, 4880, 1353, 25939, 16, 279, 12, 82, 13, 273, 1059, 279, 12, 82, 17, 21, 13, 397, 890, 279, 12, 82, 17, 22, 14944, 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, 389, 12715, 67, 12, 2890, 4672, 327, 315, 15982, 576, 4880, 1353, 25939, 16, 279, 12, 82, 13, 273, 1059, 279, 12, 82, 17, 21, 13, 397, 890, 279, 12, 82, 17, 22, 14944, 2, -100, -10...
client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Depth': '1' })
client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Content-Type':'text/xml', 'Depth': '1' })
def test_timerangequery_invalid_not_utc_5(): body = open(FILES_DIR+'reports/timerangequery/invalid_nonUTC5.xml').read() client._request('REPORT', '%s/%s' % (PRINCIPAL_DAV_PATH, CALENDAR), body=body, headers={ 'Depth': '1' }) assert client.response.status == 400
0eb233b34e19f3cc4572957bdd4dfc9d1e2048e1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9939/0eb233b34e19f3cc4572957bdd4dfc9d1e2048e1/test_reports_with_float.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12542, 726, 2271, 67, 5387, 67, 902, 67, 17892, 67, 25, 13332, 1417, 273, 1696, 12, 12669, 67, 4537, 6797, 20195, 19, 12542, 726, 2271, 19, 5387, 67, 5836, 11471, 25, 18, 290...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 12542, 726, 2271, 67, 5387, 67, 902, 67, 17892, 67, 25, 13332, 1417, 273, 1696, 12, 12669, 67, 4537, 6797, 20195, 19, 12542, 726, 2271, 19, 5387, 67, 5836, 11471, 25, 18, 290...
self._conn[CONN_INTERFACE_PRESENCE].RequestPresence(subscribe_handles)
if CONN_INTERFACE_PRESENCE in self._conn: m = self._conn[CONN_INTERFACE_PRESENCE].connect_to_signal( 'PresenceUpdate', self._presence_update_cb) self._matches.append(m) self._conn[CONN_INTERFACE_PRESENCE].RequestPresence( subscribe_handles) else: _logger.warning('%s does not support Connection.Interface.' 'Presence', self._conn.object_path)
def _connected_cb(self): """Callback on successful connection to a server """ # FIXME: cope with CMs that lack some of the interfaces # FIXME: cope with CMs with no 'publish' or 'subscribe'
8afd4a76072c953759af1010f27c239eba3da0cd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/8afd4a76072c953759af1010f27c239eba3da0cd/telepathy_plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8537, 67, 7358, 12, 2890, 4672, 3536, 2428, 603, 6873, 1459, 358, 279, 1438, 3536, 468, 9852, 30, 276, 1306, 598, 385, 6947, 716, 30679, 2690, 434, 326, 7349, 468, 9852, 30, 276, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8537, 67, 7358, 12, 2890, 4672, 3536, 2428, 603, 6873, 1459, 358, 279, 1438, 3536, 468, 9852, 30, 276, 1306, 598, 385, 6947, 716, 30679, 2690, 434, 326, 7349, 468, 9852, 30, 276, ...
"--title='Cumulative C-H bond length distribution'", "--xlabel='C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency",
"--title=Cumulative C-H bond length distribution", "--xlabel=C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency",
def test_df(self): self.from_xyz("thf01", "pos") self.from_cp2k_ener("thf01") self.execute("tr-ic-psf", ['tracks/atom.pos', 'bond', '1,2,3,4', '5,6,7,8,9,10,11,12', os.path.join(input_dir, "thf01/init.psf")]) # ordinary df, no error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.df"]) df_hist = load_track("tracks/atom.pos.bond.df.hist") self.assertAlmostEqual(df_hist.sum(), 1.0, 2) self.execute("tr-plot", [ "--title='C-H bond length distribution'", "--xlabel='C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.df.bins", "tracks/atom.pos.bond.df.hist", os.path.join(output_dir, "df_noerror.png"), ]) # cumulative df, no error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["-c", "1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.cdf"]) cdf_hist = load_track("tracks/atom.pos.bond.cdf.hist") self.assertAlmostEqual(cdf_hist[-1], 1.0, 2) self.execute("tr-plot", [ "--title='Cumulative C-H bond length distribution'", "--xlabel='C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.cdf.bins", "tracks/atom.pos.bond.cdf.hist", os.path.join(output_dir, "df_cumul_noerror.png"), ]) # ordinary df, with error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["--bin-tracks", "1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.df"]) lines = [] for bin_filename in sorted(glob.glob("tracks/atom.pos.bond.df.bin.???????")): output = self.execute("tr-blav", [bin_filename, "tracks/time", "-b10"]) lines.append(output[0]) self.execute("tr-write", ["tracks/atom.pos.bond.df.hist", "tracks/atom.pos.bond.df.hist.error"], stdin=lines) df_hist_bis = load_track("tracks/atom.pos.bond.df.hist") self.assertAlmostEqual(df_hist_bis.sum(), 1.0, 2) self.assertArraysAlmostEqual(df_hist, df_hist_bis, 1e-5) self.execute("tr-plot", [ "--title='C-H bond length distribution'", "--xlabel=C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.df.bins", "tracks/atom.pos.bond.df.hist", "tracks/atom.pos.bond.df.hist.error", os.path.join(output_dir, "df_error.png"), ]) # cumulative df, with error bars self.execute("tr-df", glob.glob("tracks/atom.pos.bond.???????.???????") + ["-c", "--bin-tracks", "1.0*A", "1.2*A", "20", "tracks/atom.pos.bond.cdf"]) lines = [] for bin_filename in sorted(glob.glob("tracks/atom.pos.bond.cdf.bin.???????")): output = self.execute("tr-blav", [bin_filename, "tracks/time", "-b10"]) lines.append(output[0]) self.execute("tr-write", ["tracks/atom.pos.bond.cdf.hist", "tracks/atom.pos.bond.cdf.hist.error"], stdin=lines) cdf_hist_bis = load_track("tracks/atom.pos.bond.cdf.hist") self.assertAlmostEqual(cdf_hist_bis[-1], 1.0, 2) self.assertArraysAlmostEqual(cdf_hist, cdf_hist_bis, 1e-5) self.execute("tr-plot", [ "--title='C-H bond length distribution'", "--xlabel=C-H Distance", "--xunit=A", "--yunit=1", "--ylabel=Frequency", ":bar", "tracks/atom.pos.bond.cdf.bins", "tracks/atom.pos.bond.cdf.hist", "tracks/atom.pos.bond.cdf.hist.error", os.path.join(output_dir, "df_cumul_error.png"), ])
d5a077734d4b0c5a3fbddf6c66de01cad46658ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11050/d5a077734d4b0c5a3fbddf6c66de01cad46658ff/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2180, 12, 2890, 4672, 365, 18, 2080, 67, 17177, 2932, 451, 74, 1611, 3113, 315, 917, 7923, 365, 18, 2080, 67, 4057, 22, 79, 67, 708, 2932, 451, 74, 1611, 7923, 365, 18, 883...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2180, 12, 2890, 4672, 365, 18, 2080, 67, 17177, 2932, 451, 74, 1611, 3113, 315, 917, 7923, 365, 18, 2080, 67, 4057, 22, 79, 67, 708, 2932, 451, 74, 1611, 7923, 365, 18, 883...
indx = self.learners.index(learner)
indx = [l.id for l in self.learners].index(learner.id)
def test(self, learner=None): # testing if self.results and learner: learners = [learner] else: learners = self.learnDict.values() if not learners: return
4a5d0b6408fb255b8754ad2849a498c83b9e6cc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4a5d0b6408fb255b8754ad2849a498c83b9e6cc3/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 16, 884, 24834, 33, 7036, 4672, 468, 7769, 309, 365, 18, 4717, 471, 884, 24834, 30, 16094, 414, 273, 306, 298, 24834, 65, 469, 30, 16094, 414, 273, 365, 18, 21346, 5014...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 12, 2890, 16, 884, 24834, 33, 7036, 4672, 468, 7769, 309, 365, 18, 4717, 471, 884, 24834, 30, 16094, 414, 273, 306, 298, 24834, 65, 469, 30, 16094, 414, 273, 365, 18, 21346, 5014...
- a pair (p, q) of tableaux of the same shape and where q is standard.
- ``p``, ``q``: two tableaux of the same shape and where ``q`` is standard.
def robinson_schensted_inverse(p, q): r""" Returns the permutation corresponding to the pair of tableaux (p,q) using the inverse of Robinson-Schensted algorithm. INPUT: - a pair (p, q) of tableaux of the same shape and where q is standard. EXAMPLES:: sage: from sage.combinat.permutation import robinson_schensted_inverse sage: t1 = Tableau([[1, 2, 5], [3], [4]]) sage: t2 = Tableau([[1, 2, 3], [4], [5]]) sage: robinson_schensted_inverse(t1, t2) [1, 4, 5, 3, 2] sage: robinson_schensted_inverse(t1, t1) [1, 4, 3, 2, 5] sage: robinson_schensted_inverse(t2, t2) [1, 2, 5, 4, 3] sage: robinson_schensted_inverse(t2, t1) [1, 5, 4, 2, 3] If the first tableau is not standard, then it is not a bijection:: sage: p = Tableau([[1,3,2]]); q = Tableau([[1,2,3]]) sage: robinson_schensted_inverse(p, q) [1, 3, 2] sage: _.robinson_schensted() [[[1, 2], [3]], [[1, 2], [3]]] sage: robinson_schensted_inverse(*_) [1, 3, 2] If the first tableau is semistandard:: sage: p = Tableau([[1,2,2]]); q = Tableau([[1,2,3]]) sage: robinson_schensted_inverse(p, q) [1, 2, 2] sage: _.robinson_schensted() [[[1, 2, 2]], [[1, 2, 3]]] TESTS:: From empty tableaux:: sage: robinson_schensted_inverse(Tableau([]), Tableau([])) [] This function is the inverse of robinson_shensted:: sage: f = lambda p: robinson_schensted_inverse(*p.robinson_schensted()) sage: all(p == f(p) for n in range(7) for p in Permutations(n)) True sage: n = ZZ.random_element(200) sage: p = Permutations(n).random_element() sage: is_fine = True if p == f(p) else p ; is_fine True Both tableaux must be of the same shape:: sage: robinson_schensted_inverse(Tableau([[1,2,3]]), Tableau([[1,2]])) Traceback (most recent call last): ... ValueError: p(=[[1, 2, 3]]) and q(=[[1, 2]]) must have the same shape The second tableau must be standard:: sage: robinson_schensted_inverse(Tableau([[1,2,3]]), Tableau([[1,3,2]])) Traceback (most recent call last): ... ValueError: q(=[[1, 3, 2]]) must be standard """ if p.shape() != q.shape(): raise ValueError, "p(=%s) and q(=%s) must have the same shape"%(p, q) if not q.is_standard(): raise ValueError, "q(=%s) must be standard"%q size = p.size() permutation = [] d = dict((q[i][j],(i,j)) for i in range(len(q)) for j in range(len(q[i]))) p = map(list, p) for n in range(size, 0, -1): i,j = d[n] x = p[i][j] del p[i][j] if len(p[i]) == 0: del p[i] while i > 0: row = p[i-1] y = max(filter(lambda z: z<x, row )) row[row.index(y)] = x x = y i = i-1 permutation.insert(0, x) return Permutation(permutation)
149fc1ff9917de1b892ecdfb86903ef66b09974d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/149fc1ff9917de1b892ecdfb86903ef66b09974d/permutation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 721, 4757, 816, 67, 28204, 275, 334, 329, 67, 22552, 12, 84, 16, 1043, 4672, 436, 8395, 2860, 326, 17440, 4656, 358, 326, 3082, 434, 1014, 18196, 261, 84, 16, 85, 13, 1450, 326, 8322, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 721, 4757, 816, 67, 28204, 275, 334, 329, 67, 22552, 12, 84, 16, 1043, 4672, 436, 8395, 2860, 326, 17440, 4656, 358, 326, 3082, 434, 1014, 18196, 261, 84, 16, 85, 13, 1450, 326, 8322, ...
f = open("foobar", "w+")
f = open("a", "w+")
def test_conv_descriptor(self): import fcntl f = open("foobar", "w+") raises(TypeError, fcntl._conv_descriptor, "foo") raises(TypeError, fcntl._conv_descriptor, 2.0) import cStringIO raises(TypeError, fcntl._conv_descriptor, cStringIO.StringIO()) res = fcntl._conv_descriptor(10) res_1 = fcntl._conv_descriptor(f) assert res == 10 assert res_1 == f.fileno() f.close()
ffa8287d97ec378336d0da055cd3dd77ba65ce9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ffa8287d97ec378336d0da055cd3dd77ba65ce9e/test_fcntl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4896, 67, 12628, 12, 2890, 4672, 1930, 30894, 225, 284, 273, 1696, 2932, 69, 3113, 315, 91, 15, 7923, 225, 14183, 12, 19030, 16, 30894, 6315, 4896, 67, 12628, 16, 315, 11351, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4896, 67, 12628, 12, 2890, 4672, 1930, 30894, 225, 284, 273, 1696, 2932, 69, 3113, 315, 91, 15, 7923, 225, 14183, 12, 19030, 16, 30894, 6315, 4896, 67, 12628, 16, 315, 11351, ...
"""operator.mul(%s)"""
def _repeat(self, node, results): """operator.mul(%s)""" return self._handle_rename(node, results, "mul")
9296c21e78ed50e8864f9f54d4e772a329a36240 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/9296c21e78ed50e8864f9f54d4e772a329a36240/fix_operator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9374, 12, 2890, 16, 756, 16, 1686, 4672, 327, 365, 6315, 4110, 67, 18539, 12, 2159, 16, 1686, 16, 315, 16411, 7923, 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, 389, 9374, 12, 2890, 16, 756, 16, 1686, 4672, 327, 365, 6315, 4110, 67, 18539, 12, 2159, 16, 1686, 16, 315, 16411, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, request, id=None, name="", password=None, auth_username=""): """ Initialize user object
def __init__(self, request, id=None, name="", password=None, auth_username=""): """ Initialize User object
def __init__(self, request, id=None, name="", password=None, auth_username=""): """ Initialize user object @param request: the request object @param id: (optional) user ID @param name: (optional) user name @param password: (optional) user password @param auth_username: (optional) already authenticated user name (e.g. apache basic auth) """ self._cfg = request.cfg self.valid = 0 self.trusted = 0 self.id = id self.auth_username = auth_username
3459697b85907bfd97b15aecf78ffd9a02beac53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/3459697b85907bfd97b15aecf78ffd9a02beac53/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 590, 16, 612, 33, 7036, 16, 508, 1546, 3113, 2201, 33, 7036, 16, 1357, 67, 5053, 1546, 6, 4672, 3536, 9190, 2177, 733, 225, 632, 891, 590, 30, 326, 590...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 590, 16, 612, 33, 7036, 16, 508, 1546, 3113, 2201, 33, 7036, 16, 1357, 67, 5053, 1546, 6, 4672, 3536, 9190, 2177, 733, 225, 632, 891, 590, 30, 326, 590...
else: if is_quad_core() and sched_mc_level == 0: return(0) print "INFO: CPUs utilized is not in same package" sys.exit(1)
return(1)
def validate_cpugrp_map(cpu_group, sched_mc_level, sched_smt_level): ''' Verify if cpugrp belong to same package ''' modi_cpu_grp = cpu_group[:] try: if is_hyper_threaded(): for pkg in sorted(cpu_map.keys()): # if CPU utilized is across package this condition will be true if len(modi_cpu_grp) != len(cpu_group): break for core in sorted(cpu_map[pkg].keys()): core_cpus = cpu_map[pkg][core] if core_cpus == modi_cpu_grp: return 0 else: #if CPUs used across the cores for i in range(0, len(core_cpus)): if core_cpus[i] in modi_cpu_grp: modi_cpu_grp.remove(core_cpus[i]) else: # If sched_smt == 0 then its oky if threads run # in different cores of same package if sched_smt_level == 1: sys.exit(1) else: if len(cpu_group) == 2 and \ len(modi_cpu_grp) < len(cpu_group): print "INFO:CPUs utilized not in a core" return 0 print "INFO: CPUs utilized is not in same package or core" sys.exit(1) else: for pkg in sorted(cpu_map.keys()): pkg_cpus = cpu_map[pkg] if pkg_cpus == cpu_group: return(0) else: if is_quad_core() and sched_mc_level == 0: return(0) print "INFO: CPUs utilized is not in same package" sys.exit(1) except Exception, details: print "Exception in validate_cpugrp_map: ", details sys.exit(1)
b2c7cd73607f781c03a9475f07333b594ed7d1a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11457/b2c7cd73607f781c03a9475f07333b594ed7d1a5/sched_mc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 4057, 637, 13832, 67, 1458, 12, 11447, 67, 1655, 16, 23964, 67, 13952, 67, 2815, 16, 23964, 67, 87, 1010, 67, 2815, 4672, 9163, 8553, 309, 3283, 637, 13832, 10957, 358, 1967, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1954, 67, 4057, 637, 13832, 67, 1458, 12, 11447, 67, 1655, 16, 23964, 67, 13952, 67, 2815, 16, 23964, 67, 87, 1010, 67, 2815, 4672, 9163, 8553, 309, 3283, 637, 13832, 10957, 358, 1967, ...
def __neq__(self, other):
def __ne__(self, other):
def __neq__(self, other): return not self.__eq__(other)
b50a3054f4a2d32047f6139fb1f61a1331cac274 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12664/b50a3054f4a2d32047f6139fb1f61a1331cac274/euclid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 486, 365, 16186, 11253, 972, 12, 3011, 13, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 486, 365, 16186, 11253, 972, 12, 3011, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.docstring_parser.parse_docstring(val_doc)
self.docstring_parser.parse_docstring(val_doc, docindex)
def build_doc_index(self, *items): """ Build API documentation for the given list of items, and return it in the form of a L{DocIndex}. Each item can be any of the following (tried in order): - A string naming a python package directory (e.g., C{'epydoc/markup'}) - A string naming a python file (e.g., C{'epydoc/docparser.py'}) - A string naming a python object (e.g., C{'epydoc.docparser.DocParser'}) - A (non-string) python object (e.g., C{list.append}) """ # Get the basic docs for each item. doc_pairs = self._get_docs_from_items(items)
871395d07f0ba523b13287e6513bcc58d255a1d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/871395d07f0ba523b13287e6513bcc58d255a1d7/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 2434, 67, 1615, 12, 2890, 16, 380, 3319, 4672, 3536, 3998, 1491, 7323, 364, 326, 864, 666, 434, 1516, 16, 471, 327, 518, 316, 326, 646, 434, 279, 511, 95, 1759, 1016, 5496, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2434, 67, 1615, 12, 2890, 16, 380, 3319, 4672, 3536, 3998, 1491, 7323, 364, 326, 864, 666, 434, 1516, 16, 471, 327, 518, 316, 326, 646, 434, 279, 511, 95, 1759, 1016, 5496, ...
def bench_cache(import_, repeat, number): """Measure the time it takes to pull from sys.modules."""
def bench(name, cleanup=lambda: None, *, seconds=1, repeat=3): """Bench the given statement as many times as necessary until total executions take one second.""" stmt = "__import__({!r})".format(name) timer = timeit.Timer(stmt) for x in range(repeat): total_time = 0 count = 0 while total_time < seconds: try: total_time += timer.timeit(1) finally: cleanup() count += 1 else: if total_time > seconds: count -= 1 yield count def from_cache(repeat): """sys.modules"""
def bench_cache(import_, repeat, number): """Measure the time it takes to pull from sys.modules.""" name = '<benchmark import>' with util.uncache(name): module = imp.new_module(name) sys.modules[name] = module runs = [] for x in range(repeat): start_time = timeit.default_timer() for y in range(number): import_(name) end_time = timeit.default_timer() runs.append(end_time - start_time) return min(runs)
23cf5743aef2b8c2baa023ec3f7493c7e139027a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/23cf5743aef2b8c2baa023ec3f7493c7e139027a/benchmark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22499, 12, 529, 16, 6686, 33, 14661, 30, 599, 16, 380, 16, 3974, 33, 21, 16, 7666, 33, 23, 4672, 3536, 38, 7382, 326, 864, 3021, 487, 4906, 4124, 487, 4573, 3180, 2078, 26845, 4862, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22499, 12, 529, 16, 6686, 33, 14661, 30, 599, 16, 380, 16, 3974, 33, 21, 16, 7666, 33, 23, 4672, 3536, 38, 7382, 326, 864, 3021, 487, 4906, 4124, 487, 4573, 3180, 2078, 26845, 4862, ...
repos_path = get_hg_ui_settings()['paths_root_path']
repos_path = HgModel().repos_path
def get_commits_stats(repo_name, ts_min_y, ts_max_y): from rhodecode.model.db import Statistics, Repository log = get_commits_stats.get_logger() author_key_cleaner = lambda k: person(k).replace('"', "") #for js data compatibilty commits_by_day_author_aggregate = {} commits_by_day_aggregate = {} repos_path = get_hg_ui_settings()['paths_root_path'] p = os.path.join(repos_path, repo_name) repo = get_repo(p) skip_date_limit = True parse_limit = 250 #limit for single task changeset parsing optimal for last_rev = 0 last_cs = None timegetter = itemgetter('time') sa = get_session() dbrepo = sa.query(Repository)\ .filter(Repository.repo_name == repo_name).scalar() cur_stats = sa.query(Statistics)\ .filter(Statistics.repository == dbrepo).scalar() if cur_stats: last_rev = cur_stats.stat_on_revision if not repo.revisions: return True if last_rev == repo.revisions[-1] and len(repo.revisions) > 1: #pass silently without any work if we're not on first revision or current #state of parsing revision(from db marker) is the last revision return True if cur_stats: commits_by_day_aggregate = OrderedDict( json.loads( cur_stats.commit_activity_combined)) commits_by_day_author_aggregate = json.loads(cur_stats.commit_activity) log.debug('starting parsing %s', parse_limit) lmktime = mktime for cnt, rev in enumerate(repo.revisions[last_rev:]): last_cs = cs = repo.get_changeset(rev) k = '%s-%s-%s' % (cs.date.timetuple()[0], cs.date.timetuple()[1], cs.date.timetuple()[2]) timetupple = [int(x) for x in k.split('-')] timetupple.extend([0 for _ in xrange(6)]) k = lmktime(timetupple) if commits_by_day_author_aggregate.has_key(author_key_cleaner(cs.author)): try: l = [timegetter(x) for x in commits_by_day_author_aggregate\ [author_key_cleaner(cs.author)]['data']] time_pos = l.index(k) except ValueError: time_pos = False if time_pos >= 0 and time_pos is not False: datadict = commits_by_day_author_aggregate\ [author_key_cleaner(cs.author)]['data'][time_pos] datadict["commits"] += 1 datadict["added"] += len(cs.added) datadict["changed"] += len(cs.changed) datadict["removed"] += len(cs.removed) else: if k >= ts_min_y and k <= ts_max_y or skip_date_limit: datadict = {"time":k, "commits":1, "added":len(cs.added), "changed":len(cs.changed), "removed":len(cs.removed), } commits_by_day_author_aggregate\ [author_key_cleaner(cs.author)]['data'].append(datadict) else: if k >= ts_min_y and k <= ts_max_y or skip_date_limit: commits_by_day_author_aggregate[author_key_cleaner(cs.author)] = { "label":author_key_cleaner(cs.author), "data":[{"time":k, "commits":1, "added":len(cs.added), "changed":len(cs.changed), "removed":len(cs.removed), }], "schema":["commits"], } #gather all data by day if commits_by_day_aggregate.has_key(k): commits_by_day_aggregate[k] += 1 else: commits_by_day_aggregate[k] = 1 if cnt >= parse_limit: #don't fetch to much data since we can freeze application break overview_data = [] for k, v in commits_by_day_aggregate.items(): overview_data.append([k, v]) overview_data = sorted(overview_data, key=itemgetter(0)) if not commits_by_day_author_aggregate: commits_by_day_author_aggregate[author_key_cleaner(repo.contact)] = { "label":author_key_cleaner(repo.contact), "data":[0, 1], "schema":["commits"], } stats = cur_stats if cur_stats else Statistics() stats.commit_activity = json.dumps(commits_by_day_author_aggregate) stats.commit_activity_combined = json.dumps(overview_data) log.debug('last revison %s', last_rev) leftovers = len(repo.revisions[last_rev:]) log.debug('revisions to parse %s', leftovers) if last_rev == 0 or leftovers < parse_limit: stats.languages = json.dumps(__get_codes_stats(repo_name)) stats.repository = dbrepo stats.stat_on_revision = last_cs.revision try: sa.add(stats) sa.commit() except: log.error(traceback.format_exc()) sa.rollback() return False if len(repo.revisions) > 1: run_task(get_commits_stats, repo_name, ts_min_y, ts_max_y) return True
1cdc1a088ab95d4ce5cdc5fc9a19a3555e58f791 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/1cdc1a088ab95d4ce5cdc5fc9a19a3555e58f791/tasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27000, 67, 5296, 12, 7422, 67, 529, 16, 3742, 67, 1154, 67, 93, 16, 3742, 67, 1896, 67, 93, 4672, 628, 6259, 390, 710, 18, 2284, 18, 1966, 1930, 22964, 16, 6281, 613, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 27000, 67, 5296, 12, 7422, 67, 529, 16, 3742, 67, 1154, 67, 93, 16, 3742, 67, 1896, 67, 93, 4672, 628, 6259, 390, 710, 18, 2284, 18, 1966, 1930, 22964, 16, 6281, 613, 273, ...
'zope.ucol >= 1.0', 'zope.html >= 0.0.1'],
'zope.ucol >= 1.0', 'zope.html >= 0.0.1', 'zope.file', 'zope.mimetype'],
def get_version(): version_file = os.path.join('src', 'schooltool', 'version.txt') f = open(version_file, 'r') result = f.read() f.close() return result
f961914970c9f5d28c6b0601c3dd7bae515bbfe5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7127/f961914970c9f5d28c6b0601c3dd7bae515bbfe5/setup.eggs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 13332, 1177, 67, 768, 273, 1140, 18, 803, 18, 5701, 2668, 4816, 2187, 296, 28204, 1371, 6738, 2187, 296, 1589, 18, 5830, 6134, 284, 273, 1696, 12, 1589, 67, 768, 16, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 13332, 1177, 67, 768, 273, 1140, 18, 803, 18, 5701, 2668, 4816, 2187, 296, 28204, 1371, 6738, 2187, 296, 1589, 18, 5830, 6134, 284, 273, 1696, 12, 1589, 67, 768, 16, 296...
compositions = IntegerListsLex(range(*l),
compositions = IntegerListsLex(range(*arg),
def iter_morphisms(self, l=None, codomain=None, min_length=1): r""" Iterate over all morphisms with domain ``self`` and the given codmain.
271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/271befb9ab8e7c2467a8b9cdc30e56ff251f7c7e/words.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 81, 7657, 23749, 12, 2890, 16, 328, 33, 7036, 16, 11012, 1530, 33, 7036, 16, 1131, 67, 2469, 33, 21, 4672, 436, 8395, 11436, 1879, 777, 14354, 23749, 598, 2461, 12176, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 67, 81, 7657, 23749, 12, 2890, 16, 328, 33, 7036, 16, 11012, 1530, 33, 7036, 16, 1131, 67, 2469, 33, 21, 4672, 436, 8395, 11436, 1879, 777, 14354, 23749, 598, 2461, 12176, 2890, ...
undo['virtual'][key] = binaries[arch][1][j][:] binaries[arch][1][j].remove(binary) if len(binaries[arch][1][j]) == 0: del binaries[arch][1][j]
undo['virtual'][key] = binaries[parch][1][j][:] binaries[parch][1][j].remove(binary) if len(binaries[parch][1][j]) == 0: del binaries[parch][1][j]
def doop_source(self, pkg): """Apply a change to the testing distribution as requested by `pkg`
b0ef0af3487c34142dce19457921f7cceb8b113e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/b0ef0af3487c34142dce19457921f7cceb8b113e/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 556, 67, 3168, 12, 2890, 16, 3475, 4672, 3536, 7001, 279, 2549, 358, 326, 7769, 7006, 487, 3764, 635, 1375, 10657, 68, 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, 741, 556, 67, 3168, 12, 2890, 16, 3475, 4672, 3536, 7001, 279, 2549, 358, 326, 7769, 7006, 487, 3764, 635, 1375, 10657, 68, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if ext == '.cc':
if ext in ('.cc', '.mm', '.c', '.m'):
def WalkDirectory(root_path, actions): for path, dirs, files in os.walk(root_path): if '.svn' in dirs: dirs.remove('.svn') for file in files: ext = os.path.splitext(file)[1] if ext == '.cc': GrepForActions(os.path.join(path, file), actions)
53d51d208e5e097ceae9eebdc8be7f377edb4476 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/53d51d208e5e097ceae9eebdc8be7f377edb4476/extract_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7564, 2853, 12, 3085, 67, 803, 16, 4209, 4672, 364, 589, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 67, 803, 4672, 309, 2418, 31505, 11, 316, 7717, 30, 7717, 18, 4479, 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, 7564, 2853, 12, 3085, 67, 803, 16, 4209, 4672, 364, 589, 16, 7717, 16, 1390, 316, 1140, 18, 11348, 12, 3085, 67, 803, 4672, 309, 2418, 31505, 11, 316, 7717, 30, 7717, 18, 4479, 2668, ...
bv = value
bv = value if not BACKWARDS_COMPATIBLE: bv += 1
def set(self, nodeid, **propvalues): isnew = 0 if propvalues.has_key('#ISNEW'): isnew = 1 del propvalues['#ISNEW'] if not isnew: self.fireAuditors('set', nodeid, propvalues) if not propvalues: return propvalues if propvalues.has_key('id'): raise KeyError, '"id" is reserved' if self.db.journaltag is None: raise hyperdb.DatabaseError, 'Database open read-only' view = self.getview(1)
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 12, 2890, 16, 756, 350, 16, 2826, 5986, 2372, 4672, 353, 2704, 273, 374, 309, 2270, 2372, 18, 5332, 67, 856, 2668, 7, 5127, 12917, 11, 4672, 353, 2704, 273, 404, 1464, 2270, 2372,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 756, 350, 16, 2826, 5986, 2372, 4672, 353, 2704, 273, 374, 309, 2270, 2372, 18, 5332, 67, 856, 2668, 7, 5127, 12917, 11, 4672, 353, 2704, 273, 404, 1464, 2270, 2372,...
m = Chem.MolFromSmiles('C1CCN1CCCC')
m = Chem.MolFromSmiles('C1CCCCN1CCCC')
def testSFNetIssue1804418(self): m = Chem.MolFromSmiles('C1CCN1CCCC') res = RecapDecompose(m) self.failUnless(res) self.failUnless(len(res.GetLeaves())==2) ks = res.GetLeaves().keys() self.failUnless('[Du]N1CCC1' in ks) self.failUnless('[Du]CCCC' in ks)
3023fb9be32736c17107514a20cac7c65f47a49f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9195/3023fb9be32736c17107514a20cac7c65f47a49f/Recap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 22395, 7308, 12956, 2643, 3028, 24, 2643, 12, 2890, 4672, 312, 273, 26542, 18, 49, 355, 1265, 9552, 1449, 2668, 39, 21, 6743, 6743, 50, 21, 6743, 6743, 6134, 400, 273, 868, 5909, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22395, 7308, 12956, 2643, 3028, 24, 2643, 12, 2890, 4672, 312, 273, 26542, 18, 49, 355, 1265, 9552, 1449, 2668, 39, 21, 6743, 6743, 50, 21, 6743, 6743, 6134, 400, 273, 868, 5909, ...
dest = l[1:] or ''
dest = l and getstring(l[0], _("outgoing wants a repository path")) or ''
def outgoing(repo, subset, x): import hg # avoid start-up nasties l = getargs(x, 0, 1, _("outgoing wants a repository path")) dest = l[1:] or '' dest = repo.ui.expandpath(dest or 'default-push', dest or 'default') dest, branches = hg.parseurl(dest) other = hg.repository(hg.remoteui(repo, {}), dest) repo.ui.pushbuffer() o = discovery.findoutgoing(repo, other) repo.ui.popbuffer() cl = repo.changelog o = set([cl.rev(r) for r in repo.changelog.nodesbetween(o, None)[0]]) return [r for r in subset if r in o]
4553a5962e83ff67e4f0c64d8933da38a8f66c67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/4553a5962e83ff67e4f0c64d8933da38a8f66c67/revset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12902, 12, 7422, 16, 7931, 16, 619, 4672, 1930, 22576, 468, 4543, 787, 17, 416, 290, 689, 606, 328, 273, 336, 1968, 12, 92, 16, 374, 16, 404, 16, 389, 2932, 31891, 14805, 279, 3352, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12902, 12, 7422, 16, 7931, 16, 619, 4672, 1930, 22576, 468, 4543, 787, 17, 416, 290, 689, 606, 328, 273, 336, 1968, 12, 92, 16, 374, 16, 404, 16, 389, 2932, 31891, 14805, 279, 3352, ...
if traceVerbosity>=7: trace(7, 0, "getNecessary(%s) -> %s", (pkg, sorted(necdct.keys())))
if traceVerbosity>=7: print "
def getNecessary(self, pkg, ignorepkgs={}): """ Return the set of packages for which pkg is necessary (i.e., a chain of requires with no alternatives). """
b26ec53d5174d18eebf24ded272ad218fb19d0b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/b26ec53d5174d18eebf24ded272ad218fb19d0b4/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 4128, 12, 2890, 16, 3475, 16, 2305, 25376, 12938, 4672, 3536, 2000, 326, 444, 434, 5907, 364, 1492, 3475, 353, 4573, 261, 77, 18, 73, 12990, 279, 2687, 434, 4991, 598, 1158, 20699...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11069, 4128, 12, 2890, 16, 3475, 16, 2305, 25376, 12938, 4672, 3536, 2000, 326, 444, 434, 5907, 364, 1492, 3475, 353, 4573, 261, 77, 18, 73, 12990, 279, 2687, 434, 4991, 598, 1158, 20699...
width = 0 self._colpositions = [0] for w in W: width = width + w self._colpositions.append(width) self._width = width
def _calc(self): if hasattr(self,'_width'): return self._calc_height() if hasattr(self,'_width_calculated_once'): return self._width_calculated_once = 1 self._calc_width()
def _calc(self): if hasattr(self,'_width'): return
4467fe581b408009f671962abdf5ff948d9427d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/4467fe581b408009f671962abdf5ff948d9427d3/tables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12448, 12, 2890, 4672, 309, 3859, 12, 2890, 11189, 67, 2819, 11, 4672, 327, 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...
[ 1, 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, 389, 12448, 12, 2890, 4672, 309, 3859, 12, 2890, 11189, 67, 2819, 11, 4672, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cur_list = skel_to_col_attr_list(self.__skeleton__[table])
cur_list = skel_to_col_attr_list(self.__skeleton__[table_name])
def add_column(self, table, col_name, attr_dict, default='NULL'): """ Takes a while, thanks to SQLite... """ # Check input: if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if self.__skeleton__[table].has_key(col_name): raise ValueError("Table %s already has column %s."%(table,col_name)) attr_dict = verify_column(attr_dict) # Get an ordered list: cur_list = skel_to_col_attr_list(self.__skeleton__[table]) # Update the skeleton: self.__skeleton__[table][col_name] = attr_dict original = '' for col in cur_list: original += col[0] +', ' original = original.rstrip(', ') more = original + ', ' + col_name more_attr = '' for col in cur_list: if col[2]: # If primary key: more_attr += col[0] + ' ' + col[1] + ' primary key, ' else: more_attr += col[0] + ' ' + col[1] + ', ' more_attr += col_name + ' ' + attr_dict['sql'] # ROBERT: Look at the new fun way to do this... # executescript runs a begin transaction and commit so this # should speed things up for even large amounts of data # Silly SQLite -- we have to make a temp table to hold info... self.__connection__.executescript(""" create temporary table spam(%s); insert into spam select %s, %s from %s; drop table %s; create table %s (%s); """%(more_attr, original, default, table, table, table, more_attr)) # Update indices in new table new_table_set_col_attr(self.__connection__, table, self.__skeleton__[table]) # Now we can plop our data into the *new* table: self.__connection__.executescript(""" insert into %s select %s from spam; drop table spam; """%(table, more)) self.vacuum()
5ddf79d83938a9c0191ec3af2f60e264a74ecef9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5ddf79d83938a9c0191ec3af2f60e264a74ecef9/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 16, 1604, 67, 1576, 16, 805, 2218, 8560, 11, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 225, 3536, 468, 2073, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 527, 67, 2827, 12, 2890, 16, 1014, 16, 645, 67, 529, 16, 1604, 67, 1576, 16, 805, 2218, 8560, 11, 4672, 3536, 23004, 279, 1323, 16, 286, 19965, 358, 16192, 2777, 225, 3536, 468, 2073, ...
"..TD": "Default tempo", ".BPR": "Rows per beat", ".MPR": "Rows per measure", "..MT": "Tempo mode", ".MMP": "Plugin Mix mode", ".VWC": "CreatedWith version", "VWSL": "LastSavedWith version", ".APS": "Song Pre-amplification", "VTSV": "VSTi volume", ".VGD": "Default global volume", "...C": "?"
"...C": (UInt32, 1, "Channels"), ".VWC": (None, 0, "CreatedWith version"), ".VGD": (None, 0, "Default global volume"), "..TD": (None, 0, "Default tempo"), "HIBE": (None, 0, "Embedded instrument header"), "VWSL": (None, 0, "LastSavedWith version"), ".MMP": (None, 0, "Plugin Mix mode"), ".BPR": (None, 0, "Rows per beat"), ".MPR": (None, 0, "Rows per measure"), "@PES": (None, 0, "Chunk separaror"), ".APS": (None, 0, "Song Pre-amplification"), "..MT": (None, 0, "Tempo mode"), "VTSV": (None, 0, "VSTi volume"),
def parsePlugin(s): yield SoundMixPluginInfo(s, "info") # Check if VST setchunk present size = s.stream.readBits(s.absolute_address+s.current_size, 32, LITTLE_ENDIAN) if size > 0 and size < s.current_size + s._size: yield ExtraData(s, "extra_data") # Check if XPlugData is present size = s.stream.readBits(s.absolute_address+s.current_size, 32, LITTLE_ENDIAN) if size > 0 and size < s.current_size + s._size: yield XPlugData(s, "xplug_data")
75d0930d61b2b98bfd5cdaf0ec5487c36bb81181 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/75d0930d61b2b98bfd5cdaf0ec5487c36bb81181/xm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3773, 12, 87, 4672, 2824, 348, 772, 21294, 3773, 966, 12, 87, 16, 315, 1376, 7923, 225, 468, 2073, 309, 776, 882, 444, 6551, 3430, 963, 273, 272, 18, 3256, 18, 896, 6495, 12, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3773, 12, 87, 4672, 2824, 348, 772, 21294, 3773, 966, 12, 87, 16, 315, 1376, 7923, 225, 468, 2073, 309, 776, 882, 444, 6551, 3430, 963, 273, 272, 18, 3256, 18, 896, 6495, 12, 8...
if self.core.GetCanSave(): self.core.Save()
self.core.Save()
def on_MainWindow_delete_event(self,widget,data=None): if not self.config.Get("autosave"): if not self.core.GetCanSave(): gtk.main_quit() return False
bf045f2c8d98a9e6ff4da3ca65a805a01e54f5e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/bf045f2c8d98a9e6ff4da3ca65a805a01e54f5e6/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 6376, 3829, 67, 3733, 67, 2575, 12, 2890, 16, 6587, 16, 892, 33, 7036, 4672, 309, 486, 365, 18, 1425, 18, 967, 2932, 21996, 836, 6, 4672, 309, 486, 365, 18, 3644, 18, 967, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 6376, 3829, 67, 3733, 67, 2575, 12, 2890, 16, 6587, 16, 892, 33, 7036, 4672, 309, 486, 365, 18, 1425, 18, 967, 2932, 21996, 836, 6, 4672, 309, 486, 365, 18, 3644, 18, 967, ...
message = '%s CE: SubmittedJobs=%s' %(self.ceName,submittedJobs) message += ', WaitingJobs=%s, RunningJobs=%s' %(waitingJobs,runningJobs)
message = '%s CE: SubmittedJobs=%s' % ( self.ceName, submittedJobs ) message += ', WaitingJobs=%s, RunningJobs=%s' % ( waitingJobs, runningJobs )
def available(self, requirements = {} ): """This method returns True if CE is available and false if not. The CE instance polls for waiting and running jobs and compares to the limits in the CE parameters. """ # FIXME: need to take into account the possible requirements from the pilots, # so far the cputime result = self.getDynamicInfo() if not result['OK']: self.log.warn('Could not obtain CE dynamic information') self.log.warn(result['Message']) return result else: runningJobs = result['RunningJobs'] waitingJobs = result['WaitingJobs'] submittedJobs = result['SubmittedJobs']
3d103a1ec7530dcfac38e6ccc642be862e663b73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3d103a1ec7530dcfac38e6ccc642be862e663b73/ComputingElement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2319, 12, 2890, 16, 8433, 273, 2618, 262, 30, 3536, 2503, 707, 1135, 1053, 309, 29538, 353, 2319, 471, 629, 309, 486, 18, 225, 1021, 29538, 791, 2952, 3251, 364, 7336, 471, 3549, 6550, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2319, 12, 2890, 16, 8433, 273, 2618, 262, 30, 3536, 2503, 707, 1135, 1053, 309, 29538, 353, 2319, 471, 629, 309, 486, 18, 225, 1021, 29538, 791, 2952, 3251, 364, 7336, 471, 3549, 6550, ...
char.socket.clilocmessage(501679) return
char.socket.clilocmessage(501679) return
def copy_response(char, args, target): if len(args) != 1: return key = wolfpack.finditem(args[0]) if not key or not char.canreach(key,5): char.socket.clilocmessage(501661) return # Check if the targetted item is a key if not target.item or not target.item.hasscript( 'key' ): char.socket.clilocmessage(501679) return # Also a blank key? if not target.item.hastag('lock'): char.socket.clilocmessage(501675) return # Check if the player can reach the item if not char.canreach(target.item,5): char.socket.clilocmessage(501661) return # Tinkering check (15%-30%, 25% chance of loosing the key on failure) if char.checkskill(TINKERING, 150, 300): key.settag('lock',target.item.gettag('lock')) key.resendtooltip() char.socket.clilocmessage(501676) else: char.socket.clilocmessage(501677) # 25% chance of destroying the blank key if random.randint(1,4) == 1: char.socket.clilocmessage(501678) key.remove()
516c1fcdf800cd69abc81c17dada3a6bf321ca8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/516c1fcdf800cd69abc81c17dada3a6bf321ca8c/key.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 2740, 12, 3001, 16, 833, 16, 1018, 4672, 309, 562, 12, 1968, 13, 480, 404, 30, 327, 225, 498, 273, 341, 355, 74, 2920, 18, 4720, 1726, 12, 1968, 63, 20, 5717, 309, 486, 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, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 2740, 12, 3001, 16, 833, 16, 1018, 4672, 309, 562, 12, 1968, 13, 480, 404, 30, 327, 225, 498, 273, 341, 355, 74, 2920, 18, 4720, 1726, 12, 1968, 63, 20, 5717, 309, 486, 4...
retVal = currVal[ind]
retVal = keyVar[ind]
def getKeyVar(self, keyVar, ind=0, defVal=Exception,
03af8e03b5d1c35c781517d0d00adb5dbfa952e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/425/03af8e03b5d1c35c781517d0d00adb5dbfa952e6/scriptrunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 1537, 12, 2890, 16, 498, 1537, 16, 1547, 33, 20, 16, 1652, 3053, 33, 503, 16, 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, ...
[ 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 1537, 12, 2890, 16, 498, 1537, 16, 1547, 33, 20, 16, 1652, 3053, 33, 503, 16, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if self.request.strip().upper() == 'KILL': self.serverSocket.sendall('QUIT\r\n') self.send("+OK, dying.\r\n") self.serverSocket.shutdown(2) self.serverSocket.close()
verb = self.request.strip().upper() if verb == 'KILL':
def found_terminator(self): """Asynchat override.""" if self.request.strip().upper() == 'KILL': self.serverSocket.sendall('QUIT\r\n') self.send("+OK, dying.\r\n") self.serverSocket.shutdown(2) self.serverSocket.close() self.shutdown(2) self.close() raise SystemExit
bb67db5e2dc016a7be764205cf241b78d334ff9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/bb67db5e2dc016a7be764205cf241b78d334ff9b/pop3proxy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 3536, 1463, 2515, 270, 3849, 12123, 6405, 273, 365, 18, 2293, 18, 6406, 7675, 5797, 1435, 309, 6405, 422, 296, 47, 15125, 4278, 365, 18, 15132, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 3536, 1463, 2515, 270, 3849, 12123, 6405, 273, 365, 18, 2293, 18, 6406, 7675, 5797, 1435, 309, 6405, 422, 296, 47, 15125, 4278, 365, 18, 15132, 12, ...
return command
return cmd
def complete(self, text, state): idx = 0 for command in self.commands: if command.startswith(text): idx += 1 if idx > state: return command #print "text: '%s', state '%d'" % (text, state)
4fa40d0fa53f566e2da9a25725626441b833727b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8501/4fa40d0fa53f566e2da9a25725626441b833727b/hatari-console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 12, 2890, 16, 977, 16, 919, 4672, 2067, 273, 374, 364, 1296, 316, 365, 18, 7847, 30, 309, 1296, 18, 17514, 1918, 12, 955, 4672, 2067, 1011, 404, 309, 2067, 405, 919, 30, 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, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 12, 2890, 16, 977, 16, 919, 4672, 2067, 273, 374, 364, 1296, 316, 365, 18, 7847, 30, 309, 1296, 18, 17514, 1918, 12, 955, 4672, 2067, 1011, 404, 309, 2067, 405, 919, 30, 327, 1...
r""" Sequence of Fibonacci numbers, offset 0,4. REFERENCES: S. Plouffe, Project Gutenberg, The First 1001 Fibonacci Numbers, \url{http://ibiblio.org/pub/docs/books/gutenberg/etext01/fbncc10.txt} We have one more. Our first Fibonacci number is 0. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000045; a Fibonacci numbers with index n >= 0 sage: a(0) 0 sage: a(1) 1 sage: a.list(12) [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] sage: a(1/3) Traceback (most recent call last): ... TypeError: input must be an int, long, or Integer AUTHOR: -- Jaap Spies (2007-01-13) """ def __init__(self):
def __init__(self): r""" Sequence of Fibonacci numbers, offset 0,4. REFERENCES: S. Plouffe, Project Gutenberg, The First 1001 Fibonacci Numbers, \url{http://ibiblio.org/pub/docs/books/gutenberg/etext01/fbncc10.txt} We have one more. Our first Fibonacci number is 0. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000045; a Fibonacci numbers with index n >= 0 sage: a(0) 0 sage: a(1) 1 sage: a.list(12) [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] sage: a(1/3) Traceback (most recent call last): ... TypeError: input must be an int, long, or Integer AUTHOR: -- Jaap Spies (2007-01-13) """
def _eval(self, n): return partition.Partitions(n).count()
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 3590, 18, 13738, 12, 82, 2934, 1883, 1435, 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, 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, 389, 8622, 12, 2890, 16, 290, 4672, 327, 3590, 18, 13738, 12, 82, 2934, 1883, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.fileobj.write(struct.pack("<L", self.pos))
self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFFL))
def close(self): """Close the _Stream object. No operation should be done on it afterwards. """ if self.closed: return
d27bbf0a8d82702edfcccfd0de73e7f6df191a5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d27bbf0a8d82702edfcccfd0de73e7f6df191a5d/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 326, 389, 1228, 733, 18, 2631, 1674, 1410, 506, 2731, 603, 518, 23838, 18, 3536, 309, 365, 18, 12204, 30, 327, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 4605, 326, 389, 1228, 733, 18, 2631, 1674, 1410, 506, 2731, 603, 518, 23838, 18, 3536, 309, 365, 18, 12204, 30, 327, 2, -100, -100, -100, -100, -100, -100, ...
title = u"I&nstall", helpString = u'Install plugins'),
title = _(u"I&nstall"), helpString = _(u'Install plugins')),
def makeVisibleHourMenuItems(parcel): """ Create the 'Visible Hours' submenu. Should look like: Automatic --------- 5 hours 6 hours
043a08a77771b31713425ec3f48a9c0186570e1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/043a08a77771b31713425ec3f48a9c0186570e1d/menus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 6207, 13433, 4599, 3126, 12, 1065, 2183, 4672, 3536, 1788, 326, 296, 6207, 670, 4390, 11, 27539, 18, 9363, 2324, 3007, 30, 225, 11809, 4941, 300, 788, 1381, 7507, 1666, 7507, 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, 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, 1221, 6207, 13433, 4599, 3126, 12, 1065, 2183, 4672, 3536, 1788, 326, 296, 6207, 670, 4390, 11, 27539, 18, 9363, 2324, 3007, 30, 225, 11809, 4941, 300, 788, 1381, 7507, 1666, 7507, 2, -1...
for d in dirp:
for d in dirs:
def dirfilt(root, dirs): """ Platform hook to filter out any directories that should not be descended into, root and dirs corresponds as per os.dirwalk() and same semantics for these objects apply. """ removelist = [] ws = NSWorkspace.sharedWorkspace() for d in dirp: if ws.isFilePackageAtPath_(os.path.join(root, d)): removelist.append(d) for x in removelist: dirs.remove(x) return dirs
a90ef12db7a34753fc40cd7b9cfeeac77611f830 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/a90ef12db7a34753fc40cd7b9cfeeac77611f830/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1577, 30991, 12, 3085, 16, 7717, 4672, 3536, 11810, 3953, 358, 1034, 596, 1281, 6402, 716, 1410, 486, 506, 3044, 3934, 1368, 16, 1365, 471, 7717, 13955, 487, 1534, 1140, 18, 1214, 11348, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1577, 30991, 12, 3085, 16, 7717, 4672, 3536, 11810, 3953, 358, 1034, 596, 1281, 6402, 716, 1410, 486, 506, 3044, 3934, 1368, 16, 1365, 471, 7717, 13955, 487, 1534, 1140, 18, 1214, 11348, ...
if self.PE_TYPE == OPTIONAL_HEADER_MAGIC_PE: format = self.__IMAGE_THUNK_DATA_format__ elif self.PE_TYPE == OPTIONAL_HEADER_MAGIC_PE_PLUS: format = self.__IMAGE_THUNK_DATA64_format__
def get_import_table(self, rva): table = [] while True and rva: try: data = self.get_data(rva) except PEFormatError, e: self.__warnings.append( 'Error parsing the import table. ' + 'Invalid data at RVA: 0x%x' % ( rva ) ) return None if self.PE_TYPE == OPTIONAL_HEADER_MAGIC_PE: format = self.__IMAGE_THUNK_DATA_format__ elif self.PE_TYPE == OPTIONAL_HEADER_MAGIC_PE_PLUS: format = self.__IMAGE_THUNK_DATA64_format__ thunk_data = self.__unpack_data__( format, data, file_offset=self.get_offset_from_rva(rva) ) if not thunk_data or thunk_data.all_zeroes(): break rva += thunk_data.sizeof() table.append(thunk_data) return table
1d5b4f161f415406d1d384dc2319874979bcdef8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/213/1d5b4f161f415406d1d384dc2319874979bcdef8/pefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5666, 67, 2121, 12, 2890, 16, 5633, 69, 4672, 225, 1014, 273, 5378, 225, 1323, 1053, 471, 5633, 69, 30, 775, 30, 501, 273, 365, 18, 588, 67, 892, 12, 4962, 69, 13, 1335, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5666, 67, 2121, 12, 2890, 16, 5633, 69, 4672, 225, 1014, 273, 5378, 225, 1323, 1053, 471, 5633, 69, 30, 775, 30, 501, 273, 365, 18, 588, 67, 892, 12, 4962, 69, 13, 1335, 1...
sources.append(self.parse(extra_phil))
self.merge_phil(phil_string=extra_phil, rebuild_index=False)
def save_param_file (self, file_name, sources=None, extra_phil="", diff_only=False, save_state=False) : if sources is None : sources = [] if extra_phil != "" : sources.append(self.parse(extra_phil)) final_phil = self.master_phil.fetch(sources=[self.working_phil]+sources) if diff_only : output_phil = self.master_phil.fetch_diff(source=final_phil) else : output_phil = final_phil f = open(file_name, "w") output_phil.show(out=f) f.close() if save_state : cache_file = "%s_cache.pkl" % file_name easy_pickle.dump(cache_file, self)
dfcd064589ff97e21974bcd8309f5d4bb0afc5fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/dfcd064589ff97e21974bcd8309f5d4bb0afc5fc/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 891, 67, 768, 261, 2890, 16, 585, 67, 529, 16, 5550, 33, 7036, 16, 2870, 67, 844, 330, 1546, 3113, 3122, 67, 3700, 33, 8381, 16, 1923, 67, 2019, 33, 8381, 13, 294, 309, 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, 1923, 67, 891, 67, 768, 261, 2890, 16, 585, 67, 529, 16, 5550, 33, 7036, 16, 2870, 67, 844, 330, 1546, 3113, 3122, 67, 3700, 33, 8381, 16, 1923, 67, 2019, 33, 8381, 13, 294, 309, 5...
newnode = self.Node(parent.position + diff*d/div, angle, parent = parent, time = newtime, freeprob = newprob)
subpos = bestparent.position + diff*d/div freeprob = self.freeprob_turn_line(lastnode.position, lastnode.angle, subpos, view, lastnode.time) dt = self.segment_time(lastnode.angle, lastnode.position, subpos) newnode = self.Node(subpos, angle, parent = lastnode, time = lastnode.time + dt, freeprob = lastnode.freeprob * freeprob) lastnode = newnode
def getpath(self, view, max_size): testpath = self.find_globaltree(self.position, self.angle, view, 0, 1) if testpath: return testpath print "Cannot find global path from current, extending search tree" start = Arty.Node(self.position, self.angle, parent = None, time = 0, freeprob = 1) nodes = [start]
61e06514249f4a065965dbc16b1504bb428a21ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9407/61e06514249f4a065965dbc16b1504bb428a21ae/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 803, 12, 2890, 16, 1476, 16, 943, 67, 1467, 4672, 1842, 803, 273, 365, 18, 4720, 67, 6347, 3413, 12, 2890, 18, 3276, 16, 365, 18, 4341, 16, 1476, 16, 374, 16, 404, 13, 309, 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, 336, 803, 12, 2890, 16, 1476, 16, 943, 67, 1467, 4672, 1842, 803, 273, 365, 18, 4720, 67, 6347, 3413, 12, 2890, 18, 3276, 16, 365, 18, 4341, 16, 1476, 16, 374, 16, 404, 13, 309, 18...
@bigmemtest(minsize=_2G + 2, memuse=8 + 3)
@bigmemtest(minsize=_2G + 2, memuse=8 + 3 * character_size)
def test_repr_small(self, size): return self.basic_test_repr(size)
63a284272952002c43d0677f047977034312543b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/63a284272952002c43d0677f047977034312543b/test_bigmem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12715, 67, 12019, 12, 2890, 16, 963, 4672, 327, 365, 18, 13240, 67, 3813, 67, 12715, 12, 1467, 13, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12715, 67, 12019, 12, 2890, 16, 963, 4672, 327, 365, 18, 13240, 67, 3813, 67, 12715, 12, 1467, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "Slice.tick"
def tick_operation(self, op): """ Op handler for regular tick op """ print "Slice.tick"
eb993559622c0db68ad5e8781c5b16d0b2845519 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12932/eb993559622c0db68ad5e8781c5b16d0b2845519/Slice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4024, 67, 7624, 12, 2890, 16, 1061, 4672, 3536, 6066, 1838, 364, 6736, 4024, 1061, 3536, 1172, 315, 5959, 18, 6470, 6, 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, 4024, 67, 7624, 12, 2890, 16, 1061, 4672, 3536, 6066, 1838, 364, 6736, 4024, 1061, 3536, 1172, 315, 5959, 18, 6470, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print "func btn called from ", source
logger.debug("func btn called from %s", source)
def func_btn(self,emission, source, param): print "func btn called from ", source state = emission.part_state_get(param) print state[0] if param == 'call-button': if state[0] == 'default': #self.create_call() print "nothing to be done" elif state[0] == 'incoming': self.accept_call(emission) elif state[0] == 'dialing': self.release_call(emission) elif state[0] == 'active': self.release_call(emission) elif state[0] == 'releasing': #self.accept_call() print "nothing to be done" else : print "unknown state for call button" elif param == 'del-button': if state[0] == 'default': print "nothing to be done" elif state[0] == 'incoming': #self.accept_call() print "nothing to be done" elif state[0] == 'dialing': #self.release_call() print "nothing to be done" elif state[0] == 'active': #self.mute_call print "would be muting" elif state[0] == 'releasing': #self.accept_call() print "nothing to be done" else : print "unknown state for del button" else : print "unknown button"
01c25941dcc46b5166dcddd3aeed3ae3b26b48e6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/01c25941dcc46b5166dcddd3aeed3ae3b26b48e6/paroli-dialer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1326, 67, 11898, 12, 2890, 16, 351, 19710, 16, 1084, 16, 579, 4672, 1194, 18, 4148, 2932, 644, 10638, 2566, 628, 738, 87, 3113, 1084, 13, 919, 273, 801, 19710, 18, 2680, 67, 2019, 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, 1326, 67, 11898, 12, 2890, 16, 351, 19710, 16, 1084, 16, 579, 4672, 1194, 18, 4148, 2932, 644, 10638, 2566, 628, 738, 87, 3113, 1084, 13, 919, 273, 801, 19710, 18, 2680, 67, 2019, 67, ...
print 'FILL'
def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.getAttribute("id").encode('ascii') m_l = map(escape, escape_re.split(rec.getAttribute("name").encode('utf8'))) pid = False for idx, menu_elem in enumerate(m_l): if pid: cr.execute('select id from ir_ui_menu where parent_id=%d and name=%s', (pid, menu_elem)) else: cr.execute('select id from ir_ui_menu where parent_id is null and name=%s', (menu_elem,)) res = cr.fetchone() if idx==len(m_l)-1: # we are at the last menu element/level (it's a leaf) values = {'parent_id': pid,'name':menu_elem}
a443ec7892ce9f52dc2b5c2b3d000138f275d0ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7397/a443ec7892ce9f52dc2b5c2b3d000138f275d0ce/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2692, 67, 5414, 1726, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 1950, 67, 350, 273, 1950, 18, 588, 1499, 2932, 350, 20387, 3015, 2668, 9184, 6134, 312, 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, 389, 2692, 67, 5414, 1726, 12, 2890, 16, 4422, 16, 1950, 16, 501, 67, 2159, 33, 7036, 4672, 1950, 67, 350, 273, 1950, 18, 588, 1499, 2932, 350, 20387, 3015, 2668, 9184, 6134, 312, 67, ...
for field_name in self._field_names: if not initial_dict.has_key(form_prefix + '-' + field_name): initial_dict[form_prefix + '-' + field_name] = getattr(self, field_name)
if not populating_from_form: for field_name in self._field_names: initial_dict[form_prefix + '-' + field_name] = getattr(self, field_name)
def get_field_by_name(name): for f in self._meta.fields: if f.name == name: return f return None
49ea956eba4efa8908b5eae6bcf0b3c8940bff66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/49ea956eba4efa8908b5eae6bcf0b3c8940bff66/app_.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1518, 67, 1637, 67, 529, 12, 529, 4672, 364, 284, 316, 365, 6315, 3901, 18, 2821, 30, 309, 284, 18, 529, 422, 508, 30, 327, 284, 327, 599, 225, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1518, 67, 1637, 67, 529, 12, 529, 4672, 364, 284, 316, 365, 6315, 3901, 18, 2821, 30, 309, 284, 18, 529, 422, 508, 30, 327, 284, 327, 599, 225, 2, -100, -100, -100, -100, ...
from sage.libs.pari.all import pari from sage.interfaces.gp import Gp,gp R,a = _setup(prec) ans = gp.eval("hyperu(%s,%s,%s)"%(alpha,beta,x)) return R(ans) def spherical_bessel_J(n, var, alg="maxima"):
elif algorithm=='pari': from sage.libs.pari.all import pari from sage.interfaces.gp import Gp,gp R,a = _setup(prec) ans = gp.eval("hyperu(%s,%s,%s)"%(alpha,beta,x)) return R(ans) else: raise ValueError, "unknown algorithm '%s'"%algorithm def spherical_bessel_J(n, var, algorithm="maxima"):
def hypergeometric_U(alpha,beta,x,alg="pari",prec=53): r""" Default is a wrap of Pari's hyperu(alpha,beta,x) function. Optionally, alg = "scipy" can be used. The confluent hypergeometric function $y = U(a,b,x)$ is defined to be the solution to Kummer's differential equation \[ xy'' + (b-x)y' - ay = 0. \] This satisfies $U(a,b,x) \sim x^{-a}$, as $x\rightarrow \infty$, and is sometimes denoted \verb|x^{-a}2_F_0(a,1+a-b,-1/x)|. This is not the same as Kummer's $M$-hypergeometric function, denoted sometimes as \verb|_1F_1(alpha,beta,x)|, though it satisfies the same DE that $U$ does. WARNING: In the literature, both are called "Kummer confluent hypergeometric" functions. EXAMPLES: sage: hypergeometric_U(1,1,1,"scipy") 0.596347362323... sage: hypergeometric_U(1,1,1) 0.59634736232319... sage: hypergeometric_U(1,1,1,"pari",70) 0.59634736232319407434... """ if alg=="scipy": import scipy.special ans = str(scipy.special.hyperu(float(alpha),float(beta),float(x))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans) ## For commented out code below, ## f = lambda x: hypergeometric_U(1,1,x) ## P = plot(f,0.1,1) ## seems to hang. I don't know why. from sage.libs.pari.all import pari from sage.interfaces.gp import Gp,gp R,a = _setup(prec) #b = R(pari(alpha).hyperu(beta,x)) #pari.set_real_precision(a) #return b #above has weird bug ans = gp.eval("hyperu(%s,%s,%s)"%(alpha,beta,x)) return R(ans)
6634f9ab85d7944da6788aaab93ffaa3f22ce5ac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6634f9ab85d7944da6788aaab93ffaa3f22ce5ac/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9512, 10049, 1591, 67, 57, 12, 5429, 16, 5758, 16, 92, 16, 18413, 1546, 1065, 77, 3113, 4036, 33, 8643, 4672, 436, 8395, 2989, 353, 279, 2193, 434, 2280, 77, 1807, 9512, 89, 12, 5429, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9512, 10049, 1591, 67, 57, 12, 5429, 16, 5758, 16, 92, 16, 18413, 1546, 1065, 77, 3113, 4036, 33, 8643, 4672, 436, 8395, 2989, 353, 279, 2193, 434, 2280, 77, 1807, 9512, 89, 12, 5429, ...
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing':'transparent'})
self.pool.get('stock.location').write(cr, uid, [location_id], {'chained_auto_packing': 'transparent'})
def set_default(self, cr, uid, ids, context=None): for o in self.browse(cr, uid, ids, context=context): ir_values_obj = self.pool.get('ir.values') ir_values_obj.set(cr,uid,'default',False,'picking_policy',['sale.order'],o.picking_policy) ir_values_obj.set(cr,uid,'default',False,'order_policy',['sale.order'],o.order_policy)
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 1886, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 364, 320, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 33, 2472, 4672, 9482, 67, 2372, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1886, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 364, 320, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 33, 2472, 4672, 9482, 67, 2372, ...
metadata["License File"] = filename
metadata["License File"] = license_path
def ParseDir(path): """Examine a third_party/foo component and extract its metadata.""" # Parse metadata fields out of README.chromium. # We examine "LICENSE" for the license file by default. metadata = { "License File": "LICENSE", # Relative path to license text. "Name": None, # Short name (for header on about:credits). "URL": None, # Project home page. } if path in SPECIAL_CASES: metadata.update(SPECIAL_CASES[path]) else: # Try to find README.chromium. readme_path = os.path.join(path, 'README.chromium') if not os.path.exists(readme_path): raise LicenseError("missing README.chromium") for line in open(readme_path): line = line.strip() if not line: break for key in metadata.keys(): field = key + ": " if line.startswith(field): metadata[key] = line[len(field):] # Check that all expected metadata is present. for key, value in metadata.iteritems(): if not value: raise LicenseError("couldn't find '" + key + "' line " "in README.chromium or licences.py " "SPECIAL_CASES") # Check that the license file exists. for filename in (metadata["License File"], "COPYING"): license_path = os.path.join(path, filename) if os.path.exists(license_path): metadata["License File"] = filename break license_path = None if not license_path: raise LicenseError("License file not found. " "Either add a file named LICENSE, " "import upstream's COPYING if available, " "or add a 'License File:' line to README.chromium " "with the appropriate path.") return metadata
54ce726e1af62939cb12b09dc687737b114d426c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/54ce726e1af62939cb12b09dc687737b114d426c/licenses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 1621, 12, 803, 4672, 3536, 424, 301, 558, 279, 12126, 67, 21214, 19, 11351, 1794, 471, 2608, 2097, 1982, 12123, 225, 468, 2884, 1982, 1466, 596, 434, 10746, 958, 18, 16298, 5077, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2884, 1621, 12, 803, 4672, 3536, 424, 301, 558, 279, 12126, 67, 21214, 19, 11351, 1794, 471, 2608, 2097, 1982, 12123, 225, 468, 2884, 1982, 1466, 596, 434, 10746, 958, 18, 16298, 5077, 1...
""" def koira(): random.random() time.time() msg() PIL.Image.load() nenuto = "dssd" nenuto.poko() gluster.ke util.ko nero.ds() print ["colorsys"] + find_modules([koira], send_modules = True) """
def find_modules(funs, send_modules = True, recurse = True): mods = {} for fun in funs: fmod = parse_function(fun) if send_modules: try: m = locate_modules(fmod, recurse,\ include_sys = True) mods.update(m) except ImportError, x: raise ImportError("Could not find module %s "\ "defined in %s. Maybe it is a typo. If it is "\ "a valid module, see documetation of the "\ "required_modules parameter for instructions "\ "on how to include it properly." %\ (x.module, fun.func_name)) else: mods.update((m, None) for m in fmod) if send_modules: return [(k, v) for k, v in mods.iteritems() if v] +\ [k for k, v in mods.iteritems() if not v] else: return mods.keys()
b3e9b01065daf85543815879ccf2931d66a57dc6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/373/b3e9b01065daf85543815879ccf2931d66a57dc6/modutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 6400, 12, 12125, 87, 16, 1366, 67, 6400, 273, 1053, 16, 11502, 273, 1053, 4672, 15546, 273, 2618, 364, 9831, 316, 9831, 87, 30, 284, 1711, 273, 1109, 67, 915, 12, 12125, 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, 1104, 67, 6400, 12, 12125, 87, 16, 1366, 67, 6400, 273, 1053, 16, 11502, 273, 1053, 4672, 15546, 273, 2618, 364, 9831, 316, 9831, 87, 30, 284, 1711, 273, 1109, 67, 915, 12, 12125, 13, ...
self.outputfile = 'output_' + type + '.txt' self.outputerr = 'outputErr_' + type + '.txt'
self.outputfile = 'output_' + output.__str__().replace(self.filesuffix, '.txt') self.outputerr = 'outputErr_' + output.__str__().replace(self.filesuffix, '.txt')
def doJob(self, type): #create Config process = cms.Config(type) process.events(self.numberofevents_) output = self.filepath + self.fileprefix + type + "_" + time.strftime("%d%m%y", time.gmtime()) + self.filesuffix process.out(output) #setup outputfiles self.outputfile = 'output_' + type + '.txt' self.outputerr = 'outputErr_' + type + '.txt' self.executeCMSrun(process.returnTempCfg())
bbc867eec2f9e70c395143d62a40336222949829 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3254/bbc867eec2f9e70c395143d62a40336222949829/ConfigRunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2278, 12, 2890, 16, 618, 4672, 468, 2640, 1903, 1207, 273, 6166, 18, 809, 12, 723, 13, 1207, 18, 5989, 12, 2890, 18, 2696, 792, 5989, 67, 13, 876, 273, 365, 18, 10561, 397, 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, 741, 2278, 12, 2890, 16, 618, 4672, 468, 2640, 1903, 1207, 273, 6166, 18, 809, 12, 723, 13, 1207, 18, 5989, 12, 2890, 18, 2696, 792, 5989, 67, 13, 876, 273, 365, 18, 10561, 397, 365,...
update_view(index * 4 + 0, 0, 0x80, 0, 0) update_view(index * 4 + 1, 0, 0x80, 0, 0) update_view(index * 4 + 2, 0, 0x80, 0, 0) update_view(index * 4 + 3, 0, 0x80, 0, 0)
update_view(index * 4 + 0, [0, 0x80, 0, 0]) update_view(index * 4 + 1, [0, 0x80, 0, 0]) update_view(index * 4 + 2, [0, 0x80, 0, 0]) update_view(index * 4 + 3, [0, 0x80, 0, 0])
def read_in(): global in_frame, init_level, angle, index, speed_rpm nb_errors = 0 while True: try: time.sleep(0.00001) # do not hog the processor power if init_level == 0 : # start byte b = ord(ser.read(1)) if b == 0xFA : init_level = 1 else: init_level = 0 elif init_level == 1: # position index b = ord(ser.read(1)) if b >= 0xA0 and b <= 0xF9 : index = b - 0xA0 init_level = 2 else: init_level = 0 elif init_level == 2 : # speed b_speed = [ ord(b) for b in ser.read(2)] # data b_data0 = [ ord(b) for b in ser.read(4)] b_data1 = [ ord(b) for b in ser.read(4)] b_data2 = [ ord(b) for b in ser.read(4)] b_data3 = [ ord(b) for b in ser.read(4)] # for the checksum, we need all the data of the packet... # this could be collected in a more elegent fashion... all_data = [ 0xFA, index+0xA0 ] + b_speed + b_data0 + b_data1 + b_data2 + b_data3 # checksum b_checksum = [ ord(b) for b in ser.read(2) ] incoming_checksum = int(b_checksum[0]) + (int(b_checksum[1]) << 8) # verify that the received checksum is equal to the one computed from the data if checksum(all_data) == incoming_checksum: speed_rpm = float( b_speed[0] | (b_speed[1] << 8) ) / 64.0 label_speed.text = "RPM : " + str(speed_rpm) update_view(index * 4 + 0, b_data0[0], b_data0[1], b_data0[2], b_data0[3]) update_view(index * 4 + 1, b_data1[0], b_data1[1], b_data1[2], b_data1[3]) update_view(index * 4 + 2, b_data2[0], b_data2[1], b_data2[2], b_data2[3]) update_view(index * 4 + 3, b_data3[0], b_data3[1], b_data3[2], b_data3[3]) else: # the checksum does not match, something went wrong... nb_errors +=1 label_errors.text = "errors: "+str(nb_errors) # display the samples in an error state update_view(index * 4 + 0, 0, 0x80, 0, 0) update_view(index * 4 + 1, 0, 0x80, 0, 0) update_view(index * 4 + 2, 0, 0x80, 0, 0) update_view(index * 4 + 3, 0, 0x80, 0, 0) init_level = 0 # reset and wait for the next packet else: # default, should never happen... init_level = 0 except : traceback.print_exc(file=sys.stdout)
7e79bd8b6a9f13952a2c0437da2cc4de3f87703c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13852/7e79bd8b6a9f13952a2c0437da2cc4de3f87703c/XV-11_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 267, 13332, 2552, 316, 67, 3789, 16, 1208, 67, 2815, 16, 5291, 16, 770, 16, 8632, 67, 86, 7755, 225, 4264, 67, 4324, 273, 374, 1323, 1053, 30, 775, 30, 813, 18, 19607, 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, 855, 67, 267, 13332, 2552, 316, 67, 3789, 16, 1208, 67, 2815, 16, 5291, 16, 770, 16, 8632, 67, 86, 7755, 225, 4264, 67, 4324, 273, 374, 1323, 1053, 30, 775, 30, 813, 18, 19607, 12, ...
time.sleep(0.1)
def test_wait_with_already_cancelled_futures(self): call1 = Call(manual_finish=True) call2 = Call() call3 = Call() call4 = Call()
07724f0d7feafe4d50dece6f82a1962cbc64edc4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4870/07724f0d7feafe4d50dece6f82a1962cbc64edc4/test_futures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7048, 67, 1918, 67, 17583, 67, 10996, 1259, 67, 74, 10945, 12, 2890, 4672, 745, 21, 273, 3049, 12, 19840, 67, 13749, 33, 5510, 13, 745, 22, 273, 3049, 1435, 745, 23, 273, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7048, 67, 1918, 67, 17583, 67, 10996, 1259, 67, 74, 10945, 12, 2890, 4672, 745, 21, 273, 3049, 12, 19840, 67, 13749, 33, 5510, 13, 745, 22, 273, 3049, 1435, 745, 23, 273, 3...
from scikits.statsmodels.sandbox.tsa.arima import arma_generate_sample
from scikits.statsmodels.tsa.arima_process import arma_generate_sample
def Q(x): cholQ = np.array([[x[1],0],[0,x[2]]]) return np.dot(cholQ,cholQ.T)
35d667e9ea2987a1c1f369b5ac77533794ab224c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/35d667e9ea2987a1c1f369b5ac77533794ab224c/kalmanf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2238, 12, 92, 4672, 462, 355, 53, 273, 1130, 18, 1126, 3816, 63, 92, 63, 21, 6487, 20, 6487, 63, 20, 16, 92, 63, 22, 13563, 5717, 327, 1130, 18, 9811, 12, 343, 355, 53, 16, 343, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2238, 12, 92, 4672, 462, 355, 53, 273, 1130, 18, 1126, 3816, 63, 92, 63, 21, 6487, 20, 6487, 63, 20, 16, 92, 63, 22, 13563, 5717, 327, 1130, 18, 9811, 12, 343, 355, 53, 16, 343, ...
raise yum.Errors.YumBaseError, ["Unable to find a suitable mirror."]
raise Errors.YumBaseError, ["Unable to find a suitable mirror."]
def _downloadPackages(self,callback): ''' Download the need packages in the Transaction ''' # This can be overloaded by a subclass. dlpkgs = map(lambda x: x.po, filter(lambda txmbr: txmbr.ts_state in ("i", "u"), self.tsInfo.getMembers())) # Check if there is something to do if len(dlpkgs) == 0: return None # make callback with packages to download callback.event(callbacks.PT_DOWNLOAD_PKGS,dlpkgs) try: probs = self.downloadPkgs(dlpkgs)
4cf258968a109cd03de2ae7a078ff0e8e6760cea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/4cf258968a109cd03de2ae7a078ff0e8e6760cea/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7813, 11425, 12, 2890, 16, 3394, 4672, 9163, 13059, 326, 1608, 5907, 316, 326, 5947, 9163, 468, 1220, 848, 506, 1879, 4230, 635, 279, 10177, 18, 8910, 25376, 273, 852, 12, 14661, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7813, 11425, 12, 2890, 16, 3394, 4672, 9163, 13059, 326, 1608, 5907, 316, 326, 5947, 9163, 468, 1220, 848, 506, 1879, 4230, 635, 279, 10177, 18, 8910, 25376, 273, 852, 12, 14661, 61...
if field['name'] == 'owner' and field['type'] == 'select':
name = field['name'] field = field.copy() field['label'] = labels[name] if name == 'owner' and field['type'] == 'select':
def template_data(self, context, tickets, orig_list=None, orig_time=None, req=None): constraints = {} for k, v in self.constraints.items(): constraint = {'values': [], 'mode': ''} for val in v: neg = val.startswith('!') if neg: val = val[1:] mode = '' if val[:1] in ('~', '^', '$') \ and not val in self.substitutions: mode, val = val[:1], val[1:] constraint['mode'] = (neg and '!' or '') + mode constraint['values'].append(val) constraints[k] = constraint
bb35b85542ba54d565c43440cdb8c37a5ff2045d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/bb35b85542ba54d565c43440cdb8c37a5ff2045d/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 67, 892, 12, 2890, 16, 819, 16, 24475, 16, 1647, 67, 1098, 33, 7036, 16, 1647, 67, 957, 33, 7036, 16, 1111, 33, 7036, 4672, 6237, 273, 2618, 364, 417, 16, 331, 316, 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, 1542, 67, 892, 12, 2890, 16, 819, 16, 24475, 16, 1647, 67, 1098, 33, 7036, 16, 1647, 67, 957, 33, 7036, 16, 1111, 33, 7036, 4672, 6237, 273, 2618, 364, 417, 16, 331, 316, 365, 18, ...
return '<a class="button-link" href="%s">View</a>'%item.id
return '<a class="button-link" href="%s">View</a>'%(getattr( item, formatter.oid_key ))
def viewLink( item, formatter ): return '<a class="button-link" href="%s">View</a>'%item.id
e9f5b0e69014c74858dcf526c4ff0d1099deb97d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4360/e9f5b0e69014c74858dcf526c4ff0d1099deb97d/container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 2098, 12, 761, 16, 4453, 262, 30, 327, 2368, 69, 667, 1546, 5391, 17, 1232, 6, 3897, 11613, 87, 6441, 1767, 1757, 69, 1870, 17105, 588, 1747, 12, 761, 16, 4453, 18, 839, 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, 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, 1476, 2098, 12, 761, 16, 4453, 262, 30, 327, 2368, 69, 667, 1546, 5391, 17, 1232, 6, 3897, 11613, 87, 6441, 1767, 1757, 69, 1870, 17105, 588, 1747, 12, 761, 16, 4453, 18, 839, 67, 85...
'id': (BACK, u"Templat:Artikel bagus utama"),
'id': (BACK, u"Templat:Featured article"),
def LINKS(site,name, ignore=[]): p=wikipedia.Page(site, name) links=p.linkedPages() for n in links[:]: t=n.titleWithoutNamespace() if t[0] in u"/#" or t in ignore: links.remove(n) links.sort() return links
47bef2df34e7eed13d4f878f7efb7f561240bcc8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/47bef2df34e7eed13d4f878f7efb7f561240bcc8/featured.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22926, 55, 12, 4256, 16, 529, 16, 2305, 33, 8526, 4672, 293, 33, 11999, 13744, 18, 1964, 12, 4256, 16, 508, 13, 4716, 33, 84, 18, 17738, 5716, 1435, 364, 290, 316, 4716, 10531, 14542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22926, 55, 12, 4256, 16, 529, 16, 2305, 33, 8526, 4672, 293, 33, 11999, 13744, 18, 1964, 12, 4256, 16, 508, 13, 4716, 33, 84, 18, 17738, 5716, 1435, 364, 290, 316, 4716, 10531, 14542, ...
[P[i] for i in range(2,len(v)) if v[i] == 0]
[P[i] for i in range(2,len(v)) if v[i] == 0 and N%P[i] != 0]
def supersingular_primes(self, B): """ Return a list of all supersingular primes for this elliptic curve up to and possibly including B.
8592f849728cc1bde7ecaf244009cdb3609f7559 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8592f849728cc1bde7ecaf244009cdb3609f7559/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1169, 414, 17830, 67, 683, 4485, 12, 2890, 16, 605, 4672, 3536, 2000, 279, 666, 434, 777, 1169, 414, 17830, 846, 4485, 364, 333, 415, 549, 21507, 8882, 731, 358, 471, 10016, 6508, 605, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1169, 414, 17830, 67, 683, 4485, 12, 2890, 16, 605, 4672, 3536, 2000, 279, 666, 434, 777, 1169, 414, 17830, 846, 4485, 364, 333, 415, 549, 21507, 8882, 731, 358, 471, 10016, 6508, 605, ...
def __init__(self, methodName='runTest'): pyautolib.PyUITestSuite.__init__(self, sys.argv)
def __init__(self, methodName='runTest', extra_chrome_flags=None): """Initialize PyUITest. When redefining __init__ in a derived class, make sure that: o you make a call this __init__ o __init__ takes methodName as a arg. this is mandated by unittest module Args: methodName: the default method name. Internal use by unittest module extra_chrome_flags: additional flags to pass when launching chrome """ args = sys.argv if extra_chrome_flags is not None: args.append('--extra-chrome-flags=%s' % extra_chrome_flags) pyautolib.PyUITestSuite.__init__(self, args)
def __init__(self, methodName='runTest'): pyautolib.PyUITestSuite.__init__(self, sys.argv) # Figure out path to chromium binaries browser_dir = os.path.normpath(os.path.dirname(pyautolib.__file__)) os.environ['PATH'] = browser_dir + os.pathsep + os.environ['PATH'] self.Initialize(pyautolib.FilePath(browser_dir)) unittest.TestCase.__init__(self, methodName)
e792c9442b58da0f0abe42dae4a7abc75ea17127 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e792c9442b58da0f0abe42dae4a7abc75ea17127/pyauto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4918, 2218, 2681, 4709, 2187, 2870, 67, 343, 10896, 67, 7133, 33, 7036, 4672, 3536, 7520, 4707, 57, 1285, 395, 18, 225, 5203, 283, 5649, 310, 1001, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4918, 2218, 2681, 4709, 2187, 2870, 67, 343, 10896, 67, 7133, 33, 7036, 4672, 3536, 7520, 4707, 57, 1285, 395, 18, 225, 5203, 283, 5649, 310, 1001, 2738, ...
trackentry.set_text(str(filetags[self.filetagnum].tag().track)) genreentry.set_text(filetags[self.filetagnum].tag().genre) commententry.set_text(filetags[self.filetagnum].tag().comment) fileentry.set_text(mpdpaths[self.filetagnum].split('/')[-1])
entries[4].set_text(str(filetags[self.filetagnum].tag().track)) entries[5].set_text(filetags[self.filetagnum].tag().genre) entries[6].set_text(filetags[self.filetagnum].tag().comment) entries[7].set_text(mpdpaths[self.filetagnum].split('/')[-1])
def editwindow_update(self, window, filetags, titleentry, artistentry, albumentry, yearentry, trackentry, genreentry, commententry, mpdpaths, fileentry, savebutton): titleentry.set_text(filetags[self.filetagnum].tag().title) titleentry.select_region(0, len(titleentry.get_text())) artistentry.set_text(filetags[self.filetagnum].tag().artist) albumentry.set_text(filetags[self.filetagnum].tag().album) if filetags[self.filetagnum].tag().year != 0: yearentry.set_text(str(filetags[self.filetagnum].tag().year)) if filetags[self.filetagnum].tag().track != 0: trackentry.set_text(str(filetags[self.filetagnum].tag().track)) genreentry.set_text(filetags[self.filetagnum].tag().genre) commententry.set_text(filetags[self.filetagnum].tag().comment) fileentry.set_text(mpdpaths[self.filetagnum].split('/')[-1]) window.set_title(_("Edit Tags" + " - " + str(self.filetagnum+1) + " " + _("of") + " " + str(len(filetags)))) titleentry.grab_focus() gobject.idle_add(savebutton.set_sensitive, True)
8e7f75d3649afea0782df60c0cbc0b9c2fb7cc04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/8e7f75d3649afea0782df60c0cbc0b9c2fb7cc04/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 5668, 67, 2725, 12, 2890, 16, 2742, 16, 661, 278, 1341, 16, 2077, 4099, 16, 15469, 4099, 16, 14844, 4099, 16, 677, 73, 7892, 698, 16, 3298, 4099, 16, 3157, 2842, 698, 16, 2879, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3874, 5668, 67, 2725, 12, 2890, 16, 2742, 16, 661, 278, 1341, 16, 2077, 4099, 16, 15469, 4099, 16, 14844, 4099, 16, 677, 73, 7892, 698, 16, 3298, 4099, 16, 3157, 2842, 698, 16, 2879, ...
tr = transform3d() tr.set_move( -x0, 0, 0) tr.set_rotation_y( math.pi) tr.set_move( x0, 0, 0)
tr = transform() tr.set_move( -x0, 0) tr.set_scaling_xy( -1, 1) tr.set_move( x0, 0)
def swap_sides_of_selected( self, mode="vertical"): """mirrors the selected things, vertical uses y-axis as a mirror plane, horizontal x-axis""" # locate all selected containers, filter them to be unique to_align, unique = self.selected_to_unique_containers() self.unselect_all() # check if there is anything to align if len( to_align) < 1: return None bboxes = [] for o in to_align: bboxes.extend( o.bbox()) # vertical (rotate around y axis) if mode == 'vertical': xs = [bboxes[i] for i in range( 0, len( bboxes), 2)] x0 = (max( xs) + min( xs)) / 2.0 for o in to_align: if o.meta__is_container: tr = transform3d() tr.set_move( -x0, 0, 0) tr.set_rotation_y( math.pi) tr.set_move( x0, 0, 0) o.transform( tr) else: print "fuck" # horizontal (rotate around x axis) if mode == 'horizontal': ys = [bboxes[i] for i in range( 1, len( bboxes), 2)] y0 = (max( ys) + min( ys)) / 2.0 for o in to_align: if o.meta__is_container: tr = transform3d() tr.set_move( 0, -y0, 0) tr.set_rotation_x( math.pi) tr.set_move( 0, y0, 0) o.transform( tr) else: print "fuck"
34ae4cbe835a61ea3a9cf748d63fd810b1cfdb7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4298/34ae4cbe835a61ea3a9cf748d63fd810b1cfdb7f/paper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7720, 67, 87, 4369, 67, 792, 67, 8109, 12, 365, 16, 1965, 1546, 17824, 6, 4672, 3536, 81, 27026, 326, 3170, 9198, 16, 9768, 4692, 677, 17, 4890, 487, 279, 15593, 11017, 16, 10300, 619,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7720, 67, 87, 4369, 67, 792, 67, 8109, 12, 365, 16, 1965, 1546, 17824, 6, 4672, 3536, 81, 27026, 326, 3170, 9198, 16, 9768, 4692, 677, 17, 4890, 487, 279, 15593, 11017, 16, 10300, 619,...
line_desc += u' %s' % dossier.debiteur.name.decode('utf8')
line_desc += u' %s' % dossier.debiteur.name
def invoice(self, cr, uid, ids, acquis=False): """ Create an invoice for one dossier """ assert len(ids)==1 dt = time.strftime('%Y-%m-%d') frais_salle_str = { 'fr': u'Frais de salle', 'nl': u'Zaalkosten', } frais_voirie_str = { 'fr': u'Frais de voirie', 'nl': u'Vuilniskosten', }
f30f2999fe1443690b74f60969002abb8057fbfd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/f30f2999fe1443690b74f60969002abb8057fbfd/huissier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9179, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1721, 16608, 33, 8381, 4672, 3536, 1788, 392, 9179, 364, 1245, 302, 8464, 2453, 3536, 1815, 562, 12, 2232, 13, 631, 21, 225, 3681, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9179, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 1721, 16608, 33, 8381, 4672, 3536, 1788, 392, 9179, 364, 1245, 302, 8464, 2453, 3536, 1815, 562, 12, 2232, 13, 631, 21, 225, 3681, 273...
open(TESTFN, 'w').write('\xa1')
f = open(TESTFN, 'wb') try: f.write(b'\xa1') finally: f.close()
def test_bug1728403(self): try: open(TESTFN, 'w').write('\xa1') f = codecs.open(TESTFN, encoding='cp949') self.assertRaises(UnicodeDecodeError, f.read, 2) finally: try: f.close() except: pass os.unlink(TESTFN)
e359ad4c9d7893138c0c6b01c50c2fca1839a821 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/e359ad4c9d7893138c0c6b01c50c2fca1839a821/test_multibytecodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 925, 28406, 5193, 4630, 12, 2890, 4672, 775, 30, 284, 273, 1696, 12, 16961, 19793, 16, 296, 9464, 6134, 775, 30, 284, 18, 2626, 12, 70, 8314, 6995, 21, 6134, 3095, 30, 284, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 925, 28406, 5193, 4630, 12, 2890, 4672, 775, 30, 284, 273, 1696, 12, 16961, 19793, 16, 296, 9464, 6134, 775, 30, 284, 18, 2626, 12, 70, 8314, 6995, 21, 6134, 3095, 30, 284, ...
logger.warning ("Exact matches: %s" % exactMatches) logger.warning ("Close matches: %s" % closeMatches)
logger.debug ("Exact matches: %s" % exactMatches) logger.debug ("Close matches: %s" % closeMatches)
def _findStampedKind (self, operation, stampKind): """ Return the new Kind that results from self being stamped with the Mixin Kind specified. @param self: an Item that will be stamped @type self: C{Item} @param operation: 'add' to add the Mixin, 'remove' to remove @type operation: C{String} @param mixinKind: the Mixin Kind to be added or removed @type mixinKind: C{Kind} of the Mixin @return: a C{Kind} """ signature = self._computeTargetKindSignature(operation, stampKind) if signature is None: return None soughtSignature, extrasAllowed = signature exactMatches = [] closeMatches = [] candidates = self._candidateStampedKinds() for candidate in candidates: candidateSignature = _SuperKindSignature(candidate) extras = len(candidateSignature) - len(soughtSignature) if extras != 0 and (extras - extrasAllowed) != 0: continue shortList = soughtSignature longList = candidateSignature if extras < 0: shortList = candidateSignature longList = soughtSignature if shortList.properSubsetOf(longList): # found a potential match if extras == 0: # exact match exactMatches.append(candidate) else: # close match - keep searching for a better match closeMatches.append(candidate)
c2c9a025ea6fad176542358f977e3bd0d1634dd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/c2c9a025ea6fad176542358f977e3bd0d1634dd4/items.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 8860, 329, 5677, 261, 2890, 16, 1674, 16, 14429, 5677, 4672, 3536, 2000, 326, 394, 5851, 716, 1686, 628, 365, 3832, 14429, 329, 598, 326, 490, 10131, 5851, 1269, 18, 632, 891,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8860, 329, 5677, 261, 2890, 16, 1674, 16, 14429, 5677, 4672, 3536, 2000, 326, 394, 5851, 716, 1686, 628, 365, 3832, 14429, 329, 598, 326, 490, 10131, 5851, 1269, 18, 632, 891,...
aptr = ctypes.cast(vptr, LPWSTR * argc) argv = [ str( aptr[i].contents ) for i in xrange(0, argc + 1) ]
aptr = ctypes.cast(vptr, ctypes.POINTER(ctypes.c_wchar_p * argc.value) ) argv = [ aptr.contents[i] for i in xrange(0, argc.value) ]
def CommandLineToArgvW(lpCmdLine): if lpCmdLine is None: lpCmdLine = NULL if lpCmdLine != NULL: lpCmdLine = ctypes.byref(lpCmdLine) argc = ctypes.c_int(0) argv = ctypes.windll.shell32.CommandLineToArgvW(lpCmdLine, ctypes.byref(argc)) if argv == NULL or argc <= 0: ctypes.WinError() try: vptr = ctypes.c_void_p(argv) aptr = ctypes.cast(vptr, LPWSTR * argc) argv = [ str( aptr[i].contents ) for i in xrange(0, argc + 1) ] finally: LocalFree(argv) return argv
f8e3dd04a34c34d1ca65f7d41b1dd4657ede074a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/f8e3dd04a34c34d1ca65f7d41b1dd4657ede074a/win32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15893, 774, 4117, 90, 59, 12, 9953, 5931, 1670, 4672, 309, 12423, 5931, 1670, 353, 599, 30, 12423, 5931, 1670, 273, 3206, 309, 12423, 5931, 1670, 480, 3206, 30, 12423, 5931, 1670, 273, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15893, 774, 4117, 90, 59, 12, 9953, 5931, 1670, 4672, 309, 12423, 5931, 1670, 353, 599, 30, 12423, 5931, 1670, 273, 3206, 309, 12423, 5931, 1670, 480, 3206, 30, 12423, 5931, 1670, 273, 6...
return self.socket.recvfrom(max_packet_size)
return self.socket.recvfrom(self.max_packet_size)
def get_request(self):
c489e5ab6399d7479e436a7684774f3f0905e391 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c489e5ab6399d7479e436a7684774f3f0905e391/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2293, 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, 336, 67, 2293, 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, -100...
disk_data = ["'phy:%s,%s,w'" % (rldev.dev_path, cfdev.iv_name.replace("sd", "ioemu:hd")) for cfdev, rldev in block_devices]
def _WriteConfigFile(instance, block_devices, extra_args): """Create a Xen 3.1 HVM config file.
e994fcbaa62581a64bdbc4ac8f4ef935496b9014 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/e994fcbaa62581a64bdbc4ac8f4ef935496b9014/hypervisor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3067, 13705, 12, 1336, 16, 1203, 67, 12506, 16, 2870, 67, 1968, 4672, 3536, 1684, 279, 1139, 275, 890, 18, 21, 670, 7397, 642, 585, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3067, 13705, 12, 1336, 16, 1203, 67, 12506, 16, 2870, 67, 1968, 4672, 3536, 1684, 279, 1139, 275, 890, 18, 21, 670, 7397, 642, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100...
self.num_vals = control.identifier_get_max_length(); self.vals = vals self.ui.set_item_text(self.treeroot, str(self), str(vals))
self.num_vals = control.get_num_vals(); v1 = vals.split(":") self.vals = [ ] for s1 in v1: v1 = s1.split() if (v1[0] != "lc"): v1.insert(0, "") self.vals.append(v1) self.ui.set_item_text(self.treeroot, str(self), str(self.vals))
def control_get_light_cb(self, control, err, vals): if (err != 0): self.ui.set_item_text(self.treeroot, str(self), None) return self.num_vals = control.identifier_get_max_length(); self.vals = vals self.ui.set_item_text(self.treeroot, str(self), str(vals))
e4a495f473299f3234d1d57514918996b249814d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3867/e4a495f473299f3234d1d57514918996b249814d/_control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3325, 67, 588, 67, 5099, 67, 7358, 12, 2890, 16, 3325, 16, 393, 16, 5773, 4672, 309, 261, 370, 480, 374, 4672, 365, 18, 4881, 18, 542, 67, 1726, 67, 955, 12, 2890, 18, 27427, 264, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3325, 67, 588, 67, 5099, 67, 7358, 12, 2890, 16, 3325, 16, 393, 16, 5773, 4672, 309, 261, 370, 480, 374, 4672, 365, 18, 4881, 18, 542, 67, 1726, 67, 955, 12, 2890, 18, 27427, 264, ...
self.assertIsInstance(items, list) self.assertIsInstance(items[0], tuple)
self.assertTrue(isinstance(items, list)) self.assertTrue(isinstance(items[0], tuple))
def test01_basic(self): d = db.DB()
cf864ec6d7865633f1d8454ba2cc4580bd219b8a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/cf864ec6d7865633f1d8454ba2cc4580bd219b8a/test_recno.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1611, 67, 13240, 12, 2890, 4672, 302, 273, 1319, 18, 2290, 1435, 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, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1611, 67, 13240, 12, 2890, 4672, 302, 273, 1319, 18, 2290, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...