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.execvp(cmdArray[0],cmdArray) | os.execvp(self.cmd[0], self.cmd) | def launch(self): self.logger.log(Log.DEBUG, "BasicPipelineLauncher:launch") | 5a733a6a8899f54127a37b2c9b6348dc63bf661f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6549/5a733a6a8899f54127a37b2c9b6348dc63bf661f/BasicPipelineLauncher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8037,
12,
2890,
4672,
365,
18,
4901,
18,
1330,
12,
1343,
18,
9394,
16,
315,
8252,
8798,
28820,
30,
20738,
7923,
2,
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,
8037,
12,
2890,
4672,
365,
18,
4901,
18,
1330,
12,
1343,
18,
9394,
16,
315,
8252,
8798,
28820,
30,
20738,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
'pyasn1.codec.der' ], license="BSD" | 'pyasn1.codec.der' ] | def howto_install_setuptools(): print """Error: You need setuptools Python package! | a863b43b7cdfaf34d47395ad3c2e8488a87d3ff0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8754/a863b43b7cdfaf34d47395ad3c2e8488a87d3ff0/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3661,
869,
67,
5425,
67,
542,
30693,
13332,
1172,
3536,
668,
30,
4554,
1608,
444,
30693,
6600,
2181,
5,
225,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3661,
869,
67,
5425,
67,
542,
30693,
13332,
1172,
3536,
668,
30,
4554,
1608,
444,
30693,
6600,
2181,
5,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.writeSources(d.sourceTree) | self.writeSources(d.sourceTree, True) | def writePBXSourcesBuildPhase(self): w = self.file.write w("/* Begin PBXSourcesBuildPhase section */\n") for d in self.projects: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActionMask = 2147483647;\n") w("\t\tfiles = (\n") if d.usemaster: w("\t\t\t%s,\n" % d.masterbuildid) else: self.writeSources(d.sourceTree) w("\t\t);\n") w("\t\trunOnlyForDeploymentPostprocessing = 0;\n") w("\t};\n") w("/* End PBXSourcesBuildPhase section */\n\n") | a60ebba76722784f18efcbe8160429b6fe069496 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/a60ebba76722784f18efcbe8160429b6fe069496/xcode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
20724,
60,
8628,
3116,
11406,
12,
2890,
4672,
341,
273,
365,
18,
768,
18,
2626,
341,
2932,
20308,
14323,
20819,
60,
8628,
3116,
11406,
2442,
1195,
64,
82,
7923,
364,
302,
316,
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,
1045,
20724,
60,
8628,
3116,
11406,
12,
2890,
4672,
341,
273,
365,
18,
768,
18,
2626,
341,
2932,
20308,
14323,
20819,
60,
8628,
3116,
11406,
2442,
1195,
64,
82,
7923,
364,
302,
316,
365,... |
security.declareProtected(permissions.ModifyPortalContent, | security.declareProtected(CMFCorePermissions.ModifyPortalContent, | def setDefaults(self, instance): """Only call during object initialization. Sets fields to schema defaults """ ## XXX think about layout/vs dyn defaults for field in self.values(): if field.getName().lower() == 'id': continue if field.type == "reference": continue | b9a35d44b511b5a532334179a24412a4695367d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b9a35d44b511b5a532334179a24412a4695367d1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22399,
12,
2890,
16,
791,
4672,
3536,
3386,
745,
4982,
733,
10313,
18,
11511,
1466,
358,
1963,
3467,
3536,
7541,
11329,
15507,
2973,
3511,
19,
6904,
19417,
3467,
364,
652,
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,
22399,
12,
2890,
16,
791,
4672,
3536,
3386,
745,
4982,
733,
10313,
18,
11511,
1466,
358,
1963,
3467,
3536,
7541,
11329,
15507,
2973,
3511,
19,
6904,
19417,
3467,
364,
652,
316,
365,
18,
... |
[4*5 + 3*5^2 + 3*5^3 + 4*5^4 + 4*5^5 + 5^6 + 4*5^8 + O(5^9)] | [4*5 + 3*5^2 + 3*5^3 + 4*5^4 + 4*5^5 + 5^6 + 4*5^8 + 3*5^9 + O(5^10)] | def padic_height_pairing_matrix(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic $p$-adic height pairing matrix of this curve with respect to the basis self.gens() for the Mordell-Weil group for a given odd prime p of good ordinary reduction. | 65c3f320038580074d5807d5c1512949277d8800 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/65c3f320038580074d5807d5c1512949277d8800/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
4210,
67,
6017,
310,
67,
5667,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
2072,
33,
7036,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4627,
335,
67,
4210,
67,
6017,
310,
67,
5667,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
2072,
33,
7036,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281... |
itemref = self.data.pop() | try: itemref = self.data.pop() except KeyError: raise KeyError('pop from empty WeakSet') | def pop(self): while True: itemref = self.data.pop() item = itemref() if item is not None: return item | bf93b0470affd720a603805eb00c917a9bc39cc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/bf93b0470affd720a603805eb00c917a9bc39cc9/_weakrefset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1843,
12,
2890,
4672,
1323,
1053,
30,
775,
30,
761,
1734,
273,
365,
18,
892,
18,
5120,
1435,
1335,
4999,
30,
1002,
4999,
2668,
5120,
628,
1008,
23632,
694,
6134,
761,
273,
761,
1734,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1843,
12,
2890,
4672,
1323,
1053,
30,
775,
30,
761,
1734,
273,
365,
18,
892,
18,
5120,
1435,
1335,
4999,
30,
1002,
4999,
2668,
5120,
628,
1008,
23632,
694,
6134,
761,
273,
761,
1734,
1... |
width = context.get_form_value('width') height = context.get_form_value('height') | width = context.get_form_value('width', 48) height = context.get_form_value('height', 48) | def icon48(self, context): width = context.get_form_value('width') height = context.get_form_value('height') | d162186e5e1c01ab6665403ae5410fe5ca24c468 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/d162186e5e1c01ab6665403ae5410fe5ca24c468/images.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4126,
8875,
12,
2890,
16,
819,
4672,
1835,
273,
819,
18,
588,
67,
687,
67,
1132,
2668,
2819,
6134,
2072,
273,
819,
18,
588,
67,
687,
67,
1132,
2668,
4210,
6134,
2,
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,
4126,
8875,
12,
2890,
16,
819,
4672,
1835,
273,
819,
18,
588,
67,
687,
67,
1132,
2668,
2819,
6134,
2072,
273,
819,
18,
588,
67,
687,
67,
1132,
2668,
4210,
6134,
2,
-100,
-100,
-100,
... |
EXPECT_EQ(GetServiceId(kNewClientId), 0u); | EXPECT_TRUE( Get%(upper_resource_name)sInfo(client_%(resource_name)s_id_) == NULL); | def WriteImmediateServiceUnitTest(self, func, file): """Overrriden from TypeHandler.""" valid_test = """ | ae51d195b0e1bfaba2243f005a1aba675395595f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/ae51d195b0e1bfaba2243f005a1aba675395595f/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
22651,
1179,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
923,
67,
3813,
273,
3536,
2,
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,
2598,
22651,
1179,
2802,
4709,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
923,
67,
3813,
273,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if fail_dump: f = file('.stgit-failed.patch', 'w+') f.write(diff) f.close() out.warn('Diff written to the .stgit-failed.patch file') raise | raise GitException('Diff does not apply cleanly') | def apply_patch(filename = None, diff = None, base = None, fail_dump = True, reject = False, strip = None): """Apply a patch onto the current or given index. There must not be any local changes in the tree, otherwise the command fails """ if diff is None: if filename: f = file(filename) else: f = sys.stdin diff = f.read() if filename: f.close() if base: orig_head = get_head() switch(base) else: refresh_index() cmd = ['apply', '--index'] if reject: cmd += ['--reject'] if strip != None: cmd += ['-p', str(strip)] try: GRun(*cmd).raw_input(diff).no_output() except GitRunException: if base: switch(orig_head) if fail_dump: # write the failed diff to a file f = file('.stgit-failed.patch', 'w+') f.write(diff) f.close() out.warn('Diff written to the .stgit-failed.patch file') raise if base: top = commit(message = 'temporary commit used for applying a patch', parents = [base]) switch(orig_head) merge_recursive(base, orig_head, top) | b56d87814e5986a03efa9079d482a5b020141794 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12366/b56d87814e5986a03efa9079d482a5b020141794/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
2272,
12,
3459,
273,
599,
16,
3122,
273,
599,
16,
1026,
273,
599,
16,
2321,
67,
8481,
273,
1053,
16,
4925,
273,
1083,
16,
2569,
273,
599,
4672,
3536,
7001,
279,
4729,
10170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2230,
67,
2272,
12,
3459,
273,
599,
16,
3122,
273,
599,
16,
1026,
273,
599,
16,
2321,
67,
8481,
273,
1053,
16,
4925,
273,
1083,
16,
2569,
273,
599,
4672,
3536,
7001,
279,
4729,
10170,
... |
if debug_prints: print "remove breakpoint" | logger.log_text("remove breakpoint") | def removeBreakpoint(self): if debug_prints: print "remove breakpoint" if self.current_target is not None: self.debug.dont_stalk_at(self.pid, self.current_target) | 6d6079c7bcc0ba519b666a5d46e251aede9525d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/6d6079c7bcc0ba519b666a5d46e251aede9525d0/sehtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
20552,
12,
2890,
4672,
1194,
18,
1330,
67,
955,
2932,
4479,
18820,
7923,
309,
365,
18,
2972,
67,
3299,
353,
486,
599,
30,
365,
18,
4148,
18,
72,
1580,
67,
20852,
67,
270,
12,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
20552,
12,
2890,
4672,
1194,
18,
1330,
67,
955,
2932,
4479,
18820,
7923,
309,
365,
18,
2972,
67,
3299,
353,
486,
599,
30,
365,
18,
4148,
18,
72,
1580,
67,
20852,
67,
270,
12,
2... |
raise AttributeError(_("Couldn't find tag '%s' in parent view !") % tag) | raise_view_error("Element '%s' not found in parent view '%%(parent_xml_id)s'" % tag, inherit_id) | def _find(node, node2): if node2.tag == 'xpath': res = node.xpath(node2.get('expr')) if res: return res[0] else: return None else: for n in node.getiterator(node2.tag): res = True if node2.tag == 'field': # only compare field names, a field can be only once in a given view # at a given level (and for multilevel expressions, we should use xpath # inheritance spec anyway) if node2.get('name') == n.get('name'): return n else: continue for attr in node2.attrib: if attr == 'position': continue if n.get(attr): if n.get(attr) == node2.get(attr): continue res = False if res: return n return None | 5b67a3154e0e02212c6bd648ed6a5ebf91dc831e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b67a3154e0e02212c6bd648ed6a5ebf91dc831e/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
12,
2159,
16,
756,
22,
4672,
309,
756,
22,
18,
2692,
422,
296,
18644,
4278,
400,
273,
756,
18,
18644,
12,
2159,
22,
18,
588,
2668,
8638,
26112,
309,
400,
30,
327,
400,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
12,
2159,
16,
756,
22,
4672,
309,
756,
22,
18,
2692,
422,
296,
18644,
4278,
400,
273,
756,
18,
18644,
12,
2159,
22,
18,
588,
2668,
8638,
26112,
309,
400,
30,
327,
400,
63,... |
testModule("hachoir_core.regex.parser") testModule("hachoir_core.regex.regex") | def main(): setlocale(LC_ALL, "C") hachoir_dir = os.path.dirname(__file__) sys.path.append(hachoir_dir) # Configure Hachoir for tests import hachoir_core.config as config config.use_i18n = False # Test documentation in doc/*.rst files testDoc('doc/hachoir-api.rst') testDoc('doc/internals.rst') testDoc('doc/regex.rst') testDoc('tests/regression.rst') # Test documentation of some functions/classes testModule("hachoir_core.bits") testModule("hachoir_core.compatibility") testModule("hachoir_core.dict") testModule("hachoir_core.text_handler") testModule("hachoir_core.tools") testModule("hachoir_core.regex.parser") testModule("hachoir_core.regex.regex") | 11bb8f5825f73ea992fc98de3649944a083ede34 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/11bb8f5825f73ea992fc98de3649944a083ede34/test_doc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
444,
6339,
12,
13394,
67,
4685,
16,
315,
39,
7923,
366,
497,
83,
481,
67,
1214,
273,
1140,
18,
803,
18,
12287,
12,
972,
768,
972,
13,
2589,
18,
803,
18,
6923,
12,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
6339,
12,
13394,
67,
4685,
16,
315,
39,
7923,
366,
497,
83,
481,
67,
1214,
273,
1140,
18,
803,
18,
12287,
12,
972,
768,
972,
13,
2589,
18,
803,
18,
6923,
12,
76,
... | |
if len(unused_data) > 0: buffer = StringIO() buffer.write(data) while len(unused_data) > 0: self.decompressor = self._decompressor() buffer.write(self.decompressor.decompress(unused_data)) unused_data = self.decompressor.unused_data data = buffer.getvalue() buffer.close() if length > 0 and len(data) > length: self.extra_data = data[length:] data = data[0:length] | data = buffer.getvalue() buffer.close() if length > 0 and len(data) > length: self.extra_data = StringIO(data) data = self.extra_data.read(length) | def read(self, length = -1): | d1387017305dd7667414e56a07f6db8fbd451b21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d1387017305dd7667414e56a07f6db8fbd451b21/Streams.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
769,
273,
300,
21,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
769,
273,
300,
21,
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,
-... |
def __iter__(self): return 'a' | def keys(self): return 1 | def __iter__(self): return 'a' # XXX Not quite faithful to the SF bug... | e3406d9f0d5d06b424cea9459ca35f26e74487ab /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/e3406d9f0d5d06b424cea9459ca35f26e74487ab/test_builtin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1311,
12,
2890,
4672,
327,
404,
225,
468,
11329,
2288,
25102,
11087,
483,
2706,
358,
326,
21318,
7934,
2777,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1311,
12,
2890,
4672,
327,
404,
225,
468,
11329,
2288,
25102,
11087,
483,
2706,
358,
326,
21318,
7934,
2777,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
from tests.utils import testsFolder | global testsFolder | def setUp(self): self.cwd = os.getcwd() from tests.utils import testsFolder scriptDir=self.scriptDir if not os.path.isabs(scriptDir): scriptDir=os.path.join(testsFolder,scriptDir) | b05fb18f542c48f8ed9787d03cc67e728e204312 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7053/b05fb18f542c48f8ed9787d03cc67e728e204312/testutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
11089,
273,
1140,
18,
588,
11089,
1435,
2552,
7434,
3899,
2728,
1621,
33,
2890,
18,
4263,
1621,
309,
486,
1140,
18,
803,
18,
291,
5113,
12,
4263,
1621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
12,
2890,
4672,
365,
18,
11089,
273,
1140,
18,
588,
11089,
1435,
2552,
7434,
3899,
2728,
1621,
33,
2890,
18,
4263,
1621,
309,
486,
1140,
18,
803,
18,
291,
5113,
12,
4263,
1621,
... |
print "NONE" | def cmpclasses(clist): ref = clist[0] for c in clist[1:]: if c<>ref: return 0 return 1 | 7cc437673a33909d6c887618cf3c88643040c0f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/7cc437673a33909d6c887618cf3c88643040c0f2/OWClassifiedDataTable.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
4701,
12,
830,
376,
4672,
1278,
273,
927,
376,
63,
20,
65,
364,
276,
316,
927,
376,
63,
21,
30,
14542,
309,
276,
29667,
1734,
30,
327,
374,
327,
404,
2,
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,
9411,
4701,
12,
830,
376,
4672,
1278,
273,
927,
376,
63,
20,
65,
364,
276,
316,
927,
376,
63,
21,
30,
14542,
309,
276,
29667,
1734,
30,
327,
374,
327,
404,
2,
-100,
-100,
-100,
-100,... | |
date_time=time.localtime(time.time())) | date_time=time.localtime(time.time())[:6]) | def writestr(self, zinfo_or_arcname, bytes): """Write a file into the archive. The contents is the string 'bytes'. 'zinfo_or_arcname' is either a ZipInfo instance or the name of the file in the archive.""" if not isinstance(zinfo_or_arcname, ZipInfo): zinfo = ZipInfo(filename=zinfo_or_arcname, date_time=time.localtime(time.time())) zinfo.compress_type = self.compression else: zinfo = zinfo_or_arcname | 4ad87a0efaa5e64946b76e8d66f0e69f4b7d72d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/4ad87a0efaa5e64946b76e8d66f0e69f4b7d72d2/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7262,
313,
12,
2890,
16,
998,
1376,
67,
280,
67,
11828,
529,
16,
1731,
4672,
3536,
3067,
279,
585,
1368,
326,
5052,
18,
225,
1021,
2939,
353,
326,
533,
296,
3890,
10332,
225,
296,
94,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7262,
313,
12,
2890,
16,
998,
1376,
67,
280,
67,
11828,
529,
16,
1731,
4672,
3536,
3067,
279,
585,
1368,
326,
5052,
18,
225,
1021,
2939,
353,
326,
533,
296,
3890,
10332,
225,
296,
94,
... |
Inverse of the link functin. Just a placeholder. | Inverse of the link function. Just a placeholder. | def inverse(self, z): """ Inverse of the link functin. Just a placeholder. | 3bc1e5c887942a5e791ddd2d9ef2c82674df8885 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/3bc1e5c887942a5e791ddd2d9ef2c82674df8885/links.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8322,
12,
2890,
16,
998,
4672,
3536,
657,
2476,
434,
326,
1692,
12882,
267,
18,
225,
12526,
279,
6695,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
8322,
12,
2890,
16,
998,
4672,
3536,
657,
2476,
434,
326,
1692,
12882,
267,
18,
225,
12526,
279,
6695,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
except: | except NameError: | def _init_categories(categories=categories): for k,v in globals().items(): if k[:3] == 'LC_': categories[k] = v | 0c65c856c330d7ecf07a8ad91527d3baf04f3022 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0c65c856c330d7ecf07a8ad91527d3baf04f3022/locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
8995,
12,
8995,
33,
8995,
4672,
364,
417,
16,
90,
316,
10941,
7675,
3319,
13332,
309,
417,
10531,
23,
65,
422,
296,
13394,
67,
4278,
6477,
63,
79,
65,
273,
331,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
8995,
12,
8995,
33,
8995,
4672,
364,
417,
16,
90,
316,
10941,
7675,
3319,
13332,
309,
417,
10531,
23,
65,
422,
296,
13394,
67,
4278,
6477,
63,
79,
65,
273,
331,
2,
-10... |
module=func.__module__, dict=func.__dict__, | module=tempMod, dict=func.__dict__, | >>> def f(self, x=1, y=2, *args, **kw): pass | a08def734948b314b88b13793e3091404bd92e8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/34/a08def734948b314b88b13793e3091404bd92e8d/decorator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
2890,
16,
619,
33,
21,
16,
677,
33,
22,
16,
380,
1968,
16,
2826,
9987,
4672,
1342,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4080,
1652,
284,
12,
2890,
16,
619,
33,
21,
16,
677,
33,
22,
16,
380,
1968,
16,
2826,
9987,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if verbose: stderr.write( "@@@ %i duplicate sigs out of %i\n" %(dups, n)) | def canon(graph, c0=0): "Try one pass at canonicalizing this using 1 step sigs" nextBnode = 0 bnodes = {} pattern = [] signature = [] canonical = {} for j in range(len(graph)): triple = graph[j] pat = [] for i in range(3): if triple[i].startswith("_:"): b = bnodes.get(triple[i], None) if b == None: b = nextBnode nextBnode = nextBnode + 1 bnodes[triple[i]] = b signature.append([]) pat.append(None) else: pat.append(triple[i]) pattern.append(pat) for i in range(3): if triple[i].startswith("_:"): b = bnodes[triple[i]] signature[b].append((i, pat)) n = nextBnode s = [] for i in range(n): signature[i].sort(compare) # Signature is now intrinsic to the local environment of that bnode. if verbose: stderr.write( " %3i) %s\n" % (i, signature[i])) s.append((signature[i], i)) s.sort() dups = 0 c = c0 for i in range(n): if i != n-1 and s[i][0] == s[i+1][0]: if verbose: stderr.write( "@@@ %3i] %i and %i have same signature: \n\t%s\nand\t%s\n" % ( i, s[i][1], s[i+1][1], s[i][0], s[i+1][0])) dups = dups + 1 elif i != 0 and s[i][0] == s[i-1][0]: if verbose: stderr.write( "@@@ %3i] %i and %i have same signature: \n\t%s\nand\t%s\n" % ( i, s[i][1], s[i-1][1], s[i][0], s[i-1][0])) else: canonical[i] = c if verbose: stderr.write( "\t#%i canonicalized #%i\n" %(s[i][1], c)) c = c + 1 if verbose: stderr.write( "@@@ %i duplicate sigs out of %i\n" %(dups, n)) | 93ef9692764039652174ae73633b295ae7797b4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/93ef9692764039652174ae73633b295ae7797b4d/cant.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29147,
12,
4660,
16,
276,
20,
33,
20,
4672,
315,
7833,
1245,
1342,
622,
7378,
6894,
333,
1450,
404,
2235,
3553,
87,
6,
1024,
38,
2159,
273,
374,
324,
4690,
273,
2618,
1936,
273,
5378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29147,
12,
4660,
16,
276,
20,
33,
20,
4672,
315,
7833,
1245,
1342,
622,
7378,
6894,
333,
1450,
404,
2235,
3553,
87,
6,
1024,
38,
2159,
273,
374,
324,
4690,
273,
2618,
1936,
273,
5378,
... | |
if activity: | if activity is not None: | def convertToTextFile(fromPath, toPath, serializer=PickleSerializer, activity=None): if activity: activity.update(totalWork=None, msg=_(u"Counting records...")) input = open(fromPath, "rb") load = serializer.loader(input) i = 0 while True: record = load() if not record: break i += 1 input.close() activity.update(totalWork=i) input = open(fromPath, "rb") output = open(toPath, "wb") try: load = serializer.loader(input) i = 0 while True: record = load() if not record: break output.write(str(record)) output.write("\n\n") i += 1 if activity: activity.update(msg=_(u"Converted %(total)d records") % {'total':i}, work=1) del load finally: input.close() output.close() | 47ace3edcac6912ffb5dfe00f96f9b282b9f8217 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9228/47ace3edcac6912ffb5dfe00f96f9b282b9f8217/dumpreload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8137,
1528,
812,
12,
2080,
743,
16,
21467,
16,
6340,
33,
17968,
298,
6306,
16,
5728,
33,
7036,
4672,
225,
309,
5728,
353,
486,
599,
30,
5728,
18,
2725,
12,
4963,
2421,
33,
7036,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8137,
1528,
812,
12,
2080,
743,
16,
21467,
16,
6340,
33,
17968,
298,
6306,
16,
5728,
33,
7036,
4672,
225,
309,
5728,
353,
486,
599,
30,
5728,
18,
2725,
12,
4963,
2421,
33,
7036,
16,
... |
return setattr(self, fixname(attr), val) | return setattr(self, self.fixname(attr), val) | def __setitem__(self, attr, val): return setattr(self, fixname(attr), val) | 5331884b7b51163f724d1e93d9a1dd81be57a76c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7311/5331884b7b51163f724d1e93d9a1dd81be57a76c/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
1604,
16,
1244,
4672,
327,
9241,
12,
2890,
16,
2917,
529,
12,
1747,
3631,
1244,
13,
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,
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,
1001,
542,
1726,
972,
12,
2890,
16,
1604,
16,
1244,
4672,
327,
9241,
12,
2890,
16,
2917,
529,
12,
1747,
3631,
1244,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
sendWindAlert(id, db[id].maxSPED, db[id].maxDrctTxt, myThreshold) | def windGustAlert(): for id in db.keys(): myThreshold = _WIND_THRESHOLD if (id == 84 or id == 40 or id == 9 or id == 78 or id == 49): myThreshold += 7 if (id == 49 or id == 618 or id == 1): myThreshold += 40 # If no obs during this period, no alerts # If no obs during this period, no alerts if (db[id].valid == None): continue # If the max gust is greater than the threshold, we consider if (db[id].maxSPED != None and db[id].maxSPED >= myThreshold): # We also need this maxGust to be greater than previously warned if (db[id].windGustAlert != None and \ db[id].maxSPED > db[id].windGustAlert): sendWindAlert(id, db[id].maxSPED, db[id].maxDrctTxt, myThreshold) # Set the value for the last alert generated! db[id].windGustAlert = db[id].maxSPED continue # If the windGustAlert is None, then we should alert too if (db[id].windGustAlert == None): sendWindAlert(id, db[id].maxSPED, db[id].maxDrctTxt, myThreshold) # Set the value for the last alert generated! db[id].windGustAlert = db[id].maxSPED continue # We will always alert in this situation if (len(db[id].aSPED) > 0) and (max(db[id].aSPED) >= myThreshold): # We need to find the max wind speed direction for pos in range(len(db[id].aSPED)): if (max(db[id].aSPED) == db[id].aSPED[pos]): alertDrctTxt = db[id].aDrctTxt[pos] db[id].maxDrctTxt = alertDrctTxt db[id].maxSPED_ts = db[id].valid sendWindAlert(id, max(db[id].aSPED), alertDrctTxt, myThreshold) | 7965b7e2dc32eb4373b3870075b83b9773078d80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11189/7965b7e2dc32eb4373b3870075b83b9773078d80/ingest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17064,
43,
641,
13298,
13332,
364,
612,
316,
1319,
18,
2452,
13332,
3399,
7614,
273,
389,
16597,
67,
23840,
309,
261,
350,
422,
23421,
578,
612,
422,
8063,
578,
612,
422,
2468,
578,
612,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17064,
43,
641,
13298,
13332,
364,
612,
316,
1319,
18,
2452,
13332,
3399,
7614,
273,
389,
16597,
67,
23840,
309,
261,
350,
422,
23421,
578,
612,
422,
8063,
578,
612,
422,
2468,
578,
612,... | |
mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_cal_dir.name | calendar_dir_id = data_pool.get_object(cr, uid, 'caldav', 'document_directory_calendars0') return calendar_dir_id.name | def _get_root_calendar_directory(self, cr, uid, context=None): objid = self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_cal_dir.name except Exception: logger = logging.getLogger('document') logger.warning('Cannot set root directory for Calendars:', exc_info=True) return False return False | f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010/calendar_collection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
3085,
67,
11650,
67,
5149,
12,
2890,
16,
4422,
16,
4555,
16,
819,
33,
7036,
4672,
1081,
350,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
775,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
3085,
67,
11650,
67,
5149,
12,
2890,
16,
4422,
16,
4555,
16,
819,
33,
7036,
4672,
1081,
350,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
2284,
18,
892,
6134,
775,
30,
... |
choices=("release", "quick", "debug"), | choices=("release", "quick", "debug", "debug_optimized"), | def process_args(self, args, default_repository=None): cold_start = default_repository is not None if (len(args) == 0): args = ["--help"] if (default_repository is None): command_name = "libtbx.configure" else: command_name = "libtbx/configure.py" parser = option_parser( usage="%s [options] module_name[=redirection_path] ..." % command_name) if (not cold_start): parser.option(None, "--only", action="store_true", default=False, help="disable previously configured modules") else: parser.option("-r", "--repository", action="callback", type="string", callback=self.option_repository, help="path to source code repository", metavar="DIRECTORY") parser.option(None, "--build", choices=("release", "quick", "debug"), default="release", help="build mode", metavar="release|quick|debug") parser.option(None, "--compiler", action="store", type="string", default="default", help="select non-standard compiler", metavar="STRING") parser.option(None, "--static_libraries", action="store_true", default=False, help="build all libraries statically") parser.option(None, "--static_exe", action="store_true", default=False, help="link all executables statically (implies --static_libraries)") parser.option(None, "--scan_boost", action="store_true", default=False, help="enable implicit dependency scan") parser.option(None, "--command_version_suffix", action="store", type="string", default=None, help="version suffix for commands in bin directory", metavar="STRING") command_line = parser.process(args=args) if (default_repository is not None): self.add_repository(default_repository) module_names = [] for module_name in command_line.args: if (module_name in self.command_line_redirections): del self.command_line_redirections[module_name] elif (module_name.count("=") == 1 and self.find_dist_path(module_name, optional=True) is None): module_name, redirection = module_name.split("=") dist_path = self.abs_path_clean(os.path.expandvars(redirection)) if (not os.path.isdir(dist_path)): raise Sorry( 'Invalid command line redirection:\n' ' module name = "%s"\n' ' redirection = "%s"\n' ' resulting target = "%s"' % ( module_name, redirection, dist_path)) self.command_line_redirections[module_name] = dist_path module_names.append(module_name) if (not cold_start): if (not command_line.options.only): for module in self.module_list: module_names.append(module.name) else: self.build_options = build_options( compiler=command_line.options.compiler, mode=command_line.options.build, static_libraries=command_line.options.static_libraries, static_exe=command_line.options.static_exe, scan_boost=command_line.options.scan_boost) if (command_line.options.command_version_suffix is not None): self.command_version_suffix = \ command_line.options.command_version_suffix self.write_command_version_suffix() self.reset_module_registry() module_names.append("libtbx") module_names.reverse() for module_name in module_names: self.process_module( dependent_module=None, module_name=module_name, optional=False) self.scons_dist_path = self.find_dist_path("scons", optional=True) self.path_utility = self.under_dist( "libtbx", "libtbx/command_line/path_utility.py") assert os.path.isfile(self.path_utility) | d5a015cdf902dcd3c7f03c78496071b5468f5c8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/d5a015cdf902dcd3c7f03c78496071b5468f5c8a/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
1968,
12,
2890,
16,
833,
16,
805,
67,
9071,
33,
7036,
4672,
645,
72,
67,
1937,
273,
805,
67,
9071,
353,
486,
599,
309,
261,
1897,
12,
1968,
13,
422,
374,
4672,
833,
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,
1207,
67,
1968,
12,
2890,
16,
833,
16,
805,
67,
9071,
33,
7036,
4672,
645,
72,
67,
1937,
273,
805,
67,
9071,
353,
486,
599,
309,
261,
1897,
12,
1968,
13,
422,
374,
4672,
833,
273,
... |
self.AddError(_("Bad user - %s.") % sender, trunc=0) | self.AddError(_("Bad user - %(sender)s."), trunc=0) | def ProcessPasswordCmd(self, args, cmd, mail): if len(args) not in [0,2]: self.AddError(_("Usage: password [<oldpw> <newpw>]")) return sender = mail.GetSender() if len(args) == 0: # Mail user's password to user user = self.FindUser(sender) if user and self.passwords.has_key(user): self.AddToResponse(_("You are subscribed as %s,\n" " with password: %s") % (user, self.passwords[user]), trunc=0) else: self.AddError(_("Found no password for %s") %sender, trunc=0) return # Try to change password | bfed9ae359e2eea17ad856f6284f7870ede7b63f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/bfed9ae359e2eea17ad856f6284f7870ede7b63f/MailCommandHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4389,
3913,
5931,
12,
2890,
16,
833,
16,
1797,
16,
4791,
4672,
309,
562,
12,
1968,
13,
486,
316,
306,
20,
16,
22,
14542,
365,
18,
986,
668,
24899,
2932,
5357,
30,
2201,
306,
32,
1673... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4389,
3913,
5931,
12,
2890,
16,
833,
16,
1797,
16,
4791,
4672,
309,
562,
12,
1968,
13,
486,
316,
306,
20,
16,
22,
14542,
365,
18,
986,
668,
24899,
2932,
5357,
30,
2201,
306,
32,
1673... |
sage: R = k['x'] sage: k(R(3)) 3 Nonconstant polynomials do not coerce: | sage: k(x^2) a + 3 sage: R.<x> = GF(5)[] sage: k(x^3-2*x+1) 2*a + 4 | def __call__(self, x): r""" Coerce x into the finite field. | 70aa9021f3742d2afe1b54d4ef7874c52f2025b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/70aa9021f3742d2afe1b54d4ef7874c52f2025b0/finite_field_ext_pari.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
436,
8395,
7695,
2765,
619,
1368,
326,
25922,
652,
18,
2,
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,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
4672,
436,
8395,
7695,
2765,
619,
1368,
326,
25922,
652,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.change_fuse_mode(self.w.fuse_mode_combox.currentText()) | self.recompute_fusables = True self.change_fuse_mode(self.w.fuse_mode_combox.currentText()) | def Enter(self): modifyMode.Enter(self) self.change_fuse_mode(self.w.fuse_mode_combox.currentText()) # Syncs the dashboard and glpane. | 36ecf86cd310caee386f9f47f59775c487387178 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/36ecf86cd310caee386f9f47f59775c487387178/fusechunksMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15439,
12,
2890,
4672,
5612,
2309,
18,
10237,
12,
2890,
13,
365,
18,
266,
9200,
67,
74,
407,
1538,
273,
1053,
365,
18,
3427,
67,
74,
1202,
67,
3188,
12,
2890,
18,
91,
18,
74,
1202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15439,
12,
2890,
4672,
5612,
2309,
18,
10237,
12,
2890,
13,
365,
18,
266,
9200,
67,
74,
407,
1538,
273,
1053,
365,
18,
3427,
67,
74,
1202,
67,
3188,
12,
2890,
18,
91,
18,
74,
1202,
... |
print 'connecting to', hostname if not samepw: if username == '': username = raw_input('username: ') if password == '': password = getpass.getpass('password: ') | def main (): global CMD_HELP try: optlist, args = getopt.getopt(sys.argv[1:], 'h?', ['help','h','?','samepw','username=','password=']) except Exception, e: print str(e) exit_with_usage() options = dict(optlist) # There are a million ways to cry for help. These are but a few of them. if [elem for elem in options if elem in ['-h','--h','-?','--?','--help']]: exit_with_usage(0) if '--samepw' in options: samepw = True else: samepw = False if samepw: if '--username' in options: username = options['--username'] else: username = raw_input('username: ') if '--password' in options: password = options['--password'] else: password = getpass.getpass('password: ') hive = {} hive_names = [] for host_connect_string in args: hcd = parse_host_connect_string (host_connect_string) hostname = hcd['hostname'] username = hcd['username'] password = hcd['password'] port = hcd['port'] print 'connecting to', hostname if not samepw: if username == '': username = raw_input('username: ') if password == '': password = getpass.getpass('password: ') if port == '': port = None try: hive[hostname] = pxssh.pxssh() hive[hostname].login(hostname, username, password, port) hive_names.append(hostname) print hive[hostname].before print '- OK' except Exception, e: print '- ERROR', print str(e) print 'Skipping', hostname if hostname in hive: del hive[hostname] synchronous_mode = True target_hostnames = hive_names[:] print 'targetting hosts:', ' '.join(target_hostnames) while True: cmd = raw_input('CMD (? for help) > ') cmd = cmd.strip() if cmd=='?': print CMD_HELP continue elif cmd==':resync': resync (hive, target_hostnames, timeout=0.5) for hostname in target_hostnames: print '/=============================================================================' print '| ' + hostname print '\\-----------------------------------------------------------------------------' print hive[hostname].before print '==============================================================================' continue elif cmd==':sync': synchronous_mode = True resync (hive, target_hostnames, timeout=0.5) continue elif cmd==':async': synchronous_mode = False continue elif cmd==':prompt': for hostname in target_hostnames: hive[hostname].set_unique_prompt() continue elif cmd[:5] == ':send': cmd, txt = cmd.split(None,1) for hostname in target_hostnames: hive[hostname].send(txt) continue elif cmd[:7] == ':expect': cmd, pattern = cmd.split(None,1) print 'looking for', pattern for hostname in target_hostnames: hive[hostname].expect(pattern) print hive[hostname].before continue elif cmd[:7] == ':target': # TODO need to check target_list against hive_names target_hostnames = cmd.split()[1:] if len(target_hostnames) == 0 or target_hostnames[0] == 'all': target_hostnames = hive_names[:] print 'targetting hosts:', ' '.join(target_hostnames) continue elif cmd == ':exit' or cmd == ':q' or cmd == ':quit': break # # Run the command on all targets in parallel # try: for hostname in target_hostnames: hive[hostname].sendline (cmd) except Exception, e: print "Had trouble communicating with %s, so removing it from the target list." % hostname print str(e) del hive[hostname] #del target_hostnames[hostname] # # print the response for each targeted host. # if synchronous_mode: for hostname in target_hostnames: hive[hostname].prompt(timeout=2) print '/=============================================================================' print '| ' + hostname print '\\-----------------------------------------------------------------------------' print hive[hostname].before print '==============================================================================' | a4de0f5054c1cb5e16268d1d0087a903f6f8d938 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/a4de0f5054c1cb5e16268d1d0087a903f6f8d938/hive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
1832,
30,
2552,
18052,
67,
27396,
225,
775,
30,
2153,
1098,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
76,
35,
2187,
10228,
5201,
17023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1832,
30,
2552,
18052,
67,
27396,
225,
775,
30,
2153,
1098,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
18,
19485,
63,
21,
30,
6487,
296,
76,
35,
2187,
10228,
5201,
17023,
... | |
color=istate.fgcolor) | color=unicode(istate.fgcolor)) | def mobimlize_content(self, tag, text, bstate, istates): 'Convert text content' if text or tag != 'br': bstate.content = True istate = istates[-1] para = bstate.para if tag in SPECIAL_TAGS and not text: para = para if para is not None else bstate.body elif para is None or tag in ('td', 'th'): body = bstate.body if bstate.pbreak: etree.SubElement(body, MBP('pagebreak')) bstate.pbreak = False bstate.istate = None bstate.anchor = None parent = bstate.nested[-1] if bstate.nested else bstate.body indent = istate.indent left = istate.left if indent < 0 and abs(indent) < left: left += indent indent = 0 elif indent != 0 and abs(indent) < self.profile.fbase: indent = (indent / abs(indent)) * self.profile.fbase if tag in NESTABLE_TAGS and not istate.rendered: para = wrapper = etree.SubElement( parent, XHTML(tag), attrib=istate.attrib) bstate.nested.append(para) if tag == 'li' and len(istates) > 1: istates[-2].list_num += 1 para.attrib['value'] = str(istates[-2].list_num) elif tag in NESTABLE_TAGS and istate.rendered: para = wrapper = bstate.nested[-1] elif left > 0 and indent >= 0: para = wrapper = etree.SubElement(parent, XHTML('blockquote')) para = wrapper emleft = int(round(left / self.profile.fbase)) - 1 emleft = min((emleft, 10)) while emleft > 0: para = etree.SubElement(para, XHTML('blockquote')) emleft -= 1 else: para = wrapper = etree.SubElement(parent, XHTML('p')) bstate.inline = bstate.para = para vspace = bstate.vpadding + bstate.vmargin bstate.vpadding = bstate.vmargin = 0 if tag not in TABLE_TAGS: wrapper.attrib['height'] = self.mobimlize_measure(vspace) para.attrib['width'] = self.mobimlize_measure(indent) elif tag == 'table' and vspace > 0: vspace = int(round(vspace / self.profile.fbase)) while vspace > 0: wrapper.addprevious(etree.Element(XHTML('br'))) vspace -= 1 if istate.halign != 'auto' and isinstance(istate.halign, (str, unicode)): para.attrib['align'] = istate.halign istate.rendered = True pstate = bstate.istate if tag in CONTENT_TAGS: bstate.inline = para pstate = bstate.istate = None etree.SubElement(para, XHTML(tag), attrib=istate.attrib) elif tag in TABLE_TAGS: para.attrib['valign'] = 'top' if istate.ids: last = bstate.body[-1] for id in istate.ids: last.addprevious(etree.Element(XHTML('a'), attrib={'id': id})) istate.ids.clear() if not text: return if not pstate or istate != pstate: inline = para valign = istate.valign fsize = istate.fsize href = istate.href if not href: bstate.anchor = None elif pstate and pstate.href == href: inline = bstate.anchor else: inline = etree.SubElement(inline, XHTML('a'), href=href) bstate.anchor = inline if valign == 'super': inline = etree.SubElement(inline, XHTML('sup')) elif valign == 'sub': inline = etree.SubElement(inline, XHTML('sub')) elif fsize != 3: inline = etree.SubElement(inline, XHTML('font'), size=str(fsize)) if istate.family == 'monospace': inline = etree.SubElement(inline, XHTML('tt')) if istate.italic: inline = etree.SubElement(inline, XHTML('i')) if istate.bold: inline = etree.SubElement(inline, XHTML('b')) if istate.bgcolor is not None and istate.bgcolor != 'transparent' : inline = etree.SubElement(inline, XHTML('span'), bgcolor=istate.bgcolor) if istate.fgcolor != 'black': inline = etree.SubElement(inline, XHTML('font'), color=istate.fgcolor) if istate.strikethrough: inline = etree.SubElement(inline, XHTML('s')) bstate.inline = inline bstate.istate = istate inline = bstate.inline content = self.preize_text(text) if istate.preserve else [text] for item in content: if isinstance(item, basestring): if len(inline) == 0: inline.text = (inline.text or '') + item else: last = inline[-1] last.tail = (last.tail or '') + item else: inline.append(item) | 3dd8767ecb3fc509446b066127705cf7b83a7f9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/3dd8767ecb3fc509446b066127705cf7b83a7f9c/mobiml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
947,
381,
80,
554,
67,
1745,
12,
2890,
16,
1047,
16,
977,
16,
324,
2019,
16,
277,
7992,
4672,
296,
2723,
977,
913,
11,
309,
977,
578,
1047,
480,
296,
2848,
4278,
324,
2019,
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,
312,
947,
381,
80,
554,
67,
1745,
12,
2890,
16,
1047,
16,
977,
16,
324,
2019,
16,
277,
7992,
4672,
296,
2723,
977,
913,
11,
309,
977,
578,
1047,
480,
296,
2848,
4278,
324,
2019,
18,
... |
updateVersions(version, workingDir) | updateVersions(version, workingDir, base_dir) | def release(): # We start by determining whether the version passed in is a valid one if len(sys.argv) < 2: helpAndExit() base_dir = os.getcwd() version = validateVersion(sys.argv[1]) print "Releasing Infinispan version " + version print "Please stand by!" ## Release order: # Step 1: Tag in SVN newVersion = "%s/tags/%s" % (svnBase, version) print "Step 1: Tagging trunk in SVN as %s" % newVersion tagInSubversion(version, newVersion) print "Step 1: Complete" workingDir = localTagsDir + "/" + version # Step 2: Update version in tagged files print "Step 2: Updating version number in source files" updateVersions(version, workingDir) print "Step 2: Complete" # Step 3: Build and test in Maven2 print "Step 3: Build and test in Maven2" buildAndTest(workingDir) print "Step 3: Complete" # Step 4: Check in to Maven2 repo print "Step 4: Checking in to Maven2 Repo (this can take a while, go get coffee)" checkInMaven2Repo(version, workingDir) print "Step 4: Complete" # Step 5: Upload javadocs to FTP print "Step 5: Uploading Javadocs" uploadJavadocs(base_dir, workingDir, version) print "Step 5: Complete" print "Step 6: Uploading to Sourceforge" uploadArtifactsToSourceforge(version) print "Step 6: Complete" # (future) # Step 6: Update www.infinispan.org # Step 7; Upload to SF.net print "\n\n\nDone! Now all you need to do is:" print " 1. Update http://www.infinispan.org" print " 2. Update wiki pages with relevant information and links to docs, etc" print " 3. Login to the Sourceforge project admin page and mark the -bin.ZIP package as the default download for all platforms." | 9fc43e2136f3e38733f93df7b17599075f1fadbd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14175/9fc43e2136f3e38733f93df7b17599075f1fadbd/release.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
13332,
468,
1660,
787,
635,
23789,
2856,
326,
1177,
2275,
316,
353,
279,
923,
1245,
309,
562,
12,
9499,
18,
19485,
13,
411,
576,
30,
2809,
29000,
1435,
1026,
67,
1214,
273,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
13332,
468,
1660,
787,
635,
23789,
2856,
326,
1177,
2275,
316,
353,
279,
923,
1245,
309,
562,
12,
9499,
18,
19485,
13,
411,
576,
30,
2809,
29000,
1435,
1026,
67,
1214,
273,
1140,
... |
logger = logging.getLogger('init') logger.warning('could not eval(%s) for %s in %s' % (a_eval, node.get('name'), context), exc_info=True) return "" | logger = logging.getLogger('init') logger.warning('could not eval(%s) for %s in %s' % (a_eval, node.get('name'), context), exc_info=True) return "" | def _eval_xml(self, node, pool, cr, uid, idref, context=None): if context is None: context = {} if node.tag in ('field','value'): t = node.get('type','char') f_model = node.get('model', '').encode('utf-8') if node.get('search'): f_search = node.get("search",'').encode('utf-8') f_use = node.get("use",'id').encode('utf-8') f_name = node.get("name",'').encode('utf-8') q = unsafe_eval(f_search, idref) ids = pool.get(f_model).search(cr, uid, q) if f_use != 'id': ids = map(lambda x: x[f_use], pool.get(f_model).read(cr, uid, ids, [f_use])) _cols = pool.get(f_model)._columns if (f_name in _cols) and _cols[f_name]._type=='many2many': return ids f_val = False if len(ids): f_val = ids[0] if isinstance(f_val, tuple): f_val = f_val[0] return f_val a_eval = node.get('eval','') if a_eval: idref2 = dict(idref, time=time, DateTime=datetime, timedelta=timedelta, version=release.major_version, ref=lambda x: self.id_get(cr, False, x), pytz=pytz) if len(f_model): idref2['obj'] = _obj(self.pool, cr, uid, f_model, context=context) try: return unsafe_eval(a_eval, idref2) except Exception: logger = logging.getLogger('init') logger.warning('could not eval(%s) for %s in %s' % (a_eval, node.get('name'), context), exc_info=True) return "" if t == 'xml': def _process(s, idref): m = re.findall('[^%]%\((.*?)\)[ds]', s) for id in m: if not id in idref: idref[id]=self.id_get(cr, False, id) return s % idref return '<?xml version="1.0"?>\n'\ +_process("".join([etree.tostring(n, encoding='utf-8') for n in node]), idref) if t in ('char', 'int', 'float'): d = node.text if t == 'int': d = d.strip() if d == 'None': return None else: return int(d.strip()) elif t == 'float': return float(d.strip()) return d elif t in ('list','tuple'): res=[] for n in node.findall('./value'): res.append(_eval_xml(self,n,pool,cr,uid,idref)) if t=='tuple': return tuple(res) return res elif node.tag == "getitem": for n in node: res=_eval_xml(self,n,pool,cr,uid,idref) if not res: raise LookupError elif node.get('type') in ("int", "list"): return res[int(node.get('index'))] else: return res[node.get('index','').encode("utf8")] elif node.tag == "function": args = [] a_eval = node.get('eval','') if a_eval: idref['ref'] = lambda x: self.id_get(cr, False, x) args = unsafe_eval(a_eval, idref) for n in node: return_val = _eval_xml(self,n, pool, cr, uid, idref, context) if return_val is not None: args.append(return_val) model = pool.get(node.get('model','')) method = node.get('name','') res = getattr(model, method)(cr, uid, *args) return res elif node.tag == "test": return node.text | 67cdeb3fa00f7b80af3a3411c9529c2199e0def0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/67cdeb3fa00f7b80af3a3411c9529c2199e0def0/convert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
67,
2902,
12,
2890,
16,
756,
16,
2845,
16,
4422,
16,
4555,
16,
612,
1734,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
756,
18,
2692,
316,
7707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8622,
67,
2902,
12,
2890,
16,
756,
16,
2845,
16,
4422,
16,
4555,
16,
612,
1734,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
756,
18,
2692,
316,
7707,
... |
req.args['format'] = match.group(1) and 'raw' or '' | if match.group(1): req.args['format'] = 'raw' | def match_request(self, req): match = re.match(r'^/(raw-)?attachment/([^/]+)(?:[/:](.*))?$', req.path_info) if match: req.args['format'] = match.group(1) and 'raw' or '' req.args['type'] = match.group(2) req.args['path'] = match.group(3).replace(':', '/') return True | 64516b007d071661098d80634a0ab48cea725b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/64516b007d071661098d80634a0ab48cea725b9b/attachment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
67,
2293,
12,
2890,
16,
1111,
4672,
845,
273,
283,
18,
1916,
12,
86,
19856,
19,
12,
1899,
17,
9945,
11461,
19,
8178,
19,
7941,
23203,
16880,
65,
7444,
24783,
8,
2187,
1111,
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,
845,
67,
2293,
12,
2890,
16,
1111,
4672,
845,
273,
283,
18,
1916,
12,
86,
19856,
19,
12,
1899,
17,
9945,
11461,
19,
8178,
19,
7941,
23203,
16880,
65,
7444,
24783,
8,
2187,
1111,
18,
... |
for phase in phase.next_phase_ids: if phase.state in ['draft', 'open', 'pending']: id_cal = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False self.generate_schedule(cr, uid, [phase.id], date_start, id_cal, context=context) | for next_phase in phase.next_phase_ids: if next_phase.state in ['draft', 'open', 'pending']: id_cal = next_phase.project_id.resource_calendar_id and next_phase.project_id.resource_calendar_id.id or False self.generate_schedule(cr, uid, [next_phase.id], date_start+timedelta(days=1), id_cal, context=context) | def phase(): effort = duration | db3ecb06499f378d9226420f5807fbb84b33128a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db3ecb06499f378d9226420f5807fbb84b33128a/project_long_term.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6855,
13332,
23445,
273,
3734,
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,
0... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6855,
13332,
23445,
273,
3734,
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,
... |
self.logger.info("dict: Converting a tuple...") | self.logger.debug("dict: Converting a tuple...") | def _convert_dict(self, dict_node, id, name): d = {} for (k, v) in dict_node.items(): if isinstance(v, dict): self.logger.info("dict: You have a special type stored at %s" % k) if "ref" in v: self.logger.info("dict/ref: k,v = %s,%s" % (k, v)) d[k] = self._convert_ref(v["ref"], "%s.dict['%s']" % (name, k)) self.logger.info("dict: Stored %s => %s" % (k, d[k])) elif "tuple" in v: self.logger.info("dict: Converting a tuple...") d[k] = self._convert_tuple(v["tuple"], "%s.dict['%s']" % ( name, k)) else: self.logger.info("dict: Don't know how to handle type %s" % v) else: self.logger.info("dict: %s is NOT a dict, so going to convert as a value." % v) d[k] = self._convert_value(v, id, "%s.dict['%s']" % (name, k)) #key = None #for element in entry.xml_children: # if isinstance(element, amara.bindery.element_base): # if element.localName == "key": # pass # key is required, and known to already be at entry.key, so no need to re-parse it here # elif element.localName == "value": # dict[str(entry.key.value)] = self._convert_value(element, id, "%s.dict['%s']" % (name, entry.key.value)) # elif element.localName == "ref": # dict[str(entry.key.value)] = self._convert_ref(element, "%s.dict['%s']" % (name, entry.key.value)) # elif element.localName == "object": # self.logger.debug("Parsing an inner object definition...") # dict[str(entry.key.value)] = self._convert_inner_object(element, id, "%s.dict['%s']" % (name, entry.key.value)) # elif element.localName in ["list", "tuple", "set", "frozenset"]: # self.logger.debug("This dictionary entry has child elements of type %s." % element.localName) # dict[str(entry.key.value)] = self._convert_value(element, id, "%s.dict['%s']" % (name, entry.key.value)) # else: # self.logger.debug("dict: Don't know how to handle %s" % element.localName) return DictDef(name, d) | f640b15368e4d3037d291c060bcc1380e557323f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7713/f640b15368e4d3037d291c060bcc1380e557323f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6283,
67,
1576,
12,
2890,
16,
2065,
67,
2159,
16,
612,
16,
508,
4672,
302,
273,
2618,
364,
261,
79,
16,
331,
13,
316,
2065,
67,
2159,
18,
3319,
13332,
309,
1549,
12,
90,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6283,
67,
1576,
12,
2890,
16,
2065,
67,
2159,
16,
612,
16,
508,
4672,
302,
273,
2618,
364,
261,
79,
16,
331,
13,
316,
2065,
67,
2159,
18,
3319,
13332,
309,
1549,
12,
90,
16,
2... |
fti[0]['name']='I18NLayer' fti[0]['filter_content_types']=1 | fti['name']='I18NLayer' fti['filter_content_types']=1 | def modify_fti(fti): fti[0]['name']='I18NLayer' fti[0]['filter_content_types']=1 # NOTE: we better hide the useless actions rather than delete them # to keep compatibilty with templates requesting them for a in fti[0]['actions']: if a['id'] in ('references', 'metadata'): a['visible'] = 0 return fti | f4e216508a631499af383387b4b88dcf700720d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/f4e216508a631499af383387b4b88dcf700720d7/I18NLayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5612,
67,
1222,
77,
12,
1222,
77,
4672,
284,
9096,
3292,
529,
3546,
2218,
45,
2643,
50,
4576,
11,
284,
9096,
3292,
2188,
67,
1745,
67,
2352,
3546,
33,
21,
468,
5219,
30,
732,
7844,
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,
5612,
67,
1222,
77,
12,
1222,
77,
4672,
284,
9096,
3292,
529,
3546,
2218,
45,
2643,
50,
4576,
11,
284,
9096,
3292,
2188,
67,
1745,
67,
2352,
3546,
33,
21,
468,
5219,
30,
732,
7844,
6... |
except AttributeError, KeyError: | except (AttributeError, KeyError): | def getDateTimeFormatter(self, name): "See ZopeProducts.LocaleProvider.interfaces.ILocale" try: pattern = self.getDefaultCalendar().datetimePattern except AttributeError, KeyError: return self._getNextLocale().getDateTimeFormatter(name) date_pat = self.getDateFormatter(name).getPattern() time_pat = self.getTimeFormatter(name).getPattern() pattern = pattern.replace('{1}', date_pat) pattern = pattern.replace('{0}', time_pat) return DateTimeFormat(pattern, self._createFullCalendar()) | 775291d9e848c82a3c128f8f1966e04c51d49737 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9827/775291d9e848c82a3c128f8f1966e04c51d49737/locales.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25562,
5074,
12,
2890,
16,
508,
4672,
315,
9704,
2285,
1306,
13344,
18,
3916,
2249,
18,
15898,
18,
45,
3916,
6,
775,
30,
1936,
273,
365,
18,
588,
1868,
7335,
7675,
6585,
3234,
1335,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25562,
5074,
12,
2890,
16,
508,
4672,
315,
9704,
2285,
1306,
13344,
18,
3916,
2249,
18,
15898,
18,
45,
3916,
6,
775,
30,
1936,
273,
365,
18,
588,
1868,
7335,
7675,
6585,
3234,
1335,
26... |
query += ', %s=priority_area' % area_indexname | query += ', resource_area_exp=priority_area' | def searchExperts(self, priority_area='', focus=[], country='', free_text='', skey='', rkey=0, perform_search='', meta='', REQUEST=None): """ """ res_per_page = 10 query = '' res = [] results = [] lang = self.gl_get_selected_language() if meta == 'prj': meta = '[METATYPE_NYSMAPPROJECT]' area_indexname = 'resource_area' focus_indexname = 'resource_focus' elif meta == 'exp': meta = '[METATYPE_NYSMAPEXPERT]' area_indexname = 'resource_area_exp' focus_indexname = 'resource_focus_exp' else: meta = '[]' | 6d3d24ff623c3c2b26c9d137218bc046ea8f38f1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/6d3d24ff623c3c2b26c9d137218bc046ea8f38f1/SMAPSite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
424,
672,
87,
12,
2890,
16,
4394,
67,
5036,
2218,
2187,
7155,
22850,
6487,
5251,
2218,
2187,
4843,
67,
955,
2218,
2187,
272,
856,
2218,
2187,
436,
856,
33,
20,
16,
3073,
67,
3072... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1623,
424,
672,
87,
12,
2890,
16,
4394,
67,
5036,
2218,
2187,
7155,
22850,
6487,
5251,
2218,
2187,
4843,
67,
955,
2218,
2187,
272,
856,
2218,
2187,
436,
856,
33,
20,
16,
3073,
67,
3072... |
print >>sys.stderr, "\tburst events: %d" % len(self.sngl_burst_table) | if self.sngl_burst_table is not None: print >>sys.stderr, "\tburst events: %d" % len(self.sngl_burst_table) | def summarize(self, live_time_program, verbose = False): """ Compute and record some summary information about the database. Call this after all the data has been inserted, and before you want any of this information. """ cursor = self.connection.cursor() | 94f9f8c27f64696c4a1a2b050dbaf08fef12789b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/94f9f8c27f64696c4a1a2b050dbaf08fef12789b/SnglBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28712,
12,
2890,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
326,
501,
711,
2118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28712,
12,
2890,
16,
8429,
67,
957,
67,
12890,
16,
3988,
273,
1083,
4672,
3536,
8155,
471,
1409,
2690,
4916,
1779,
2973,
326,
2063,
18,
225,
3049,
333,
1839,
777,
326,
501,
711,
2118,
... |
Mylib.Subdirs("src") | Mylib.Subdirs(env, "src") | def MyCScan(node, env, target): deps = c_scanner(node, env, target) global Scanned n = str(node) try: Scanned[n] = Scanned[n] + 1 except KeyError: Scanned[n] = 1 write_out('MyCScan.out', Scanned) return deps | 28572233073e043940796083bf9b7021569af305 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7126/28572233073e043940796083bf9b7021569af305/scan-once.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8005,
39,
7972,
12,
2159,
16,
1550,
16,
1018,
4672,
8740,
273,
276,
67,
26842,
12,
2159,
16,
1550,
16,
1018,
13,
225,
2552,
2850,
10041,
290,
273,
609,
12,
2159,
13,
775,
30,
2850,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8005,
39,
7972,
12,
2159,
16,
1550,
16,
1018,
4672,
8740,
273,
276,
67,
26842,
12,
2159,
16,
1550,
16,
1018,
13,
225,
2552,
2850,
10041,
290,
273,
609,
12,
2159,
13,
775,
30,
2850,
1... |
auxTableList.append(auxTable) | auxTableList.append( auxTable ) | def _createTables( self, tableDict, force=False ): """ tableDict: tableName: { 'Fields' : { 'Field': 'Description' }, 'ForeignKeys': {'Field': 'Table' }, 'PrimaryKey': 'Id', 'Indexes': { 'Index': [] }, 'UniqueIndexes': { 'Index': [] }, 'Engine': 'InnoDB' } only 'Fields' is a mandatory key. | 0e53f5944800e7e4e2a93a0c3f1aefa6be7f7b08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/0e53f5944800e7e4e2a93a0c3f1aefa6be7f7b08/MySQL.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
6905,
12,
365,
16,
1014,
5014,
16,
2944,
33,
8381,
262,
30,
3536,
1014,
5014,
30,
4775,
30,
288,
296,
2314,
11,
294,
288,
296,
974,
4278,
296,
3291,
11,
19879,
296,
28285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2640,
6905,
12,
365,
16,
1014,
5014,
16,
2944,
33,
8381,
262,
30,
3536,
1014,
5014,
30,
4775,
30,
288,
296,
2314,
11,
294,
288,
296,
974,
4278,
296,
3291,
11,
19879,
296,
28285,
... |
self.pInfo.SetHDC(self.pInfo.CreatePrinterDC()) | self.pInfo.CreatePrinterDC() return self._obj_.OnInitDialog() | def OnInitDialog(self): self.pInfo.SetHDC(self.pInfo.CreatePrinterDC()) | 81be9edd0818d0cc5675a75bd7b6fce36ac54c3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/81be9edd0818d0cc5675a75bd7b6fce36ac54c3d/dialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
2570,
6353,
12,
2890,
4672,
365,
18,
84,
966,
18,
694,
44,
5528,
12,
2890,
18,
84,
966,
18,
1684,
12149,
5528,
10756,
225,
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,
2755,
2570,
6353,
12,
2890,
4672,
365,
18,
84,
966,
18,
694,
44,
5528,
12,
2890,
18,
84,
966,
18,
1684,
12149,
5528,
10756,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if char is None or char == ")": | if char is None: raise error, "unexpected end of pattern" if char == ")": | def _parse(source, state): # parse a simple pattern subpattern = SubPattern(state) while 1: if source.next in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if state.flags & SRE_FLAG_VERBOSE: # skip whitespace and comments if this in WHITESPACE: continue if this == "#": while 1: this = source.get() if this in (None, "\n"): break continue if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, ord(this))) elif this == "[": # character set set = [] | 470ea5ab9493993b0e65842db2aa412ed9807e37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/470ea5ab9493993b0e65842db2aa412ed9807e37/sre_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
919,
4672,
468,
1109,
279,
4143,
1936,
225,
720,
4951,
273,
2592,
3234,
12,
2019,
13,
225,
1323,
404,
30,
225,
309,
1084,
18,
4285,
316,
7566,
96,
3113,
7310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
3168,
16,
919,
4672,
468,
1109,
279,
4143,
1936,
225,
720,
4951,
273,
2592,
3234,
12,
2019,
13,
225,
1323,
404,
30,
225,
309,
1084,
18,
4285,
316,
7566,
96,
3113,
7310,
... |
queue name=audio max-size-buffers=50 | seamless-queue name=audio max-size-buffers=50 | def __init__(self, options, name="player"): Thread.__init__(self, name) | e199149feffd28213ee739392b3d88b6b06cb8fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/e199149feffd28213ee739392b3d88b6b06cb8fa/dvdplayer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
16,
508,
1546,
14872,
6,
4672,
4884,
16186,
2738,
972,
12,
2890,
16,
508,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
702,
16,
508,
1546,
14872,
6,
4672,
4884,
16186,
2738,
972,
12,
2890,
16,
508,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if len(matches) == 0: | if not matches: | def file_should_exist(self, path, msg=None): """Fails unless the given path points to an existing file. The path can be given as an exact path or as a pattern where '*' - matches everything '?' - matches any single character '[chars]' - matches any character inside square brackets (e.g. '[abc]' matches either 'a', 'b' or 'c') '[!chars]' - matches any character not inside square brackets The default error message can be overridden with the `msg` argument. """ matches = [ p for p in glob.glob(path) if os.path.isfile(p) ] if len(matches) == 0: self._fail(msg, "Path '%s' does not match any file" % path) self._info("File '%s' exists" % path) | 6f8bd1e5c5b0db8d92d174d89dc27677542321fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/6f8bd1e5c5b0db8d92d174d89dc27677542321fb/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
585,
67,
13139,
67,
7398,
12,
2890,
16,
589,
16,
1234,
33,
7036,
4672,
3536,
30800,
3308,
326,
864,
589,
3143,
358,
392,
2062,
585,
18,
225,
1021,
589,
848,
506,
864,
487,
392,
5565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
585,
67,
13139,
67,
7398,
12,
2890,
16,
589,
16,
1234,
33,
7036,
4672,
3536,
30800,
3308,
326,
864,
589,
3143,
358,
392,
2062,
585,
18,
225,
1021,
589,
848,
506,
864,
487,
392,
5565,
... |
global status, flooder, targetip, targethost, timeout, subsite, message, port, method, threads, wait, random, speed | global status, flooder, targetip, timeout, subsite, message, port, method, threads, wait, random, speed | def lazerStartHook(event): global status, flooder, targetip, targethost, timeout, subsite, message, port, method, threads, wait, random, speed print "FIRING MAH LAZ000000R!" if status == START: if flooder != None: flooder.stop() if (targetip == None and targethost == None) or port == None: print "no target set" return if timeout == None: print "Missing required timeout" return if len(method) == 0: print "Missing required method" return if threads == None: print "Missing required thread amount" return host = None if targetip == None: host = targethost else: host = targetip flooder = Flooder(host, port, timeout, method, threads, subsite, message, random, wait, srchost, srcport) flooder.start() | 63ec690122fe779c11d7de86f591257b1412dea7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13624/63ec690122fe779c11d7de86f591257b1412dea7/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
1561,
264,
1685,
5394,
12,
2575,
4672,
2552,
1267,
16,
20802,
5350,
16,
1018,
625,
16,
2021,
16,
720,
4256,
16,
883,
16,
1756,
16,
707,
16,
7403,
16,
2529,
16,
2744,
16,
8632,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
328,
1561,
264,
1685,
5394,
12,
2575,
4672,
2552,
1267,
16,
20802,
5350,
16,
1018,
625,
16,
2021,
16,
720,
4256,
16,
883,
16,
1756,
16,
707,
16,
7403,
16,
2529,
16,
2744,
16,
8632,
1... |
mailbox.PortableUnixMailbox.__init__(self, fp, email.message_from_file) | mailbox.PortableUnixMailbox.__init__(self, fp, _safeparser) | def __init__(self, fp): mailbox.PortableUnixMailbox.__init__(self, fp, email.message_from_file) | a554ebe6a034aa4b2f8d66d0f8c48eec427de347 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/a554ebe6a034aa4b2f8d66d0f8c48eec427de347/Mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4253,
4672,
14187,
18,
2617,
429,
18729,
30239,
16186,
2738,
972,
12,
2890,
16,
4253,
16,
2699,
18,
2150,
67,
2080,
67,
768,
13,
2,
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,
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,
4253,
4672,
14187,
18,
2617,
429,
18729,
30239,
16186,
2738,
972,
12,
2890,
16,
4253,
16,
2699,
18,
2150,
67,
2080,
67,
768,
13,
2,
-100,
-100,
-100,
-10... |
super(wxInPlaceEditor, self).__init__(style=wx.TE_PROCESS_ENTER | wx.NO_BORDER, | style=wx.TE_PROCESS_ENTER | wx.NO_BORDER if '__WXGTK__' in wx.PlatformInfo: style |= wx.TE_MULTILINE super(wxInPlaceEditor, self).__init__(style=style, | def __init__(self, *arguments, **keywords): super(wxInPlaceEditor, self).__init__(style=wx.TE_PROCESS_ENTER | wx.NO_BORDER, *arguments, **keywords) self.item = None self.Bind(wx.EVT_TEXT_ENTER, self.OnTextEnter) self.Bind(wx.EVT_KILL_FOCUS, self.OnTextEnter) self.Hide() | 0a27f4ca2cd3fd79d460f99220e89241993dd034 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0a27f4ca2cd3fd79d460f99220e89241993dd034/CalendarCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
7099,
16,
2826,
11771,
4672,
2154,
33,
27226,
18,
1448,
67,
16560,
67,
12278,
571,
7075,
18,
3417,
67,
38,
7954,
377,
309,
4940,
59,
60,
16506,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
7099,
16,
2826,
11771,
4672,
2154,
33,
27226,
18,
1448,
67,
16560,
67,
12278,
571,
7075,
18,
3417,
67,
38,
7954,
377,
309,
4940,
59,
60,
16506,
47,
... |
try: f1, f2 = MakeBigFiles(rcsf) BigFileRun(f1, f2) except CommandError, e: pass | while not test.HasEnoughResults(): test.RandomBigRun(f1, f2) | def RunSpeed(): for L in Decimals(MAX_RUN): SetFileSize(RUNFILE, L) trx = TimeRun(Xdelta3Run1(RUNFILE)) ReportSpeed(L,trx,'xdelta3') trg = TimeRun(GzipRun1(RUNFILE)) ReportSpeed(L,trg,'gzip ') | f29141f565abfcc5b15cc9df401fa1b44be63c91 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9009/f29141f565abfcc5b15cc9df401fa1b44be63c91/xdelta3-regtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1939,
16562,
13332,
364,
511,
316,
3416,
11366,
12,
6694,
67,
15238,
4672,
1000,
15100,
12,
15238,
3776,
16,
511,
13,
433,
92,
273,
2647,
1997,
12,
60,
9878,
23,
1997,
21,
12,
15238,
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,
1939,
16562,
13332,
364,
511,
316,
3416,
11366,
12,
6694,
67,
15238,
4672,
1000,
15100,
12,
15238,
3776,
16,
511,
13,
433,
92,
273,
2647,
1997,
12,
60,
9878,
23,
1997,
21,
12,
15238,
3... |
def select_browser(self, activator, current, library, player, restore): | def select_browser(self, activator, current, library, player, restore=False): | def select_browser(self, activator, current, library, player, restore): if isinstance(current, gtk.RadioAction): current = current.get_current_value() Browser = browsers.get(current) config.set("memory", "browser", Browser.__name__) if self.browser: container = self.browser.__container self.browser.unpack(container, self.songpane) if self.browser.accelerators: self.remove_accel_group(self.browser.accelerators) container.destroy() self.browser.destroy() self.browser = Browser(library, player) self.browser.connect('songs-selected', self.__browser_cb) if restore: self.browser.restore() self.browser.activate() self.browser.finalize(restore) if self.browser.reordered: self.songlist.enable_drop() elif self.browser.dropped: self.songlist.enable_drop(False) else: self.songlist.disable_drop() if self.browser.accelerators: self.add_accel_group(self.browser.accelerators) | cccbe9d0fbff85094f6ba331577a97f98ca03b45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/cccbe9d0fbff85094f6ba331577a97f98ca03b45/quodlibetwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
67,
11213,
12,
2890,
16,
5981,
639,
16,
783,
16,
5313,
16,
7291,
16,
5217,
33,
8381,
4672,
309,
1549,
12,
2972,
16,
22718,
18,
19984,
1803,
4672,
783,
273,
783,
18,
588,
67,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
67,
11213,
12,
2890,
16,
5981,
639,
16,
783,
16,
5313,
16,
7291,
16,
5217,
33,
8381,
4672,
309,
1549,
12,
2972,
16,
22718,
18,
19984,
1803,
4672,
783,
273,
783,
18,
588,
67,
29... |
return http.Response(stream = message("You are not authorized to move '%s'"%W.name())) | return HTMLResponse(stream = message("You are not authorized to move '%s'"%W.name())) | def render(self, ctx): X = notebook.user(self.username) if user_type(self.username) == 'guest': return http.Response(stream = message("You are not authorized to move '%s'"%W.name())) def send_worksheet_to_folder(filename): W = notebook.get_worksheet_with_filename(filename) self.action(W) if ctx.args.has_key('filename'): filenames = [ctx.args['filename'][0]] elif ctx.args.has_key('filenames'): sep = ctx.args['sep'][0] filenames = [x for x in ctx.args['filenames'][0].split(sep) if len(x.strip()) > 0] else: filenames = [] for F in filenames: send_worksheet_to_folder(F) return http.Response(stream = '') | 5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
1139,
273,
14718,
18,
1355,
12,
2890,
18,
5053,
13,
309,
729,
67,
723,
12,
2890,
18,
5053,
13,
422,
296,
18908,
4278,
327,
3982,
1064,
12,
3256,
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,
1743,
12,
2890,
16,
1103,
4672,
1139,
273,
14718,
18,
1355,
12,
2890,
18,
5053,
13,
309,
729,
67,
723,
12,
2890,
18,
5053,
13,
422,
296,
18908,
4278,
327,
3982,
1064,
12,
3256,
273,
... |
import os doupdate = os.getenv("GST_REGISTRY_UPDATE") != "no" os.environ["GST_REGISTRY_UPDATE"] = "no" | def __float__(self): return float(self.num) / float(self.denom) | bbedab4e6521fe7c813f23698fe650203b1d0820 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1020/bbedab4e6521fe7c813f23698fe650203b1d0820/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5659,
972,
12,
2890,
4672,
327,
1431,
12,
2890,
18,
2107,
13,
342,
1431,
12,
2890,
18,
13002,
362,
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,
1001,
5659,
972,
12,
2890,
4672,
327,
1431,
12,
2890,
18,
2107,
13,
342,
1431,
12,
2890,
18,
13002,
362,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if verbose: progress("Definition %s = inverse:%i pred=%s y=%s", (x, inverse, pred, y)) | if verbose: progress("Definition %s = %s%s%s"% (x, pred, ".^"[inverse], y)) | def differences(f, g): """Smush the formulae. Compare them, generating patch instructions.""" | 31fe96e6268194f85f36a24f0c07042d59afa09d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/31fe96e6268194f85f36a24f0c07042d59afa09d/diff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16440,
12,
74,
16,
314,
4672,
3536,
9552,
1218,
326,
8013,
73,
18,
225,
11051,
2182,
16,
12516,
4729,
12509,
12123,
225,
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,
16440,
12,
74,
16,
314,
4672,
3536,
9552,
1218,
326,
8013,
73,
18,
225,
11051,
2182,
16,
12516,
4729,
12509,
12123,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
p.drawPolygon(self._getZoomedFace(face)) | qpa, sizes = self._getZoomedFace(face) if face.holeCount(): index = 0 for size in sizes: p.drawPolyline(qpa, index, size) index += size if self.fillColor: p.save() p.setPen(qt.Qt.NoPen) p.drawPolygon(qpa) p.restore() else: p.drawPolygon(qpa) | def draw(self, p): if not self._map(): return | 98f943594ac2f501715b3e5e447742495e8d437a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10394/98f943594ac2f501715b3e5e447742495e8d437a/mapdisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
16,
293,
4672,
309,
486,
365,
6315,
1458,
13332,
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... | [
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,
3724,
12,
2890,
16,
293,
4672,
309,
486,
365,
6315,
1458,
13332,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
global_key = self.get_key_for_user() cache_dict = cache.get(global_key) if cache_dict is None: cache_dict = {} cache_dict[key] = value cache.set(global_key, cache_dict, self.cache_time) | cache.set(self._prefix_user_key(key), value, self.cache_time) | def __setitem__(self, key, value): global_key = self.get_key_for_user() cache_dict = cache.get(global_key) if cache_dict is None: cache_dict = {} | 941587095d5f96c224fcc018848a40ba2dbe7e68 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/941587095d5f96c224fcc018848a40ba2dbe7e68/userbits.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
2552,
67,
856,
273,
365,
18,
588,
67,
856,
67,
1884,
67,
1355,
1435,
1247,
67,
1576,
273,
1247,
18,
588,
12,
6347,
67,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
2552,
67,
856,
273,
365,
18,
588,
67,
856,
67,
1884,
67,
1355,
1435,
1247,
67,
1576,
273,
1247,
18,
588,
12,
6347,
67,
856,
... |
filename = rootSEDdir + 'final_' + filt bandpass[filter] = lm.teleThruput(filename) | filename = os.path.join(rootFILTERdir,'total_' + f + '.dat') bandpass[f] = Bandpass() bandpass[f].readThroughput(filename) | def calcAllMags(self, filt, mjdTaiList, rootSEDdir, withErrors=True, fiveSigmaLimitingMag=None): """ Calculate the magnitude of all objects in the movingObjectList """ """ - Given the filter, the mjd (to find the ephemeris info) and the root directory of SEDS/thruputs """ """ individual objects know their SED and their expected V magnitude """ # set up data needed to calculate magnitudes for each moving object # to calculate magnitudes, need info from sed/bandpass (lsst_mags) import lsst_mags as lm # read in and set up filter files if rootSEDdir != '': rootSEDdir = rootSEDdir + "/" bandpass = {} filterlist = [filt, 'V', 'imsim'] for filter in filterlist: if filter == 'V': filename = rootSEDdir + 'harris_V.dat' elif filter=='imsim': filename = 'imsim' else: filename = rootSEDdir + 'final_' + filt bandpass[filter] = lm.teleThruput(filename) # read in and set up sed files sedtypes = ('C.dat', 'S.dat') sed={} sedmag = {} for sedfile in sedtypes: # read sed files filename = rootSEDdir + sedfile sed[sedfile] = lm.simObj(filename) # set up magnitudes sedmag[sedfile] = {} for filter in filterlist: sedmag[sedfile][filter] = sed[sedfile].calcMag(bandpass[filter]) # BUT can improve this later if add phaseG(bandpass). | 649989e6c45a02c566ac9b33aee0267cb811b9a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/649989e6c45a02c566ac9b33aee0267cb811b9a9/movingObjectList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
1595,
49,
1341,
12,
2890,
16,
18553,
16,
312,
20769,
56,
10658,
682,
16,
1365,
18204,
1214,
16,
598,
4229,
33,
5510,
16,
23714,
24491,
3039,
310,
11372,
33,
7036,
4672,
3536,
9029,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7029,
1595,
49,
1341,
12,
2890,
16,
18553,
16,
312,
20769,
56,
10658,
682,
16,
1365,
18204,
1214,
16,
598,
4229,
33,
5510,
16,
23714,
24491,
3039,
310,
11372,
33,
7036,
4672,
3536,
9029,... |
clientTransport.sendData( S_ERROR( "%s is not up in this service" % requestedService ) ) | clientTransport.sendData( S_ERROR( "%s is not up in this service" % serviceName ) ) | def _authorizeClientProposal( self, serviceName, actionTuple, clientTransport ): """ Authorize the action being proposed by the client """ if requestedService not in self.servicesDict: gLogger.error( "Client is trying to connect to an invalid service", "%s is not one of %s" % ( requestedService, self.servicesDict.keys() ) ) clientTransport.sendData( S_ERROR( "%s is not up in this service" % requestedService ) ) return #serviceInfoDict = self._getServiceInfo( service ) if actionTuple[0] == 'RPC': action = actionTuple[1] else: action = "%s/%s" % actionTuple credDict = clientTransport.getConnectingCredentials() authorized = True retVal = self._authorizeAction( serviceName, action, credDict ) identity = self._createIdentityStringFromCredDict( credDict ) if not retVal[ 'OK' ]: gLogger.error( "Unauthorized query", "to %s:%s by %s" % ( serviceName, action, identity ) ) clientTransport.sendData( retVal ) authorized = False #Security log sourceAddress = clientTransport.getRemoteAddress() self.__securityLog.addMessage( authorized, sourceAddress[0], sourceAddress[1], identity, self.servicesDict[ serviceName ]['cfg'].getHostname(), self.servicesDict[ serviceName ]['cfg'].getPort(), serviceName, "/".join( actionTuple ) ) #end security log return authorized | 7763210cd2b659e19d82b1fd8dfdf1cfa81ee2d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/7763210cd2b659e19d82b1fd8dfdf1cfa81ee2d4/Dispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
22488,
1227,
14592,
12,
365,
16,
6773,
16,
1301,
9038,
16,
1004,
6568,
262,
30,
3536,
23859,
326,
1301,
3832,
20084,
635,
326,
1004,
3536,
309,
3764,
1179,
486,
316,
365,
18,
8387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22488,
1227,
14592,
12,
365,
16,
6773,
16,
1301,
9038,
16,
1004,
6568,
262,
30,
3536,
23859,
326,
1301,
3832,
20084,
635,
326,
1004,
3536,
309,
3764,
1179,
486,
316,
365,
18,
8387,
... |
parts = line.split()[0:2] newlist = [self.float(x.split('=')[1]) for x in parts] | parts = line.split() newlist = [self.float(x.split('=')[1]) for x in parts[0:2]] | def parse(self, fupdate=0.05, cupdate=0.002): """Extract information from the logfile.""" inputfile = open(self.filename, "r") if self.progress: inputfile.seek(0, 2) #go to end of file nstep = inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep = 0 optfinished = False # Flag that indicates whether it has reached the end of a geoopt for line in inputfile: if self.progress and random.random() < cupdate: step = inputfile.tell() if step != oldstep: self.progress.update(step, "Unsupported Information") oldstep = step if line[1:8] == "NAtoms=": | 2245ff508e64a37b73c992ca9fe21589f77eb0d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/2245ff508e64a37b73c992ca9fe21589f77eb0d8/gaussianparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
16,
315,
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,
12,
2890,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
16,
315,
8... |
home, '.mozilla', 'firefox', '*', 'cookies.txt')) | home, '.mozilla', 'firefox*', '*', 'cookies.txt')) | def reset_browser(self): """ Delete crash dialog and browser cache. """ home = os.environ['HOME'] self.delete_if_exists(os.path.join( home, '.mozilla', 'firefox', '*', 'Cache')) self.delete_if_exists(os.path.join( home, '.mozilla', 'firefox', '*', 'sessionstore.js')) self.delete_if_exists(os.path.join( home, '.mozilla', 'firefox', '*', 'history.dat')) self.delete_if_exists(os.path.join( home, '.mozilla', 'firefox', '*', 'cookies.txt')) | b34d6f7cb32594dbc44ef302318bf2e4acb3cd7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3111/b34d6f7cb32594dbc44ef302318bf2e4acb3cd7b/firefox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2715,
67,
11213,
12,
2890,
4672,
3536,
2504,
17053,
6176,
471,
4748,
1247,
18,
3536,
6382,
273,
1140,
18,
28684,
3292,
14209,
3546,
365,
18,
3733,
67,
430,
67,
1808,
12,
538,
18,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2715,
67,
11213,
12,
2890,
4672,
3536,
2504,
17053,
6176,
471,
4748,
1247,
18,
3536,
6382,
273,
1140,
18,
28684,
3292,
14209,
3546,
365,
18,
3733,
67,
430,
67,
1808,
12,
538,
18,
803,
... |
accept = accept + string.split(line[7:]) | accept = accept + string.split(line[7:], ',') | def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = string.rfind(rest, '?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = string.find(rest, '/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%s)" % `scriptname`) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%s)" % `scriptname`) return if not executable(scriptfile): self.send_error(403, "CGI script is not executable (%s)" % `scriptname`) return nobody = nobody_uid() self.send_response(200, "Script output follows") self.wfile.flush() # Always flush before forking pid = os.fork() if pid != 0: # Parent pid, sts = os.waitpid(pid, 0) if sts: self.log_error("CGI script exit status x%x" % sts) return # Child try: # Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html # XXX Much of the following could be prepared ahead of time! env = {} env['SERVER_SOFTWARE'] = self.version_string() env['SERVER_NAME'] = self.server.server_name env['GATEWAY_INTERFACE'] = 'CGI/1.1' env['SERVER_PROTOCOL'] = self.protocol_version env['SERVER_PORT'] = str(self.server.server_port) env['REQUEST_METHOD'] = self.command uqrest = urllib.unquote(rest) env['PATH_INFO'] = uqrest env['PATH_TRANSLATED'] = self.translate_path(uqrest) env['SCRIPT_NAME'] = scriptname if query: env['QUERY_STRING'] = query host = self.address_string() if host != self.client_address[0]: env['REMOTE_HOST'] = host env['REMOTE_ADDR'] = self.client_address[0] # AUTH_TYPE # REMOTE_USER # REMOTE_IDENT if self.headers.typeheader is None: env['CONTENT_TYPE'] = self.headers.type else: env['CONTENT_TYPE'] = self.headers.typeheader length = self.headers.getheader('content-length') if length: env['CONTENT_LENGTH'] = length accept = [] for line in self.headers.getallmatchingheaders('accept'): if line[:1] in string.whitespace: accept.append(string.strip(line)) else: accept = accept + string.split(line[7:]) env['HTTP_ACCEPT'] = string.joinfields(accept, ',') ua = self.headers.getheader('user-agent') if ua: env['HTTP_USER_AGENT'] = ua # XXX Other HTTP_* headers decoded_query = string.replace(query, '+', ' ') try: os.setuid(nobody) except os.error: pass os.dup2(self.rfile.fileno(), 0) os.dup2(self.wfile.fileno(), 1) print scriptfile, script, decoded_query os.execve(scriptfile, [script, decoded_query], env) except: self.server.handle_error(self.request, self.client_address) os._exit(127) | db2dadb0dc8c6dbabb469bcc0c439b14c4cba522 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/db2dadb0dc8c6dbabb469bcc0c439b14c4cba522/CGIHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
533,
18,
86,
4720,
12,
8792,
16,
6787,
13,
309,
277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
19062,
12,
2890,
4672,
3536,
5289,
279,
385,
13797,
2728,
12123,
1577,
16,
3127,
273,
365,
18,
19062,
67,
1376,
277,
273,
533,
18,
86,
4720,
12,
8792,
16,
6787,
13,
309,
277,... |
("memberOf", "Group DNs", "memberOf", True)] | ("memberOf", "Group DNs", True, "memberOf")] | def addMandatorySchemaItems(): luf=getLDAPPlugin()._getLDAPUserFolder() config=getUtility(ILDAPConfiguration) if config.ldap_type==u"AD": required = [ ("dn", "Distinguished Name"), ("objectGUID", "AD Object GUID"), ("cn", "Canonical Name"), ("memberOf", "Group DNs", "memberOf", True)] else: required = [] schema=luf.getSchemaConfig() for prop in required: if prop[0] not in schema: luf.manage_addLDAPSchemaItem(*prop) | 82902e8dee093e476013e0eb59d5d06a5a0f8899 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11951/82902e8dee093e476013e0eb59d5d06a5a0f8899/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
49,
10018,
3078,
3126,
13332,
328,
696,
33,
588,
15496,
3773,
1435,
6315,
588,
15496,
1299,
3899,
1435,
642,
33,
588,
6497,
12,
2627,
8790,
1750,
13,
225,
309,
642,
18,
14394,
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,
527,
49,
10018,
3078,
3126,
13332,
328,
696,
33,
588,
15496,
3773,
1435,
6315,
588,
15496,
1299,
3899,
1435,
642,
33,
588,
6497,
12,
2627,
8790,
1750,
13,
225,
309,
642,
18,
14394,
67,
... |
users = searchUserAdvanced() ret['installed_users'] = len(users) | ret['installed_users'], _ = searchUserAdvanced() | def getInformations(self, dynamic = False): if not self.config.is_subscribe_done: return { 'is_subsscribed': False } ret = { 'is_subsscribed':True, 'product_name':self.config.subs_product_name, 'vendor_name':self.config.subs_vendor_name, 'vendor_mail':self.config.subs_vendor_mail, 'customer_name':self.config.subs_customer_name, 'customer_mail':self.config.subs_customer_mail, 'comment':self.config.subs_comment, 'users':self.config.subs_users, 'computers':self.config.subs_computers, 'support_mail':self.config.subs_support_mail, 'support_phone':self.config.subs_support_phone, 'support_comment':self.config.subs_support_comment } if dynamic: # we add the number of user and computers we have right now users = searchUserAdvanced() ret['installed_users'] = len(users) ret['too_much_users'] = (ret['installed_users'] > ret['users']) if ComputerManager().isActivated(): ret['installed_computers'] = ComputerManager().getTotalComputerCount() else: ret['installed_computers'] = 0 ret['too_much_computers'] = (ret['installed_computers'] > ret['computers']) return ret | 1cf0fde53398db0f2f511f40ddfc01bdba038434 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/1cf0fde53398db0f2f511f40ddfc01bdba038434/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7854,
687,
1012,
12,
2890,
16,
5976,
273,
1083,
4672,
309,
486,
365,
18,
1425,
18,
291,
67,
9174,
67,
8734,
30,
327,
288,
296,
291,
67,
22284,
15802,
4278,
1083,
289,
325,
273,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7854,
687,
1012,
12,
2890,
16,
5976,
273,
1083,
4672,
309,
486,
365,
18,
1425,
18,
291,
67,
9174,
67,
8734,
30,
327,
288,
296,
291,
67,
22284,
15802,
4278,
1083,
289,
325,
273,
288,
... |
LOG_DEBUG_RPC_ANSWER = 'debug_rpc_answer' | def abortResponse(self, error, description, origin, details): if not tools.config['debug_mode']: raise Exception("%s -- %s\n\n%s"%(origin, description, details)) else: raise | 4ca97cc326bd2f9cf0fa603d3f82e705e3a678e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/4ca97cc326bd2f9cf0fa603d3f82e705e3a678e3/netsvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6263,
1064,
12,
2890,
16,
555,
16,
2477,
16,
4026,
16,
3189,
4672,
309,
486,
8513,
18,
1425,
3292,
4148,
67,
3188,
3546,
30,
1002,
1185,
27188,
87,
1493,
738,
87,
64,
82,
64,
82,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6263,
1064,
12,
2890,
16,
555,
16,
2477,
16,
4026,
16,
3189,
4672,
309,
486,
8513,
18,
1425,
3292,
4148,
67,
3188,
3546,
30,
1002,
1185,
27188,
87,
1493,
738,
87,
64,
82,
64,
82,
9,
... | |
_save(db) return content finally: lock.unlock(unconditionally=1) | try: _save(db, lock) except LockFile.NotLockedError: continue return content else: raise LockFile.TimeOutError finally: if lock.locked(): lock.unlock() | def confirm(cookie, expunge=1): """Return data for cookie, or None if not found. If optional expunge is true (the default), the record is also removed from the database. """ # Acquire the pending database lock, letting TimeOutError percolate up. # BAW: we perhaps shouldn't acquire the lock if expunge==0. lock = LockFile.LockFile(LOCKFILE) lock.lock(timeout=30) try: # Load the database db = _load() missing = [] content = db.get(cookie, missing) if content is missing: return None # Remove the entry from the database if expunge: del db[cookie] del db['evictions'][cookie] _save(db) return content finally: lock.unlock(unconditionally=1) | 496da7301195b3472cf282c56be0463c46ff842a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/496da7301195b3472cf282c56be0463c46ff842a/Pending.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6932,
12,
8417,
16,
1329,
25561,
33,
21,
4672,
3536,
990,
501,
364,
3878,
16,
578,
599,
309,
486,
1392,
18,
225,
971,
3129,
1329,
25561,
353,
638,
261,
5787,
805,
3631,
326,
1409,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6932,
12,
8417,
16,
1329,
25561,
33,
21,
4672,
3536,
990,
501,
364,
3878,
16,
578,
599,
309,
486,
1392,
18,
225,
971,
3129,
1329,
25561,
353,
638,
261,
5787,
805,
3631,
326,
1409,
353,... |
self.default_font.GetFamily(), self.default_font.GetStyle(),wx.BOLD) | default_font.GetFamily(), default_font.GetStyle(),wx.BOLD) self.dropTarget=SongDropTarget(self) self.SetDropTarget(self.dropTarget) | def __init__(self, mode, parent): wx.ListCtrl.__init__(self, parent, style=wx.LC_REPORT) self.mpd = mode.mpd self.createColumns() | dfc430bfbd215fb5641b5a8403f6a74ce6ee39f9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/dfc430bfbd215fb5641b5a8403f6a74ce6ee39f9/mpd_major_mode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1965,
16,
982,
4672,
7075,
18,
682,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
2154,
33,
27226,
18,
13394,
67,
22710,
13,
365,
18,
1291,
72,
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,
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,
1965,
16,
982,
4672,
7075,
18,
682,
12418,
16186,
2738,
972,
12,
2890,
16,
982,
16,
2154,
33,
27226,
18,
13394,
67,
22710,
13,
365,
18,
1291,
72,
273,
... |
return self.i2s.get(x, repr(x)) | if type(x) is list: return map(lambda z,pkt=pkt:self.i2repr_one(pkt,z), x) else: return self.i2repr_one(pkt,x) | def i2repr(self, pkt, x): return self.i2s.get(x, repr(x)) | 5c0b5c24331d812a65579a76249071e2d35675fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/5c0b5c24331d812a65579a76249071e2d35675fc/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
22,
12715,
12,
2890,
16,
11536,
16,
619,
4672,
327,
365,
18,
77,
22,
87,
18,
588,
12,
92,
16,
8480,
12,
92,
3719,
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,
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,
277,
22,
12715,
12,
2890,
16,
11536,
16,
619,
4672,
327,
365,
18,
77,
22,
87,
18,
588,
12,
92,
16,
8480,
12,
92,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "There are "+str(len(group_quantity_data_dicts[1]))+" quantities defined.\n" | print "There are "+str(len(group_quantity_data_dicts[1]))+" quantities defined, (q lines).\n" | def scatter_plot(group_info,scatter_info,data_set): #data_set is a dictionary keyed by quantity containing lists of groups and X and Y data points. #print "Group Info:", group_info for quantity_number in scatter_info: #print "Dataset for quantity number "+str(quantity_number)+": ", data_set[quantity_number] if data_set[quantity_number] == []: print "No Scatter Plot Data in Quantity "+str(quantity_number)+" Dataset.\n" else: print "Scatter Plot Data for Quantity "+str(quantity_number)+" Dataset." # Set variables for Plot extracted from the first group of lines in config file starting with 'q'. # Variables for plot. plot_title = scatter_info[int(quantity_number)]['Scatter_Plot_Title'] print plot_title x_title = scatter_info[int(quantity_number)]['X_Title'] y_title = scatter_info[int(quantity_number)]['Y_Title'] min_x = float(scatter_info[int(quantity_number)]['Plot_Min']) #print min_x max_x = float(scatter_info[int(quantity_number)]['Plot_Max']) #print max_x min_y = float(scatter_info[int(quantity_number)]['Plot_Min']) max_y = float(scatter_info[int(quantity_number)]['Plot_Max']) percent_error = int(scatter_info[int(quantity_number)]['%error']) title_quadrant = int(scatter_info[int(quantity_number)]['Title_Quadrant']) key_pos = scatter_info[int(quantity_number)]['Key_Position'] key_dist = 0.2*unit.v_cm plot_width = int(scatter_info[int(quantity_number)]['Plot_Width(cm)']) #Create filename from fields in input file record. plot_file_name = scatter_info[int(quantity_number)]['Plot_Filename'] #print plot_file_name # Determine the location for the key, alignment based on key_quadrant setting. if key_pos == "tl" or "tc" or "tr" or "ml" or "mc" or "mr" or "bl" or "bc" or "br": () #print "Key Position =", key_pos else: print "The key position was not specified./nUsing the default bottom right position." key_pos = "br" #Begin Plotting #print exp_data #print mod_data # Initialize graph object g = graph.graphxy(width=plot_width, ratio=1/1, key=graph.key.key(pos=key_pos, dist=key_dist), x=graph.axis.linear(title=x_title, min=min_x, max=max_x), y=graph.axis.linear(title=y_title, min=min_y, max=max_y)) #Plot Midline and Error bounds lines. errorLineCenterPoints = [[min_x,min_y],[max_x,max_y]] #print errorLineCenterPoints lower_bound = max_y - max_y * percent_error / 100 #print lower_bound errorLineLowerPoints = [[min_x,min_y],[max_x,lower_bound]] #print errorLineLowerPoints upper_bound = max_y + max_y * percent_error / 100.0 #print upper_bound errorLineUpperPoints = [[min_x,min_y],[max_x,upper_bound]] #print errorLineUpperPoints g.plot(graph.data.points(errorLineCenterPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.solid])]) g.plot(graph.data.points(errorLineLowerPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) g.plot(graph.data.points(errorLineUpperPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) # mystyle = graph.style.symbol(graph.style.symbol.changetriangletwice, size=0.1*unit.v_cm, # symbolattrs=[graph.style.symbol.changefilledstroked, # attr.changelist([color.rgb.red, color.rgb.green, color.rgb.blue])]) #One point at a time added to plot from each data set. # Iterate over items in scatter data dictionary key for items that are not []. # Append data sets to scatter_plot_data_list # colors for symbols are from http://pyx.sourceforge.net/manual/colorname.html scatter_plot_data_list = [] grouped_data = {} grouped_data_list = range(len(group_quantity_data_dicts[0])+1) #print "Grouped Data List:", grouped_data_list #print "DataSet for Quantity "+str(quantity_number)+":", data_set[quantity_number] if len(data_set[quantity_number]) > 1: #print "Grouped Scatter Data:" #print data_set[quantity_number] for arr_temp in grouped_data_list: grouped_data_list[arr_temp] = [] for data_set_item in data_set[quantity_number]: #print data_set_item #print "Data for group "+data_set_item[0]+":", data_set_item[1] grouped_data_list[int(data_set_item[0])].append(data_set_item[1]) print "Grouped data list:", grouped_data_list #g.plot(graph.data.points(scatter_plot_data, x=1, y=2, title=group_info[int(data_set[quantity_number][0][0])]["Group_Title"]), [mystyle]) group_counter = 0 for j in grouped_data_list: print "J =", j if j != []: print group_counter # Pull group symbol specifications from config file. config_group_symbol = group_info[group_counter]["Symbol"] #print config_group_symbol group_symbol = "graph.style.symbol."+config_group_symbol #print group_symbol config_group_symbol_color = group_info[group_counter]["Color"] #print config_group_symbol_color #group_color = "color.rgb."+config_group_symbol_color config_group_symbol_filled = group_info[group_counter]["Filled"] #print config_group_symbol_filled if config_group_symbol_filled == 'yes': fillstyle = "deco.filled([color.rgb."+config_group_symbol_color+"])" else: fillstyle = "deco.stroked([color.rgb."+config_group_symbol_color+"])" print group_symbol, fillstyle #Create temporary symbol style. tempstyle = "graph.style.symbol("+group_symbol+", size=0.1*unit.v_cm, symbolattrs=["+fillstyle+"])" print "TempStyle:", tempstyle scatterpointstyle = eval(tempstyle) #print group_info[group_counter]["Group_Title"] g.plot(graph.data.points(j, x=1, y=2, title=group_info[group_counter]["Group_Title"]), [scatterpointstyle]) else: pass group_counter = group_counter + 1 else: print "Non-Grouped Scatter Data:" print data_set[quantity_number] scatter_plot_data = [] scatter_plot_data.append(data_set[quantity_number][0][1]) print scatter_plot_data #print grouped_data_list # Now plot the Title text, alignment based on title quadrant setting. if title_quadrant == 1: g.text(0.1, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.small]) elif title_quadrant == 2: g.text(g.width-0.1, g.height - 0.2, plot_title, [text.halign.right, text.valign.top, text.size.normalsize]) elif title_quadrant == 3: g.text(0.1, 0.2, plot_title, [text.halign.left, text.valign.bottom, text.size.normalsize]) elif title_quadrant == 4: g.text(g.width-0.1, 0.2, plot_title, [text.halign.right, text.valign.bottom, text.size.normalsize]) else: print "A title location was not specified./nUsing the default top left quadrant." g.text(0.1, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.small]) # Write the output plot_file_path = output_directory+plot_file_name #print plot_file_path g.writePDFfile(plot_file_path) print "Plot to: \n", plot_file_path+".PDF\n" | ad91d4eb3f67d10bfa5d623cd1280d36462603e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/ad91d4eb3f67d10bfa5d623cd1280d36462603e1/Validation_Data_Processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14644,
67,
4032,
12,
1655,
67,
1376,
16,
31320,
67,
1376,
16,
892,
67,
542,
4672,
468,
892,
67,
542,
353,
279,
3880,
17408,
635,
10457,
4191,
6035,
434,
3252,
471,
1139,
471,
1624,
501... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14644,
67,
4032,
12,
1655,
67,
1376,
16,
31320,
67,
1376,
16,
892,
67,
542,
4672,
468,
892,
67,
542,
353,
279,
3880,
17408,
635,
10457,
4191,
6035,
434,
3252,
471,
1139,
471,
1624,
501... |
for instr in mainapp.projects.instruments: | for instr in self.mainapp.projects.instruments: | def add_file_to_instrument(self, instr_id, uri, position=0): """ Creates a new event from the file at the given URI and adds it to the instrument with id 'instr_id' at position (in seconds). Return values: 0: success 1: bad URI or file could not be loaded 2: instrument with id 'instr_id' not found """ for instr in mainapp.projects.instruments: if instr.id == instr_id: instr.addEventFromFile(position, uri) #TODO: find out if the add failed and return 1 return 0 return 2 | 03b6852fea5f3306fbb86a8044b88c5e3871a1a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/03b6852fea5f3306fbb86a8044b88c5e3871a1a1/Extension.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
768,
67,
869,
67,
22818,
12,
2890,
16,
16170,
67,
350,
16,
2003,
16,
1754,
33,
20,
4672,
3536,
10210,
279,
394,
871,
628,
326,
585,
622,
326,
864,
3699,
471,
4831,
518,
358,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
768,
67,
869,
67,
22818,
12,
2890,
16,
16170,
67,
350,
16,
2003,
16,
1754,
33,
20,
4672,
3536,
10210,
279,
394,
871,
628,
326,
585,
622,
326,
864,
3699,
471,
4831,
518,
358,... |
return self._arg_arg_op_with_imm(gv_x, gv_y, _PPC.mullw, _PPC.mulli, commutative=True) | return self._arg_arg_op_with_simm(gv_x, gv_y, _PPC.mullw, _PPC.mulli, commutative=True) | def op_int_mul(self, gv_x, gv_y): return self._arg_arg_op_with_imm(gv_x, gv_y, _PPC.mullw, _PPC.mulli, commutative=True) | 1a13bb2e4052fbbe77efb6b6dbf2fa6c38d03672 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/1a13bb2e4052fbbe77efb6b6dbf2fa6c38d03672/rgenop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1061,
67,
474,
67,
16411,
12,
2890,
16,
11404,
67,
92,
16,
11404,
67,
93,
4672,
327,
365,
6315,
3175,
67,
3175,
67,
556,
67,
1918,
67,
381,
81,
12,
75,
90,
67,
92,
16,
11404,
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,
1061,
67,
474,
67,
16411,
12,
2890,
16,
11404,
67,
92,
16,
11404,
67,
93,
4672,
327,
365,
6315,
3175,
67,
3175,
67,
556,
67,
1918,
67,
381,
81,
12,
75,
90,
67,
92,
16,
11404,
67,
... |
p_to = self.__emBuildEmailAddress(p_to) l_message = self.__emCreateEmail(p_content, p_to, p_from, p_subject) | p_to = self.__build_addresses(p_to) l_message = self.__create_email(p_content, p_to, p_from, p_subject) | def sendEmail(self, p_content, p_to, p_from, p_subject): #sends a generic email try: p_to = self.__emBuildEmailAddress(p_to) l_message = self.__emCreateEmail(p_content, p_to, p_from, p_subject) server = smtplib.SMTP(self.mail_server_name, self.mail_server_port) server.sendmail(p_from, p_to, l_message) server.quit() return 1 except: return 0 | b0ceef4e35c4ff5d7f3b57a06278abe612b9bb58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/b0ceef4e35c4ff5d7f3b57a06278abe612b9bb58/EmailTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4134,
12,
2890,
16,
293,
67,
1745,
16,
293,
67,
869,
16,
293,
67,
2080,
16,
293,
67,
7857,
4672,
468,
4661,
87,
279,
5210,
2699,
775,
30,
293,
67,
869,
273,
365,
16186,
3510,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1366,
4134,
12,
2890,
16,
293,
67,
1745,
16,
293,
67,
869,
16,
293,
67,
2080,
16,
293,
67,
7857,
4672,
468,
4661,
87,
279,
5210,
2699,
775,
30,
293,
67,
869,
273,
365,
16186,
3510,
... |
return ' '.join(s.split()) | beginning = s.startswith(' ') ending = s.endswith(' ') s = ' '.join(s.split()) if beginning: s = ' ' + s if ending: s = s + ' ' return s | def normalizeWhitespace(s): """Normalizes the whitespace in a string; \s+ becomes one space.""" return ' '.join(s.split()) | a2c8c613db7058d63a68ef5b9f8c247859fc78c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12790/a2c8c613db7058d63a68ef5b9f8c247859fc78c4/str.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
9431,
12,
87,
4672,
3536,
26265,
326,
7983,
316,
279,
533,
31,
521,
87,
15,
12724,
1245,
3476,
12123,
8435,
273,
272,
18,
17514,
1918,
2668,
8624,
11463,
273,
272,
18,
5839,
1918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3883,
9431,
12,
87,
4672,
3536,
26265,
326,
7983,
316,
279,
533,
31,
521,
87,
15,
12724,
1245,
3476,
12123,
8435,
273,
272,
18,
17514,
1918,
2668,
8624,
11463,
273,
272,
18,
5839,
1918,
... |
toObj = o.position - self.vehicle.robot.position | toObj = o.position - robotPos | def _findClosest(self, objects): """ Find the closest object to the given position @note: This is inefficient but the object count is to remain low, so we are fine. """ closest = None obj = None relativePos = None robotPos = self.vehicle.robot.position + \ (self.vehicle.robot.orientation * ogre.Vector3(0.5, 0, 0)) for o in objects: toObj = o.position - self.vehicle.robot.position # None yet found, default to this one if closest is None: closest = (o, toObj) else: obj, realtivePos = closest if toObj.squaredLength() < realtivePos.squaredLength(): # Found a better one switch to it closest = (o, toObj) | 91fa95ce5f91a80e6d18cfe31393ac1449865bc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10608/91fa95ce5f91a80e6d18cfe31393ac1449865bc9/vision.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
4082,
7781,
12,
2890,
16,
2184,
4672,
3536,
4163,
326,
9219,
733,
358,
326,
864,
1754,
225,
632,
7652,
30,
1220,
353,
316,
25403,
1496,
326,
733,
1056,
353,
358,
7232,
4587,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4082,
7781,
12,
2890,
16,
2184,
4672,
3536,
4163,
326,
9219,
733,
358,
326,
864,
1754,
225,
632,
7652,
30,
1220,
353,
316,
25403,
1496,
326,
733,
1056,
353,
358,
7232,
4587,
... |
print "to_align=", to_align_parts, to_align_seqs, to_align_dump | def testRealign(self): """test realignment.""" mali, seqs = self.constructMali() v = AlignandumVector() seqs = [ "IIACDIIEFG" , "IAILCDEFGI" , "KALKCDEFGK" , ] for x in seqs: v.append( makeSequence(x) ) counts = mali.getGapCounts( v, AggCount ) ma = makeMultipleAlignatorSimple( makeAlignatorDPFull( ALIGNMENT_LOCAL, 0, 0 ) ) map_old2new = makeAlignmentVector() offset = 0 fragments = [] for col in range(len(counts)): if counts[col] > 1: print "realignment of column", col, counts[col] to_align_seqs, to_align_parts, to_align_dump = StringVector(), [], [] for s in range(len(seqs)): ali = mali.getRow( s ) y = col - 1 while y >= 0 and ali.mapRowToCol( y ) < 0: y -= 1 if y < 0: start = 0 else: start = ali.mapRowToCol( y ) + 1 if col == mali.getLength(): end = len(seqs[s]) else: end = ali.mapRowToCol( col ) to_align_seqs.append( seqs[s][start:end] ) to_align_dump.append( seqs[s][start:end] ) to_align_parts.append( (start, end ) ) v[s].useSegment( start, end ) print "to_align=", to_align_parts, to_align_seqs, to_align_dump result = makeMultAlignment() ma.align( result, v ) print "partial alignment\n", str(MultAlignmentFormatPlain( result, v ) ) | 0c2849879addbe35983ed4ea29681eb835dfd701 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8012/0c2849879addbe35983ed4ea29681eb835dfd701/test_MultAlignment.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6955,
724,
12,
2890,
4672,
3536,
3813,
2863,
3515,
12123,
312,
18083,
16,
19472,
273,
365,
18,
10062,
49,
18083,
1435,
331,
273,
19317,
464,
379,
5018,
1435,
19472,
273,
306,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6955,
724,
12,
2890,
4672,
3536,
3813,
2863,
3515,
12123,
312,
18083,
16,
19472,
273,
365,
18,
10062,
49,
18083,
1435,
331,
273,
19317,
464,
379,
5018,
1435,
19472,
273,
306,
315,
... | |
delimiters[field] = element.text | delimiters[camelCaseToUpper(field)] = element.text | def __addDelimiters(self, tree): """ Adds CLDR delimiters """ delimiters = self.__getStore(self.__data, "delimiter") for element in tree.findall("/delimiters/*"): if not element.get("draft"): field = element.tag if not field in delimiters: delimiters[field] = element.text | 0449da46d56db0af7dbfd9f24d9304ce5d7225e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/0449da46d56db0af7dbfd9f24d9304ce5d7225e2/LocaleData.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
23531,
414,
12,
2890,
16,
2151,
4672,
3536,
15605,
14934,
6331,
18374,
3536,
225,
18374,
273,
365,
16186,
588,
2257,
12,
2890,
16186,
892,
16,
315,
15751,
7923,
225,
364,
930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
23531,
414,
12,
2890,
16,
2151,
4672,
3536,
15605,
14934,
6331,
18374,
3536,
225,
18374,
273,
365,
16186,
588,
2257,
12,
2890,
16186,
892,
16,
315,
15751,
7923,
225,
364,
930,
... |
self._printResponseJava(f,,response) | self._printResponseJava(f,response) | def printResponse(self,fileDes,isSoap=False,response=None): """ Print response to files given as input parameter. | c8e008fe10897ecc71f80fe5c7aeb349dd59ee4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10967/c8e008fe10897ecc71f80fe5c7aeb349dd59ee4f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
1064,
12,
2890,
16,
768,
6305,
16,
291,
20601,
33,
8381,
16,
2740,
33,
7036,
4672,
3536,
3038,
766,
358,
1390,
864,
487,
810,
1569,
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,
1172,
1064,
12,
2890,
16,
768,
6305,
16,
291,
20601,
33,
8381,
16,
2740,
33,
7036,
4672,
3536,
3038,
766,
358,
1390,
864,
487,
810,
1569,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if not self.templatenode.hasAttribute('unit'): return None | def getUnit(self): """Returns the unit of the node; None is returned if the node does not have a unit specified. """ if not self.templatenode.hasAttribute('unit'): return None unit = self.templatenode.getAttribute('unit') if unit[0]=='[' and unit[-1]==']': node = self.parent[unit[1:-1]] if node is None: return None unit = node.getValueAsString(addunit=False,usedefault=True) return unit | 70863b7f16c0263d2226e8fac7b7819dada311d7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/70863b7f16c0263d2226e8fac7b7819dada311d7/xmlstore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19194,
12,
2890,
4672,
3536,
1356,
326,
2836,
434,
326,
756,
31,
599,
353,
2106,
309,
326,
756,
1552,
486,
1240,
279,
2836,
1269,
18,
3536,
2836,
273,
365,
18,
27380,
270,
20680,
18,
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,
19194,
12,
2890,
4672,
3536,
1356,
326,
2836,
434,
326,
756,
31,
599,
353,
2106,
309,
326,
756,
1552,
486,
1240,
279,
2836,
1269,
18,
3536,
2836,
273,
365,
18,
27380,
270,
20680,
18,
5... | |
a,b,c = b2, 8*b4, 16*b6 | def short_weierstrass_model(self, complete_cube=True): """ Return a short Weierstrass model for self. | ff92f75072c761f8db7341cb1bf269e7ff19084a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ff92f75072c761f8db7341cb1bf269e7ff19084a/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3025,
67,
1814,
20778,
313,
428,
67,
2284,
12,
2890,
16,
3912,
67,
21186,
33,
5510,
4672,
3536,
2000,
279,
3025,
1660,
20778,
313,
428,
938,
364,
365,
18,
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,
0,
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,
3025,
67,
1814,
20778,
313,
428,
67,
2284,
12,
2890,
16,
3912,
67,
21186,
33,
5510,
4672,
3536,
2000,
279,
3025,
1660,
20778,
313,
428,
938,
364,
365,
18,
2,
-100,
-100,
-100,
-100,
-1... | |
this = apply(_quickfix.new_DueToRelated, args) | this = _quickfix.new_DueToRelated(*args) | def __init__(self, *args): this = apply(_quickfix.new_DueToRelated, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
30023,
774,
8017,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
30023,
774,
8017,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... |
def _add_category_to_list(self, category): self.lst_categories.Append(category.name, category) | def _update_categories(self): self.lst_categories.Clear() for category in sort_categories(self.timeline.get_categories()): self.lst_categories.Append(category.name, category) | def _add_category_to_list(self, category): self.lst_categories.Append(category.name, category) | ffe163266816059f0d4557c6c679fd61f7c6f0d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/ffe163266816059f0d4557c6c679fd61f7c6f0d3/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
4743,
67,
869,
67,
1098,
12,
2890,
16,
3150,
4672,
365,
18,
16923,
67,
8995,
18,
5736,
12,
4743,
18,
529,
16,
3150,
13,
2,
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,
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,
1289,
67,
4743,
67,
869,
67,
1098,
12,
2890,
16,
3150,
4672,
365,
18,
16923,
67,
8995,
18,
5736,
12,
4743,
18,
529,
16,
3150,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
left = "%.3f" % (((phase['start']-data.start)*100)/tTotal) width = "%.3f" % (((phase['end']-phase['start'])*100)/tTotal) devtl.html['timeline'] += html_phase.format(left, width, "%.3f"%devtl.scaleH, "%.3f"%(100-devtl.scaleH), data.dmesg[b]['color'], "") devtl.html['scale'] = createTimeScale(t0, tMax, data.tSuspended) devtl.html['timeline'] += devtl.html['scale'] | length = phase['end']-phase['start'] left = '%.3f' % (((phase['start']-t0)*100.0)/tTotal) width = '%.3f' % ((length*100.0)/tTotal) devtl.html['timeline'] += html_phase.format(left, width, \ '%.3f'%devtl.scaleH, '%.3f'%(100-devtl.scaleH), \ data.dmesg[b]['color'], '') devtl.html['scale'] = createTimeScale(t0, tMax, tSuspended) devtl.html['timeline'] += devtl.html['scale'] for data in testruns: | def createHTML(): global sysvals, data data.normalizeTime() # html function templates headline_stamp = '<div class="stamp">{0} {1} {2} {3}</div>\n' html_zoombox = '<center><button id="zoomin">ZOOM IN</button><button id="zoomout">ZOOM OUT</button><button id="zoomdef">ZOOM 1:1</button></center>\n<div id="dmesgzoombox" class="zoombox">\n' html_timeline = '<div id="{0}" class="timeline" style="height:{1}px">\n' html_device = '<div id="{0}" title="{1}" class="thread" style="left:{2}%;top:{3}%;height:{4}%;width:{5}%;">{6}</div>\n' html_phase = '<div class="phase" style="left:{0}%;width:{1}%;top:{2}%;height:{3}%;background-color:{4}">{5}</div>\n' html_legend = '<div class="square" style="left:{0}%;background-color:{1}"> {2}</div>\n' html_timetotal = '<table class="time1">\n<tr>'\ '<td class="gray">{2} Suspend Time: <b>{0} ms</b></td>'\ '<td class="gray">{2} Resume Time: <b>{1} ms</b></td>'\ '</tr>\n</table>\n' html_timegroups = '<table class="time2">\n<tr>'\ '<td class="green">Kernel Suspend: {0} ms</td>'\ '<td class="purple">Firmware Suspend: {1} ms</td>'\ '<td class="purple">Firmware Resume: {2} ms</td>'\ '<td class="yellow">Kernel Resume: {3} ms</td>'\ '</tr>\n</table>\n' # device timeline (dmesg) if(data.usedmesg): data.vprint("Creating Device Timeline...") devtl = Timeline() # Generate the header for this timeline t0 = data.start tMax = data.end tTotal = tMax - t0 if(tTotal == 0): print("ERROR: No timeline data") sys.exit() suspend_time = "%.0f"%(-data.start*1000) resume_time = "%.0f"%(data.end*1000) if data.fwValid: devtl.html['timeline'] = html_timetotal.format(suspend_time, resume_time, "Total") sktime = "%.3f"%((data.dmesg['suspend_cpu']['end'] - data.dmesg['suspend_general']['start'])*1000) sftime = "%.3f"%(data.fwSuspend / 1000000.0) rftime = "%.3f"%(data.fwResume / 1000000.0) rktime = "%.3f"%((data.dmesg['resume_general']['end'] - data.dmesg['resume_cpu']['start'])*1000) devtl.html['timeline'] += html_timegroups.format(sktime, sftime, rftime, rktime) else: devtl.html['timeline'] = html_timetotal.format(suspend_time, resume_time, "Kernel") # determine the maximum number of rows we need to draw timelinerows = 0 for phase in data.dmesg: list = data.dmesg[phase]['list'] rows = setTimelineRows(list, list) data.dmesg[phase]['row'] = rows if(rows > timelinerows): timelinerows = rows # calculate the timeline height and create its bounding box devtl.setRows(timelinerows + 1) devtl.html['timeline'] += html_zoombox; devtl.html['timeline'] += html_timeline.format("dmesg", devtl.height); # draw the colored boxes for each of the phases for b in data.dmesg: phase = data.dmesg[b] left = "%.3f" % (((phase['start']-data.start)*100)/tTotal) width = "%.3f" % (((phase['end']-phase['start'])*100)/tTotal) devtl.html['timeline'] += html_phase.format(left, width, "%.3f"%devtl.scaleH, "%.3f"%(100-devtl.scaleH), data.dmesg[b]['color'], "") # draw the time scale, try to make the number of labels readable devtl.html['scale'] = createTimeScale(t0, tMax, data.tSuspended) devtl.html['timeline'] += devtl.html['scale'] for b in data.dmesg: phaselist = data.dmesg[b]['list'] for d in phaselist: name = d if(d in data.altdevname): name = data.altdevname[d] dev = phaselist[d] height = (100.0 - devtl.scaleH)/data.dmesg[b]['row'] top = "%.3f" % ((dev['row']*height) + devtl.scaleH) left = "%.3f" % (((dev['start']-data.start)*100)/tTotal) width = "%.3f" % (((dev['end']-dev['start'])*100)/tTotal) len = " (%0.3f ms) " % ((dev['end']-dev['start'])*1000) color = "rgba(204,204,204,0.5)" devtl.html['timeline'] += html_device.format(dev['id'], name+len+b, left, top, "%.3f"%height, width, name) # timeline is finished devtl.html['timeline'] += "</div>\n</div>\n" # draw a legend which describes the phases by color devtl.html['legend'] = "<div class=\"legend\">\n" pdelta = 100.0/data.phases.__len__() pmargin = pdelta / 4.0 for phase in data.phases: order = "%.2f" % ((data.dmesg[phase]['order'] * pdelta) + pmargin) name = string.replace(phase, "_", " ") devtl.html['legend'] += html_legend.format(order, data.dmesg[phase]['color'], name) devtl.html['legend'] += "</div>\n" hf = open(sysvals.htmlfile, 'w') thread_height = 0 # write the html header first (html head, css code, everything up to the start of body) html_header = "<!DOCTYPE html>\n<html>\n<head>\n\ <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n\ <title>AnalyzeSuspend</title>\n\ <style type='text/css'>\n\ body {overflow-y: scroll;}\n\ .stamp {width: 100%;text-align:center;background-color:gray;line-height:30px;color:white;font: 25px Arial;}\n\ .callgraph {margin-top: 30px;box-shadow: 5px 5px 20px black;}\n\ .callgraph article * {padding-left: 28px;}\n\ h1 {color:black;font: bold 30px Times;}\n\ table {width:100%;}\n\ .gray {background-color:rgba(80,80,80,0.1);}\n\ .green {background-color:rgba(204,255,204,0.4);}\n\ .purple {background-color:rgba(128,0,128,0.2);}\n\ .yellow {background-color:rgba(255,255,204,0.4);}\n\ .time1 {font: 22px Arial;border:1px solid;}\n\ .time2 {font: 15px Arial;border-bottom:1px solid;border-left:1px solid;border-right:1px solid;}\n\ td {text-align: center;}\n\ .tdhl {color: red;}\n\ .hide {display: none;}\n\ .pf {display: none;}\n\ .pf:checked + label {background: url(\'data:image/svg+xml;utf,<?xml version=\"1.0\" standalone=\"no\"?><svg xmlns=\"http://www.w3.org/2000/svg\" height=\"18\" width=\"18\" version=\"1.1\"><circle cx=\"9\" cy=\"9\" r=\"8\" stroke=\"black\" stroke-width=\"1\" fill=\"white\"/><rect x=\"4\" y=\"8\" width=\"10\" height=\"2\" style=\"fill:black;stroke-width:0\"/><rect x=\"8\" y=\"4\" width=\"2\" height=\"10\" style=\"fill:black;stroke-width:0\"/></svg>\') no-repeat left center;}\n\ .pf:not(:checked) ~ label {background: url(\'data:image/svg+xml;utf,<?xml version=\"1.0\" standalone=\"no\"?><svg xmlns=\"http://www.w3.org/2000/svg\" height=\"18\" width=\"18\" version=\"1.1\"><circle cx=\"9\" cy=\"9\" r=\"8\" stroke=\"black\" stroke-width=\"1\" fill=\"white\"/><rect x=\"4\" y=\"8\" width=\"10\" height=\"2\" style=\"fill:black;stroke-width:0\"/></svg>\') no-repeat left center;}\n\ .pf:checked ~ *:not(:nth-child(2)) {display: none;}\n\ .zoombox {position: relative; width: 100%; overflow-x: scroll;}\n\ .timeline {position: relative; font-size: 14px;cursor: pointer;width: 100%; overflow: hidden; background-color:#dddddd;}\n\ .thread {position: absolute; height: "+"%.3f"%thread_height+"%; overflow: hidden; line-height: 30px; border:1px solid;text-align:center;white-space:nowrap;background-color:rgba(204,204,204,0.5);}\n\ .thread:hover {background-color:white;border:1px solid red;z-index:10;}\n\ .phase {position: absolute;overflow: hidden;border:0px;text-align:center;}\n\ .t {position: absolute; top: 0%; height: 100%; border-right:1px solid black;}\n\ .legend {position: relative; width: 100%; height: 40px; text-align: center;margin-bottom:20px}\n\ .legend .square {position:absolute;top:10px; width: 0px;height: 20px;border:1px solid;padding-left:20px;}\n\ button {height:40px;width:200px;margin-bottom:20px;margin-top:20px;font-size:24px;}\n\ </style>\n</head>\n<body>\n" hf.write(html_header) # write the test title and general info header if(data.stamp['time'] != ""): hf.write(headline_stamp.format(data.stamp['host'], data.stamp['kernel'], data.stamp['mode'], data.stamp['time'])) # write the dmesg data (device timeline) if(data.usedmesg): hf.write(devtl.html['timeline']) hf.write(devtl.html['legend']) hf.write('<div id="devicedetail"></div>\n') hf.write('<div id="devicetree"></div>\n') # write the ftrace data (callgraph) if(data.useftrace): hf.write('<section id="callgraphs" class="callgraph">\n') # write out the ftrace data converted to html html_func_top = '<article id="{0}" class="atop" style="background-color:{1}">\n<input type="checkbox" class="pf" id="f{2}" checked/><label for="f{2}">{3} {4}</label>\n' html_func_start = '<article>\n<input type="checkbox" class="pf" id="f{0}" checked/><label for="f{0}">{1} {2}</label>\n' html_func_end = '</article>\n' html_func_leaf = '<article>{0} {1}</article>\n' num = 0 for p in data.phases: list = data.dmesg[p]['list'] for devname in data.sortedDevices(p): if('ftrace' not in list[devname]): continue name = devname if(devname in data.altdevname): name = data.altdevname[devname] devid = list[devname]['id'] cg = list[devname]['ftrace'] flen = "(%.3f ms)" % ((cg.end - cg.start)*1000) hf.write(html_func_top.format(devid, data.dmesg[p]['color'], num, name+" "+p, flen)) num += 1 for line in cg.list: if(line.length < 0.000000001): flen = "" else: flen = "(%.3f ms)" % (line.length*1000) if(line.freturn and line.fcall): hf.write(html_func_leaf.format(line.name, flen)) elif(line.freturn): hf.write(html_func_end) else: hf.write(html_func_start.format(num, line.name, flen)) num += 1 hf.write(html_func_end) hf.write("\n\n </section>\n") # write the footer and close addScriptCode(hf) hf.write("</body>\n</html>\n") hf.close() return True | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4870,
13332,
2552,
2589,
4524,
16,
501,
225,
501,
18,
12237,
950,
1435,
225,
468,
1729,
445,
5539,
910,
1369,
67,
14317,
273,
2368,
2892,
667,
1546,
14317,
6441,
95,
20,
97,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
4870,
13332,
2552,
2589,
4524,
16,
501,
225,
501,
18,
12237,
950,
1435,
225,
468,
1729,
445,
5539,
910,
1369,
67,
14317,
273,
2368,
2892,
667,
1546,
14317,
6441,
95,
20,
97,
288,
... |
path = os.path.join(os.getenv('CHANDLERHOME') or '.', | sharePath = os.path.join(os.getenv('CHANDLERHOME') or '.', | def testImport(self): path = os.path.join(os.getenv('CHANDLERHOME') or '.', 'parcels', 'osaf', 'sharing', 'tests') | 2681fe9f4e2fe708792bca08ab3ddb32208e46c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2681fe9f4e2fe708792bca08ab3ddb32208e46c6/TestIcalUIDToUUID.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5010,
12,
2890,
4672,
7433,
743,
273,
1140,
18,
803,
18,
5701,
12,
538,
18,
588,
3074,
2668,
1792,
4307,
14668,
14209,
6134,
578,
2611,
16,
296,
1065,
2183,
87,
2187,
296,
538,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5010,
12,
2890,
4672,
7433,
743,
273,
1140,
18,
803,
18,
5701,
12,
538,
18,
588,
3074,
2668,
1792,
4307,
14668,
14209,
6134,
578,
2611,
16,
296,
1065,
2183,
87,
2187,
296,
538,
1... |
'test_heteroatom_organics_CH3SiH3', 'test_heteroatom_organics_C4H8SiH2', 'test_heteroatom_organics_SiH_ADAM_C3v', | def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE) | 3f4a171b835422313ecc0171dd0ab652a7f6a1bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/3f4a171b835422313ecc0171dd0ab652a7f6a1bc/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
3142,
328,
1077,
273,
11311,
8467,
16059,
12,
2890,
18,
1969,
397,
3552,
81,
1291,
7923,
272,
273,
3142,
18,
2930,
10153,
12,
2890,
18,
1969,
397,
3552,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
4672,
1930,
3142,
328,
1077,
273,
11311,
8467,
16059,
12,
2890,
18,
1969,
397,
3552,
81,
1291,
7923,
272,
273,
3142,
18,
2930,
10153,
12,
2890,
18,
1969,
397,
3552,
81,
... | |
if self.ends("eed"): | if self.ends("ied"): if self.j == 0: self.k = self.k - 1 else: self.k = self.k - 2 elif self.ends("eed"): | def step1ab(self): """step1ab() gets rid of plurals and -ed or -ing. e.g. | 8345d263907db865fc1212b587728d28e3c3f5d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11001/8345d263907db865fc1212b587728d28e3c3f5d3/porter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
21,
378,
12,
2890,
4672,
3536,
4119,
21,
378,
1435,
5571,
10911,
434,
21211,
471,
300,
329,
578,
300,
310,
18,
425,
18,
75,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
21,
378,
12,
2890,
4672,
3536,
4119,
21,
378,
1435,
5571,
10911,
434,
21211,
471,
300,
329,
578,
300,
310,
18,
425,
18,
75,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def positionsOfUnmatchedPlus(self, i, dual=False, reverse=False): | def positionsOfUnmatchedMinus(self, i, dual=False, reverse=False): | def positionsOfUnmatchedPlus(self, i, dual=False, reverse=False): | 290ec0fb647f6b99c868676e596a7b8e4c124575 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/290ec0fb647f6b99c868676e596a7b8e4c124575/crystals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6865,
951,
984,
11073,
13207,
12,
2890,
16,
277,
16,
24557,
33,
8381,
16,
4219,
33,
8381,
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,
... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6865,
951,
984,
11073,
13207,
12,
2890,
16,
277,
16,
24557,
33,
8381,
16,
4219,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
out('<h1 class="tocheading">Module %s</h1>\n' % name) | out('<h1 class="toc">Module %s</h1>\n' % name) | def write_module_toc(self, out, doc): """ Write an HTML page containing the table of contents page for the given module to the given streams. This page lists the modules, classes, exceptions, functions, and variables defined by the module. """ name = doc.canonical_name[-1] self.write_header(out, name) out('<h1 class="tocheading">Module %s</h1>\n' % name) out('<hr />\n') | ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
2978,
67,
1391,
12,
2890,
16,
596,
16,
997,
4672,
3536,
2598,
392,
3982,
1363,
4191,
326,
1014,
434,
2939,
1363,
364,
326,
864,
1605,
358,
326,
864,
8205,
18,
225,
1220,
1363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1045,
67,
2978,
67,
1391,
12,
2890,
16,
596,
16,
997,
4672,
3536,
2598,
392,
3982,
1363,
4191,
326,
1014,
434,
2939,
1363,
364,
326,
864,
1605,
358,
326,
864,
8205,
18,
225,
1220,
1363... |
return False, "; ".join(final_result) | _Fail("; ".join(final_result), log=False) | def ImportOSIntoInstance(instance, src_node, src_images, cluster_name): """Import an os image into an instance. @type instance: L{objects.Instance} @param instance: instance to import the disks into @type src_node: string @param src_node: source node for the disk images @type src_images: list of string @param src_images: absolute paths of the disk images @rtype: list of boolean @return: each boolean represent the success of importing the n-th disk """ import_env = OSEnvironment(instance) inst_os = OSFromDisk(instance.os) import_script = inst_os.import_script logfile = "%s/import-%s-%s-%s.log" % (constants.LOG_OS_DIR, instance.os, instance.name, int(time.time())) if not os.path.exists(constants.LOG_OS_DIR): os.mkdir(constants.LOG_OS_DIR, 0750) comprcmd = "gunzip" impcmd = utils.BuildShellCmd("(cd %s; %s >%s 2>&1)", inst_os.path, import_script, logfile) final_result = [] for idx, image in enumerate(src_images): if image: destcmd = utils.BuildShellCmd('cat %s', image) remotecmd = _GetSshRunner(cluster_name).BuildCmd(src_node, constants.GANETI_RUNAS, destcmd) command = '|'.join([utils.ShellQuoteArgs(remotecmd), comprcmd, impcmd]) import_env['IMPORT_DEVICE'] = import_env['DISK_%d_PATH' % idx] import_env['IMPORT_INDEX'] = str(idx) result = utils.RunCmd(command, env=import_env) if result.failed: logging.error("Disk import command '%s' returned error: %s" " output: %s", command, result.fail_reason, result.output) final_result.append("error importing disk %d: %s, %s" % (idx, result.fail_reason, result.output[-100])) if final_result: return False, "; ".join(final_result) return True, None | afdc3985644be8d2b91d9f0e37dfda391a30d036 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/afdc3985644be8d2b91d9f0e37dfda391a30d036/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6164,
4618,
5952,
1442,
12,
1336,
16,
1705,
67,
2159,
16,
1705,
67,
7369,
16,
2855,
67,
529,
4672,
3536,
5010,
392,
1140,
1316,
1368,
392,
791,
18,
225,
632,
723,
791,
30,
511,
95,
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,
6164,
4618,
5952,
1442,
12,
1336,
16,
1705,
67,
2159,
16,
1705,
67,
7369,
16,
2855,
67,
529,
4672,
3536,
5010,
392,
1140,
1316,
1368,
392,
791,
18,
225,
632,
723,
791,
30,
511,
95,
6... |
c.binary = self.binary | c.protocol = self.protocol | def cursor(self, txn=None, flags=0): c = DBShelfCursor(self.db.cursor(txn, flags)) c.binary = self.binary return c | 05cf33361140b3644eb30c58a1a0d669441bd7ec /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/05cf33361140b3644eb30c58a1a0d669441bd7ec/dbshelve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3347,
12,
2890,
16,
7827,
33,
7036,
16,
2943,
33,
20,
4672,
276,
273,
2383,
1555,
19079,
6688,
12,
2890,
18,
1966,
18,
9216,
12,
24790,
16,
2943,
3719,
276,
18,
8373,
273,
365,
18,
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,
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,
3347,
12,
2890,
16,
7827,
33,
7036,
16,
2943,
33,
20,
4672,
276,
273,
2383,
1555,
19079,
6688,
12,
2890,
18,
1966,
18,
9216,
12,
24790,
16,
2943,
3719,
276,
18,
8373,
273,
365,
18,
8... |
if sum(count for count in self.dispatcher_session_count.itervalues()) == 0: MediaRelayBase._shutdown(self) | if len(self.dispatcher_connectors) + len(self.old_connectors) == 0: self._shutdown() | def shutdown(self, kill_sessions): if not self.shutting_down: if sum(count for count in self.dispatcher_session_count.itervalues()) == 0: MediaRelayBase._shutdown(self) else: self.update_dispatchers([]) self.shutting_down = True if kill_sessions: self.session_manager.cleanup() | 18c7d713b0129c0461fa93d4d6524e07d1c3910f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3445/18c7d713b0129c0461fa93d4d6524e07d1c3910f/relay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
2890,
16,
8673,
67,
16794,
4672,
309,
486,
365,
18,
674,
25387,
67,
2378,
30,
309,
562,
12,
2890,
18,
18495,
67,
4646,
18886,
13,
397,
562,
12,
2890,
18,
1673,
67,
4646,
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,
5731,
12,
2890,
16,
8673,
67,
16794,
4672,
309,
486,
365,
18,
674,
25387,
67,
2378,
30,
309,
562,
12,
2890,
18,
18495,
67,
4646,
18886,
13,
397,
562,
12,
2890,
18,
1673,
67,
4646,
18... |
print "skipping non-jar:", entry | def cli_compare_dirs(options, leftd, rightd): from dirdelta import compare, LEFT, RIGHT, SAME, DIFF from os.path import join for event,entry in compare(leftd, rightd): if not fnmatches(("*.jar","*.sar","*.ear","*.war"), entry): # skip non-JARs. This is a terrible way to test for this, # but I am in a hurry. print "skipping non-jar:", entry continue if fnmatches(options.ignore_jar, entry): # skip continue elif event == LEFT: if options.ignore_jar_removed: continue else: print "JAR Removed:", entry elif event == RIGHT: if options.ignore_jar_added: continue else: print "JAR Added:", entry elif event == SAME: pass elif event == DIFF: print "JAR Changed:", entry cli_compare_jars(options, join(leftd, entry[len(rightd):]), entry) # print an empty line, for legibility print | 959f43823d6ca4823aea0df50ace3c1477d8f59e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11507/959f43823d6ca4823aea0df50ace3c1477d8f59e/jardiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
9877,
67,
8291,
12,
2116,
16,
2002,
72,
16,
2145,
72,
4672,
628,
1577,
9878,
1930,
3400,
16,
9686,
16,
13135,
16,
348,
1642,
16,
3690,
2246,
628,
1140,
18,
803,
1930,
1233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
67,
9877,
67,
8291,
12,
2116,
16,
2002,
72,
16,
2145,
72,
4672,
628,
1577,
9878,
1930,
3400,
16,
9686,
16,
13135,
16,
348,
1642,
16,
3690,
2246,
628,
1140,
18,
803,
1930,
1233,
... | |
print "\t | print >> stream, "\t | ret = [ "\tdef __call__(self):\n\t\treturn self._ApplyTypes_(*%s)" % propArgs] | cfd84d318292d699ca53899ee423b08bfb797445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/cfd84d318292d699ca53899ee423b08bfb797445/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
325,
273,
306,
1548,
88,
536,
1001,
1991,
972,
12,
2890,
4672,
64,
82,
64,
88,
64,
88,
2463,
365,
6315,
7001,
2016,
67,
30857,
9,
87,
2225,
738,
2270,
2615,
65,
2,
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,
325,
273,
306,
1548,
88,
536,
1001,
1991,
972,
12,
2890,
4672,
64,
82,
64,
88,
64,
88,
2463,
365,
6315,
7001,
2016,
67,
30857,
9,
87,
2225,
738,
2270,
2615,
65,
2,
-100,
-100,
-100,
-100,
... |
""" fl_create_choice(type, x, y, w, h, label) -> object ref. | """ fl_create_choice(type, x, y, w, h, label) -> object | def fl_create_choice(type, x, y, w, h, label): """ fl_create_choice(type, x, y, w, h, label) -> object ref. """ retval = _fl_create_choice(type, x, y, w, h, label) return retval | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
2640,
67,
11569,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
11569,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
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,
1183,
67,
2640,
67,
11569,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
11569,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
13,
... |
Todo -- Mathematica can do this and gets pi^2/15 | Todo -- Mathematica can do this and gets $\pi^2/15$. | sage: def christoffel(i,j,k,vars,g): | 685053b1fb472ece05d81fc291a8934d4a1b56b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/685053b1fb472ece05d81fc291a8934d4a1b56b2/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
4513,
376,
3674,
292,
12,
77,
16,
78,
16,
79,
16,
4699,
16,
75,
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,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
272,
410,
30,
1652,
4513,
376,
3674,
292,
12,
77,
16,
78,
16,
79,
16,
4699,
16,
75,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
warning += ('Relation not found: ' + \ line[i] + ' on '+relation + ' !\n') | warning += [_("Relation not found: %s on '%s'")%(line[i],relation)] | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(config.get('csv_internal_sep')): if '.' in word: module, xml_id = word.rsplit('.', 1) else: module, xml_id = current_module, word id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2 = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id = [(6, 0, res_id)] else: if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field) == len(prefix)+1) and \ len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field) == len(prefix)+1) and \ (prefix == field[0:len(prefix)]): if field[len(prefix)] == "id": # XML ID db_id = False is_xml_id = data_id = line[i] d = data_id.split('.') module = len(d)>1 and d[0] or '' name = len(d)>1 and d[1] or d[0] data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('name','=',name)]) if len(data_ids): d = ir_model_data_obj.read(cr, uid, data_ids, ['res_id'])[0] db_id = d['res_id'] if is_db_id and not db_id: data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('res_id','=',is_db_id)]) if not len(data_ids): ir_model_data_obj.create(cr, uid, {'module':module, 'model':model_name, 'name':name, 'res_id':is_db_id}) db_id = is_db_id if is_db_id and int(db_id) != int(is_db_id): warning += ("Id is not the same than existing one: " + str(is_db_id) + " !\n") logger.notifyChannel("import", netsvc.LOG_ERROR, "Id is not the same than existing one: " + str(is_db_id) + ' !\n') continue | 30b2fc5bd2ddbaf44cd90f006b166de084029bfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/30b2fc5bd2ddbaf44cd90f006b166de084029bfc/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
783,
67,
2978,
16,
938,
67,
529,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
420... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
783,
67,
2978,
16,
938,
67,
529,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
420... |
pos, ext = self.getObject(message, types.StringType, pos) pos, numattr = self.getObject(message, types.IntType, pos) | pos, ext = self.getObject(message, types.StringType, pos, printerror=False) pos, numattr = self.getObject(message, types.IntType, pos, printerror=False) | def parseNetworkMessage(self, message, nozlib = 0): | 1eccec1d675a4bb50a9804c233b824727a5220e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8738/1eccec1d675a4bb50a9804c233b824727a5220e0/slskmessages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3906,
1079,
12,
2890,
16,
883,
16,
1158,
94,
2941,
273,
374,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
3906,
1079,
12,
2890,
16,
883,
16,
1158,
94,
2941,
273,
374,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
elif type( item )==StringType: | elif type( item ) in [StringType, UnicodeType]: | def _getName( item, nameFromNum ): "Helper function -- don't use it directly" if type( item ) == IntType: try: keyname = nameFromNum( item ) except (WindowsError, EnvironmentError): raise IndexError, item elif type( item )==StringType: keyname=item else: raise exceptions.TypeError, \ "Requires integer index or string key name" return keyname | ce4b96e67373f7a6b15f18919f87be7276924e3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ce4b96e67373f7a6b15f18919f87be7276924e3d/winreg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17994,
12,
761,
16,
508,
1265,
2578,
262,
30,
315,
2276,
445,
1493,
2727,
1404,
999,
518,
5122,
6,
309,
618,
12,
761,
262,
422,
3094,
559,
30,
775,
30,
27567,
273,
508,
1265,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17994,
12,
761,
16,
508,
1265,
2578,
262,
30,
315,
2276,
445,
1493,
2727,
1404,
999,
518,
5122,
6,
309,
618,
12,
761,
262,
422,
3094,
559,
30,
775,
30,
27567,
273,
508,
1265,
25... |
visitor.document.reporter.debug(self.__class__.__name__, | visitor.document.reporter.debug('visit_' + self.__class__.__name__, | def walkabout(self, visitor): """ Perform a tree traversal similarly to `Node.walk()` (which see), except also call ``depart_...`` methods before exiting each node. If there is no ``depart_particular_node`` method for a node of type ``particular_node``, the ``unknown_departure`` method is called. | 2b6ac4d8de30eb01ad4af9ea0b327526907ac619 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/2b6ac4d8de30eb01ad4af9ea0b327526907ac619/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
21071,
12,
2890,
16,
8000,
4672,
3536,
11217,
279,
2151,
15940,
7281,
715,
358,
1375,
907,
18,
11348,
20338,
261,
12784,
2621,
3631,
1335,
2546,
745,
12176,
323,
2680,
67,
2777,
1033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5442,
21071,
12,
2890,
16,
8000,
4672,
3536,
11217,
279,
2151,
15940,
7281,
715,
358,
1375,
907,
18,
11348,
20338,
261,
12784,
2621,
3631,
1335,
2546,
745,
12176,
323,
2680,
67,
2777,
1033... |
cell.focus(); | def notebook_lib(): s= r""" | 41a3405005e5de24abcc4741fadcd35cc07692f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/41a3405005e5de24abcc4741fadcd35cc07692f0/js.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
225,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14718,
67,
2941,
13332,
272,
33,
436,
8395,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
if isa == 'alpha': | if (isa == 'alpha' or isa == 'arm'): | def __init__(self, isa, os, input_set): if isa == 'alpha': self.endian = 'lendian' elif (isa == 'sparc' or isa == 'sparc32'): self.endian = 'bendian' else: raise AttributeError, "unknown ISA %s" % isa | 5da3f7badcb571b08658b46581e2a7472406893e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7385/5da3f7badcb571b08658b46581e2a7472406893e/cpu2000.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
353,
69,
16,
1140,
16,
810,
67,
542,
4672,
309,
261,
291,
69,
422,
296,
5429,
11,
578,
353,
69,
422,
296,
4610,
11,
4672,
365,
18,
22910,
273,
296,
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,
1001,
2738,
972,
12,
2890,
16,
353,
69,
16,
1140,
16,
810,
67,
542,
4672,
309,
261,
291,
69,
422,
296,
5429,
11,
578,
353,
69,
422,
296,
4610,
11,
4672,
365,
18,
22910,
273,
296,
8... |
xenddomain().autostart_domains() | dom = xenddomain() dom.autostart_domains() | def start(self, status): # Running the network script will spawn another process, which takes # the status fd with it unless we set FD_CLOEXEC. Failing to do this # causes the read in SrvDaemon to hang even when we have written here. if status: fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC) # Prepare to catch SIGTERM (received when 'xend stop' is executed) # and call each server's cleanup if possible signal.signal(signal.SIGTERM, self.cleanup) signal.signal(signal.SIGHUP, self.reloadConfig) | aee231320c52704e7bfb17ffe9b5275d09d4a03c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/aee231320c52704e7bfb17ffe9b5275d09d4a03c/SrvServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
16,
1267,
4672,
468,
20480,
326,
2483,
2728,
903,
12560,
4042,
1207,
16,
1492,
5530,
468,
326,
1267,
5194,
598,
518,
3308,
732,
444,
478,
40,
67,
22693,
15271,
18,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
787,
12,
2890,
16,
1267,
4672,
468,
20480,
326,
2483,
2728,
903,
12560,
4042,
1207,
16,
1492,
5530,
468,
326,
1267,
5194,
598,
518,
3308,
732,
444,
478,
40,
67,
22693,
15271,
18,
225,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.