rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
self.fd.seek(max(0,self.file_offset)) | self.fd.seek(max(0, offset)) | def cache_screen(self, offset, length): if self.screen_offset != offset: self.fd.seek(max(0,self.file_offset)) self.screen_cache = cStringIO.StringIO(self.fd.read(length)) self.screen_offset = offset | cf0b1fe13eba43ab7567307bb554e1832896a5aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5568/cf0b1fe13eba43ab7567307bb554e1832896a5aa/Hexeditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1247,
67,
9252,
12,
2890,
16,
1384,
16,
769,
4672,
309,
365,
18,
9252,
67,
3348,
480,
1384,
30,
365,
18,
8313,
18,
16508,
12,
1896,
12,
20,
16,
1384,
3719,
365,
18,
9252,
67,
2493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1247,
67,
9252,
12,
2890,
16,
1384,
16,
769,
4672,
309,
365,
18,
9252,
67,
3348,
480,
1384,
30,
365,
18,
8313,
18,
16508,
12,
1896,
12,
20,
16,
1384,
3719,
365,
18,
9252,
67,
2493,
... |
print(line, end=' ') | print(line, end='') | def pair(x0, x1): # x0:x1 are 0-based slice indices; convert to 1-based line indices. x0 += 1 if x0 >= x1: return "line " + str(x0) else: return "lines %d-%d" % (x0, x1) | 13d5f7abba88cf1c2d293e88603c1e91b115a553 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/13d5f7abba88cf1c2d293e88603c1e91b115a553/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3082,
12,
92,
20,
16,
619,
21,
4672,
468,
619,
20,
30,
92,
21,
854,
374,
17,
12261,
2788,
4295,
31,
1765,
358,
404,
17,
12261,
980,
4295,
18,
619,
20,
1011,
404,
309,
619,
20,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3082,
12,
92,
20,
16,
619,
21,
4672,
468,
619,
20,
30,
92,
21,
854,
374,
17,
12261,
2788,
4295,
31,
1765,
358,
404,
17,
12261,
980,
4295,
18,
619,
20,
1011,
404,
309,
619,
20,
1545... |
policies_options += \ '<option img="%s" value="%s" caption="%s"/>' % \ (policy.__image__, policy.id, policy.displayName.value) self.params['POLICIES_OPTIONS'] = policies_options | policies_options += [xmlUtils.XMLEncode(policy.__image__), policy.id, xmlUtils.XMLEncode(policy.displayName.value)] self.params['POLICIES'] = ';'.join(policies_options) | def setParams(self): self.response.setHeader('cache-control', 'no-cache') sLang = self.request.getLang() | 19d016592fde3a93ded6b6761dfcf716d2874a72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2504/19d016592fde3a93ded6b6761dfcf716d2874a72/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31705,
12,
2890,
4672,
365,
18,
2740,
18,
542,
1864,
2668,
2493,
17,
7098,
2187,
296,
2135,
17,
2493,
6134,
272,
7275,
273,
365,
18,
2293,
18,
588,
7275,
1435,
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,
31705,
12,
2890,
4672,
365,
18,
2740,
18,
542,
1864,
2668,
2493,
17,
7098,
2187,
296,
2135,
17,
2493,
6134,
272,
7275,
273,
365,
18,
2293,
18,
588,
7275,
1435,
2,
-100,
-100,
-100,
-10... |
self.assertEqual(temp_file.readline().rstrip(), "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAGTGGGGTCCC") | line = temp_file.readline().rstrip() if line == "Score 114" : line = temp_file.readline().rstrip() if line == "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAGTGGGGTCCC" : pass elif line == "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAG-TGGGGTCC" : pass else : self.assert_(False, line) | def test_align(self): temp_file = Wise.align(["dnal"], ("Wise/human_114_g01_exons.fna_01", "Wise/human_114_g02_exons.fna_01"), kbyte=100000, force_type="DNA", quiet=True) self.assertEqual(temp_file.readline().rstrip(), "ENSG00000172135 AGGGAAAGCCCCTAAGCTC--CTGATCTATGCTGCATCCAGTTTGCAAAGTGGGGTCCC") | f58d93abc9a10704c301199e9f18f050e55e7083 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/f58d93abc9a10704c301199e9f18f050e55e7083/test_Wise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7989,
12,
2890,
4672,
1906,
67,
768,
273,
678,
784,
18,
7989,
3816,
6,
5176,
287,
6,
6487,
7566,
59,
784,
19,
24270,
67,
22214,
67,
75,
1611,
67,
338,
7008,
18,
4293,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7989,
12,
2890,
4672,
1906,
67,
768,
273,
678,
784,
18,
7989,
3816,
6,
5176,
287,
6,
6487,
7566,
59,
784,
19,
24270,
67,
22214,
67,
75,
1611,
67,
338,
7008,
18,
4293,
69,
... |
for r in self.engine.resources.values() : | if sorting: context.occursAs[SUBJ].sort() for s in context.occursAs[SUBJ] : if context is s.triple[CONTEXT]and s.triple[PRED] is self.forSome: self._outputStatement(sink, s) rs = self.engine.resources.values() if sorting: rs.sort() for r in rs : if sorting: r.occursAs[SUBJ].sort() | def dumpBySubject(self, context, sink): | a7d0c800568125609e0fc58e331b9a6f318031c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/a7d0c800568125609e0fc58e331b9a6f318031c6/cwm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
858,
6638,
12,
2890,
16,
819,
16,
9049,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4657,
858,
6638,
12,
2890,
16,
819,
16,
9049,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
this.a = e.modifiers | 1; this.c = e.modifiers | 2; this.s = e.modifiers | 4; | this.v = e.modifiers; | def notebook_lib(): s= r""" | 4871fd1c89246b34259e08f76dc2f42fa44becb7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/4871fd1c89246b34259e08f76dc2f42fa44becb7/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... |
gotPassword, host, port).addErrback( | gotPassword, host, port, usn).addErrback( | def connectionError(err, host, port, usn): if isinstance(err.value, Pearl.AuthenticationError): # Bad password, let the user try again keychain.lookup(usn, ignoreStored=True).addCallback( gotPassword, host, port).addErrback( connectionError, host, port, usn) else: # Pass on other errors result.errback(err) | 611979562d81b77dfdab8259963aef58691d1412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/611979562d81b77dfdab8259963aef58691d1412/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1459,
668,
12,
370,
16,
1479,
16,
1756,
16,
584,
82,
4672,
309,
1549,
12,
370,
18,
1132,
16,
453,
2091,
80,
18,
6492,
668,
4672,
468,
6107,
2201,
16,
2231,
326,
729,
775,
3382,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1459,
668,
12,
370,
16,
1479,
16,
1756,
16,
584,
82,
4672,
309,
1549,
12,
370,
18,
1132,
16,
453,
2091,
80,
18,
6492,
668,
4672,
468,
6107,
2201,
16,
2231,
326,
729,
775,
3382,
498,
... |
self.assertEqual(020000000000, -2147483648L) self.assertEqual(037777777777, -1) self.assertEqual(-(020000000000), 2147483648L) self.assertEqual(-(037777777777), 1) self.assertEqual(-020000000000, 2147483648L) self.assertEqual(-037777777777, 1) | if platform_long_is_32_bits: self.assertEqual(020000000000, -2147483648L) self.assertEqual(037777777777, -1) self.assertEqual(-(020000000000), 2147483648L) self.assertEqual(-(037777777777), 1) self.assertEqual(-020000000000, 2147483648L) self.assertEqual(-037777777777, 1) else: self.assertEqual(01000000000000000000000, -9223372036854775808L) self.assertEqual(01777777777777777777777, -1) self.assertEqual(-(01000000000000000000000), 9223372036854775808L) self.assertEqual(-(01777777777777777777777), 1) self.assertEqual(-01000000000000000000000, 9223372036854775808L) self.assertEqual(-01777777777777777777777, 1) | def test_oct_unsigned(self): # This test is in a <string> so we can ignore the warnings exec """if 1: # Positive-looking constants with negavive values self.assertEqual(020000000000, -2147483648L) self.assertEqual(037777777777, -1) # Ditto with a minus sign and parentheses self.assertEqual(-(020000000000), 2147483648L) self.assertEqual(-(037777777777), 1) # Ditto with a minus sign and NO parentheses # This failed in Python 2.2 through 2.2.2 and in 2.3a1 self.assertEqual(-020000000000, 2147483648L) self.assertEqual(-037777777777, 1) \n""" | dcfdceb9a21881b58f0278dda92a7cdce6782614 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dcfdceb9a21881b58f0278dda92a7cdce6782614/test_hexoct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13410,
67,
22297,
12,
2890,
4672,
468,
1220,
1842,
353,
316,
279,
411,
1080,
34,
1427,
732,
848,
2305,
326,
5599,
1196,
3536,
430,
404,
30,
468,
6818,
3720,
17,
7330,
310,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13410,
67,
22297,
12,
2890,
4672,
468,
1220,
1842,
353,
316,
279,
411,
1080,
34,
1427,
732,
848,
2305,
326,
5599,
1196,
3536,
430,
404,
30,
468,
6818,
3720,
17,
7330,
310,
68... |
path = self._relpath | path = self.request_path | def mkcol(self): """Creates a subdirectory, given an absolute path.""" path = self._relpath parent_path = os.path.dirname(path) # check for duplicate if Resource.exists_with_path(path): return self.response.set_status(405,"Method Not Allowed") # fetch parent if parent_path: parent = Resource.get_by_path(parent_path) if not parent: return self.response.set_status(409,"Conflict") # must create parent folder first else: parent = Resource.root() logging.info("Creating dir at %s" % path) collection = Resource(path=path,parent_resource=parent,is_collection=True) collection.put() self.response.set_status(201,'Created') | 9869f0209db866324231063296f1d83027eb102e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14790/9869f0209db866324231063296f1d83027eb102e/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
1293,
12,
2890,
4672,
3536,
2729,
279,
29869,
16,
864,
392,
4967,
589,
12123,
589,
273,
365,
18,
2293,
67,
803,
982,
67,
803,
273,
1140,
18,
803,
18,
12287,
12,
803,
13,
225,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5028,
1293,
12,
2890,
4672,
3536,
2729,
279,
29869,
16,
864,
392,
4967,
589,
12123,
589,
273,
365,
18,
2293,
67,
803,
982,
67,
803,
273,
1140,
18,
803,
18,
12287,
12,
803,
13,
225,
4... |
if not tests and not control_file: | if not tests and not client_control_file: | def generate_control_file(tests=(), kernel=None, label=None, profilers=(), client_control_file='', use_container=False): """ Generates a client-side control file to load a kernel and run tests. @param tests List of tests to run. @param kernel Kernel to install in generated control file. @param label Name of label to grab kernel config from. @param profilers List of profilers to activate during the job. @param client_control_file The contents of a client-side control file to run at the end of all tests. If this is supplied, all tests must be client side. TODO: in the future we should support server control files directly to wrap with a kernel. That'll require changing the parameter name and adding a boolean to indicate if it is a client or server control file. @param use_container unused argument today. TODO: Enable containers on the host during a client side test. @returns a dict with the following keys: control_file: str, The control file text. is_server: bool, is the control file a server-side control file? synch_count: How many machines the job uses per autoserv execution. synch_count == 1 means the job is asynchronous. dependencies: A list of the names of labels on which the job depends. """ if not tests and not control_file: return dict(control_file='', is_server=False, synch_count=1, dependencies=[]) cf_info, test_objects, profiler_objects, label = ( rpc_utils.prepare_generate_control_file(tests, kernel, label, profilers)) cf_info['control_file'] = control_file.generate_control( tests=test_objects, kernel=kernel, platform=label, profilers=profiler_objects, is_server=cf_info['is_server'], client_control_file=client_control_file) return cf_info | dd5994f029f1cb0973bb81a1d2a0ebcce2d4e4a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/dd5994f029f1cb0973bb81a1d2a0ebcce2d4e4a8/rpc_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
7098,
67,
768,
12,
16341,
33,
9334,
5536,
33,
7036,
16,
1433,
33,
7036,
16,
450,
7540,
414,
33,
9334,
1004,
67,
7098,
67,
768,
2218,
2187,
999,
67,
3782,
33,
8381,
4672,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2103,
67,
7098,
67,
768,
12,
16341,
33,
9334,
5536,
33,
7036,
16,
1433,
33,
7036,
16,
450,
7540,
414,
33,
9334,
1004,
67,
7098,
67,
768,
2218,
2187,
999,
67,
3782,
33,
8381,
4672,
35... |
def on_darken_background_scale_change_value(self, widget): | def on_darken_background_scale_change_value(self, widget, scroll, value): | def on_darken_background_scale_change_value(self, widget): """Background darkness setting changed""" self.config['background_darkness'] = widget.get_value() self.config.save() | c8954fbdaf45bdc1ce88274f05129c89a6dd8eb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6502/c8954fbdaf45bdc1ce88274f05129c89a6dd8eb5/prefseditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
25045,
275,
67,
9342,
67,
5864,
67,
3427,
67,
1132,
12,
2890,
16,
3604,
16,
5532,
16,
460,
4672,
3536,
8199,
23433,
4496,
3637,
3550,
8395,
365,
18,
1425,
3292,
9342,
67,
2504... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
67,
25045,
275,
67,
9342,
67,
5864,
67,
3427,
67,
1132,
12,
2890,
16,
3604,
16,
5532,
16,
460,
4672,
3536,
8199,
23433,
4496,
3637,
3550,
8395,
365,
18,
1425,
3292,
9342,
67,
2504... |
res[r.builder][0][r.num - min] = r.iterations res[r.builder][1][r.num - min] = r.nsperop self.response.out.write(str(res)) | res[r.builder][0][r.num - minv] = r.iterations res[r.builder][1][r.num - minv] = r.nsperop minhash = node(minv).node maxhash = node(maxv).node if self.request.get('fmt') == 'json': self.response.headers['Content-Type'] = 'text/plain; charset=utf-8' self.response.out.write('{"min": "%s", "max": "%s", "data": {' % (minhash, maxhash)) sep = "\n\t" for b in builders: self.response.out.write('%s"%s": {"iterations": %s, "nsperop": %s}' % (sep, b, str(res[b][0]).replace("L", ""), str(res[b][1]).replace("L", ""))) sep = ",\n\t" self.response.out.write("\n}}\n") return def bgraph(builder): data = res[builder][1] encoding = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.-" m = max(data) if m == -1: return "" tot = 0 ntot = 0 for d in data: if d < 0: continue tot += d ntot += 1 avg = tot / ntot if 2*avg > m: m = 2*avg s = "" for d in data: if d < 0: s += "__" continue val = int(d*4095.0/m) s += encoding[val/64] + encoding[val%64] return "http://chart.apis.google.com/chart?cht=lc&chxt=x,y&chxl=0:|%s|%s|1:|0|%g ns|%g ns&chd=e:%s" % (minhash[0:12], maxhash[0:12], m/2, m, s) graphs = [] for b in builders: graphs.append({"builder": b, "url": bgraph(b)}) revs = [] for i in range(minv, maxv+1): r = nodeInfo(node(i)) ns = [] for b in builders: t = res[b][1][i - minv] if t < 0: t = None ns.append(t) r["ns_by_builder"] = ns revs.append(r) path = os.path.join(os.path.dirname(__file__), 'benchmark1.html') data = { "benchmark": bm.name, "builders": [builderInfo(b) for b in builders], "graphs": graphs, "revs": revs } self.response.out.write(template.render(path, data)) | def get(self): self.response.headers['Content-Type'] = 'application/json; charset=utf-8' benchmark = self.request.path[12:].decode('hex').encode('base64') | d5b946f43dd9078baac61400559a67557a9dfc53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6483/d5b946f43dd9078baac61400559a67557a9dfc53/gobuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
365,
18,
2740,
18,
2485,
3292,
1350,
17,
559,
3546,
273,
296,
3685,
19,
1977,
31,
4856,
33,
3158,
17,
28,
11,
14128,
273,
365,
18,
2293,
18,
803,
63,
2138,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
4672,
365,
18,
2740,
18,
2485,
3292,
1350,
17,
559,
3546,
273,
296,
3685,
19,
1977,
31,
4856,
33,
3158,
17,
28,
11,
14128,
273,
365,
18,
2293,
18,
803,
63,
2138,
30,
... |
str = '\\textbf{Modules}\n' | str = self._start_of('Modules') str += self._section('Modules', 1) | def _module_list(self, modules, sortorder): """ @return: The HTML code for the module hierarchy tree, containing the given modules. This is used by L{_module_to_latex} to list the submodules of a package. @rtype: C{string} """ if len(modules) == 0: return '' str = '\\textbf{Modules}\n' str += '\\begin{itemize}\n' str += '\\setlength{\\parskip}{0.6ex}' modules = self._filtersort_links(modules, sortorder) for link in modules: str += self._module_tree_item(link.target()) return str + '\\end{itemize}\n\n' | 718e913e37bd564ee3425ab6734ad7a7748f8a8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/718e913e37bd564ee3425ab6734ad7a7748f8a8a/latex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2978,
67,
1098,
12,
2890,
16,
4381,
16,
1524,
1019,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
1605,
9360,
2151,
16,
4191,
326,
864,
4381,
18,
225,
1220,
353,
1399,
635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
67,
1098,
12,
2890,
16,
4381,
16,
1524,
1019,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
1605,
9360,
2151,
16,
4191,
326,
864,
4381,
18,
225,
1220,
353,
1399,
635... |
except wikipedia.isRedirectPage: | except wikipedia.IsRedirectPage: | def workon(page): try: text = page.get() except wikipedia.isRedirectPage: return # Here go edit text in whatever way you want. If you find you do not # want to edit this page, just return if text != page.get(): page.put(text) # Adding a summary text would be good | f8c6355ea6c90ed7f5f529c305e425d7c3b5aaed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/f8c6355ea6c90ed7f5f529c305e425d7c3b5aaed/basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1440,
265,
12,
2433,
4672,
775,
30,
977,
273,
1363,
18,
588,
1435,
1335,
21137,
18,
2520,
5961,
1964,
30,
327,
468,
13743,
1960,
3874,
977,
316,
15098,
4031,
1846,
2545,
18,
971,
1846,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1440,
265,
12,
2433,
4672,
775,
30,
977,
273,
1363,
18,
588,
1435,
1335,
21137,
18,
2520,
5961,
1964,
30,
327,
468,
13743,
1960,
3874,
977,
316,
15098,
4031,
1846,
2545,
18,
971,
1846,
... |
data = etree.fromstring(data) | try: data = etree.fromstring(data) except etree.XMLSyntaxError: self.oeb.logger.warn('Stripping comments from %s'% self.href) data = re.compile(r'<!--.*?-->', re.DOTALL).sub('', data) data = etree.fromstring(data) | def _parse_xhtml(self, data): self.oeb.log.debug('Parsing', self.href, '...') # Convert to Unicode and normalize line endings data = self.oeb.decode(data) data = self.oeb.html_preprocessor(data) # Try with more & more drastic measures to parse try: data = etree.fromstring(data) except etree.XMLSyntaxError: repl = lambda m: ENTITYDEFS.get(m.group(1), m.group(0)) data = ENTITY_RE.sub(repl, data) try: data = etree.fromstring(data) except etree.XMLSyntaxError: # TODO: Factor out HTML->XML coercion self.oeb.logger.warn('Parsing file %r as HTML' % self.href) data = html.fromstring(data) data.attrib.pop('xmlns', None) for elem in data.iter(tag=etree.Comment): if elem.text: elem.text = elem.text.strip('-') data = etree.tostring(data, encoding=unicode) try: data = etree.fromstring(data) except etree.XMLSyntaxError: data = etree.fromstring(data, parser=RECOVER_PARSER) # Force into the XHTML namespace if barename(data.tag) != 'html': raise NotHTML( 'File %r does not appear to be (X)HTML' % self.href) elif not namespace(data.tag): data.attrib['xmlns'] = XHTML_NS data = etree.tostring(data, encoding=unicode) try: data = etree.fromstring(data) except: data=data.replace(':=', '=').replace(':>', '>') data = etree.fromstring(data) elif namespace(data.tag) != XHTML_NS: # OEB_DOC_NS, but possibly others ns = namespace(data.tag) attrib = dict(data.attrib) nroot = etree.Element(XHTML('html'), nsmap={None: XHTML_NS}, attrib=attrib) for elem in data.iterdescendants(): if isinstance(elem.tag, basestring) and \ namespace(elem.tag) == ns: elem.tag = XHTML(barename(elem.tag)) for elem in data: nroot.append(elem) data = nroot # Ensure has a <head/> head = xpath(data, '/h:html/h:head') head = head[0] if head else None if head is None: self.oeb.logger.warn( 'File %r missing <head/> element' % self.href) head = etree.Element(XHTML('head')) data.insert(0, head) title = etree.SubElement(head, XHTML('title')) title.text = self.oeb.translate(__('Unknown')) elif not xpath(data, '/h:html/h:head/h:title'): self.oeb.logger.warn( 'File %r missing <title/> element' % self.href) title = etree.SubElement(head, XHTML('title')) title.text = self.oeb.translate(__('Unknown')) # Remove any encoding-specifying <meta/> elements for meta in self.META_XP(data): meta.getparent().remove(meta) etree.SubElement(head, XHTML('meta'), attrib={'http-equiv': 'Content-Type', 'content': '%s; charset=utf-8' % XHTML_NS}) # Ensure has a <body/> if not xpath(data, '/h:html/h:body'): self.oeb.logger.warn( 'File %r missing <body/> element' % self.href) etree.SubElement(data, XHTML('body')) | af9e34b6d6aca0e7a2de0f3b508455e0e742953c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/af9e34b6d6aca0e7a2de0f3b508455e0e742953c/base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
26341,
12,
2890,
16,
501,
4672,
365,
18,
15548,
70,
18,
1330,
18,
4148,
2668,
13963,
2187,
365,
18,
7547,
16,
20243,
13,
468,
4037,
358,
9633,
471,
3883,
980,
679,
899,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
26341,
12,
2890,
16,
501,
4672,
365,
18,
15548,
70,
18,
1330,
18,
4148,
2668,
13963,
2187,
365,
18,
7547,
16,
20243,
13,
468,
4037,
358,
9633,
471,
3883,
980,
679,
899,
... |
None, [cty.c_int], | None, [cty.c_int], | def fl_set_tooltip_color(p1, p2): """ fl_set_tooltip_color(p1, p2) """ _fl_set_tooltip_color(p1, p2) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
19798,
67,
3266,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
542,
67,
19798,
67,
3266,
12,
84,
21,
16,
293,
22,
13,
3536,
225,
389,
2242,
67,
542,
67,
19798,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
19798,
67,
3266,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
542,
67,
19798,
67,
3266,
12,
84,
21,
16,
293,
22,
13,
3536,
225,
389,
2242,
67,
542,
67,
19798,
... |
expectedFullMessage = 'None\n%s%s' % (expectedOutMessage, expectedErrMessage) | expectedFullMessage = 'A traceback%s%s' % (expectedOutMessage, expectedErrMessage) | def testBufferOutputAddErrorOrFailure(self): for message_attr, add_attr, include_error in [ ('errors', 'addError', True), ('failures', 'addFailure', False), ('errors', 'addError', True), ('failures', 'addFailure', False) ]: result = self.getStartedResult() buffered_out = sys.stdout buffered_err = sys.stderr result._original_stdout = StringIO() result._original_stderr = StringIO() | 804cb0fab05bab7ddddf9a77fb077bb540bdeabb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/804cb0fab05bab7ddddf9a77fb077bb540bdeabb/test_result.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1892,
1447,
986,
668,
1162,
5247,
12,
2890,
4672,
364,
883,
67,
1747,
16,
527,
67,
1747,
16,
2341,
67,
1636,
316,
306,
7707,
4324,
2187,
296,
1289,
668,
2187,
1053,
3631,
7707,
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,
1842,
1892,
1447,
986,
668,
1162,
5247,
12,
2890,
4672,
364,
883,
67,
1747,
16,
527,
67,
1747,
16,
2341,
67,
1636,
316,
306,
7707,
4324,
2187,
296,
1289,
668,
2187,
1053,
3631,
7707,
2... |
err = "WARNING: maximum recursion depth exceeded (input='%s')" % input.encode(self._textEncoding) | err = "WARNING: maximum recursion depth exceeded (input='%s')" % input.encode(self._textEncoding, 'replace') | def _respond(self, input, sessionID): "Private version of respond(), does the real work." if len(input) == 0: return "" | b6f936c082e355668775b0cc69ba36110e530529 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6428/b6f936c082e355668775b0cc69ba36110e530529/Kernel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17863,
12,
2890,
16,
810,
16,
13737,
4672,
315,
6014,
1177,
434,
6846,
9334,
1552,
326,
2863,
1440,
1199,
309,
562,
12,
2630,
13,
422,
374,
30,
327,
1408,
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,
389,
17863,
12,
2890,
16,
810,
16,
13737,
4672,
315,
6014,
1177,
434,
6846,
9334,
1552,
326,
2863,
1440,
1199,
309,
562,
12,
2630,
13,
422,
374,
30,
327,
1408,
2,
-100,
-100,
-100,
-10... |
def _poolJobs(self, db_name, check=False): | def _poolJobs(self, db_name, check=False): | def _poolJobs(self, db_name, check=False): try: db, pool = pooler.get_db_and_pool(db_name) except: return False | 9174672fb432f24bc683fb83a1ffb1c9921a1012 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/9174672fb432f24bc683fb83a1ffb1c9921a1012/ir_cron.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6011,
7276,
12,
2890,
16,
1319,
67,
529,
16,
866,
33,
8381,
4672,
775,
30,
1319,
16,
2845,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
1966,
67,
529,
13,
1335,
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,
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,
6011,
7276,
12,
2890,
16,
1319,
67,
529,
16,
866,
33,
8381,
4672,
775,
30,
1319,
16,
2845,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
1966,
67,
529,
13,
1335,
3... |
log.warning("JSONField decode error. Expected dictionary, got " "string for input '%s'" % s) | logging.warning("JSONField decode error. Expected dictionary, got " "string for input '%s'" % s) | def loads(self, s): val = simplejson.loads(s, encoding=settings.DEFAULT_CHARSET) | eb7c5a391456ea459e19b6e6665836674bde6f07 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6757/eb7c5a391456ea459e19b6e6665836674bde6f07/fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6277,
12,
2890,
16,
272,
4672,
1244,
273,
4143,
1977,
18,
17135,
12,
87,
16,
2688,
33,
4272,
18,
5280,
67,
26977,
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,
6277,
12,
2890,
16,
272,
4672,
1244,
273,
4143,
1977,
18,
17135,
12,
87,
16,
2688,
33,
4272,
18,
5280,
67,
26977,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.pathTrigger = Config().get('dir', 'pathFluxd').strip() + 'trigger/' self.fileTrigger = self.pathTrigger + 'trigger.jobs' | self.pathTrigger = Config().get('dir', 'pathFluxd').strip() + 'trigger/' self.fileTrigger = self.pathTrigger + 'trigger.jobs' | def __init__(self, name, *p, **k): | 1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2550/1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1/Trigger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
380,
84,
16,
2826,
79,
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,
1001,
2738,
972,
12,
2890,
16,
508,
16,
380,
84,
16,
2826,
79,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
stat_style = ' style="font-weight:bold"' | stat_style = ' style="font-weight:bold"' | def tmpl_display_inbox(self, messages, infos=[], warnings=[], nb_messages=0, no_quota=0, ln=cdslang): """ Displays a list of messages, with the appropriate links and buttons @param messages: a list of tuples: [(message_id, user_from_id, user_from_nickname, subject, sent_date, status=] @param infos: a list of informations to print on top of page @param warnings: a list of warnings to display @param nb_messages: number of messages user has @param no_quota: 1 if user has no quota (admin) or 0 else. @param ln: language of the page. @return the list in HTML format """ _ = gettext_set_language(ln) dummy = 0 inbox = self.tmpl_warning(warnings, ln) inbox += self.tmpl_infobox(infos, ln) if not(no_quota): inbox += self.tmpl_quota(nb_messages, ln) inbox += """ | f4a9e182650614f9c75111360ff7aaa98e5eeb52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/f4a9e182650614f9c75111360ff7aaa98e5eeb52/webmessage_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
5417,
67,
267,
2147,
12,
2890,
16,
2743,
16,
10626,
22850,
6487,
5599,
22850,
6487,
4264,
67,
6833,
33,
20,
16,
1158,
67,
23205,
33,
20,
16,
7211,
33,
4315,
2069,
539,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10720,
67,
5417,
67,
267,
2147,
12,
2890,
16,
2743,
16,
10626,
22850,
6487,
5599,
22850,
6487,
4264,
67,
6833,
33,
20,
16,
1158,
67,
23205,
33,
20,
16,
7211,
33,
4315,
2069,
539,
4672,... |
if s1.key in self.ways_of_bonding: self.ways_of_bonding[s1.key] += 1 else: self.ways_of_bonding[s1.key] = 1 if s2.key in self.ways_of_bonding: self.ways_of_bonding[s2.key] += 1 else: self.ways_of_bonding[s2.key] = 1 | if s1.key in self.ways_of_bonding: self.ways_of_bonding[s1.key] += 1 else: self.ways_of_bonding[s1.key] = 1 if s2.key in self.ways_of_bonding: self.ways_of_bonding[s2.key] += 1 else: self.ways_of_bonding[s2.key] = 1 | def find_bondable_pairs(self): '''Checks the open bonds of the selected chunk to see if they are close enough to bond with any other open bonds in the part. Hidden chunks are skipped. ''' self.bondable_pairs = [] self.ways_of_bonding = {} # Get center of the selected chunk. self.selected_chunk_ctr = self.selected_chunk.bbox.center() # Loop through all the chunks in the part to search for bondable pairs of singlets. for mol in self.o.assy.molecules: if self.selected_chunk == mol: continue # Skip itself if mol.hidden: continue # Skip hidden chunks | f2621bfb8c8fbaf55c74ea81309b850ca7387098 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/f2621bfb8c8fbaf55c74ea81309b850ca7387098/fusechunksMode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
26425,
429,
67,
11545,
12,
2890,
4672,
9163,
4081,
326,
1696,
15692,
434,
326,
3170,
2441,
358,
2621,
309,
2898,
854,
1746,
7304,
358,
8427,
598,
1281,
1308,
1696,
15692,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
26425,
429,
67,
11545,
12,
2890,
4672,
9163,
4081,
326,
1696,
15692,
434,
326,
3170,
2441,
358,
2621,
309,
2898,
854,
1746,
7304,
358,
8427,
598,
1281,
1308,
1696,
15692,
316,
... |
dialog.action_area.get_children()[0].set_label(_("Search")) | dialog.action_area.get_children()[0].set_label(_("_Search")) | def on_lyrics_search(self, event): artist = self.songinfo.artist title = self.songinfo.title dialog = gtk.Dialog('Lyrics Search', self.infowindow, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, gtk.STOCK_FIND, gtk.RESPONSE_ACCEPT)) dialog.action_area.get_children()[0].set_label(_("Search")) dialog.action_area.get_children()[0].set_image(gtk.image_new_from_stock(gtk.STOCK_FIND, gtk.ICON_SIZE_MENU)) dialog.set_role('lyricsSearch') artist_hbox = gtk.HBox() artist_label = gtk.Label(_('Artist Name') + ':') artist_hbox.pack_start(artist_label, False, False, 5) artist_entry = gtk.Entry() artist_entry.set_text(artist) artist_hbox.pack_start(artist_entry, True, True, 5) title_hbox = gtk.HBox() title_label = gtk.Label(_('Song Title') + ':') title_hbox.pack_start(title_label, False, False, 5) title_entry = gtk.Entry() title_entry.set_text(title) title_hbox.pack_start(title_entry, True, True, 5) self.set_label_widths_equal([artist_label, title_label]) dialog.vbox.pack_start(artist_hbox) dialog.vbox.pack_start(title_hbox) dialog.set_default_response(gtk.RESPONSE_ACCEPT) dialog.vbox.show_all() response = dialog.run() if response == gtk.RESPONSE_ACCEPT: dialog.destroy() # Delete current lyrics: fname = artist + '-' + title + '.txt' fname = fname.replace("\\", "") fname = fname.replace("/", "") fname = fname.replace("\"", "") filename = os.path.expanduser('~/.lyrics/' + fname) if os.path.exists(filename): os.remove(filename) # Search for new lyrics: lyricThread = threading.Thread(target=self.infowindow_get_lyrics, args=(artist_entry.get_text(), title_entry.get_text(), artist, title)) lyricThread.setDaemon(True) lyricThread.start() else: dialog.destroy() | a1409e65098800c571c8d9462682648389074256 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/a1409e65098800c571c8d9462682648389074256/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
715,
1512,
87,
67,
3072,
12,
2890,
16,
871,
4672,
15469,
273,
365,
18,
816,
75,
1376,
18,
25737,
2077,
273,
365,
18,
816,
75,
1376,
18,
2649,
6176,
273,
22718,
18,
6353,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
67,
715,
1512,
87,
67,
3072,
12,
2890,
16,
871,
4672,
15469,
273,
365,
18,
816,
75,
1376,
18,
25737,
2077,
273,
365,
18,
816,
75,
1376,
18,
2649,
6176,
273,
22718,
18,
6353,
266... |
registry.String('Maveric', "Current development release")) | registry.String('Maverick', "Current development release")) | def configure(advanced): from supybot.questions import yn, something, anything, output from supybot.utils.str import format import sqlite import re Encyclopedia = conf.registerPlugin('Encyclopedia', True) enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default) if advanced: datadir = something("Which directory should the factoids database be in?", default=Encyclopedia.datadir._default) database = something("What should be the name of the default database (without the .db extension)?", default=Encyclopedia.database._default) prefixchar = something("What prefix character should the bot respond to factoid requests with?", default=Encyclopedia.prefixchar._default) ignores = set([]) output("This plugin can be configured to always ignore certain factoid requests, this is useful when you want another plugin to handle them") output("For instance, the PackageInfo plugin responds to !info and !find, so those should be ignored in Encyclopedia to allow this to work") ignores_i = anythnig("Which factoid requets should the bot always ignore?", default=', '.join(Encyclopedia.ignores._default)) for name in re.split(r',?\s', +ignore_i): ignores.add(name.lower()) curStabel = something("What is short name of the current stable release?", default=Encyclopedia.curStable._default) curStableLong = something("What is long name of the current stable release?", default=Encyclopedia.curStableLong._default) curStableNum = something("What is version number of the current stable release?", default=Encyclopedia.curStableNum._default) curDevel = something("What is short name of the current development release?", default=Encyclopedia.curDevel._default) curDevelLong = something("What is long name of the current development release?", default=Encyclopedia.curDevelLong._default) curDevelNum = something("What is version number of the current development release?", default=Encyclopedia.curDevelNum._default) curLTS = something("What is short name of the current LTS release?", default=Encyclopedia.curLTS._default) curLTSong = something("What is long name of the current LTS release?", default=Encyclopedia.curLTSLoong._default) curLTSNum = something("What is version number of the current LTS release?", default=Encyclopedia.curLTSNum._default) else: datadir = Encyclopedia.datadir._default database = Encyclopedia.database._default prefixchar = Encyclopedia.prefixchar._default ignores = Encyclopedia.ignores._default curStabel = Encyclopedia.curStable._default curStableLong = Encyclopedia.curStableLong._default curStableNum = Encyclopedia.curStableNum._default curDevel = Encyclopedia.curDevel._default curDevelLong = Encyclopedia.curDevelLong._default curDevelNum = Encyclopedia.curDevelNum._default curLTS = Encyclopedia.curLTS._default curLTSLong = Encyclopedia.curLTSLong._default curLTSNum = Encyclopedia.curLTSNum._default relaychannel = anything("What channel/nick should the bot forward alter messages to?", default=Encyclopedia.replaychannel._default) output("What message should the bot reply with when a factoid can not be found?") notfoundmsg = something("If you include a '%s' in the message, it will be replaced with the requested factoid", default=Encyclopedia.notfoundmsg._default) output("When certain factoids are called an alert can be forwarded to a channel/nick") output("Which factoids should the bot forward alert calls for?") alert = set([]) alert_i = anything("Separate types by spaces or commas:", default=', '.join(Encyclopedia.alert._default)) for name in re.split(r',?\s+', alert_i): alert.add(name.lower()) remotedb = anything("Location of a remote database to sync with (used with @sync)", default=Encyclopedia.remotedb._default) privateNotFound = yn("Should the bot reply in private when a factoid is not found, as opposed to in the channel?", default=Encyclopedia.privateNotFound._default) Encyclopedia.enabled.setValue(enabled) Encyclopedia.datadir.setValue(datadir) Encyclopedia.database.setValue(database) Encyclopedia.prefixchar.setValue(prefixchar) Encyclopedia.ignores.setValue(ignores) Encyclopedia.curStable.setValue(curStable) Encyclopedia.curStableLong.setValue(curStableLong) Encyclopedia.curStableNum.setValue(curStableNum) Encyclopedia.curDevel.setValue(curDevel) Encyclopedia.curDevelLong.setValue(curDevelLong) Encyclopedia.curDevelNum.setValue(curDevelNum) Encyclopedia.curLTS.setValue(curLTS) Encyclopedia.curLTSLong.setValue(curLTSLong) Encyclopedia.curLTSNum.setValue(curLTSNum) Encyclopedia.relaychannel.setValue(relaychannel) Encyclopedia.notfoundmsg.setValue(notfoundmsg) Encyclopedia.alert.setValue(alert) Encyclopedia.privateNotFound.setValue(privateNotFound) # Create the initial database db_dir = Encyclopedia.datadir() db_file = Encyclopedia.database() if not db_dir: db_dir = conf.supybot.directories.data() output("supybot.plugins.Encyclopedia.datadir will be set to %r" % db_dir) Encyclopedia.datadir.setValue(db_dir) if not db_file: db_file = 'ubuntu' output("supybot.plugins.Encyclopedia.database will be set to %r" % db_file) Encyclopedia.database.setValue(db_dir) if os.path.exists(os.path.join(db_dir, db_file + '.db')): return con = sqlite.connect(os.path.join(db_dir, db_file + '.db')) cur = con.cursor() try: con.begin() cur.execute("""CREATE TABLE facts ( id INTEGER PRIMARY KEY, author VARCHAR(100) NOT NULL, name VARCHAR(20) NOT NULL, added DATETIME, value VARCHAR(200) NOT NULL, popularity INTEGER NOT NULL DEFAULT 0 | 46f1113b2da4c4395501f26b130a05a91a716523 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3105/46f1113b2da4c4395501f26b130a05a91a716523/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
12,
27080,
4672,
628,
1169,
93,
4819,
18,
9758,
1930,
677,
82,
16,
5943,
16,
6967,
16,
876,
628,
1169,
93,
4819,
18,
5471,
18,
701,
1930,
740,
1930,
16184,
1930,
283,
1374,
2431,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
12,
27080,
4672,
628,
1169,
93,
4819,
18,
9758,
1930,
677,
82,
16,
5943,
16,
6967,
16,
876,
628,
1169,
93,
4819,
18,
5471,
18,
701,
1930,
740,
1930,
16184,
1930,
283,
1374,
2431,... |
qw = max(1, self.index.query_weight(text)) factor = 100.0 / qw / 1024 | qw = self.index.query_weight(text) | def formatresults(self, text, results, maxlines=MAXLINES, lo=0, hi=sys.maxint): stop = self.stopdict.has_key words = [w for w in re.findall(r"\w+\*?", text.lower()) if not stop(w)] pattern = r"\b(" + "|".join(words) + r")\b" pattern = pattern.replace("*", ".*") # glob -> re syntax prog = re.compile(pattern, re.IGNORECASE) print '='*70 rank = lo qw = max(1, self.index.query_weight(text)) factor = 100.0 / qw / 1024 for docid, score in results[lo:hi]: rank += 1 path = self.docpaths[docid] score = min(100, int(score * factor)) print "Rank: %d Score: %d%% File: %s" % (rank, score, path) path = os.path.join(self.mh.getpath(), path) fp = open(path) msg = mhlib.Message("<folder>", 0, fp) for header in "From", "To", "Cc", "Bcc", "Subject", "Date": h = msg.getheader(header) if h: print "%-8s %s" % (header+":", h) text = self.getmessagetext(msg) if text: print nleft = maxlines for part in text: for line in part.splitlines(): if prog.search(line): print line nleft -= 1 if nleft <= 0: break if nleft <= 0: break print '-'*70 | eb784ec34a945530a320a2b434a8c422fe90aa7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/eb784ec34a945530a320a2b434a8c422fe90aa7f/mhindex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
4717,
12,
2890,
16,
977,
16,
1686,
16,
943,
3548,
33,
6694,
5997,
55,
16,
437,
33,
20,
16,
10118,
33,
9499,
18,
1896,
474,
4672,
2132,
273,
365,
18,
5681,
1576,
18,
5332,
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,
740,
4717,
12,
2890,
16,
977,
16,
1686,
16,
943,
3548,
33,
6694,
5997,
55,
16,
437,
33,
20,
16,
10118,
33,
9499,
18,
1896,
474,
4672,
2132,
273,
365,
18,
5681,
1576,
18,
5332,
67,
... |
w['condition'].set_markup("<i>%s</i>" % self._conditions[item['cond']]) | if str(item['cond']) in [ str(i) for i in range(len(self._conditions)) ]: w['condition'].set_markup("<i>%s</i>" % self._conditions[item['cond']]) else: w['condition'].set_text('') self.debug.show("Wrong value in 'condition' field (movie_id=%s, cond=%s)" % (item['movie_id'], item['cond'])) | def set_details(self, item=None):#{{{ from loan import get_loan_info, get_loan_history if item is None: item = {} if item.has_key('movie_id') and item['movie_id']: self._movie_id = item['movie_id'] else: self._movie_id = None w = self.widgets['movie'] if item.has_key('number') and item['number']: w['number'].set_text(str(int(item['number']))) else: w['number'].set_text('') if item.has_key('title') and item['title']: w['title'].set_markup("<b><span size='large'>%s</span></b>" % gutils.html_encode(item['title'])) else: w['title'].set_text('') if item.has_key('o_title') and item['o_title']: w['o_title'].set_markup("<span size='medium'><i>%s</i></span>" % gutils.html_encode(item['o_title'])) else: w['o_title'].set_text('') if item.has_key('director') and item['director']: w['director'].set_markup("<i>%s</i>" % gutils.html_encode(item['director'])) else: w['director'].set_text('') if item.has_key('plot') and item['plot']: w['plot'].set_text(str(item['plot'])) else: w['plot'].set_text('') if item.has_key('year') and item['year']: w['year'].set_text(str(item['year'])) else: w['year'].set_text('') if item.has_key('runtime') and item['runtime']: w['runtime'].set_text(str(int(item['runtime']))) else: w['runtime'].set_text('x') if item.has_key('cast') and item['cast']: w['cast'].set_text(str(item['cast'])) else: w['cast'].set_text('') if item.has_key('country') and item['country']: w['country'].set_markup("<i>%s</i>" % gutils.html_encode(item['country'])) else: w['country'].set_text('') if item.has_key('genre') and item['genre']: w['genre'].set_markup("<i>%s</i>" % gutils.html_encode(item['genre'])) else: w['genre'].set_text('') if item.has_key('cond') and item['cond']: w['condition'].set_markup("<i>%s</i>" % self._conditions[item['cond']]) else: w['condition'].set_text('') if item.has_key('region') and item['region']: w['region'].set_markup("<i>%s</i>" % gutils.html_encode(item['region'])) if int(item['region']) < 9: self.widgets['tooltips'].set_tip(w['region'], self._regions[int(item['region'])]) else: w['region'].set_text('') self.widgets['tooltips'].set_tip(w['region'], self._regions[0]) # N/A if item.has_key('layers') and item['layers']: w['layers'].set_markup("<i>%s</i>" % self._layers[item['layers']]) else: w['layers'].set_text('') if item.has_key('color') and item['color']: w['color'].set_markup("<i>%s</i>" % self._colors[item['color']]) else: w['color'].set_markup('') if item.has_key('classification') and item['classification']: w['classification'].set_markup("<i>%s</i>" % gutils.html_encode(item['classification'])) else: w['classification'].set_text('') if item.has_key('studio') and item['studio']: w['studio'].set_markup("<i>%s</i>" % gutils.html_encode(item['studio'])) else: w['studio'].set_text('') if item.has_key('o_site') and item['o_site']: self._o_site_url = str(item['o_site']) w['go_o_site_button'].set_sensitive(True) else: self._o_site_url = None w['go_o_site_button'].set_sensitive(False) if item.has_key('site') and item['site']: self._site_url = str(item['site']) w['go_site_button'].set_sensitive(True) else: self._site_url = None w['go_site_button'].set_sensitive(False) if item.has_key('trailer') and item['trailer']: self._trailer_url = str(item.trailer) w['go_trailer_button'].set_sensitive(True) else: self._trailer_url = None w['go_trailer_button'].set_sensitive(False) if item.has_key('seen') and item['seen'] == True: w['seen_icon'].set_from_file(os.path.join(self.locations['images'], 'seen.png')) else: w['seen_icon'].set_from_file(os.path.join(self.locations['images'], 'unseen.png')) if item.has_key('notes') and item['notes']: w['notes'].set_text(str(item.notes)) else: w['notes'].set_text('') tmp = '' if item.has_key('media_num') and item['media_num']: tmp = str(item.media_num) else: tmp = '0' if item.has_key('medium_id') and item['medium_id']: if item.medium is not None: tmp += ' x ' + item.medium.name else: pass w['medium'].set_markup("<i>%s</i>" % gutils.html_encode(tmp)) if item.has_key('vcodec_id'): if item.vcodec is not None: w['vcodec'].set_markup("<i>%s</i>" % gutils.html_encode(item.vcodec.name)) else: w['vcodec'].set_text('') else: w['vcodec'].set_text('') # poster if item.has_key('image') and item['image']: tmp_dest = self.locations['posters'] tmp_img = os.path.join(tmp_dest, "m_%s.jpg"%item['image']) tmp_img2 = os.path.join(tmp_dest, "%s.jpg"%item['image']) if os.path.isfile(tmp_img2): image_path = tmp_img self.widgets['add']['delete_poster'].set_sensitive(True) self.widgets['menu']['delete_poster'].set_sensitive(True) w['picture_button'].set_sensitive(True) else: image_path = os.path.join(self.locations['images'], 'default.png') self.widgets['add']['delete_poster'].set_sensitive(False) self.widgets['menu']['delete_poster'].set_sensitive(False) w['picture_button'].set_sensitive(False) # lets see if we have a scaled down medium image already created if not os.path.isfile(image_path): # if not, lets make one for future use :D original_image = os.path.join(tmp_dest, "%s.jpg"%item.image) if os.path.isfile(original_image): gutils.make_medium_image(self, "%s.jpg"%item.image) else: image_path = os.path.join(self.locations['images'], 'default.png') w['picture_button'].set_sensitive(False) w['picture'].set_from_file(image_path) # ratig rimage = int(self.config.get('rating_image', 0)) if rimage: prefix = '' else: prefix = 'meter' if item.has_key('rating') and item['rating']: rating_file = "%s/%s0%d.png" % (self.locations['images'], prefix, item['rating']) else: rating_file = "%s/%s0%d.png" % (self.locations['images'], prefix, 0) handler = w['image_rating'].set_from_pixbuf(gtk.gdk.pixbuf_new_from_file(rating_file)) gutils.garbage(handler) # check loan status and adjust buttons and history box if item.has_key('loaned') and item['loaned'] == True: self.widgets['popups']['loan'].set_sensitive(False) self.widgets['popups']['email'].set_sensitive(True) self.widgets['popups']['return'].set_sensitive(True) self.widgets['menu']['loan'].set_sensitive(False) self.widgets['menu']['email'].set_sensitive(True) self.widgets['menu']['return'].set_sensitive(True) w['loan_button'].set_sensitive(False) w['email_reminder_button'].set_sensitive(True) w['return_button'].set_sensitive(True) data_loan = get_loan_info(self.db, collection_id=item['collection_id'], volume_id=item['volume_id'], movie_id=item['movie_id']) if data_loan is None: item.loaned = False else: data_person = self.db.Person.get_by(person_id=data_loan.person.person_id) self.person_name = str(data_person.name) self.person_email = str(data_person.email) self.loan_date = str(data_loan.date) w['loan_info'].set_label(_("This movie has been loaned to ") + self.person_name + _(" on ") + self.loan_date[:10]) if item.has_key('loaned') and item['loaned'] != True: # "loaned" status can be changed above, so don't use "else:" in this line self.widgets['popups']['loan'].set_sensitive(True) self.widgets['popups']['email'].set_sensitive(False) self.widgets['popups']['return'].set_sensitive(False) self.widgets['menu']['loan'].set_sensitive(True) self.widgets['menu']['email'].set_sensitive(False) self.widgets['menu']['return'].set_sensitive(False) w['return_button'].set_sensitive(False) w['email_reminder_button'].set_sensitive(False) w['loan_button'].set_sensitive(True) w['loan_info'].set_markup("<b>%s</b>" % _("Movie not loaned")) # loan history self.loans_treemodel.clear() if item.has_key('collection_id') or item.has_key('volume_id') or item.has_key('movie_id'): loans = get_loan_history(self.db, collection_id=item['collection_id'], volume_id=item['volume_id'], movie_id=item['movie_id']) for loan in loans: myiter = self.loans_treemodel.append(None) self.loans_treemodel.set_value(myiter, 0,'%s' % str(loan.date)[:10]) if loan.return_date and loan.return_date != '': self.loans_treemodel.set_value(myiter, 1, str(loan.return_date)[:10]) else: self.loans_treemodel.set_value(myiter, 1, "---") person = self.db.Person.get_by(person_id=loan.person.person_id) self.loans_treemodel.set_value(myiter, 2, person.name) # volumes/collections if item.has_key('volume_id') and item['volume_id']>0: if item.has_key('volume') and item['volume']: w['volume'].set_markup("<b>%s</b>" % gutils.html_encode(item['volume'].name)) w['show_volume_button'].set_sensitive(True) else: w['volume'].set_text('') w['show_volume_button'].set_sensitive(False) else: w['volume'].set_text('') w['show_volume_button'].set_sensitive(False) if item.has_key('collection_id') and item['collection_id']>0: if item.has_key('collection') and item['collection']: w['collection'].set_markup("<b>%s</b>" % gutils.html_encode(item['collection'].name)) w['show_collection_button'].set_sensitive(True) else: w['collection'].set_text('') w['show_collection_button'].set_sensitive(False) else: w['collection'].set_text('') w['show_collection_button'].set_sensitive(False) # languages for i in w['audio_vbox'].get_children(): i.destroy() for i in w['subtitle_vbox'].get_children(): i.destroy() if item.has_key('languages') and len(item['languages'])>0: for i in item['languages']: if i.type == 3: # subtitles if i.subformat: tmp = "%s - %s" % (i.language.name, i.subformat.name) else: tmp = "%s" % i.language.name w['subtitle_vbox'].pack_start(gtk.Label(tmp)) else: language = i.language.name if i.type is not None and len(self._lang_types[i.type])>0: language += " <i>%s</i>" % self._lang_types[i.type] tmp = '' if i.achannel: tmp = i.achannel.name if i.acodec: if len(tmp)>0: tmp += ", %s" % i.acodec.name else: tmp = i.acodec.name if len(tmp)>0: tmp = "%s (%s)" % (language, tmp) else: tmp = language widget = gtk.Label(tmp) widget.set_use_markup(True) w['audio_vbox'].pack_start(widget) w['audio_vbox'].show_all() w['subtitle_vbox'].show_all() #tags if item.has_key('tags'): tmp = '' for tag in item['tags']: tmp += "%s, " % tag.name tmp = tmp[:-2] # cut last comma w['tags'].set_text(tmp) #}}} | 09bf804fd06a71bff5e39e0f22692ba391d6bfc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2687/09bf804fd06a71bff5e39e0f22692ba391d6bfc6/main_treeview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
6395,
12,
2890,
16,
761,
33,
7036,
4672,
3642,
12187,
628,
28183,
1930,
336,
67,
383,
304,
67,
1376,
16,
336,
67,
383,
304,
67,
8189,
309,
761,
353,
599,
30,
761,
273,
2618,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
6395,
12,
2890,
16,
761,
33,
7036,
4672,
3642,
12187,
628,
28183,
1930,
336,
67,
383,
304,
67,
1376,
16,
336,
67,
383,
304,
67,
8189,
309,
761,
353,
599,
30,
761,
273,
2618,... |
subscribers = dict([(key, set([interp(value)])) for key, value in self.events.items()]) | subscribers = dict() for event, subscriber in self.events.items(): if not event in subscribers: subscribers[event] = set() subscribers[event].add(subscriber) | def run(self): | 52dcf638f6ef2886b9f82cc8816d66ed0e0531ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12796/52dcf638f6ef2886b9f82cc8816d66ed0e0531ae/tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.show_variables() | self.show_variables() | def add_watch(self, name, local): self.watches.add_watch(name, local) self.nbBottom.SetSelection(0) self.show_variables() | 872f754eafee36b7b9b20954604570707e5cd36c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/872f754eafee36b7b9b20954604570707e5cd36c/Debugger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7585,
12,
2890,
16,
508,
16,
1191,
4672,
365,
18,
7585,
281,
18,
1289,
67,
7585,
12,
529,
16,
1191,
13,
365,
18,
6423,
10393,
18,
694,
6233,
12,
20,
13,
365,
18,
4500,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7585,
12,
2890,
16,
508,
16,
1191,
4672,
365,
18,
7585,
281,
18,
1289,
67,
7585,
12,
529,
16,
1191,
13,
365,
18,
6423,
10393,
18,
694,
6233,
12,
20,
13,
365,
18,
4500,
67,... |
raise Sorry(("Anomalous map coefficients ('%s') requested, but input "+ "data are not anomalous.") % map_coeffs.map_type) | raise Sorry(("Anomalous map type ('%s') requested, but input "+ "data are not anomalous.") % map.map_type) | def run(args, log = sys.stdout): print >> log, legend print >> log, "-"*79 if(len(args) == 0): parameter_file_name = "maps.params" print >> log, "Creating parameter file '%s' in the following directory:\n%s"%( parameter_file_name, os.path.abspath('.')) if(os.path.isfile(parameter_file_name)): msg="File '%s' exists already. Re-name it or move and run the command again." raise Sorry(msg%parameter_file_name) pfo = open(parameter_file_name, "w") master_params = mmtbx.maps.maps_including_IO_master_params() master_params = master_params.fetch(iotbx.phil.parse(default_params)) master_params.show(out = pfo) pfo.close() print >> log, "-"*79 return processed_args = mmtbx.utils.process_command_line_args(args = args, log = log, master_params = mmtbx.maps.maps_including_IO_master_params()) print >> log, "-"*79 print >> log, "\nParameters to compute maps::\n" processed_args.params.show(out = log, prefix=" ") params = processed_args.params.extract() if(not os.path.isfile(str(params.maps.input.pdb_file_name))): raise Sorry( "PDB file is not given: maps.input.pdb_file_name=%s is not a file"%\ str(params.maps.input.pdb_file_name)) print >> log, "-"*79 print >> log, "\nInput PDB file:", params.maps.input.pdb_file_name pdb_inp = iotbx.pdb.input(file_name = params.maps.input.pdb_file_name) # get all crystal symmetries cs_from_coordinate_files = [pdb_inp.crystal_symmetry_from_cryst1()] cs_from_reflection_files = [] for rfn in [params.maps.input.reflection_data.file_name, params.maps.input.reflection_data.r_free_flags.file_name]: if(os.path.isfile(str(rfn))): try: cs_from_reflection_files.append(crystal_symmetry_from_any.extract_from(rfn)) except KeyboardInterrupt: raise except RuntimeError: pass crystal_symmetry = crystal.select_crystal_symmetry( from_coordinate_files=cs_from_coordinate_files, from_reflection_files=cs_from_reflection_files) # xray_structure = pdb_inp.xray_structure_simple(crystal_symmetry = crystal_symmetry) xray_structure.show_summary(f = log, prefix=" ") print >> log, "-"*79 reflection_files = [] for rfn in [params.maps.input.reflection_data.file_name, params.maps.input.reflection_data.r_free_flags.file_name]: if(os.path.isfile(str(rfn))): reflection_files.append(reflection_file_reader.any_reflection_file( file_name = rfn, ensure_read_access = False)) reflection_file_server = reflection_file_utils.reflection_file_server( crystal_symmetry = crystal_symmetry, force_symmetry = True, reflection_files = [], err = log) # reflection_data_master_params = mmtbx.utils.data_and_flags_master_params( master_scope_name="reflection_data") reflection_data_input_params = processed_args.params.get( "maps.input.reflection_data") reflection_data_params = reflection_data_master_params.fetch( reflection_data_input_params).extract().reflection_data # determine_data_and_flags_result = mmtbx.utils.determine_data_and_flags( reflection_file_server = reflection_file_server, parameters = reflection_data_params, data_parameter_scope = "maps.input.reflection_data", flags_parameter_scope = "maps.input.reflection_data.r_free_flags", data_description = "Reflection data", keep_going = True, log = log) f_obs = determine_data_and_flags_result.f_obs if (not f_obs.anomalous_flag()) : for map_coeffs in params.maps.map_coefficients : if map_coeffs.map_type.lower().startswith("anom") : raise Sorry(("Anomalous map coefficients ('%s') requested, but input "+ "data are not anomalous.") % map_coeffs.map_type) for map in params.maps.map : if map.map_type.lower().startswith("anom") : raise Sorry(("Anomalous map coefficients ('%s') requested, but input "+ "data are not anomalous.") % map_coeffs.map_type) r_free_flags = determine_data_and_flags_result.r_free_flags test_flag_value = determine_data_and_flags_result.test_flag_value if(r_free_flags is None): r_free_flags=f_obs.array(data=flex.bool(f_obs.data().size(), False)) test_flag_value=None print >> log, "-"*79 print >> log, "Bulk solvent correction and anisotropic scaling:" fmodel = mmtbx.utils.fmodel_simple( xray_structures = [xray_structure], f_obs = f_obs, r_free_flags = r_free_flags, outliers_rejection = params.maps.input.reflection_data.outliers_rejection, skip_twin_detection = params.maps.skip_twin_detection, bulk_solvent_correction = params.maps.bulk_solvent_correction, anisotropic_scaling = params.maps.anisotropic_scaling) fmodel_info = fmodel.info() fmodel_info.show_rfactors_targets_scales_overall(out = log) print >> log, "-"*79 print >> log, "Compute maps." atom_selection_manager = get_atom_selection_manager(pdb_inp = pdb_inp) if params.maps.output.directory is not None : assert os.path.isdir(params.maps.output.directory) output_dir = params.maps.output.directory else : output_dir = os.getcwd() if params.maps.output.prefix is not None : file_name_base = os.path.join(output_dir, os.path.basename(params.maps.output.prefix)) else : file_name_base = params.maps.input.pdb_file_name if(file_name_base.count(".")>0): file_name_base = file_name_base[:file_name_base.index(".")] xplor_maps = mmtbx.maps.compute_xplor_maps( fmodel = fmodel, params = params.maps.map, atom_selection_manager = atom_selection_manager, file_name_prefix = None, file_name_base = file_name_base) cmo = mmtbx.maps.compute_map_coefficients( fmodel = fmodel, params = params.maps.map_coefficients) map_coeff_file_name = file_name_base+"_map_coeffs.mtz" #if(params.maps.output.prefix is not None and len(params.maps.output.prefix)>0): # map_coeff_file_name = params.maps.output.prefix + "_" + map_coeff_file_name cmo.write_mtz_file(file_name = map_coeff_file_name) if(params.maps.output.fmodel_data_file_format is not None): fmodel_file_name = file_name_base + "_fmodel." + \ params.maps.output.fmodel_data_file_format print >> log, "Writing fmodel arrays (Fobs, Fcalc, m, ...) to %s file."%\ fmodel_file_name fmodel_file_object = open(fmodel_file_name,"w") fmodel.export(out = fmodel_file_object, format = params.maps.output.fmodel_data_file_format) fmodel_file_object.close() print >> log, "All done." print >> log, "-"*79 return (map_coeff_file_name, xplor_maps) | ed797edc31c99c9d9f7673158c55b641d22f4116 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/ed797edc31c99c9d9f7673158c55b641d22f4116/maps.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
1968,
16,
613,
273,
2589,
18,
10283,
4672,
1172,
1671,
613,
16,
7241,
1172,
1671,
613,
16,
7514,
14,
7235,
309,
12,
1897,
12,
1968,
13,
422,
374,
4672,
1569,
67,
768,
67,
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,
1086,
12,
1968,
16,
613,
273,
2589,
18,
10283,
4672,
1172,
1671,
613,
16,
7241,
1172,
1671,
613,
16,
7514,
14,
7235,
309,
12,
1897,
12,
1968,
13,
422,
374,
4672,
1569,
67,
768,
67,
5... |
next += 'Next ' + str(self.max_per_page) if page < self.flickr.TOTAL_PAGES: self.addDir(next + ' photos ->',url,mode,os.path.join(IMAGES_PATH,'next.png'),page=str(page+1),userid=kwargs.get('userid','')) | next += __language__(30512)+' ' + str(self.max_per_page) if page < self.flickr.TOTAL_PAGES: self.addDir(next + ' '+__language__(30514)+' ->',url,mode,os.path.join(IMAGES_PATH,'next.png'),page=str(page+1),userid=kwargs.get('userid','')) | def addPhotos(self,method,mode,url='BLANK',page='1',mapOption=True,**kwargs): page = int(page) #Add Previous Header if necessary if page > 1: if page == 2: self.addDir('<- Previous ' + str(self.max_per_page) + ' photos',url,mode,os.path.join(IMAGES_PATH,'previous.png'),page='-1',userid=kwargs.get('userid','')) else: self.addDir('<- Previous ' + str(self.max_per_page) + ' photos',url,mode,os.path.join(IMAGES_PATH,'previous.png'),page=str(page-1),userid=kwargs.get('userid','')) info_list = [] extras = self.SIZE_KEYS[self.defaultThumbSize] + ',' + self.SIZE_KEYS[self.defaultDisplaySize] if mapOption: extras += ',geo' #Walk photos ct=1 for photo in self.flickr.walk_photos_by_page(method,page=page,per_page=self.max_per_page,extras=extras,**kwargs): ct+=1 self.addPhoto( photo.get('title'), photo.get('id'), photo.get(self.SIZE_KEYS[self.defaultThumbSize]), photo.get(self.SIZE_KEYS[self.defaultDisplaySize]), lat=photo.get('latitude'),lon=photo.get('longitude'), mapOption=mapOption) #Add Next Footer if necessary #print "PAGES: " + str(page) + " " + str(self.flickr.TOTAL_PAGES) + " " + self.flickr.TOTAL_ON_LAST_PAGE if ct >= self.max_per_page: next = '('+str(page*self.max_per_page)+'/'+str(self.flickr.TOTAL)+') ' if page + 1 == self.flickr.TOTAL_PAGES: if self.flickr.TOTAL_ON_LAST_PAGE: next += 'Last ' + str(self.flickr.TOTAL_ON_LAST_PAGE) else: next += 'Last ' + str(self.max_per_page) else: next += 'Next ' + str(self.max_per_page) if page < self.flickr.TOTAL_PAGES: self.addDir(next + ' photos ->',url,mode,os.path.join(IMAGES_PATH,'next.png'),page=str(page+1),userid=kwargs.get('userid','')) | a3305f1cd1ae2e5ede9780e451b285854021a8f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9429/a3305f1cd1ae2e5ede9780e451b285854021a8f5/default.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
3731,
12440,
12,
2890,
16,
2039,
16,
3188,
16,
718,
2218,
38,
24307,
2187,
2433,
2218,
21,
2187,
1458,
1895,
33,
5510,
16,
636,
4333,
4672,
1363,
273,
509,
12,
2433,
13,
225,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3731,
12440,
12,
2890,
16,
2039,
16,
3188,
16,
718,
2218,
38,
24307,
2187,
2433,
2218,
21,
2187,
1458,
1895,
33,
5510,
16,
636,
4333,
4672,
1363,
273,
509,
12,
2433,
13,
225,
468,... |
sage: E.padic_height_pairing_matrix(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. | d3a85cde5bd869ed67966c8af12c72f47350d84f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/d3a85cde5bd869ed67966c8af12c72f47350d84f/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... | |
"name" : tr_lang(transproj.language.fullname) +" "+tr_lang(transproj.project.fullname), | "name" : _('"%(project)s" in %(language)s', details), | def transproj_notices(request, language_code, project_code): can_add = False can_view = False transproj = TranslationProject.objects.get(real_path = project_code + "/" + language_code) if 'view' in get_matching_permissions(get_profile(request.user), transproj.directory): can_view = True if request.user.is_authenticated() and 'administrate' in get_matching_permissions(get_profile(request.user), transproj.directory): can_add = True if not can_add and not can_view: return HttpResponseForbidden() if can_view: content = Notices(content_object = transproj) transproj_notices = Notices.objects.get_notices(content)[:5] if can_add: success = "" valid_form = False if request.method == 'POST': # If the form has been submitted... form = TransProjectNoticeForm(request.POST) # A form bound to the POST data if form.is_valid(): # All validation rules pass # Process the data in form.cleaned_data # ... form.save() success = _("Notification sent.") valid_form = True if request.method == 'GET' or valid_form: form = TransProjectNoticeForm() # An unbound form form.set_initial_value(language_code, project_code) template_vars = { "title" : _('Add notice for %(language)s/%(project)s', {"language": tr_lang(transproj.language.fullname), "project": tr_lang(transproj.project.fullname)}), "back_link" : language_code+"/"+project_code, "name" : tr_lang(transproj.language.fullname) +" "+tr_lang(transproj.project.fullname), } if can_add: template_vars["form"] = form template_vars["success"] = success if can_view: template_vars["notices"] = transproj_notices return render_to_response('pootle_notifications/notices.html', template_vars, context_instance=RequestContext(request) ) | 3364c8bd093f0a053689033c82d071d0242abde0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/3364c8bd093f0a053689033c82d071d0242abde0/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
906,
17995,
67,
902,
1242,
12,
2293,
16,
2653,
67,
710,
16,
1984,
67,
710,
4672,
225,
848,
67,
1289,
273,
1083,
848,
67,
1945,
273,
1083,
906,
17995,
273,
17427,
4109,
18,
6911,
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,
906,
17995,
67,
902,
1242,
12,
2293,
16,
2653,
67,
710,
16,
1984,
67,
710,
4672,
225,
848,
67,
1289,
273,
1083,
848,
67,
1945,
273,
1083,
906,
17995,
273,
17427,
4109,
18,
6911,
18,
... |
Returns a list keyed by parameter location of all the values by that key in that parameter location | Returns a list keyed by parameter location of all the values by that key in that parameter location | def params(): doc = textwrap.dedent("""\ MultiDict of keys from POST, GET, URL dicts | 314228f7a3afa0fe6c1e4bba47a296bf3ad1a4bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/314228f7a3afa0fe6c1e4bba47a296bf3ad1a4bd/request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
859,
13332,
997,
273,
30271,
18,
785,
319,
2932,
3660,
64,
5991,
5014,
434,
1311,
628,
5485,
16,
4978,
16,
1976,
15838,
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,
859,
13332,
997,
273,
30271,
18,
785,
319,
2932,
3660,
64,
5991,
5014,
434,
1311,
628,
5485,
16,
4978,
16,
1976,
15838,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return self.__disk.delete_partition(partition.getPedPartition()) | if self.__disk.delete_partition(partition.getPedPartition()): self._refreshPartitions = True return True else: return False | def deletePartition(self, partition): """Removes specified Partition from this Disk under the same conditions as removePartition(), but also destroy the removed Partition.""" return self.__disk.delete_partition(partition.getPedPartition()) | 6c5023786f21173a96a177fedf7b1e979538307b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5978/6c5023786f21173a96a177fedf7b1e979538307b/disk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
7003,
12,
2890,
16,
3590,
4672,
3536,
6220,
1269,
12598,
628,
333,
12951,
3613,
326,
1967,
4636,
487,
1206,
7003,
9334,
1496,
2546,
5546,
326,
3723,
12598,
12123,
327,
365,
16186,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1430,
7003,
12,
2890,
16,
3590,
4672,
3536,
6220,
1269,
12598,
628,
333,
12951,
3613,
326,
1967,
4636,
487,
1206,
7003,
9334,
1496,
2546,
5546,
326,
3723,
12598,
12123,
327,
365,
16186,
10... |
self.peerStatus = _("%d seen now") % statistics['numPeers'] if not self.errors: print _("Log: none") | self.peerStatus = _("%d") % statistics['numPeers'] | def display(self, statistics): fractionDone = statistics.get('fractionDone') activity = statistics.get('activity') timeEst = statistics.get('timeEst') downRate = statistics.get('downRate') upRate = statistics.get('upRate') spew = statistics.get('spew') | 20742370d1a08cc5f982b88b4e2dc8a71de7ebf0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2550/20742370d1a08cc5f982b88b4e2dc8a71de7ebf0/tfmainline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
12,
2890,
16,
7691,
4672,
8330,
7387,
273,
7691,
18,
588,
2668,
16744,
7387,
6134,
5728,
273,
7691,
18,
588,
2668,
9653,
6134,
813,
9122,
273,
7691,
18,
588,
2668,
957,
9122,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2562,
12,
2890,
16,
7691,
4672,
8330,
7387,
273,
7691,
18,
588,
2668,
16744,
7387,
6134,
5728,
273,
7691,
18,
588,
2668,
9653,
6134,
813,
9122,
273,
7691,
18,
588,
2668,
957,
9122,
6134,... |
raise TypeError | raise TypeError("cannot determine field from %s!" % other) | def coerce_field(self, other): """ Return the number type that contains both `self.field()` and `other`. | ec32553b7b00a5ff90111c3c1c654046e3a1e835 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/ec32553b7b00a5ff90111c3c1c654046e3a1e835/polyhedra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12270,
67,
1518,
12,
2890,
16,
1308,
4672,
3536,
2000,
326,
1300,
618,
716,
1914,
3937,
1375,
2890,
18,
1518,
20338,
471,
1375,
3011,
8338,
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,
12270,
67,
1518,
12,
2890,
16,
1308,
4672,
3536,
2000,
326,
1300,
618,
716,
1914,
3937,
1375,
2890,
18,
1518,
20338,
471,
1375,
3011,
8338,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
""" subclass should call this as soon as it has located its spec data """ | """subclass should call this as soon as it has located its spec data""" | def initializeLevel(self, levelId, levelSpec, scenarioIndex): """ subclass should call this as soon as it has located its spec data """ self.levelId = levelId self.levelSpec = levelSpec self.scenarioIndex = scenarioIndex | 5642bbee4459a58077015fb639004a95f5e4ec2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/5642bbee4459a58077015fb639004a95f5e4ec2e/Level.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
2355,
12,
2890,
16,
1801,
548,
16,
1801,
1990,
16,
10766,
1016,
4672,
3536,
10678,
1410,
745,
333,
487,
17136,
487,
518,
711,
13801,
2097,
857,
501,
8395,
365,
18,
2815,
548,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
2355,
12,
2890,
16,
1801,
548,
16,
1801,
1990,
16,
10766,
1016,
4672,
3536,
10678,
1410,
745,
333,
487,
17136,
487,
518,
711,
13801,
2097,
857,
501,
8395,
365,
18,
2815,
548,
273,
... |
if getattr(datatype, 'mandatory', False): | if is_mandatory: | def build_namespace(self, resource, context): """This utility method builds a namespace suitable to use to produce an HTML form. Its input data is a dictionnary that defines the form variables to consider: | 52375d4189af8cf288a07a69f93f5de0e04a0cd6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/52375d4189af8cf288a07a69f93f5de0e04a0cd6/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
4937,
12,
2890,
16,
1058,
16,
819,
4672,
3536,
2503,
12788,
707,
10736,
279,
1981,
10631,
358,
999,
358,
11402,
392,
3982,
646,
18,
29517,
810,
501,
353,
279,
302,
2228,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
67,
4937,
12,
2890,
16,
1058,
16,
819,
4672,
3536,
2503,
12788,
707,
10736,
279,
1981,
10631,
358,
999,
358,
11402,
392,
3982,
646,
18,
29517,
810,
501,
353,
279,
302,
2228,
82,
... |
>>> badRequest1 = RequestPasswordReset(u'foo@bar') | >>> badRequest1 = RequestPasswordReset('foo@bar') | ... def __init__(self, email): | 8f458dcf19119f271c2cde0c87dacd12a12a146f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6273/8f458dcf19119f271c2cde0c87dacd12a12a146f/test_emailEntry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
2699,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
2699,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
except ImportError: | import ctypes lib_name = find_readline_lib() if lib_name is not None: lib = ctypes.cdll.LoadLibrary(lib_name) global rl_completion_suppress_append rl_completion_suppress_append = ctypes.c_int.in_dll(lib, "rl_completion_suppress_append") except Exception: | def __init__(self, envdir=None): cmd.Cmd.__init__(self) try: import readline delims = readline.get_completer_delims() for c in '-/:': delims = delims.replace(c, '') readline.set_completer_delims(delims) except ImportError: pass self.interactive = False if envdir: self.env_set(os.path.abspath(envdir)) | 4bdaa2a7093e15317e70aed0181266eed93e17a4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2831/4bdaa2a7093e15317e70aed0181266eed93e17a4/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1550,
1214,
33,
7036,
4672,
1797,
18,
5931,
16186,
2738,
972,
12,
2890,
13,
775,
30,
1930,
12023,
10508,
87,
273,
12023,
18,
588,
67,
832,
17754,
67,
377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1550,
1214,
33,
7036,
4672,
1797,
18,
5931,
16186,
2738,
972,
12,
2890,
13,
775,
30,
1930,
12023,
10508,
87,
273,
12023,
18,
588,
67,
832,
17754,
67,
377... |
match = _passwdprog.match(user) | match = _passwdprog.match(user) | def splitpasswd(user): global _passwdprog if _passwdprog is None: import re _passwdprog = re.compile('^([^:]*):(.*)$') match = _passwdprog.match(user) if match: return match.group(1, 2) return user, None | 5cef536ace5c35cbe83aa00d5e5361f4d8e54352 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/5cef536ace5c35cbe83aa00d5e5361f4d8e54352/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
24002,
12,
1355,
4672,
2552,
389,
24002,
14654,
309,
389,
24002,
14654,
353,
599,
30,
1930,
283,
389,
24002,
14654,
273,
283,
18,
11100,
2668,
66,
8178,
30,
5772,
4672,
14361,
8,
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,
1416,
24002,
12,
1355,
4672,
2552,
389,
24002,
14654,
309,
389,
24002,
14654,
353,
599,
30,
1930,
283,
389,
24002,
14654,
273,
283,
18,
11100,
2668,
66,
8178,
30,
5772,
4672,
14361,
8,
6... |
self.assert_(max_a_gpu == max_a) | assert max_a_gpu == max_a | def test_max(self): from pycuda.curandom import rand as curand from pycuda.reduction import get_max_kernel | b961de6e4d12b33f3e3e7a683eded03d8757a940 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12870/b961de6e4d12b33f3e3e7a683eded03d8757a940/test_gpuarray.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1896,
12,
2890,
4672,
628,
2395,
71,
13177,
18,
1397,
2111,
1930,
5605,
487,
662,
464,
628,
2395,
71,
13177,
18,
1118,
4062,
1930,
336,
67,
1896,
67,
8111,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1896,
12,
2890,
4672,
628,
2395,
71,
13177,
18,
1397,
2111,
1930,
5605,
487,
662,
464,
628,
2395,
71,
13177,
18,
1118,
4062,
1930,
336,
67,
1896,
67,
8111,
2,
-100,
-100,
-10... |
self.editmodel.hasretencion=True | def on_ckretencion_toggled( self, on ): """ """ if not self.editmodel is None: self.editmodel.hasretencion=True if on : self.retencionwidget.setCurrentIndex(1) else: self.retencionwidget.setCurrentIndex(0) #self.cboretencion. | f38d7ad9828a00d9b509f69765dcdb30f4071109 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11009/f38d7ad9828a00d9b509f69765dcdb30f4071109/cheques.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
363,
1349,
1331,
285,
67,
88,
23972,
1259,
12,
365,
16,
603,
262,
30,
3536,
3536,
309,
486,
365,
18,
4619,
2284,
353,
599,
30,
225,
309,
603,
294,
365,
18,
1349,
1331,
285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
67,
363,
1349,
1331,
285,
67,
88,
23972,
1259,
12,
365,
16,
603,
262,
30,
3536,
3536,
309,
486,
365,
18,
4619,
2284,
353,
599,
30,
225,
309,
603,
294,
365,
18,
1349,
1331,
285,
... | |
colls_nicely_ordered = get_nicely_ordered_collection_list() | colls_nicely_ordered = get_nicely_ordered_collection_list(ln=ln) | def create_search_box(cc, colls, p, f, rg, sf, so, sp, rm, of, ot, as, ln, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, pl, d1y, d1m, d1d, d2y, d2m, d2d, jrec, ec, action=""): "Create search box for 'search again in the results page' functionality." # load the right message language _ = gettext_set_language(ln) # some computations if cc == cdsname: cc_intl = cdsnameintl[ln] else: cc_intl = get_coll_i18nname(cc, ln) colls_nicely_ordered = [] if cfg_nicely_ordered_collection_list: colls_nicely_ordered = get_nicely_ordered_collection_list() else: colls_nicely_ordered = get_alphabetically_ordered_collection_list() colls_nice = [] for (cx, cx_printable) in colls_nicely_ordered: if not cx.startswith("Unnamed collection"): colls_nice.append({ 'value' : cx, 'text' : cx_printable }) coll_selects = [] if colls and colls[0] != cdsname: # some collections are defined, so print these first, and only then print 'add another collection' heading: for c in colls: if c: temp = [] temp.append({ 'value' : '', 'text' : '*** %s ***' % _("any collection") }) for val in colls_nice: # print collection: if not cx.startswith("Unnamed collection"): temp.append({ 'value' : val['value'], 'text' : val['text'], 'selected' : (c == sre.sub("^[\s\-]*","", val['value'])) }) coll_selects.append(temp) coll_selects.append([{ 'value' : '', 'text' : '*** %s ***' % _("add another collection") }] + colls_nice) else: # we searched in CDSNAME, so print 'any collection' heading coll_selects.append([{ 'value' : '', 'text' : '*** %s ***' % _("any collection") }] + colls_nice) sort_formats = [{ 'value' : '', 'text' : _("latest first") }] query = """SELECT DISTINCT(f.code),f.name FROM field AS f, collection_field_fieldvalue AS cff WHERE cff.type='soo' AND cff.id_field=f.id ORDER BY cff.score DESC, f.name ASC""" res = run_sql(query) for code, name in res: sort_formats.append({ 'value' : code, 'text' : name, }) ## ranking methods ranks = [{ 'value' : '', 'text' : "- %s %s -" % (_("OR").lower (), _("rank by")), }] for (code, name) in get_bibrank_methods(get_colID(cc), ln): # propose found rank methods: ranks.append({ 'value' : code, 'text' : name, }) formats = [] query = """SELECT code,name FROM format ORDER BY name ASC""" res = run_sql(query) if res: # propose found formats: for code, name in res: formats.append({ 'value' : code, 'text' : name }) else: formats.append({'value' : 'hb', 'text' : _("HTML brief") }) return websearch_templates.tmpl_search_box( ln = ln, as = as, cc_intl = cc_intl, cc = cc, ot = ot, sp = sp, action = action, fieldslist = get_searchwithin_fields(ln = ln), f1 = f1, f2 = f2, f3 = f3, m1 = m1, m2 = m2, m3 = m3, p1 = p1, p2 = p2, p3 = p3, op1 = op1, op2 = op2, rm = rm, p = p, f = f, coll_selects = coll_selects, d1y = d1y, d2y = d2y, d1m = d1m, d2m = d2m, d1d = d1d, d2d = d2d, sort_formats = sort_formats, sf = sf, so = so, ranks = ranks, sc = sc, rg = rg, formats = formats, of = of, pl = pl, jrec = jrec, ec = ec, ) | 52e97757d0b9b7898bdc5d9d4e74647b1dbff5ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/52e97757d0b9b7898bdc5d9d4e74647b1dbff5ca/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3072,
67,
2147,
12,
952,
16,
645,
3251,
16,
293,
16,
284,
16,
14524,
16,
9033,
16,
1427,
16,
1694,
16,
6692,
16,
434,
16,
15835,
16,
487,
16,
7211,
16,
293,
21,
16,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3072,
67,
2147,
12,
952,
16,
645,
3251,
16,
293,
16,
284,
16,
14524,
16,
9033,
16,
1427,
16,
1694,
16,
6692,
16,
434,
16,
15835,
16,
487,
16,
7211,
16,
293,
21,
16,
284,
... |
print "%s" % tuple(ap.rate[line * 5 + rate_remainder - 1:]) | sys.stdout.write(ap.rate[line * 5 + rate_remainder - 1]) print | def print_scanning_results(wifi): try: results = wifi.scan() except IOError, (errno, strerror): print "%s" % (strerror, ) sys.exit(0) (num_channels, frequencies) = wifi.getChannelInfo() index = 1 for ap in results: print " Cell %02d - Address: %s" % (index, ap.bssid) print " ESSID:\"%s\"" % (ap.essid, ) print " Mode:%s" % (ap.mode, ) print " Frequency:%s %s (Channel: %d)" % \ (ap.frequency.getFrequency()[:5], ap.frequency.getFrequency()[5:], frequencies.index(ap.frequency.getFrequency()) + 1) print " Quality=%s/%s Signal level=%s/%s Noise level=%s/%s" % \ (ap.quality.quality, wifi.getQualityMax().quality, ap.quality.getSignallevel(), "100", ap.quality.getNoiselevel(), "100") #print " Encryption key:%s" % (ap.encode, ) if len(ap.rate) > 0: print " Bit Rates:", rate_lines = len(ap.rate) % 5 rate_remainder = len(ap.rate) - (rate_lines * 5) line = 0 while line < rate_lines: print "%s; %s; %s; %s; %s" % tuple(ap.rate[line * 5:(line * 5) + 5]) print " ", line = line + 1 print "%s; "*(rate_remainder - 1) % tuple(ap.rate[line * 5:line * 5 + rate_remainder - 1]), print "%s" % tuple(ap.rate[line * 5 + rate_remainder - 1:]) index = index + 1 | e6bea8a8b8a981b17d52677a8edf233dff4c3a77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/e6bea8a8b8a981b17d52677a8edf233dff4c3a77/pyiwlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1017,
10903,
67,
4717,
12,
91,
704,
4672,
775,
30,
1686,
273,
341,
704,
18,
9871,
1435,
1335,
8340,
16,
261,
19088,
16,
609,
1636,
4672,
1172,
2213,
87,
6,
738,
261,
701,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
1017,
10903,
67,
4717,
12,
91,
704,
4672,
775,
30,
1686,
273,
341,
704,
18,
9871,
1435,
1335,
8340,
16,
261,
19088,
16,
609,
1636,
4672,
1172,
2213,
87,
6,
738,
261,
701,
1... |
if mtime < os.path.getmtime (filename): | if os.path.exists (filename) and mtime < os.path.getmtime (filename): | def write (self, filename): | 04b5d6c23d0819c33f4f0af5c7664d151c661ba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4747/04b5d6c23d0819c33f4f0af5c7664d151c661ba5/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
261,
2890,
16,
1544,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
261,
2890,
16,
1544,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
target[key] = source[key] | target[key] = source[key] | def mergeEntry(target, source): for key in source: if not target.has_key(key): target[key] = source[key] | e3364bd2416dfe75fd85aeea0ded427372ef3d08 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/e3364bd2416dfe75fd85aeea0ded427372ef3d08/generator2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
1622,
12,
3299,
16,
1084,
4672,
364,
498,
316,
1084,
30,
309,
486,
1018,
18,
5332,
67,
856,
12,
856,
4672,
1018,
63,
856,
65,
273,
1084,
63,
856,
65,
282,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
1622,
12,
3299,
16,
1084,
4672,
364,
498,
316,
1084,
30,
309,
486,
1018,
18,
5332,
67,
856,
12,
856,
4672,
1018,
63,
856,
65,
273,
1084,
63,
856,
65,
282,
2,
-100,
-100,
-100,
... |
testPath = os.path.join("twisted", 'test') testFiles = ['server.pem', 'template.tpl'] | loreTestPath = os.path.join('twisted', 'lore', 'test') loreTestFiles = ['template.tpl'] webTestPath = os.path.join('twisted', 'web', 'test') webTestFiles = ['server.pem'] | def _detect_modules(self): """ Determine which extension modules we should build on this system. """ | 23c7ff5d98540aacf22ef4457fecfa52fff787c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/23c7ff5d98540aacf22ef4457fecfa52fff787c1/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16518,
67,
6400,
12,
2890,
4672,
3536,
10229,
1492,
2710,
4381,
732,
1410,
1361,
603,
333,
2619,
18,
3536,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
16518,
67,
6400,
12,
2890,
4672,
3536,
10229,
1492,
2710,
4381,
732,
1410,
1361,
603,
333,
2619,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
"Repository format version mismatch, expected version 0x%08x, but got 0x%08x" | __doc__ = "Repository format version mismatch, expected version 0x%08x, but got 0x%08x" | def __str__(self): return self.__doc__ %(self.args[0], self.args[1]) | 43ec45bd1519334fa54f35ea0dc700ba1d97d890 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/43ec45bd1519334fa54f35ea0dc700ba1d97d890/RepositoryError.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
365,
16186,
2434,
972,
8975,
2890,
18,
1968,
63,
20,
6487,
365,
18,
1968,
63,
21,
5717,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
327,
365,
16186,
2434,
972,
8975,
2890,
18,
1968,
63,
20,
6487,
365,
18,
1968,
63,
21,
5717,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) | return eval(maxima.eval("jacobi_sn(%s,%s)"%(float(x),float(m)))) | def jacobi(sym,x,m): r""" Here sym = "pq", where p,q in {c,d,n,s}. This returns the value of the Jacobi function pq(x,m), as described in the documentation for SAGE's "special" module. There are a total of 12 functions described by this. EXAMPLES: sage: jacobi("sn",1,1) 0.76159415595576485 sage: jacobi("cd",1,1/2) 0.72400972165937116 sage: jacobi("cn",1,1/2);jacobi("dn",1,1/2);jacobi("cn",1,1/2)/jacobi("dn",1,1/2) 0.59597656767214113 0.82316100163159622 0.72400972165937116 sage: jsn = lambda x: jacobi("sn",x,1) sage: P= plot(jsn,0,1) Now to view this, just type show(P). """ #R = x.parent() #y = R.gen() if sym=="dc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="nc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="sc": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="cd": return eval(maxima.eval("jacobi_cd(%s,%s)"%(RR(x),RR(m)))) if sym=="nd": return eval(maxima.eval("jacobi_nd(%s,%s)"%(RR(x),RR(m)))) if sym=="sd": return eval(maxima.eval("jacobi_sd(%s,%s)"%(RR(x),RR(m)))) if sym=="cn": return eval(maxima.eval("jacobi_cn(%s,%s)"%(RR(x),RR(m)))) if sym=="dn": return eval(maxima.eval("jacobi_dn(%s,%s)"%(RR(x),RR(m)))) if sym=="sn": return eval(maxima.eval("jacobi_sn(%s,%s)"%(RR(x),RR(m)))) if sym=="cs": return eval(maxima.eval("jacobi_cs(%s,%s)"%(RR(x),RR(m)))) if sym=="ds": return eval(maxima.eval("jacobi_ds(%s,%s)"%(RR(x),RR(m)))) if sym=="ns": return eval(maxima.eval("jacobi_ns(%s,%s)"%(RR(x),RR(m)))) return 1 | 9a0ab89f387827fef6f9118a65362ee1e0032bd5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/9a0ab89f387827fef6f9118a65362ee1e0032bd5/special.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20138,
30875,
12,
8117,
16,
92,
16,
81,
4672,
436,
8395,
13743,
5382,
273,
315,
84,
85,
3113,
1625,
293,
16,
85,
316,
288,
71,
16,
72,
16,
82,
16,
87,
5496,
1220,
1135,
326,
460,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20138,
30875,
12,
8117,
16,
92,
16,
81,
4672,
436,
8395,
13743,
5382,
273,
315,
84,
85,
3113,
1625,
293,
16,
85,
316,
288,
71,
16,
72,
16,
82,
16,
87,
5496,
1220,
1135,
326,
460,
4... |
if self._winamp.getRunning() == False: self.launchBackground() | self.launchBackground() self._logger.info("Adding \'"+filepath+"\' to playlist.") | def addTrack(self, filepath): if self._winamp.getRunning() == False: self.launchBackground() self._winamp.enqueue(filepath) | da886acbcc9c38f3930b9097dec2ddde85a2a568 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8545/da886acbcc9c38f3930b9097dec2ddde85a2a568/WinampWindows.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
4402,
12,
2890,
16,
3608,
4672,
365,
18,
20738,
8199,
1435,
365,
6315,
4901,
18,
1376,
2932,
13962,
521,
4970,
15,
10561,
9078,
3730,
358,
16428,
1199,
13,
365,
6315,
8082,
931,
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,
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,
527,
4402,
12,
2890,
16,
3608,
4672,
365,
18,
20738,
8199,
1435,
365,
6315,
4901,
18,
1376,
2932,
13962,
521,
4970,
15,
10561,
9078,
3730,
358,
16428,
1199,
13,
365,
6315,
8082,
931,
18,... |
self.log = logging.getLogger() | self.log = logging.getLogger( '%s.%s' % (__name__, self.__class__.__name__)) self.workingbranch_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '..')) self.build_dir = os.path.join(self.workingbranch_dir, 'build') if not os.path.isdir(self.build_dir): self.log.debug('Creating build dir: %s' % (self.build_dir,)) os.mkdir(self.build_dir) else: self.log.debug('Using build dir: %s' % (self.build_dir,)) | def __init__(self, buildversion, log=None): self.buildversion = buildversion if log is not None: self.log = log else: self.log = logging.getLogger() | 4f4741d8826978150a3c1338624b357d26b9d480 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3694/4f4741d8826978150a3c1338624b357d26b9d480/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1361,
1589,
16,
613,
33,
7036,
4672,
365,
18,
3510,
1589,
273,
1361,
1589,
309,
613,
353,
486,
599,
30,
365,
18,
1330,
273,
613,
469,
30,
365,
18,
1330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
1361,
1589,
16,
613,
33,
7036,
4672,
365,
18,
3510,
1589,
273,
1361,
1589,
309,
613,
353,
486,
599,
30,
365,
18,
1330,
273,
613,
469,
30,
365,
18,
1330... |
def write(s): | def write(self, s): | def write(s): pass | f25386ba8df1750e2b1a62d8ee8d933cd0930202 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/f25386ba8df1750e2b1a62d8ee8d933cd0930202/ShellEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
272,
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,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
272,
4672,
1342,
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... |
gX[i] = self.mag[i]*self.signlogsig(glX[i])''' | gX[i] = self.mag[i]*self.signlogsig(glX[i]) | def newEKF(self, glX): gX = glX '''for i in range(len(glX)): if(self.signed[i] > 0): | 34d4f09b039e70487059f0c0f57fcf51fdda7ac3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14739/34d4f09b039e70487059f0c0f57fcf51fdda7ac3/cwru_ekf_kalibrater_thrun2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
11325,
42,
12,
2890,
16,
5118,
60,
4672,
314,
60,
273,
5118,
60,
9163,
1884,
277,
316,
1048,
12,
1897,
12,
7043,
60,
3719,
30,
309,
12,
2890,
18,
5679,
63,
77,
65,
405,
374,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
11325,
42,
12,
2890,
16,
5118,
60,
4672,
314,
60,
273,
5118,
60,
9163,
1884,
277,
316,
1048,
12,
1897,
12,
7043,
60,
3719,
30,
309,
12,
2890,
18,
5679,
63,
77,
65,
405,
374,
4... |
def my_list2_clear(bt, li, *args, **kwargs): | def my_list2_clear(bt, li): | def my_list2_clear(bt, li, *args, **kwargs): li.clear() | ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12343/ef127faaba8fc06ebbb7bd48a4185405cdfc6a4e/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
1098,
22,
67,
8507,
12,
23602,
16,
4501,
4672,
4501,
18,
8507,
1435,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
67,
1098,
22,
67,
8507,
12,
23602,
16,
4501,
4672,
4501,
18,
8507,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
c= time.strptime(record.date_to,'%Y-%m-%d %H:%M:%S').tm_mday d= time.strptime(record.date_from,'%Y-%m-%d %H:%M:%S').tm_mday vals['duration']= (c-d) * 8 | epoch_c = time.mktime(time.strptime(record.date_to,'%Y-%m-%d %H:%M:%S')) epoch_d = time.mktime(time.strptime(record.date_from,'%Y-%m-%d %H:%M:%S')) diff_day = (epoch_c - epoch_d)/(3600*24) vals['duration']= (diff_day) * 8 | def check_holidays(self,cr,uid,ids): | b627bb2865e0fea455aa9adedc4fdb776787d9ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/b627bb2865e0fea455aa9adedc4fdb776787d9ba/hr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
76,
22999,
12,
2890,
16,
3353,
16,
1911,
16,
2232,
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,
... | [
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,
866,
67,
76,
22999,
12,
2890,
16,
3353,
16,
1911,
16,
2232,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
if self.page_title() == self.portal_title(): return u"<title>%s</title>" % ( escape(safe_unicode(self.portal_title()))) | portal_title = safe_unicode(self.portal_title()) page_title = safe_unicode(self.page_title()) if page_title == portal_title: return u"<title>%s</title>" % (escape(portal_title)) | def render(self): if self.page_title() == self.portal_title(): return u"<title>%s</title>" % ( escape(safe_unicode(self.portal_title()))) else: return u"<title>%s — %s</title>" % ( escape(safe_unicode(self.page_title())), escape(safe_unicode(self.portal_title()))) | 6eedac445f589988fe58bb007b34f9bdab05c597 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12185/6eedac445f589988fe58bb007b34f9bdab05c597/common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
11899,
67,
2649,
273,
4183,
67,
9124,
12,
2890,
18,
24386,
67,
2649,
10756,
1363,
67,
2649,
273,
4183,
67,
9124,
12,
2890,
18,
2433,
67,
2649,
10756,
309,
1363,
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,
1743,
12,
2890,
4672,
11899,
67,
2649,
273,
4183,
67,
9124,
12,
2890,
18,
24386,
67,
2649,
10756,
1363,
67,
2649,
273,
4183,
67,
9124,
12,
2890,
18,
2433,
67,
2649,
10756,
309,
1363,
6... |
extra += ' <td class="admintd">%s</td>\n' % (row, ) | extra += ' <td class="%s">%s</td>\n' % (align[0], firstrow) | def tupletotable(header=[], tuple=[], start='', end='', extracolumn=''): """create html table for a tuple. header - optional header for the columns tuple - create table of this start - text to be added in the beginning, most likely beginning of a form end - text to be added in the end, mot likely end of a form. extracolumn - mainly used to put in a button. """ tblstr = '' for h in header + ['']: tblstr += ' <th class="adminheader">%s</th>\n' % (h, ) if tblstr: tblstr = ' <tr>\n%s\n </tr>\n' % (tblstr, ) tblstr = start + '<table class="admin_wvar_nomargin">\n' + tblstr # extra column try: extra = '<tr>' row = tuple[0] if type(row) not in [int, long, str, dict]: for data in row: extra += '<td class="admintd">%s</td>\n' % (data,) else: extra += ' <td class="admintd">%s</td>\n' % (row, ) extra += '<td rowspan="%s" style="vertical-align: bottom">\n%s\n</td>\n</tr>\n' % (len(tuple), extracolumn) except IndexError: extra = '' tblstr += extra for row in tuple[1:]: tblstr += ' <tr>\n' if type(row) not in [int, long, str, dict]: for data in row: tblstr += '<td class="admintd">%s</td>\n' % (data,) else: tblstr += ' <td class="admintd">%s</td>\n' % (row, ) tblstr += ' </tr> \n' tblstr += '</table> \n ' tblstr += end return tblstr | d5c421bd0fb517578e6a485b6cc1f60455de2c85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/d5c421bd0fb517578e6a485b6cc1f60455de2c85/webaccessadmin_lib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
28325,
1469,
352,
429,
12,
3374,
22850,
6487,
3193,
22850,
6487,
787,
2218,
2187,
679,
2218,
2187,
7582,
1077,
355,
755,
2218,
11,
4672,
3536,
2640,
1729,
1014,
364,
279,
3193,
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,
28325,
1469,
352,
429,
12,
3374,
22850,
6487,
3193,
22850,
6487,
787,
2218,
2187,
679,
2218,
2187,
7582,
1077,
355,
755,
2218,
11,
4672,
3536,
2640,
1729,
1014,
364,
279,
3193,
18,
225,
... |
return filter(lambda arg: not arg.haschild('RibValue'), argList) | return filter(lambda arg: not arg.findall('RibValue'), argList) | def ribArgs(argList): return filter(lambda arg: not arg.haschild('RibValue'), argList) | 955727445029de8de2b01125125b85498dbc2345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11560/955727445029de8de2b01125125b85498dbc2345/codegenutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
495,
2615,
12,
3175,
682,
4672,
327,
1034,
12,
14661,
1501,
30,
486,
1501,
18,
4720,
454,
2668,
54,
495,
620,
19899,
1501,
682,
13,
225,
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,
436,
495,
2615,
12,
3175,
682,
4672,
327,
1034,
12,
14661,
1501,
30,
486,
1501,
18,
4720,
454,
2668,
54,
495,
620,
19899,
1501,
682,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
- ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyword arguments in the form ``renamed_option='existing_option'``. This will have the effect of renaming ``renamed_option`` so that the function only sees ``existing_option``. If both ``renamed_option`` and ``existing_option`` are passed to the function, ``existing_option`` | - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyword arguments in the form ``renamed_option='existing_option'``. This will have the effect of renaming ``renamed_option`` so that the function only sees ``existing_option``. If both ``renamed_option`` and ``existing_option`` are passed to the function, ``existing_option`` | def __init__(self, deprecated=None, **renames): """ A decorator which renames keyword arguments and optionally deprecates the new keyword. INPUT: - ``deprecated`` - If the option being renamed is deprecated, this is the Sage version where the deprecation initially occurs. - the rest of the arguments is a list of keyword arguments in the form ``renamed_option='existing_option'``. This will have the effect of renaming ``renamed_option`` so that the function only sees ``existing_option``. If both ``renamed_option`` and ``existing_option`` are passed to the function, ``existing_option`` will override the ``renamed_option`` value. EXAMPLES:: sage: from sage.plot.misc import rename_keyword sage: r = rename_keyword(color='rgbcolor') sage: r.renames {'color': 'rgbcolor'} sage: loads(dumps(r)).renames {'color': 'rgbcolor'} To deprecate an old keyword:: sage: r = rename_keyword(deprecated='Sage version 4.2', color='rgbcolor') """ self.renames = renames self.deprecated=deprecated | 6c16e91b11295f93fc8dd582603df7ad9451da5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6c16e91b11295f93fc8dd582603df7ad9451da5f/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
6849,
33,
7036,
16,
2826,
1187,
753,
4672,
3536,
432,
7367,
1492,
1654,
753,
4932,
1775,
471,
8771,
443,
4036,
815,
326,
394,
4932,
18,
225,
12943,
30,
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,
1001,
2738,
972,
12,
2890,
16,
6849,
33,
7036,
16,
2826,
1187,
753,
4672,
3536,
432,
7367,
1492,
1654,
753,
4932,
1775,
471,
8771,
443,
4036,
815,
326,
394,
4932,
18,
225,
12943,
30,
2... |
log( 'Changing channel | log( 'Changing channel | def on_itemEditChannel_activate(self, widget, *args): if self.active_channel == None: title = _('No channel selected') message = _('Please select a channel in the channels list to edit.') self.show_message( message, title) return gpc = Gpodderchannel( gpodderwindow = self.gPodder) result = gpc.edit_channel( self.active_channel) | 23cb5ce36adee0e52eb33fd99c9c1ead88cee6aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12778/23cb5ce36adee0e52eb33fd99c9c1ead88cee6aa/gpodder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1726,
4666,
2909,
67,
10014,
12,
2890,
16,
3604,
16,
380,
1968,
4672,
309,
365,
18,
3535,
67,
4327,
422,
599,
30,
2077,
273,
389,
2668,
2279,
1904,
3170,
6134,
883,
273,
389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
603,
67,
1726,
4666,
2909,
67,
10014,
12,
2890,
16,
3604,
16,
380,
1968,
4672,
309,
365,
18,
3535,
67,
4327,
422,
599,
30,
2077,
273,
389,
2668,
2279,
1904,
3170,
6134,
883,
273,
389,
... |
WglFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), (Pointer(GLint), "params")]), WglFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLdouble), "params")]), WglFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLdouble), "params")]), WglFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), WglFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLfloat), "params")]), WglFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLint), "params")]), WglFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), (Pointer(GLint), "params")]), | WglFunction(Void, "glGetProgramivARB", [(GLenum, "target"), (GLenum, "pname"), (OutPointer(GLint), "params")]), WglFunction(Void, "glGetVertexAttribdv", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]), WglFunction(Void, "glGetVertexAttribdvARB", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLdouble), "params")]), WglFunction(Void, "glGetVertexAttribfv", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), WglFunction(Void, "glGetVertexAttribfvARB", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLfloat), "params")]), WglFunction(Void, "glGetVertexAttribiv", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLint), "params")]), WglFunction(Void, "glGetVertexAttribivARB", [(GLuint, "index"), (GLenum, "pname"), (OutPointer(GLint), "params")]), | def get_true_pointer(self): ptype = self.pointer_type() pvalue = self.pointer_value() print ' if(!%s)' % (pvalue,) self.fail_impl() | 82b589b74a04ee43b7da197fd9dfa17e60ee6ca5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12828/82b589b74a04ee43b7da197fd9dfa17e60ee6ca5/opengl32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3767,
67,
10437,
12,
2890,
4672,
24203,
273,
365,
18,
10437,
67,
723,
1435,
293,
1132,
273,
365,
18,
10437,
67,
1132,
1435,
1172,
296,
565,
309,
12,
5,
9,
87,
2506,
738,
261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3767,
67,
10437,
12,
2890,
4672,
24203,
273,
365,
18,
10437,
67,
723,
1435,
293,
1132,
273,
365,
18,
10437,
67,
1132,
1435,
1172,
296,
565,
309,
12,
5,
9,
87,
2506,
738,
261... |
u = unicode(self.photo.title) | u = unicode(self._photo.title) | def GetTitle(self): """ Returns the title of the slide. """ u = unicode(self.photo.title) return u.encode("utf8", "replace") | 8b145ec3886f2560fe340a405ee784ce2a6775ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4583/8b145ec3886f2560fe340a405ee784ce2a6775ae/slideshowmodel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
4247,
12,
2890,
4672,
3536,
2860,
326,
2077,
434,
326,
12701,
18,
3536,
582,
273,
5252,
12,
2890,
6315,
17232,
18,
2649,
13,
327,
582,
18,
3015,
2932,
3158,
28,
3113,
315,
2079,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
968,
4247,
12,
2890,
4672,
3536,
2860,
326,
2077,
434,
326,
12701,
18,
3536,
582,
273,
5252,
12,
2890,
6315,
17232,
18,
2649,
13,
327,
582,
18,
3015,
2932,
3158,
28,
3113,
315,
2079,
7... |
host = hosts.create_host(hostname, user, port, | host = hosts.create_host(hostname, user=user, port=port, | def install(machine): hostname, user, passwd, port = parse_machine(machine, ssh_user, ssh_port, ssh_pass) host = hosts.create_host(hostname, user, port, initialize=False, password=passwd) host.machine_install() | d53df032188aa484d2b6a3dbce1b79577e00c3b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/d53df032188aa484d2b6a3dbce1b79577e00c3b5/server_job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
12,
9149,
4672,
5199,
16,
729,
16,
19093,
16,
1756,
273,
1109,
67,
9149,
12,
9149,
16,
7056,
67,
1355,
16,
7056,
67,
655,
16,
7056,
67,
5466,
13,
225,
1479,
273,
7206,
18,
2640... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3799,
12,
9149,
4672,
5199,
16,
729,
16,
19093,
16,
1756,
273,
1109,
67,
9149,
12,
9149,
16,
7056,
67,
1355,
16,
7056,
67,
655,
16,
7056,
67,
5466,
13,
225,
1479,
273,
7206,
18,
2640... |
P ( contents = [ | P ( contents = [ | def makePage( _T, _N, _M, MIRRORS_DATA, lang, charset ): navigation = Tree \ ( [ P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['home'], href=makeURL( '.', lang ))] ), Tree \ ( [ P ( contents = [ Img( src = '%(ROOT)simages/englishlogo.png', width = 16, height = 10), A( 'English', href='%(BASE)s.' )]), P ( contents = [ Img( src = '%(ROOT)simages/germanylogo.png', width = 16, height = 10), A( 'Deutsch', href='%(BASE)sde/' )]), P ( contents = [ Img( src = '%(ROOT)simages/greecelogo.png', width = 16, height = 10), A( 'Ελληυικά', href='%(BASE)sel/' )]), P ( contents = [ Img( src = '%(ROOT)simages/francelogo.png', width = 16, height = 10), A( 'Français', href='%(BASE)sfr/' )]), P ( contents = [ Img( src = '%(ROOT)simages/italylogo.png', width = 16, height = 10), A( 'Italiano', href='%(BASE)sit/' )]), P ( contents = [ Img( src = '%(ROOT)simages/netherlandslogo.png', width = 16, height = 10), A( 'Nederlands', href='%(BASE)snl/' )]), P ( contents = [ Img( src = '%(ROOT)simages/polandlogo.png', width = 16, height = 10), A( 'Polski', href='%(BASE)spl/' )]), P ( contents = [ Img( src = '%(ROOT)simages/portugallogo.png', width = 16, height = 10), A( 'Português', href='%(BASE)spt/' )]), P ( contents = [ Img( src = '%(ROOT)simages/russialogo.png', width = 16, height = 10), A( 'Русский', href='%(BASE)sru/' )]), P ( contents = [ Img( src = '%(ROOT)simages/spanishlogo.png', width = 16, height = 10), A( 'Español', href='%(BASE)ses/' )]), P ( contents = [ Img( src = '%(ROOT)simages/finlandlogo.png', width = 16, height = 10), A( 'Suomi', href='%(BASE)sfi/' )]), P ( contents = [ Img( src = '%(ROOT)simages/swedenlogo.png', width = 16, height = 10), A( 'Svenska', href='%(BASE)ssv/' )]), P ( contents = [ Img( src = '%(ROOT)simages/czechlogo.png', width = 16, height = 10), A( 'Česky', href='%(BASE)scs/' )]) ] ), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['news'], href=makeURL( 'news/', lang ) )]), Tree ( A( _N['archive'], href=makeURL( 'news/archive/', lang ) ) ), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['introduction'], href=makeURL( 'introduction/', lang ) ) ]), Tree \ ( [ #A( _N['status'], href=makeURL('introduction/status/everything.html' ), A( _N['screenshots'], href=makeURL( 'pictures/screenshots/', lang) ), A( _N['ports'], href=makeURL( 'introduction/ports', lang ) ), A( _N['license'], href='%(BASE)slicense.html' ) ] ), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['download'], href=makeURL( 'download', lang ) )]), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), _N['documentation'] ]), Tree \ ( [ A( _N['users'], href=makeURL( 'documentation/users/', lang ) ), Tree \ ( [ A( _N['installation'], href=makeURL( 'documentation/users/installation', lang ) ), A( _N['using'], href=makeURL( 'documentation/users/using', lang ) ), A( _N['shell'], href=makeURL( 'documentation/users/shell/index', lang ) ), A( _N['applications'], href=makeURL( 'documentation/users/applications/index', lang ) ), A( _N['faq'], href=makeURL( 'documentation/users/faq', lang ) ), #_N['ports'], #A( _N['links'], href=makeURL( 'documentation/users/links', lang ) ) ] ), A( _N['developers'], href=makeURL( 'documentation/developers/index', lang ) ), Tree \ ( [ A( _N['contribute'], href=makeURL( 'documentation/developers/contribute', lang ) ), A( 'Roadmap', href=makeURL( 'documentation/developers/roadmap', lang ) ), A( _N['bug-tracker'], href='http://sourceforge.net/tracker/?atid=439463&group_id=43586&func=browse' ), A( _N['working-with-subversion'], href=makeURL( 'documentation/developers/svn', lang ) ), A( _N['compiling'], href=makeURL( 'documentation/developers/compiling', lang ) ), A( _N['application-development-manual'], href=makeURL( 'documentation/developers/app-dev/index', lang ) ), A( _N['zune-application-development-manual'], href=makeURL( 'documentation/developers/zune-application-development', lang ) ), A( _N['system-development-manual'], href=makeURL( 'documentation/developers/system-development', lang ) ), A( _N['debugging-manual'], href=makeURL( 'documentation/developers/debugging', lang ) ), A( _N['reference'], href=makeURL( 'documentation/developers/autodocs/index', lang ) ), A( _N['specifications'], href=makeURL( 'documentation/developers/specifications/', lang ) ), A( _N['ui-style-guide'], href=makeURL( 'documentation/developers/ui', lang ) ), A( _N['documenting'], href=makeURL( 'documentation/developers/documenting', lang ) ), A( _N['porting'], href=makeURL( 'documentation/developers/porting', lang ) ), A( _N['translating'], href=makeURL( 'documentation/developers/translating', lang ) ), A( _N['summaries'], href=makeURL( 'documentation/developers/summaries/', lang ) ), A( _N['links'], href=makeURL( 'documentation/developers/links', lang ) ) ] ) ] ), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['contact'], href=makeURL( 'contact', lang ) )]), Tree \ ( [ A( _N['mailing-lists'], href=makeURL( 'contact', lang, 'mailing-lists' ) ), #A( _N['forums'], href=makeURL( 'contact', lang, 'forums' ) ), A( _N['irc-channels'], href=makeURL( 'contact', lang, 'irc-channels' ) ) ] ), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['credits'], href=makeURL( 'credits', lang ) )]), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( 'Acknowledgements', href=makeURL( 'acknowledgements', lang ) )]), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), _N['pictures']]), Tree \ ( [ A( _N['developers'], href=makeURL( 'pictures/developers/', lang ) ), A( _N['developers-together'], href=makeURL( 'pictures/developers-together/', lang ) ) ] ), BR(), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['sponsors'], href=makeURL( 'sponsors', lang ) )]), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['linking'], href=makeURL( 'linking', lang ) )]), P ( contents = [ Img( src = '%(ROOT)simages/pointer.png' ), A( _N['links'], href=makeURL( 'links', lang ) )]) ] ) counter = Img( src = 'http://www.hepe.com/cgi-bin/wwwcount.cgi?df=aros.dat&dd=E&ft=0' ) sponsors = Table\ ( cellspacing = 5, cellpadding = 0, contents = [ TR ( TD ( A ( Img( src = '%(ROOT)simages/trustec-small.png', border = 0 ), href = 'http://www.trustsec.de/' ) ) ), TR ( TD ( A ( Img( src = '%(ROOT)simages/genesi-small.gif', border = 0 ), href = 'http://www.pegasosppc.com/' ) ) ), TR ( TD ( A \ ( Img \ ( src = 'http://sflogo.sourceforge.net/sflogo.php?group_id=43586&type=1', width = 88, height = 31, border = 0, alt = 'SourceForge Logo' ), href = 'http://sourceforge.net/' ) ) ) ] ) bar = Table( border = 0, cellpadding = 2, cellspacing = 2, width = 171, valign = 'top', contents = [ TR( valign = 'top', contents = [ TD( rowspan = 8, width=15 ), TD() ] ), TR( valign = 'top', contents = TD( navigation ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = counter ) ), TR( TD(), height=15 ), TR( valign = 'top', contents = TD( align = 'center', contents = sponsors ) ), TR( TD(), height=30 ), TR \ ( valign = 'top', contents = TD \ ( align = 'center', contents = A \ ( Img \ ( src = '%(ROOT)simages/noeupatents-small.png', border = 0 ), href = 'http://petition.eurolinux.org/' ) ) ) ] ) statsPHP = ''' <?php //define("_BBC_PAGE_NAME", "my page title"); define("_BBCLONE_DIR", "%(ROOT)smybbclone/"); define("COUNTER", _BBCLONE_DIR."index.php"); if (file_exists(COUNTER)) include_once(COUNTER); ?> ''' statsPHP2 = ''' <?php echo date("m.d.y"); ?> ''' statsPHP3 = ''' <?php echo "<map name=\\"map\\">"; echo "<area shape=\\"rect\\" coords=\\"11,80,82,95\\" alt=\\"http://www.aros.org\\" href=\\"http://www.aros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"87,78,165,95\\" alt=\\"AROS-Exec\\" href=\\"http://www.aros-exec.org\\">"; echo "<area shape=\\"rect\\" coords=\\"244,77,323,95166,77,240,95\\" alt=\\"Team AROS\\" href=\\"http://www.teamaros.org\\">"; echo "<area shape=\\"rect\\" coords=\\"166,77,240,95\\" alt=\\"AROS-Exec Archives\\" href=\\"http://archives.aros-exec.org\\">"; echo "</map>"; ?> ''' statsPHP4 = ''' <?php echo "<table width=\\"100%%\\"><tr><td>"; echo "<div style=\\"text-align: right;\\">"; echo "<font color=\\"#aaaaaa\\">"; ?> ''' statsPHP6 = ''' <?php echo "</font></div>"; echo "</p></tr></td></table>"; ?> ''' statsPHP5= ''' <?php include( '/home/groups/a/ar/aros/htdocs/rsfeed/browserdetect.php'); $win_ie56 = (browser_detection('browser') == 'ie' ) && (browser_detection('number') >= 5 ) && (browser_detection('number') < 7 ); if ($win_ie56) { echo \"<img src=\\"/images/kittymascot.gif\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.gif\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } else { echo \"<img src=\\"/images/kittymascot.png\\" style=\\"float:right\\" border=\\"0\\"></img><img src=\\"/images/toplogomenu.png\\" border=\\"0\\" usemap=\\"#map\\"></img>"; } ?> ''' page = HTML( [ Head( [ Charset( charset ), Title( 'AROS Research Operating System' ), Link( href = '%(ROOT)saros.css', type = 'text/css', rel = 'stylesheet' ), Meta( name = 'keywords', content = 'AROS, OS, operating system, research, open source, portage' ) ] ), Body( style = 'margin: 0px;', bgcolor = '#ffffff', contents = [ statsPHP3, Table( border = 0, cellspacing = 0, cellpadding = 0, width = '100%%', contents = [ TR( [ TD( halign = 'top', width = '100%%', height = 109, background='%(ROOT)simages/backgroundtop.png' ,rowspan = 4, contents = statsPHP5) | 6f57d571cb5a191a538d1b271f46a3e100233a4d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4747/6f57d571cb5a191a538d1b271f46a3e100233a4d/page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1964,
12,
389,
56,
16,
389,
50,
16,
389,
49,
16,
490,
7937,
2784,
55,
67,
4883,
16,
3303,
16,
4856,
262,
30,
10394,
273,
4902,
521,
261,
306,
453,
261,
2939,
273,
306,
2221,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
1964,
12,
389,
56,
16,
389,
50,
16,
389,
49,
16,
490,
7937,
2784,
55,
67,
4883,
16,
3303,
16,
4856,
262,
30,
10394,
273,
4902,
521,
261,
306,
453,
261,
2939,
273,
306,
2221,
... |
def open(self, url, new=1): | def open(self, url, new=1, autoraise=1): | def open(self, url, new=1): # XXX Currently I know no way to prevent KFM from opening a new win. self._remote("openURL %s" % url) | cfa4096618650f6317c8872b8cbe7daaf90ccb03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/cfa4096618650f6317c8872b8cbe7daaf90ccb03/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
21,
16,
2059,
10610,
784,
33,
21,
4672,
468,
11329,
15212,
467,
5055,
1158,
4031,
358,
5309,
1475,
42,
49,
628,
10890,
279,
394,
5657,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
21,
16,
2059,
10610,
784,
33,
21,
4672,
468,
11329,
15212,
467,
5055,
1158,
4031,
358,
5309,
1475,
42,
49,
628,
10890,
279,
394,
5657,
18,
365,
... |
got = tb.as_data_dict_for_bug_object() | got = tb.as_data_dict_for_bug_object(tracbug_tests_extract_tracker_specific_data) | def test_create_bug_object_data_dict_more_recent(self, m): m.return_value = { 'branch': '', 'branch_author': '', 'cc': 'thijs_ exarkun', 'component': 'core', 'description': "This package hasn't been touched in 4 years which either means it's stable or not being used at all. Let's deprecate it (also see #4111).", 'id': '4298', 'keywords': 'easy', 'launchpad_bug': '', 'milestone': '', 'owner': 'djfroofy', 'priority': 'normal', 'reporter': 'thijs', 'resolution': '', 'status': 'new', 'summary': 'Deprecate twisted.persisted.journal', 'type': 'task'} tb = mysite.customs.bugtrackers.trac.TracBug( bug_id=4298, BASE_URL='http://twistedmatrix.com/trac/', bitesized_keyword='easy') cached_html_filename = os.path.join(settings.MEDIA_ROOT, 'sample-data', 'twisted-trac-4298-on-2010-04-02.html') tb._bug_html_page = unicode( open(cached_html_filename).read(), 'utf-8') self.assertEqual(tb.component, 'core') | b26a024a65e2e84149f3e8a313e7dc626cc32725 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/b26a024a65e2e84149f3e8a313e7dc626cc32725/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2640,
67,
925,
67,
1612,
67,
892,
67,
1576,
67,
10161,
67,
20872,
12,
2890,
16,
312,
4672,
312,
18,
2463,
67,
1132,
273,
288,
296,
7500,
4278,
10226,
296,
7500,
67,
4161,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2640,
67,
925,
67,
1612,
67,
892,
67,
1576,
67,
10161,
67,
20872,
12,
2890,
16,
312,
4672,
312,
18,
2463,
67,
1132,
273,
288,
296,
7500,
4278,
10226,
296,
7500,
67,
4161,
4... |
return SubmitOpCode(op, cl=cl, feedback_fn=feedback_fn) | return SubmitOpCode(op, cl=cl, feedback_fn=feedback_fn, opts=opts) def SetGenericOpcodeOpts(opcode_list, options): """Processor for generic options. This function updates the given opcodes based on generic command line options (like debug, dry-run, etc.). @param opcode_list: list of opcodes @param options: command line options or None @return: None (in-place modification) """ if not options: return for op in opcode_list: op.dry_run = options.dry_run op.debug_level = options.debug | def SubmitOrSend(op, opts, cl=None, feedback_fn=None): """Wrapper around SubmitOpCode or SendJob. This function will decide, based on the 'opts' parameter, whether to submit and wait for the result of the opcode (and return it), or whether to just send the job and print its identifier. It is used in order to simplify the implementation of the '--submit' option. It will also add the dry-run parameter from the options passed, if true. """ if opts and opts.dry_run: op.dry_run = opts.dry_run if opts and opts.submit_only: job_id = SendJob([op], cl=cl) raise JobSubmittedException(job_id) else: return SubmitOpCode(op, cl=cl, feedback_fn=feedback_fn) | 293ba2d8b9a8303b4dd82c0f71aa3fe3e243c52c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/293ba2d8b9a8303b4dd82c0f71aa3fe3e243c52c/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17320,
1162,
3826,
12,
556,
16,
1500,
16,
927,
33,
7036,
16,
10762,
67,
4293,
33,
7036,
4672,
3536,
3611,
6740,
17320,
3817,
1085,
578,
2479,
2278,
18,
225,
1220,
445,
903,
16288,
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,
17320,
1162,
3826,
12,
556,
16,
1500,
16,
927,
33,
7036,
16,
10762,
67,
4293,
33,
7036,
4672,
3536,
3611,
6740,
17320,
3817,
1085,
578,
2479,
2278,
18,
225,
1220,
445,
903,
16288,
16,
... |
existed = sectdict.has_key(key) | existed = sectdict.has_key(option) | def remove_option(self, section, option): """Remove an option.""" if not section or section == "DEFAULT": sectdict = self.__defaults else: try: sectdict = self.__sections[section] except KeyError: raise NoSectionError(section) existed = sectdict.has_key(key) if existed: del sectdict[key] return existed | 27409c95b33b971c499c359698bbd01a7181f64b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/27409c95b33b971c499c359698bbd01a7181f64b/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
3288,
392,
1456,
12123,
309,
486,
2442,
578,
2442,
422,
315,
5280,
6877,
29140,
1576,
273,
365,
16186,
7606,
469,
30,
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,
1206,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
3288,
392,
1456,
12123,
309,
486,
2442,
578,
2442,
422,
315,
5280,
6877,
29140,
1576,
273,
365,
16186,
7606,
469,
30,
775,
30,
... |
self.assertEqual(zlib.crc32(foo), 2486878355) | self.assertEqual(zlib.crc32(foo), -1808088941) | def test_crc32_adler32_unsigned(self): foo = 'abcdefghijklmnop' # explicitly test signed behavior self.assertEqual(zlib.crc32(foo), 2486878355) self.assertEqual(zlib.crc32('spam'), 1138425661) self.assertEqual(zlib.adler32(foo+foo), 3573550353) self.assertEqual(zlib.adler32('spam'), 72286642) | 6bbdcc9659ec1638c0a4d5d5a513fd0eba8ae861 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/6bbdcc9659ec1638c0a4d5d5a513fd0eba8ae861/test_zlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22988,
1578,
67,
361,
749,
1578,
67,
22297,
12,
2890,
4672,
8431,
273,
296,
28953,
17680,
8302,
16391,
13607,
556,
11,
468,
8122,
1842,
6726,
6885,
365,
18,
11231,
5812,
12,
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,
1842,
67,
22988,
1578,
67,
361,
749,
1578,
67,
22297,
12,
2890,
4672,
8431,
273,
296,
28953,
17680,
8302,
16391,
13607,
556,
11,
468,
8122,
1842,
6726,
6885,
365,
18,
11231,
5812,
12,
94... |
sqlJobP = "SELECT jobParameters FROM ATLAS_PANDA.jobParamsTable WHERE PandaID=:PandaID" | jobParamTableName = re.sub('jobsArchived','jobParamsTable_ARCH',table) sqlJobP = "SELECT jobParameters FROM %s WHERE PandaID=:PandaID" % jobParamTableName | def peekJobLog(self,pandaID): comment = ' /* DBProxy.peekJobLog */' _logger.debug("peekJob : %s" % pandaID) # return None for NULL PandaID if pandaID in ['NULL','','None',None]: return None sql1_0 = "SELECT %s FROM %s " sql1_1 = "WHERE PandaID=:PandaID AND modificationTime>(CURRENT_DATE-30) " # select varMap = {} varMap[':PandaID'] = pandaID nTry=3 for iTry in range(nTry): try: # get list of archived tables tables = self.getArchiveTables() # select for table in tables: # start transaction self.conn.begin() # select sql = sql1_0 % (JobSpec.columnNames(),table) + sql1_1 self.cur.arraysize = 10 self.cur.execute(sql+comment, varMap) res = self.cur.fetchall() # commit if not self._commit(): raise RuntimeError, 'Commit error' if len(res) != 0: # Job job = JobSpec() job.pack(res[0]) # Files # start transaction self.conn.begin() # select fileTableName = re.sub('jobsArchived','filesTable',table) sqlFile = "SELECT %s " % FileSpec.columnNames() sqlFile+= "FROM %s " % fileTableName sqlFile+= "WHERE PandaID=:PandaID" self.cur.arraysize = 10000 self.cur.execute(sqlFile+comment, varMap) resFs = self.cur.fetchall() # metadata job.metadata = None sqlMeta = "SELECT metaData FROM ATLAS_PANDA.metaTable WHERE PandaID=:PandaID" self.cur.execute(sqlMeta+comment, varMap) for clobMeta, in self.cur: job.metadata = clobMeta.read() break # job parameters job.jobParameters = None sqlJobP = "SELECT jobParameters FROM ATLAS_PANDA.jobParamsTable WHERE PandaID=:PandaID" varMap = {} varMap[':PandaID'] = job.PandaID self.cur.execute(sqlJobP+comment, varMap) for clobJobP, in self.cur: job.jobParameters = clobJobP.read() break # commit if not self._commit(): raise RuntimeError, 'Commit error' # set files for resF in resFs: file = FileSpec() file.pack(resF) job.addFile(file) return job _logger.debug("peekJobLog() : PandaID %s not found" % pandaID) return None except: # roll back self._rollback() if iTry+1 < nTry: _logger.error("peekJobLog : %s %s %s" % (pandaID,type,value)) time.sleep(random.randint(10,20)) continue type, value, traceBack = sys.exc_info() _logger.error("peekJobLog : %s %s" % (type,value)) # return None return None | 23213e61ab8dd53c22fecb26ec5cecc346fd3333 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/23213e61ab8dd53c22fecb26ec5cecc346fd3333/OraDBProxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8032,
2278,
1343,
12,
2890,
16,
84,
464,
69,
734,
4672,
2879,
273,
296,
1748,
2383,
3886,
18,
347,
3839,
2278,
1343,
1195,
11,
389,
4901,
18,
4148,
2932,
347,
3839,
2278,
294,
738,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8032,
2278,
1343,
12,
2890,
16,
84,
464,
69,
734,
4672,
2879,
273,
296,
1748,
2383,
3886,
18,
347,
3839,
2278,
1343,
1195,
11,
389,
4901,
18,
4148,
2932,
347,
3839,
2278,
294,
738,
87,... |
normalizedWeight=normalizeWeight(value,weightLimits) | normalizedWeight=normalizeValue(value,weightLimits) | def setEdgeWidth(value,weightLimits,minwidth,maxwidth): # Transforms edge weights to widths in the range (minwidth,maxwidth). # If given minwidth and maxwidth are the same, simply use that given width. if not(weightLimits[0]-weightLimits[1])==0: normalizedWeight=normalizeWeight(value,weightLimits) # normalizes the weight linearly to the range (0,1) width=minwidth+normalizedWeight*(maxwidth-minwidth) # transforms the normalized weight linearly to the range (minwidth,maxwidth) else: width=minwidth # if given minwidth and maxwidth are the same, simply use that width return width | 1b046154581ac107eda7faef67d10c4c19528a4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/768/1b046154581ac107eda7faef67d10c4c19528a4c/visuals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
6098,
2384,
12,
1132,
16,
4865,
12768,
16,
1154,
2819,
16,
1896,
2819,
4672,
468,
2604,
9741,
3591,
5376,
358,
15801,
316,
326,
1048,
225,
261,
1154,
2819,
16,
1896,
2819,
2934,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
6098,
2384,
12,
1132,
16,
4865,
12768,
16,
1154,
2819,
16,
1896,
2819,
4672,
468,
2604,
9741,
3591,
5376,
358,
15801,
316,
326,
1048,
225,
261,
1154,
2819,
16,
1896,
2819,
2934,
468... |
assert status == 0x100 | exitstatus = os.WEXITSTATUS(status) assert exitstatus != 0 | def run(): maker = su.SuProxyMaker( 'Need to become root to test this module.') yield maker.blocker root = maker.get_root() | 85c9953b0f04e63a0ea0812a82c796505bc2ea6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4591/85c9953b0f04e63a0ea0812a82c796505bc2ea6b/testsu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
312,
6388,
273,
1597,
18,
17072,
3886,
12373,
12,
296,
14112,
358,
12561,
1365,
358,
1842,
333,
1605,
1093,
13,
2824,
312,
6388,
18,
2629,
264,
1365,
273,
312,
6388,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
312,
6388,
273,
1597,
18,
17072,
3886,
12373,
12,
296,
14112,
358,
12561,
1365,
358,
1842,
333,
1605,
1093,
13,
2824,
312,
6388,
18,
2629,
264,
1365,
273,
312,
6388,
18,
588... |
'verify': options.verify } | 'verify': options.verify or __debug__ } | def initRepository(directory, options): repository = DBRepository(directory) kwds = { 'stderr': options.stderr, 'ramdb': options.ramdb, 'create': True, 'recover': options.recover, 'exclusive': True, 'refcounted': True, 'logged': not not options.logging, 'verify': options.verify } if options.restore: kwds['restore'] = options.restore while True: try: if options.encrypt: from getpass import getpass kwds['password'] = getpass("password> ") if options.create: repository.create(**kwds) else: repository.open(**kwds) except RepositoryPasswordError, e: if options.encrypt: print e.args[0] else: options.encrypt = True continue except RepositoryVersionError: repository.close() raise else: del kwds break view = repository.view if not view.getRoot("Packs").hasChild("Chandler"): view.loadPack("repository/packs/chandler.pack") return view | 6f142f461ebb1fc8a240ff72ddbf9b539c50ff75 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6f142f461ebb1fc8a240ff72ddbf9b539c50ff75/Utility.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
3305,
12,
5149,
16,
702,
4672,
225,
3352,
273,
2383,
3305,
12,
5149,
13,
225,
17149,
273,
288,
296,
11241,
4278,
702,
18,
11241,
16,
296,
1940,
1966,
4278,
702,
18,
1940,
1966,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1208,
3305,
12,
5149,
16,
702,
4672,
225,
3352,
273,
2383,
3305,
12,
5149,
13,
225,
17149,
273,
288,
296,
11241,
4278,
702,
18,
11241,
16,
296,
1940,
1966,
4278,
702,
18,
1940,
1966,
1... |
def _internal_poll(self, _deadstate=None): | def _internal_poll(self, _deadstate=None, _WaitForSingleObject=WaitForSingleObject, _WAIT_OBJECT_0=WAIT_OBJECT_0, _GetExitCodeProcess=GetExitCodeProcess): | def _internal_poll(self, _deadstate=None): """Check if child process has terminated. Returns returncode attribute.""" if self.returncode is None: if(_subprocess.WaitForSingleObject(self._handle, 0) == _subprocess.WAIT_OBJECT_0): self.returncode = _subprocess.GetExitCodeProcess(self._handle) return self.returncode | 3e77f45be7d91ffd1e8dba1d604782652eb3b659 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/3e77f45be7d91ffd1e8dba1d604782652eb3b659/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7236,
67,
13835,
12,
2890,
16,
389,
22097,
2019,
33,
7036,
16,
389,
29321,
5281,
921,
33,
29321,
5281,
921,
16,
389,
19046,
67,
9422,
67,
20,
33,
19046,
67,
9422,
67,
20,
16,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7236,
67,
13835,
12,
2890,
16,
389,
22097,
2019,
33,
7036,
16,
389,
29321,
5281,
921,
33,
29321,
5281,
921,
16,
389,
19046,
67,
9422,
67,
20,
33,
19046,
67,
9422,
67,
20,
16,
38... |
"""Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (self, see the tix_addbitmapdir command above). By using tix_getbitmap, you can advoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. | """Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (see the tix_addbitmapdir command above). By using tix_getbitmap, you can avoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. | def tix_getbitmap(self, name): """Locates a bitmap file of the name name.xpm or name in one of the bitmap directories (self, see the tix_addbitmapdir command above). By using tix_getbitmap, you can advoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. """ return self.tk.call('tix', 'getbitmap', name) | 723293cb49f479a41dc893d72c2d6502587d52cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/723293cb49f479a41dc893d72c2d6502587d52cb/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
697,
67,
588,
3682,
1458,
12,
2890,
16,
508,
4672,
3536,
1333,
815,
279,
9389,
585,
434,
326,
508,
508,
18,
92,
7755,
578,
508,
316,
1245,
434,
326,
9389,
6402,
261,
5946,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
697,
67,
588,
3682,
1458,
12,
2890,
16,
508,
4672,
3536,
1333,
815,
279,
9389,
585,
434,
326,
508,
508,
18,
92,
7755,
578,
508,
316,
1245,
434,
326,
9389,
6402,
261,
5946,
326,
... |
self.sql_log_model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) | self.sql_log_model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) | def __init__(self): #~ self.read_query( | 7dda6efe0ce5eb9252a0950001c0288c1a84bb9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8147/7dda6efe0ce5eb9252a0950001c0288c1a84bb9f/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
468,
98,
365,
18,
896,
67,
2271,
12,
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,
1001,
2738,
972,
12,
2890,
4672,
468,
98,
365,
18,
896,
67,
2271,
12,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
d2[hit[6]] = r | signature = hit[6].encode('ascii','ignore') d2[signature] = r | def create_channel_query_reply(self,id,hits): d = {} d['id'] = id d2 = {} for hit in hits: r = {} r['publisher_id'] = hit[0] r['publisher_name'] = hit[1] r['infohash'] = hit[2] r['torrenthash'] = hit[3] r['torrentname'] = hit[4] r['time_stamp'] = hit[5] # hit[6]: signature, which is unique for any torrent published by a user d2[hit[6]] = r d['a'] = d2 return bencode(d) | 32dd328def9431eb7334c38960d11f3917fe3675 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/32dd328def9431eb7334c38960d11f3917fe3675/RemoteQueryMsgHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4327,
67,
2271,
67,
10629,
12,
2890,
16,
350,
16,
15173,
4672,
302,
273,
2618,
302,
3292,
350,
3546,
273,
612,
302,
22,
273,
2618,
364,
6800,
316,
11076,
30,
436,
273,
2618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4327,
67,
2271,
67,
10629,
12,
2890,
16,
350,
16,
15173,
4672,
302,
273,
2618,
302,
3292,
350,
3546,
273,
612,
302,
22,
273,
2618,
364,
6800,
316,
11076,
30,
436,
273,
2618,
... |
self.title = feed.feed.get('title', self.url) | self.title = re.sub('\s+', ' ', feed.feed.get('title', self.url)) | def _consume_updated_feed(self, feed, max_episodes=0, mimetype_prefs=''): self.parse_error = feed.get('bozo_exception', None) | 83a6f36e28862d83be65dfb388acf6020748c492 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/83a6f36e28862d83be65dfb388acf6020748c492/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
21224,
67,
7007,
67,
7848,
12,
2890,
16,
4746,
16,
943,
67,
881,
27134,
33,
20,
16,
12595,
67,
1484,
2556,
2218,
11,
4672,
365,
18,
2670,
67,
1636,
273,
4746,
18,
588,
2668,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
21224,
67,
7007,
67,
7848,
12,
2890,
16,
4746,
16,
943,
67,
881,
27134,
33,
20,
16,
12595,
67,
1484,
2556,
2218,
11,
4672,
365,
18,
2670,
67,
1636,
273,
4746,
18,
588,
2668,
107... |
fieldname = 'sf', | fieldname = 'rm', | def create_rankoptions(self, ln=CFG_SITE_LANG): "Produces 'Rank options' portal box." | 46ea15dd64530ffd61013886d1d335fb273217d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2139/46ea15dd64530ffd61013886d1d335fb273217d5/websearch_webcoll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
11500,
2116,
12,
2890,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
315,
27291,
296,
12925,
702,
11,
11899,
3919,
1199,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
11500,
2116,
12,
2890,
16,
7211,
33,
19727,
67,
20609,
67,
10571,
4672,
315,
27291,
296,
12925,
702,
11,
11899,
3919,
1199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
xsd = 'xsd' wsdl = 'wsdl' soap = 'soap' soapenc = 'soapenc' mime = 'mime' http = 'http' | def __str__(self): XMLBase.__rlock.acquire() XMLBase.__indent += 1 tmp = "<" + str(self.__class__) + '>\n' for k,v in self.__dict__.items(): tmp += "%s* %s = %s\n" %(XMLBase.__indent*' ', k, v) XMLBase.__indent -= 1 XMLBase.__rlock.release() return tmp | e50368f02a007b522df43404acf761191b9356f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/e50368f02a007b522df43404acf761191b9356f0/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
3167,
2171,
16186,
86,
739,
18,
1077,
1039,
1435,
3167,
2171,
16186,
9355,
1011,
404,
1853,
273,
18165,
397,
609,
12,
2890,
16186,
1106,
972,
13,
397,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
3167,
2171,
16186,
86,
739,
18,
1077,
1039,
1435,
3167,
2171,
16186,
9355,
1011,
404,
1853,
273,
18165,
397,
609,
12,
2890,
16186,
1106,
972,
13,
397,
296... | |
if count < 100: continue | if count > 100: break | def createDeviceModel(self, restore = False): if self.device_model is None: return if self.pid: return # Execute device model. #todo: Error handling args = self.getDeviceModelArgs(restore) env = dict(os.environ) if self.display: env['DISPLAY'] = self.display if self.xauthority: env['XAUTHORITY'] = self.xauthority unique_id = "%i-%i" % (self.vm.getDomid(), time.time()) sentinel_path = sentinel_path_prefix + unique_id sentinel_path_fifo = sentinel_path + '.fifo' os.mkfifo(sentinel_path_fifo, 0600) sentinel_write = file(sentinel_path_fifo, 'r+') self._openSentinel(sentinel_path_fifo) self.vm.storeDom("image/device-model-fifo", sentinel_path_fifo) xstransact.Mkdir("/local/domain/0/device-model/%i" % self.vm.getDomid()) xstransact.SetPermissions("/local/domain/0/device-model/%i" % self.vm.getDomid(), { 'dom': self.vm.getDomid(), 'read': True, 'write': True }) log.info("spawning device models: %s %s", self.device_model, args) # keep track of pid and spawned options to kill it later | be016c846d7f99b0aae1ef436f49246d85685052 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6195/be016c846d7f99b0aae1ef436f49246d85685052/image.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3654,
1488,
12,
2890,
16,
5217,
273,
1083,
4672,
309,
365,
18,
5964,
67,
2284,
353,
599,
30,
327,
309,
365,
18,
6610,
30,
327,
468,
7903,
2346,
938,
18,
468,
9012,
30,
1068,
505... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3654,
1488,
12,
2890,
16,
5217,
273,
1083,
4672,
309,
365,
18,
5964,
67,
2284,
353,
599,
30,
327,
309,
365,
18,
6610,
30,
327,
468,
7903,
2346,
938,
18,
468,
9012,
30,
1068,
505... |
global dbmodule, connect, make_connect_string, do_commit, sane_rowcount, dialect | global dbmodule, connect, make_connect_string, do_commit, sane_rowcount, dialect, colspecs, ischema_names | def use_adodbapi(): global dbmodule, connect, make_connect_string, do_commit, sane_rowcount, dialect import adodbapi as dbmodule # ADODBAPI has a non-standard Connection method connect = dbmodule.Connection make_connect_string = lambda keys: \ [["Provider=SQLOLEDB;Data Source=%s;User Id=%s;Password=%s;Initial Catalog=%s" % ( keys.get("host"), keys.get("user"), keys.get("password"), keys.get("database"))], {}] sane_rowcount = True dialect = MSSQLDialect | fc53d244b74c32d68c7144bd7a419f16ec528d52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/fc53d244b74c32d68c7144bd7a419f16ec528d52/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
999,
67,
361,
10605,
2425,
13332,
2552,
1319,
2978,
16,
3077,
16,
1221,
67,
3612,
67,
1080,
16,
741,
67,
7371,
16,
30426,
67,
492,
1883,
16,
10864,
16,
645,
15115,
16,
353,
1243,
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,
999,
67,
361,
10605,
2425,
13332,
2552,
1319,
2978,
16,
3077,
16,
1221,
67,
3612,
67,
1080,
16,
741,
67,
7371,
16,
30426,
67,
492,
1883,
16,
10864,
16,
645,
15115,
16,
353,
1243,
67,
... |
return None | overrides_file = self.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt') if os.path.exists(overrides_file): return file(overrides_file, "r").read() else: return None | def test_expectations_overrides(self): # FIXME: uncomment this when we're convinced the upstream code # is working. #overrides_file = self.path_from_chromium_base('webkit', 'tools', # 'layout_tests', 'test_expectations.txt') #if os.path.exists(overrides_file): # return file(overrides_file, "r").read() #else: # return None return None | 0b991d23c6081ba45928989966f2f4f1ecb758ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/0b991d23c6081ba45928989966f2f4f1ecb758ed/chromium.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12339,
1012,
67,
19775,
12,
2890,
4672,
468,
9852,
30,
12704,
475,
333,
1347,
732,
4565,
6292,
2410,
72,
326,
13505,
981,
468,
353,
5960,
18,
468,
19775,
67,
768,
273,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12339,
1012,
67,
19775,
12,
2890,
4672,
468,
9852,
30,
12704,
475,
333,
1347,
732,
4565,
6292,
2410,
72,
326,
13505,
981,
468,
353,
5960,
18,
468,
19775,
67,
768,
273,
365,
1... |
return self.__parents | return _output_lines('git-rev-list --parents --max-count=1 %s' % self.__id_hash)[0].split()[1:] | def get_parents(self): return self.__parents | 2406f7d16cad24d396b3e8ea5605813f4011b5a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/2406f7d16cad24d396b3e8ea5605813f4011b5a6/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12606,
12,
2890,
4672,
327,
365,
16186,
12606,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12606,
12,
2890,
4672,
327,
365,
16186,
12606,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
i = M.rfind('[C\x1b[C\n') if i != -1: M = M[i+len('[C\x1b[C\n'):] x.append(M) | if UNAME == 'Darwin': phrase = L else: phrase = '[C\x1b[C\n' i = M.rfind(phrase) if i > 1: M = M[i+len(phrase):] x.append(M.strip()) | def eval(self, code, strip=True): self._synchronize() code = str(code) code = code.strip() code = code.replace('\n',' ') x = [] for L in code.split('\n'): if L != '': try: s = self.__in_seq + 1 pr = '\[%s\]>'%s #M = self._eval_line(L, wait_for_prompt=pr) M = self._eval_line(L, wait_for_prompt=self._prompt) i = M.rfind('[C\x1b[C\n') if i != -1: M = M[i+len('[C\x1b[C\n'):] x.append(M) self.__in_seq = s except KeyboardInterrupt: self._keyboard_interrupt() except TypeError, s: return 'error evaluating "%s":\n%s'%(code,s) return '\n'.join(x) | 9ac4706a0b4cd0a6e019becdabbf831b2676dc4f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9ac4706a0b4cd0a6e019becdabbf831b2676dc4f/lisp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
981,
16,
2569,
33,
5510,
4672,
365,
6315,
87,
2600,
554,
1435,
981,
273,
609,
12,
710,
13,
981,
273,
981,
18,
6406,
1435,
981,
273,
981,
18,
2079,
2668,
64,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5302,
12,
2890,
16,
981,
16,
2569,
33,
5510,
4672,
365,
6315,
87,
2600,
554,
1435,
981,
273,
609,
12,
710,
13,
981,
273,
981,
18,
6406,
1435,
981,
273,
981,
18,
2079,
2668,
64,
82,
... |
self.load_autostart(group, key, check) check.connect("toggled", self.autostart_changed, (group, key)) self.client.notify_add(group, key, self.reload_autostart, check) def load_autostart(self, group, key, check): check.set_active(self.client.get_bool(group, key)) | self.load_autostart(check) check.connect("toggled", self.autostart_changed) def load_autostart(self, check): autostart_file = self.get_autostart_file_path() check.set_active(os.path.isfile(autostart_file)) | def setup_autostart(self, group, key, check): """sets up checkboxes""" self.load_autostart(group, key, check) check.connect("toggled", self.autostart_changed, (group, key)) self.client.notify_add(group, key, self.reload_autostart, check) | 578e7de85087a2fe2729d8795d24467d6202461a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/578e7de85087a2fe2729d8795d24467d6202461a/awnPreferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
5854,
669,
485,
12,
2890,
16,
1041,
16,
498,
16,
866,
4672,
3536,
4424,
731,
11832,
281,
8395,
365,
18,
945,
67,
5854,
669,
485,
12,
1655,
16,
498,
16,
866,
13,
866,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
5854,
669,
485,
12,
2890,
16,
1041,
16,
498,
16,
866,
4672,
3536,
4424,
731,
11832,
281,
8395,
365,
18,
945,
67,
5854,
669,
485,
12,
1655,
16,
498,
16,
866,
13,
866,
18,
... |
self.save(sage.misc.misc.SAGE_TMP + '/test.png', | self.save(DOCTEST_MODE_FILE, | def show(self, filename=None, dpi=DEFAULT_DPI, figsize=DEFAULT_FIGSIZE, axes = None, **args): r""" Show this graphics array using the default viewer. | a871eb6e7b9b9c77e30c4e96bcbc3975003ca111 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a871eb6e7b9b9c77e30c4e96bcbc3975003ca111/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
12,
2890,
16,
1544,
33,
7036,
16,
16361,
33,
5280,
67,
40,
1102,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
6515,
273,
599,
16,
2826,
1968,
4672,
436,
8395,
9674,
333,
17313,
526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2405,
12,
2890,
16,
1544,
33,
7036,
16,
16361,
33,
5280,
67,
40,
1102,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
6515,
273,
599,
16,
2826,
1968,
4672,
436,
8395,
9674,
333,
17313,
526,
... |
def showAllData(ec2Data): api_ver = '2008-02-01' metadata = None base_url = 'http://169.254.169.254/%s/meta-data' % api_ver | def getAllData(ec2Data): | def showAllData(ec2Data): api_ver = '2008-02-01' metadata = None base_url = 'http://169.254.169.254/%s/meta-data' % api_ver for x in ec2Data: data = urllib.urlopen('%s/%s' %(base_url,x)).read() print "%s: %s" %(ec2data,data) | 7fc548cf64af5a6a6d3b1b56a8147995102bf6e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7197/7fc548cf64af5a6a6d3b1b56a8147995102bf6e4/ec2-get-info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
751,
12,
557,
22,
751,
4672,
364,
619,
316,
6557,
22,
751,
30,
501,
273,
11527,
18,
295,
18589,
29909,
87,
5258,
87,
11,
8975,
1969,
67,
718,
16,
92,
13,
2934,
896,
1435,
1172,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
751,
12,
557,
22,
751,
4672,
364,
619,
316,
6557,
22,
751,
30,
501,
273,
11527,
18,
295,
18589,
29909,
87,
5258,
87,
11,
8975,
1969,
67,
718,
16,
92,
13,
2934,
896,
1435,
1172,... |
except KeyboardInterrupt: if verbose: print "KeyboardInterrupt (the alarm() went off)" | handler_b_exception_raised = False | def force_test_exit(): # Sigh, both imports seem necessary to avoid errors. import os fork_pid = os.fork() if fork_pid: # In parent. return fork_pid # In child. import os, time try: # Wait 5 seconds longer than the expected alarm to give enough # time for the normal sequence of events to occur. This is # just a stop-gap to try to prevent the test from hanging. time.sleep(MAX_DURATION + 5) print >> sys.__stdout__, ' child should not have to kill parent' for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM": os.kill(pid, getattr(signal, signame)) print >> sys.__stdout__, " child sent", signame, "to", pid time.sleep(1) finally: os._exit(0) | 99d3744d692f422a8786422bd8080f3980cb2b40 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/99d3744d692f422a8786422bd8080f3980cb2b40/test_signal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2944,
67,
3813,
67,
8593,
13332,
468,
348,
2031,
16,
3937,
10095,
19264,
4573,
358,
4543,
1334,
18,
1930,
1140,
12515,
67,
6610,
273,
1140,
18,
23335,
1435,
309,
12515,
67,
6610,
30,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2944,
67,
3813,
67,
8593,
13332,
468,
348,
2031,
16,
3937,
10095,
19264,
4573,
358,
4543,
1334,
18,
1930,
1140,
12515,
67,
6610,
273,
1140,
18,
23335,
1435,
309,
12515,
67,
6610,
30,
468... |
def next(self, bytes): | def next(self, bytes, timestamp): | def next(self, bytes): """Decode higher layer packets contained in TCP.""" if (self.dport in tcp_map.map): return tcp_map.map[self.dport](bytes) if (self.sport in tcp_map.map): return tcp_map.map[self.sport](bytes) return None | 90eca6707436c8c94eb6d30d2166f02e1b21f5e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/90eca6707436c8c94eb6d30d2166f02e1b21f5e8/tcp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
16,
1731,
16,
2858,
4672,
3536,
6615,
10478,
3018,
12640,
7542,
316,
9911,
12123,
309,
261,
2890,
18,
72,
655,
316,
9658,
67,
1458,
18,
1458,
4672,
327,
9658,
67,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1024,
12,
2890,
16,
1731,
16,
2858,
4672,
3536,
6615,
10478,
3018,
12640,
7542,
316,
9911,
12123,
309,
261,
2890,
18,
72,
655,
316,
9658,
67,
1458,
18,
1458,
4672,
327,
9658,
67,
1458,
... |
if sys.platform[:3] == "os2" and _iscommand("netscape.exe"): _tryorder = ["os2netscape"] | if sys.platform[:3] == "os2" and _iscommand("netscape"): _tryorder = [] _browsers = {} | def open_new(self, url): self.open(url) | e8f244305ef4f257f6999b69601f4316b31faa5e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e8f244305ef4f257f6999b69601f4316b31faa5e/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1696,
67,
2704,
12,
2890,
16,
880,
4672,
365,
18,
3190,
12,
718,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
p.sale_id = ANY(%s) GROUP BY mp.state, p.sale_id''') | p.sale_id = ANY(%s) GROUP BY mp.state, p.sale_id''',(ids,)) | def _picked_rate(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} if not ids: return {} res = {} for id in ids: res[id] = [0.0, 0.0] cr.execute('''SELECT p.sale_id,sum(m.product_qty), mp.state as mp_state FROM stock_move m LEFT JOIN stock_picking p on (p.id=m.picking_id) LEFT JOIN mrp_procurement mp on (mp.move_id=m.id) WHERE p.sale_id = ANY(%s) GROUP BY mp.state, p.sale_id''') for oid, nbr, mp_state in cr.fetchall(): if mp_state == 'cancel': continue if mp_state == 'done': res[oid][0] += nbr or 0.0 res[oid][1] += nbr or 0.0 else: res[oid][1] += nbr or 0.0 for r in res: if not res[r][1]: res[r] = 0.0 else: res[r] = 100.0 * res[r][0] / res[r][1] for order in self.browse(cr, uid, ids, context=context): if order.shipped: res[order.id] = 100.0 return res | 0a2641b0df245ce8ce72113af93f760d7234526b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0a2641b0df245ce8ce72113af93f760d7234526b/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11503,
329,
67,
5141,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
486,
3258,
30,
327,
2618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11503,
329,
67,
5141,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
309,
486,
3258,
30,
327,
2618,
... |
length = length+500 | def move_to_category(self, article, original_cat, current_cat): ''' Given an article which is in category original_cat, ask the user if it should be moved to one of original_cat's subcategories. Recursively run through subcategories' subcategories. NOTE: current_cat is only used for internal recursion. You should always use current_cat = original_cat. ''' print wikipedia.output(u'Treating page %s, currently in category %s' % (article.title(), current_cat.title())) subcatlist = self.catDB.getSubcats(current_cat) supercatlist = self.catDB.getSupercats(current_cat) print if len(subcatlist) == 0: print 'This category has no subcategories.' print if len(supercatlist) == 0: print 'This category has no supercategories.' print # show subcategories as possible choices (with numbers) for i in range(len(supercatlist)): # layout: we don't expect a cat to have more than 10 supercats wikipedia.output(u'u%d - Move up to %s' % (i, supercatlist[i].title())) for i in range(len(subcatlist)): # layout: we don't expect a cat to have more than 100 subcats wikipedia.output(u'%2d - Move down to %s' % (i, subcatlist[i].title())) print ' j - Jump to another category' print ' n - Skip this article' print ' r - Remove this category tag' print ' ? - Read the page' wikipedia.output(u'Enter - Save category as %s' % current_cat.title()) | c155583c16bb5574b722d20b9144d99630aae92f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/c155583c16bb5574b722d20b9144d99630aae92f/category.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
67,
869,
67,
4743,
12,
2890,
16,
7559,
16,
2282,
67,
2574,
16,
783,
67,
2574,
4672,
9163,
16803,
392,
7559,
1492,
353,
316,
3150,
2282,
67,
2574,
16,
6827,
326,
729,
309,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3635,
67,
869,
67,
4743,
12,
2890,
16,
7559,
16,
2282,
67,
2574,
16,
783,
67,
2574,
4672,
9163,
16803,
392,
7559,
1492,
353,
316,
3150,
2282,
67,
2574,
16,
6827,
326,
729,
309,
518,
... | |
harness_logger.info("Starting full run through...") | harness_logger.info("---------------------\n Starting full run through...") | def dofullrun(kinit, kend, deltak): """Complete full model run of 1st, source and 2nd order calculations.""" harness_logger.info("Starting full run through...") fofile = runfomodel(kinit, kend, deltak, foargs=FOARGS) sourcefile = runfullsourceintegration(fofile) sohelpers.copy_source_to_fofile(sourcefile, fofile) sofile = runsomodel(fofile) cfilename = sofile.replace("so", "cmb") cfile = sohelpers.combine_results(fofile, sofile, cfilename) harness_logger.info("Combined results saved in %s.", cfile) return cfile | 2bb9b2dff6931edf5c042e0856421c583a456cbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/2bb9b2dff6931edf5c042e0856421c583a456cbb/harness.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
2854,
2681,
12,
79,
2738,
16,
417,
409,
16,
1464,
88,
581,
4672,
3536,
6322,
1983,
938,
1086,
434,
404,
334,
16,
1084,
471,
576,
4880,
1353,
20882,
12123,
366,
1303,
403,
67,
4901... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
2854,
2681,
12,
79,
2738,
16,
417,
409,
16,
1464,
88,
581,
4672,
3536,
6322,
1983,
938,
1086,
434,
404,
334,
16,
1084,
471,
576,
4880,
1353,
20882,
12123,
366,
1303,
403,
67,
4901... |
def prepare_rebuild_ops(self, instnode, rebuild_ops, memo): box = instnode.source | def prepare_rebuild_ops(self, instnode, rebuild_ops, memo, box=None): if box is None: box = instnode.source | def prepare_rebuild_ops(self, instnode, rebuild_ops, memo): box = instnode.source if not isinstance(box, Box): return box if box in memo: return memo[box] if instnode.virtual: newbox = BoxPtr() ld = instnode.cls.source if isinstance(ld, FixedList): ad = ld.arraydescr sizebox = ConstInt(instnode.cursize) op = ResOperation(rop.NEW_ARRAY, [sizebox], newbox, descr=ad) else: vtable = ld.getint() if self.cpu.translate_support_code: vtable_addr = self.cpu.cast_int_to_adr(vtable) size = self.cpu.class_sizes[vtable_addr] else: size = self.cpu.class_sizes[vtable] op = ResOperation(rop.NEW_WITH_VTABLE, [ld], newbox, descr=size) rebuild_ops.append(op) memo[box] = newbox for ofs, node in instnode.curfields.items(): fieldbox = self.prepare_rebuild_ops(node, rebuild_ops, memo) if isinstance(ld, FixedList): op = ResOperation(rop.SETARRAYITEM_GC, [newbox, ofs, fieldbox], None, descr=ld.arraydescr) else: assert isinstance(ofs, AbstractDescr) op = ResOperation(rop.SETFIELD_GC, [newbox, fieldbox], None, descr=ofs) rebuild_ops.append(op) return newbox memo[box] = box if instnode.virtualized: for ofs, node in instnode.curfields.items(): fieldbox = self.prepare_rebuild_ops(node, rebuild_ops, memo) if instnode.cls and isinstance(instnode.cls.source, FixedList): ld = instnode.cls.source assert isinstance(ld, FixedList) op = ResOperation(rop.SETARRAYITEM_GC, [box, ofs, fieldbox], None, descr=ld.arraydescr) else: assert isinstance(ofs, AbstractDescr) op = ResOperation(rop.SETFIELD_GC, [box, fieldbox], None, descr=ofs) rebuild_ops.append(op) return box | 79190106133823d3a24c3ea421404f6fd33f936d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/79190106133823d3a24c3ea421404f6fd33f936d/optimize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
266,
3510,
67,
4473,
12,
2890,
16,
1804,
2159,
16,
13419,
67,
4473,
16,
11063,
16,
3919,
33,
7036,
4672,
309,
3919,
353,
599,
30,
3919,
273,
1804,
2159,
18,
3168,
309,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
67,
266,
3510,
67,
4473,
12,
2890,
16,
1804,
2159,
16,
13419,
67,
4473,
16,
11063,
16,
3919,
33,
7036,
4672,
309,
3919,
353,
599,
30,
3919,
273,
1804,
2159,
18,
3168,
309,
486,
... |
OUTPUT: - ``int`` - smallest cond - ``int`` - largest conductor plus one | OUTPUT: tuple of ints (N1,N2+1) where N1 is the smallest and N2 the largest conductor for which the database is complete. | def conductor_range(self): """ Return the range of conductors that are covered by the database. OUTPUT: - ``int`` - smallest cond - ``int`` - largest conductor plus one EXAMPLES:: sage: from sage.databases.cremona import LargeCremonaDatabase # optional - database_cremona_ellcurve sage: c = LargeCremonaDatabase() # optional - database_cremona_ellcurve sage: c.conductor_range() # optional - database_cremona_ellcurve (1, 130001) """ return 1, self.largest_conductor()+1 | 2f49488c3344bc60432b3c71255ae35616667fc5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2f49488c3344bc60432b3c71255ae35616667fc5/cremona.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
356,
1828,
280,
67,
3676,
12,
2890,
4672,
3536,
2000,
326,
1048,
434,
356,
1828,
1383,
716,
854,
18147,
635,
326,
2063,
18,
225,
11550,
30,
3193,
434,
15542,
261,
50,
21,
16,
50,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
356,
1828,
280,
67,
3676,
12,
2890,
4672,
3536,
2000,
326,
1048,
434,
356,
1828,
1383,
716,
854,
18147,
635,
326,
2063,
18,
225,
11550,
30,
3193,
434,
15542,
261,
50,
21,
16,
50,
22,
... |
k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v | if ':' in item: k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v lastk = k elif lastk: self._info[lastk] += '\n' + item | def _parse(self, fp): """Override this method to support alternative .mo formats.""" unpack = struct.unpack filename = getattr(fp, 'name', '') # Parse the .mo file header, which consists of 5 little endian 32 # bit words. self._catalog = catalog = {} self.plural = lambda n: int(n != 1) # germanic plural by default buf = fp.read() buflen = len(buf) # Are we big endian or little endian? magic = unpack('<I', buf[:4])[0] if magic == self.LE_MAGIC: version, msgcount, masteridx, transidx = unpack('<4I', buf[4:20]) ii = '<II' elif magic == self.BE_MAGIC: version, msgcount, masteridx, transidx = unpack('>4I', buf[4:20]) ii = '>II' else: raise IOError(0, 'Bad magic number', filename) # Now put all messages from the .mo file buffer into the catalog # dictionary. for i in xrange(0, msgcount): mlen, moff = unpack(ii, buf[masteridx:masteridx+8]) mend = moff + mlen tlen, toff = unpack(ii, buf[transidx:transidx+8]) tend = toff + tlen if mend < buflen and tend < buflen: msg = buf[moff:mend] tmsg = buf[toff:tend] else: raise IOError(0, 'File is corrupt', filename) # See if we're looking at GNU .mo conventions for metadata if mlen == 0: # Catalog description for item in tmsg.splitlines(): item = item.strip() if not item: continue k, v = item.split(':', 1) k = k.strip().lower() v = v.strip() self._info[k] = v if k == 'content-type': self._charset = v.split('charset=')[1] elif k == 'plural-forms': v = v.split(';') plural = v[1].split('plural=')[1] self.plural = c2py(plural) # Note: we unconditionally convert both msgids and msgstrs to # Unicode using the character encoding specified in the charset # parameter of the Content-Type header. The gettext documentation # strongly encourages msgids to be us-ascii, but some appliations # require alternative encodings (e.g. Zope's ZCML and ZPT). For # traditional gettext applications, the msgid conversion will # cause no problems since us-ascii should always be a subset of # the charset encoding. We may want to fall back to 8-bit msgids # if the Unicode conversion fails. if msg.find('\x00') >= 0: # Plural forms msgid1, msgid2 = msg.split('\x00') tmsg = tmsg.split('\x00') if self._charset: msgid1 = unicode(msgid1, self._charset) tmsg = [unicode(x, self._charset) for x in tmsg] for i in range(len(tmsg)): catalog[(msgid1, i)] = tmsg[i] else: if self._charset: msg = unicode(msg, self._charset) tmsg = unicode(tmsg, self._charset) catalog[msg] = tmsg # advance to next entry in the seek tables masteridx += 8 transidx += 8 | e0ea83ebf4c410e6b64a653a819cc85d54d5339d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e0ea83ebf4c410e6b64a653a819cc85d54d5339d/gettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
2890,
16,
4253,
4672,
3536,
6618,
333,
707,
358,
2865,
10355,
263,
8683,
6449,
12123,
6167,
273,
1958,
18,
17309,
1544,
273,
3869,
12,
7944,
16,
296,
529,
2187,
28707,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
16,
4253,
4672,
3536,
6618,
333,
707,
358,
2865,
10355,
263,
8683,
6449,
12123,
6167,
273,
1958,
18,
17309,
1544,
273,
3869,
12,
7944,
16,
296,
529,
2187,
28707,
468... |
P = lambda x: scipy.stats.t.sf(x, self.dfd) | P = lambda x: stats.t.sf(x, self.dfd) | def __call__(self, x, search=None): """ Get expected EC for a search region (default is self.search which itself defaults to [1] giving the survival function. """ | b251694b7d7fc8fce6e39eac693410d6577055a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12658/b251694b7d7fc8fce6e39eac693410d6577055a1/rft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
1623,
33,
7036,
4672,
3536,
968,
2665,
7773,
364,
279,
1623,
3020,
261,
1886,
353,
365,
18,
3072,
1492,
6174,
3467,
358,
306,
21,
65,
21057,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16,
1623,
33,
7036,
4672,
3536,
968,
2665,
7773,
364,
279,
1623,
3020,
261,
1886,
353,
365,
18,
3072,
1492,
6174,
3467,
358,
306,
21,
65,
21057,
326... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.