rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
path[0] = pb2 | info[0] = pb2 | def library_get_toplevel_cache(self, genreview=False, artistview=False, albumview=False): if genreview and self.lib_view_genre_cache is not None: bd = self.lib_view_genre_cache elif artistview and self.lib_view_artist_cache is not None: bd = self.lib_view_artist_cache elif albumview and self.lib_view_album_cache is not None: bd = self.lib_view_album_cache else: return None # Check if we can update any artwork: for _sort, path in bd: pb = path[0] if pb == self.albumpb: artist, album, path = self.library_get_data(path[1], 'artist', 'album', 'path') key = self.library_set_data(path=path, artist=artist, album=album) pb2 = self.artwork.get_library_artwork_cached_pb(key, None) if pb2 is not None: path[0] = pb2 return bd | 6ee905a6c5062915be7f923b2dbcb3e626876af5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/6ee905a6c5062915be7f923b2dbcb3e626876af5/library.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
67,
588,
67,
3669,
2815,
67,
2493,
12,
2890,
16,
3157,
16041,
33,
8381,
16,
15469,
1945,
33,
8381,
16,
14844,
1945,
33,
8381,
4672,
309,
3157,
16041,
471,
365,
18,
2941,
67,
1945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5313,
67,
588,
67,
3669,
2815,
67,
2493,
12,
2890,
16,
3157,
16041,
33,
8381,
16,
15469,
1945,
33,
8381,
16,
14844,
1945,
33,
8381,
4672,
309,
3157,
16041,
471,
365,
18,
2941,
67,
1945... |
elif i-1 < len(s) and s[i+1] == '$': | elif i+1 < len(s) and s[i+1] == '$': | def math_parse(s): r""" Do the following: \begin{verbatim} * Replace all $ text $'s by <span class='math'> text </span> * Replace all $$ text $$'s by <div class='math'> text </div> * Replace all \$'s by $'.s Note that in the above two cases nothing is done if the $ is preceeded by a backslash. \end{verbatim} """ t = '' while True: i = s.find('$') if i == -1: return t + s elif i > 0 and s[i-1] == '\\': t += s[:i-1] + '$' s = s[i+1:] elif i-1 < len(s) and s[i+1] == '$': typ = 'div' else: typ = 'span' j = s[i+2:].find('$') if j == -1: j = len(s) s += '$' if typ == 'div': s += '$$' else: j += i + 2 if typ == 'div': txt = s[i+2:j] else: txt = s[i+1:j] t += s[:i] + '<%s class="math">%s</%s>'%(typ, ' '.join(txt.splitlines()), typ) s = s[j+1:] if typ == 'div': s = s[1:] return t | c344243434fb30b6250f73a365f5dff08a6e0008 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/c344243434fb30b6250f73a365f5dff08a6e0008/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4233,
67,
2670,
12,
87,
4672,
436,
8395,
2256,
326,
3751,
30,
521,
10086,
95,
16629,
22204,
97,
380,
6910,
777,
271,
977,
271,
11,
87,
635,
411,
3969,
667,
2218,
15949,
29256,
977,
776... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4233,
67,
2670,
12,
87,
4672,
436,
8395,
2256,
326,
3751,
30,
521,
10086,
95,
16629,
22204,
97,
380,
6910,
777,
271,
977,
271,
11,
87,
635,
411,
3969,
667,
2218,
15949,
29256,
977,
776... |
cobblestone_block = terrain.crop(get_cropbox(0,1)) | cobblestone = terrain.crop(get_cropbox(0,1)) | def get_cropbox(x, y): return (x*16, y*16, x*16 + 16, y*16 + 16) | 085d2e65d6c70e23a4d1c9d5c5373fe9db845f1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13883/085d2e65d6c70e23a4d1c9d5c5373fe9db845f1a/read_chunk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13758,
2147,
12,
92,
16,
677,
4672,
327,
261,
92,
14,
2313,
16,
677,
14,
2313,
16,
619,
14,
2313,
397,
2872,
16,
677,
14,
2313,
397,
2872,
13,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13758,
2147,
12,
92,
16,
677,
4672,
327,
261,
92,
14,
2313,
16,
677,
14,
2313,
16,
619,
14,
2313,
397,
2872,
16,
677,
14,
2313,
397,
2872,
13,
2,
-100,
-100,
-100,
-100,
-... |
self.assertEqual(sprite.spritecollide(s1, ag2, dokill = False, collided = sprite.collide_circle_ratio(20.0)),[s2,s3]) | self.assertTrue ( unordered_equality ( sprite.spritecollide(s1, ag2, dokill = False, collided = sprite.collide_circle_ratio(20.0)), [s2,s3] )) | def test_spritecollide(self): | db8df1b888c4afedef92c66bbb60a73971be1b37 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/db8df1b888c4afedef92c66bbb60a73971be1b37/sprite_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1752,
583,
18997,
8130,
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,
... | [
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,
1842,
67,
1752,
583,
18997,
8130,
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,
-10... |
self._must_close = True | def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering=False): if buffering: # The caller won't be using any sock.recv() calls, so buffering # is fine and recommended for performance. self.fp = sock.makefile('rb') # As our sock.makefile() object may receive data into its buffer # beyond that needed to satisfy this response, we must close # afterwards. self._must_close = True else: # The buffer size is specified as zero, because the headers of # the response are read with readline(). If the reads were # buffered the readline() calls could consume some of the # response, which make be read via a recv() on the underlying # socket. self.fp = sock.makefile('rb', 0) self._must_close = False self.debuglevel = debuglevel self.strict = strict self._method = method | ccb0c6f38692dcba649e8bf40ff928da7f74ba9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/ccb0c6f38692dcba649e8bf40ff928da7f74ba9f/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7313,
16,
1198,
2815,
33,
20,
16,
5490,
33,
20,
16,
707,
33,
7036,
16,
25056,
33,
8381,
4672,
309,
25056,
30,
468,
1021,
4894,
8462,
1404,
506,
1450,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7313,
16,
1198,
2815,
33,
20,
16,
5490,
33,
20,
16,
707,
33,
7036,
16,
25056,
33,
8381,
4672,
309,
25056,
30,
468,
1021,
4894,
8462,
1404,
506,
1450,
1... | |
if vararg: self._vararg_param = Param(vararg) else: self._vararg_param = None if kwarg: self._kwarg_param = Param(kwarg) else: self._kwarg_param = None | if vararg: self._vararg_param = Param(vararg) else: self._vararg_param = None if kwarg: self._kwarg_param = Param(kwarg) else: self._kwarg_param = None | def _init_signature(self, func): # Get the function's signature (args, vararg, kwarg, defaults) = inspect.getargspec(func) | 1bdc6e1cd033a9c44438228cd8b6521d911aa459 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/1bdc6e1cd033a9c44438228cd8b6521d911aa459/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
8195,
12,
2890,
16,
1326,
4672,
468,
968,
326,
445,
1807,
3372,
261,
1968,
16,
569,
3175,
16,
19554,
16,
3467,
13,
273,
5334,
18,
588,
23172,
12,
644,
13,
2,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
8195,
12,
2890,
16,
1326,
4672,
468,
968,
326,
445,
1807,
3372,
261,
1968,
16,
569,
3175,
16,
19554,
16,
3467,
13,
273,
5334,
18,
588,
23172,
12,
644,
13,
2,
-100,
-10... |
calling call_cls | calling classcall | ... def __init__(self): | 083d2581f9172647da2a6e6f7338e869e5aef113 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/083d2581f9172647da2a6e6f7338e869e5aef113/classcall_metaclass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
4202,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
4202,
1652,
1001,
2738,
972,
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,
-1... |
z = rbigint([0] * newsize, a.sign) | z = rbigint([0] * newsize, self.sign) | def rshift(w_bigint1, w_bigint2): if w_bigint2.sign < 0: raise ValueError("negative shift count") elif w_bigint2.sign == 0: return w_bigint1 if w_bigint1.sign == -1: w_a1 = w_bigint1.invert() w_a2 = w_a1.rshift(w_bigint2) return w_a2.invert() shiftby = w_bigint2.toint() | 87da397eba037ce53e8c5847c7c4b29acfda97b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/87da397eba037ce53e8c5847c7c4b29acfda97b2/rbigint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
4012,
12,
91,
67,
14002,
474,
21,
16,
341,
67,
14002,
474,
22,
4672,
309,
341,
67,
14002,
474,
22,
18,
2977,
411,
374,
30,
1002,
2068,
2932,
13258,
4654,
1056,
7923,
1327,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
436,
4012,
12,
91,
67,
14002,
474,
21,
16,
341,
67,
14002,
474,
22,
4672,
309,
341,
67,
14002,
474,
22,
18,
2977,
411,
374,
30,
1002,
2068,
2932,
13258,
4654,
1056,
7923,
1327,
341,
... |
else: | elif progress is not None: | def __init__(self, function, interval, progress=None): InProgress.__init__(self) self._coroutine = function self._timer = Timer(self._step) self._interval = interval self._async = None self._valid = True | 7adcf260c2d12f8e18e83b9029a7c2560ca25d5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11722/7adcf260c2d12f8e18e83b9029a7c2560ca25d5e/coroutine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
445,
16,
3673,
16,
4007,
33,
7036,
4672,
657,
5491,
16186,
2738,
972,
12,
2890,
13,
365,
6315,
3850,
8983,
273,
445,
365,
6315,
12542,
273,
12290,
12,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
445,
16,
3673,
16,
4007,
33,
7036,
4672,
657,
5491,
16186,
2738,
972,
12,
2890,
13,
365,
6315,
3850,
8983,
273,
445,
365,
6315,
12542,
273,
12290,
12,
28... |
0.21762156185440268136513424360523807352075436916785404091068124239250 - 0.86801414289592494863584920891627388827343874994609327121115071646235*I 0.21762156185440268136513424360523807352075436916785404091068124239250 - 0.86801414289592494863584920891627388827343874994609327121115071646235*I | 0.21762156185440268136513424360523807352075436916785404091068124239 - 0.86801414289592494863584920891627388827343874994609327121115071646*I 0.21762156185440268136513424360523807352075436916785404091068124239235 - 0.86801414289592494863584920891627388827343874994609327121115071646235*I | def cotan(self): """ EXAMPLES: sage: (1+I).cotan() 0.21762156185440268 - 0.86801414289592493*I sage: i = ComplexField(200).0 sage: (1+i).cotan() 0.21762156185440268136513424360523807352075436916785404091068128 - 0.86801414289592494863584920891627388827343874994609327121115055*I # 32-bit 0.21762156185440268136513424360523807352075436916785404091068128 - 0.86801414289592494863584920891627388827343874994609327121115055*I # 64-bit sage: i = ComplexField(220).0 sage: (1+i).cotan() 0.21762156185440268136513424360523807352075436916785404091068124239250 - 0.86801414289592494863584920891627388827343874994609327121115071646235*I # 32-bit 0.21762156185440268136513424360523807352075436916785404091068124239250 - 0.86801414289592494863584920891627388827343874994609327121115071646235*I # 64-bit """ return self.parent()(self._pari_().cotan()) | 293427b47ee2bb564117092226099ed44acd171f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/293427b47ee2bb564117092226099ed44acd171f/complex_number.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
352,
304,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
261,
21,
15,
45,
2934,
71,
352,
304,
1435,
374,
18,
22,
4033,
8898,
28946,
30489,
6334,
3103,
9470,
300,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
352,
304,
12,
2890,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
261,
21,
15,
45,
2934,
71,
352,
304,
1435,
374,
18,
22,
4033,
8898,
28946,
30489,
6334,
3103,
9470,
300,
374,
... |
return self.val | return self.val | def __str__(self): if self.val: if hasattr(self,'name') and self.name: datetime = mx.DateTime.strptime(self.name,DHM_FORMAT) return datetime.strftime(self.lang_obj.date_format+ " " + self.lang_obj.time_format) return self.val | 580ab8c750be375663f614385e959361e071f30a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/580ab8c750be375663f614385e959361e071f30a/report_sxw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
4672,
309,
365,
18,
1125,
30,
309,
3859,
12,
2890,
11189,
529,
6134,
471,
365,
18,
529,
30,
3314,
273,
7938,
18,
5096,
18,
701,
10650,
12,
2890,
18,
529,
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,
1001,
701,
972,
12,
2890,
4672,
309,
365,
18,
1125,
30,
309,
3859,
12,
2890,
11189,
529,
6134,
471,
365,
18,
529,
30,
3314,
273,
7938,
18,
5096,
18,
701,
10650,
12,
2890,
18,
529,
16... |
if req.versions[0] not in [v_a, '%s-%s' % (v_a, b_a)]: print("%s is installed cannot remove version %s." % (pkg, req.versions[0])) | if req.version != v_a or (req.build and req.build != int(b_a)): print("Version mismatch: %s is installed cannot remove %s." % (pkg, req)) | def remove_req(req, opts): for pkg in egginst.get_active(): if req.name != cname_eggname(pkg): continue if req.versions: v_a, b_a = pkg.split('-')[1:3] if req.versions[0] not in [v_a, '%s-%s' % (v_a, b_a)]: print("%s is installed cannot remove version %s." % (pkg, req.versions[0])) return break else: print "Package %r does not seem to be installed." % req.name return pprint_fn_action(pkg, 'removing') if not opts.dry_run: call_egginst(['--remove', pkg]) | 9de6afca59fe3412c83c27cb27b0f33a2cb11c93 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7707/9de6afca59fe3412c83c27cb27b0f33a2cb11c93/enpkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
67,
3658,
12,
3658,
16,
1500,
4672,
364,
3475,
316,
9130,
1912,
334,
18,
588,
67,
3535,
13332,
309,
1111,
18,
529,
480,
18290,
67,
23171,
529,
12,
10657,
4672,
1324,
309,
1111,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3658,
12,
3658,
16,
1500,
4672,
364,
3475,
316,
9130,
1912,
334,
18,
588,
67,
3535,
13332,
309,
1111,
18,
529,
480,
18290,
67,
23171,
529,
12,
10657,
4672,
1324,
309,
1111,
1... |
p = combine_paths (d,['djbfft.a']) | p = self.combine_paths (d,['djbfft.a']) | def calc_info(self): lib_dirs = self.get_lib_dirs() incl_dirs = self.get_include_dirs() info = None for d in lib_dirs: p = combine_paths (d,['djbfft.a']) if p: info = {'extra_objects':p} break if info is None: return for d in incl_dirs: if len(combine_paths(d,['fftc8.h','fftfreq.h']))==2: dict_append(info,include_dirs=[d], define_macros=[('SCIPY_DJBFFT_H',None)]) self.set_info(**info) return | 11cffa55fceeda7a779a5a596b22fb98270f22b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/11cffa55fceeda7a779a5a596b22fb98270f22b8/system_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2561,
67,
8291,
273,
365,
18,
588,
67,
2941,
67,
8291,
1435,
2823,
67,
8291,
273,
365,
18,
588,
67,
6702,
67,
8291,
1435,
1123,
273,
599,
364,
302,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
1376,
12,
2890,
4672,
2561,
67,
8291,
273,
365,
18,
588,
67,
2941,
67,
8291,
1435,
2823,
67,
8291,
273,
365,
18,
588,
67,
6702,
67,
8291,
1435,
1123,
273,
599,
364,
302,
31... |
import time os.system("%s &" % self.name) time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) | rc = os.system("%s %s" % (self.name, url)) | def _remote(self, action, autoraise): raise_opt = ("-noraise", "-raise")[autoraise] cmd = "%s %s -remote '%s' >/dev/null 2>&1" % (self.name, raise_opt, action) rc = os.system(cmd) if rc: import time os.system("%s &" % self.name) time.sleep(PROCESS_CREATION_DELAY) rc = os.system(cmd) return not rc | 336cf8e9a006f0abbd7712771acc892711f93ebd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/336cf8e9a006f0abbd7712771acc892711f93ebd/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7222,
12,
2890,
16,
1301,
16,
2059,
10610,
784,
4672,
1002,
67,
3838,
273,
7566,
17,
82,
10610,
784,
3113,
3701,
11628,
7923,
63,
69,
3408,
69,
784,
65,
1797,
273,
2213,
87,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7222,
12,
2890,
16,
1301,
16,
2059,
10610,
784,
4672,
1002,
67,
3838,
273,
7566,
17,
82,
10610,
784,
3113,
3701,
11628,
7923,
63,
69,
3408,
69,
784,
65,
1797,
273,
2213,
87,
738,
... |
v1 = self._applyfixUpAxis(blockData[bMFace.v[0].index].co) v2 = self._applyfixUpAxis(blockData[bMFace.v[1].index].co) v3 = self._applyfixUpAxis(blockData[bMFace.v[2].index].co) | v1 = self._applyfixUpAxis(blockData[bMFace.v[0].index]) v2 = self._applyfixUpAxis(blockData[bMFace.v[1].index]) v3 = self._applyfixUpAxis(blockData[bMFace.v[2].index]) | def __init__(self, bMesh, bMFace, bIndex, index, fixUpAxis, armatureExporter=None): """Represents an Ogre vertex. @param bIndex Index in the vertex list of the NMFace. @param index Vertexbuffer position. @param fixUpAxis Additional transformation to apply to the vertex. """ self.bMesh = bMesh # imples position # vertex in basis shape self.bMVert = bMFace.v[bIndex] self.basisPos = self.bMVert.co bKey = self.bMesh.key if (bKey and len(bKey.blocks)): # first shape key is rest position self.basisPos = bKey.blocks[0].data[self.bMVert.index] ## Face properties in Blender self.normal = None self.colourDiffuse = None self.texcoords = [] ## bookkeeping # vertexbuffer position in vertexbuffer self.index = index self.fixUpAxis = fixUpAxis # implies influences self.armatureExporter = armatureExporter ### populated attributes ## normal if bMFace.smooth: # key blocks don't have normals self.normal = self._applyfixUpAxis(bMFace.v[bIndex].no) else: # create face normal # 1 - 2 # | / # 3 # n = (v_3 - v_1) x (v_2 - v_1)/||n|| if (bKey and len(bKey.blocks)): # first shape key is rest position blockData = bKey.blocks[0].data v1 = self._applyfixUpAxis(blockData[bMFace.v[0].index].co) v2 = self._applyfixUpAxis(blockData[bMFace.v[1].index].co) v3 = self._applyfixUpAxis(blockData[bMFace.v[2].index].co) else: # self.normal = CrossVecs(bMFace.v[1].co - bMFace.v[0].co, bMFace.v[2].co - bMFace.v[0].co) v1 = self._applyfixUpAxis(bMFace.v[0].co) v2 = self._applyfixUpAxis(bMFace.v[1].co) v3 = self._applyfixUpAxis(bMFace.v[2].co) self.normal = CrossVecs(v2 - v1, v3 - v1) # self.normal.normalize() does not throw ZeroDivisionError exception normalLength = self.normal.length if (normalLength > Vertex.THRESHOLD): self.normal = Vector([coordinate/normalLength for coordinate in self.normal]) else: Log.getSingleton().logWarning("Error in normalize! Face of mesh \"%s\" too small." % bMesh.name) self.normal = Vector([0,0,0]) ## colourDiffuse if bMesh.vertexColors: bMCol = bMFace.col[bIndex] if OGRE_OPENGL_VERTEXCOLOUR: self.colourDiffuse = (bMCol.b/255.0, bMCol.g/255.0, bMCol.r/255.0, bMCol.a/255.0) else: self.colourDiffuse = (bMCol.r/255.0, bMCol.g/255.0, bMCol.b/255.0, bMCol.a/255.0) else: # Note: hasVertexColours() always returns false when uv coordinates are present. # Therefore also check "VCol Paint" and "VCol Light" buttons as well as # try if Blender's faces provide vertex colour data. try: bMCol = bMFace.col[bIndex] except: pass else: # vertex colour data available try: bMaterial = self.bMesh.materials[bMFace.mat] except: pass else: # material assigned if ((bMaterial.mode & Blender.Material.Modes["VCOL_PAINT"]) or (bMaterial.mode & Blender.Material.Modes["VCOL_LIGHT"])): # vertex colours enabled if OGRE_OPENGL_VERTEXCOLOUR: self.colourDiffuse = (bMCol.b/255.0, bMCol.g/255.0, bMCol.r/255.0, bMCol.a/255.0) else: self.colourDiffuse = (bMCol.r/255.0, bMCol.g/255.0, bMCol.b/255.0, bMCol.a/255.0) ## texcoord # origin in OGRE is top-left for uvlayer in bMesh.getUVLayerNames(): bMesh.activeUVLayer = uvlayer if bMesh.faceUV: self.texcoords.append((bMFace.uv[bIndex][0], 1 - bMFace.uv[bIndex][1])) elif bMesh.vertexUV: self.texcoords.append((self.bMVert.uvco[0], 1 - self.bMVert.uvco[1])) | c4dbfdadadf05ac71e39e4a8184c48c795d3f200 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11621/c4dbfdadadf05ac71e39e4a8184c48c795d3f200/meshexport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
324,
16748,
16,
324,
49,
11824,
16,
324,
1016,
16,
770,
16,
2917,
1211,
6558,
16,
23563,
1231,
22305,
33,
7036,
4672,
3536,
23869,
87,
392,
531,
11556,
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,
1001,
2738,
972,
12,
2890,
16,
324,
16748,
16,
324,
49,
11824,
16,
324,
1016,
16,
770,
16,
2917,
1211,
6558,
16,
23563,
1231,
22305,
33,
7036,
4672,
3536,
23869,
87,
392,
531,
11556,
5... |
def Wait(self, *args, **kwargs): """Wait for the window to be in any of the following states: 'exists' 'visible' 'enabled' 'ready' e.g. self.Dlg.Wait("exists", "enabled", "visible", "ready") 'exists' means that the window is a valid handle 'visible' means that the window is not hidden 'enabled' means that the window is not disabled 'ready' means that the window is visible and enabled | def Wait(self, wait_for, timeout = window_find_timeout, wait_interval = window_retry_interval): """Wait for the window to be in a particular state :wait_for: The state to wait for the window to be in. It can be any of the following states * 'exists' means that the window is a valid handle * 'visible' means that the window is not hidden * 'enabled' means that the window is not disabled * 'ready' means that the window is visible and enabled :timeout: Raise an error if the window is not in the appropriate state after this number of seconds. :wiat_interval: How long to sleep between each retry e.g. self.Dlg.Wait("exists enabled visible ready") | def Wait(self, *args, **kwargs): """Wait for the window to be in any of the following states: | 3041c3cbb3a9cba089ef284c77ea17fa506bba68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/3041c3cbb3a9cba089ef284c77ea17fa506bba68/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5838,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
5480,
364,
326,
2742,
358,
506,
316,
1281,
434,
326,
3751,
5493,
30,
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,
5838,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
5480,
364,
326,
2742,
358,
506,
316,
1281,
434,
326,
3751,
5493,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return _unicode_replace(space, w_self, space.buffer_w(w_old).as_str(), space.buffer_w(w_new).as_str(), w_maxsplit) | old = unicode(space.buffer_w(w_old).as_str()) new = unicode(space.buffer_w(w_new).as_str()) return _unicode_replace(space, w_self, old, new, w_maxsplit) | def unicode_replace__Unicode_ANY_ANY_ANY(space, w_self, w_old, w_new, w_maxsplit): return _unicode_replace(space, w_self, space.buffer_w(w_old).as_str(), space.buffer_w(w_new).as_str(), w_maxsplit) | 90604b9648df011341cb2343828790b69eb80691 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/90604b9648df011341cb2343828790b69eb80691/unicodeobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5252,
67,
2079,
972,
16532,
67,
15409,
67,
15409,
67,
15409,
12,
2981,
16,
341,
67,
2890,
16,
341,
67,
1673,
16,
341,
67,
2704,
16,
341,
67,
1896,
4939,
4672,
1592,
273,
5252,
12,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5252,
67,
2079,
972,
16532,
67,
15409,
67,
15409,
67,
15409,
12,
2981,
16,
341,
67,
2890,
16,
341,
67,
1673,
16,
341,
67,
2704,
16,
341,
67,
1896,
4939,
4672,
1592,
273,
5252,
12,
29... |
return (_center(a, colwidth) + ' ' * spacing + _center(b, colwidth) + ' ' * spacing + _center(c, colwidth)) | return (a.center(colwidth) + ' ' * spacing + b.center(colwidth) + ' ' * spacing + c.center(colwidth)) | def format3cstring(a, b, c, colwidth=_colwidth, spacing=_spacing): """Returns a string formatted from 3 strings, centered within 3 columns.""" return (_center(a, colwidth) + ' ' * spacing + _center(b, colwidth) + ' ' * spacing + _center(c, colwidth)) | 9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ecf9ce161bf3c1eafebe3c7f6d06b4f2458ff4e/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
23,
71,
1080,
12,
69,
16,
324,
16,
276,
16,
645,
2819,
33,
67,
1293,
2819,
16,
13259,
33,
67,
14080,
4672,
3536,
1356,
279,
533,
4955,
628,
890,
2064,
16,
25340,
3470,
890,
2168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23,
71,
1080,
12,
69,
16,
324,
16,
276,
16,
645,
2819,
33,
67,
1293,
2819,
16,
13259,
33,
67,
14080,
4672,
3536,
1356,
279,
533,
4955,
628,
890,
2064,
16,
25340,
3470,
890,
2168... |
self.current_tweaks.setPlainText(curt) self.default_tweaks.setPlainText(deft) | self.current_tweaks.setPlainText(curt.decode('utf-8')) self.default_tweaks.setPlainText(deft.decode('utf-8')) | def __init__(self, parent, library_view, server=None, initial_category='general'): ResizableDialog.__init__(self, parent) self._category_model = CategoryModel() | 6eade64d807b9af1f254585eccd560eb10f68a5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/6eade64d807b9af1f254585eccd560eb10f68a5d/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
5313,
67,
1945,
16,
1438,
33,
7036,
16,
2172,
67,
4743,
2218,
12259,
11,
4672,
1124,
6934,
6353,
16186,
2738,
972,
12,
2890,
16,
982,
13,
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,
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,
982,
16,
5313,
67,
1945,
16,
1438,
33,
7036,
16,
2172,
67,
4743,
2218,
12259,
11,
4672,
1124,
6934,
6353,
16186,
2738,
972,
12,
2890,
16,
982,
13,
365,
... |
pManager.manager.DebugStr('cProxyHandler '+ __version__ +': Detected explicit click. Title: '+str(self.ClickTitle)+' Status: '+str(self.ClickStatus)) | pManager.manager.DebugStr('cProxyHandler '+ __version__ +': Detected explicit click. Status: '+str(self.ClickStatus)) | def handle(self): """Get called by cProxyCore for each request""" | 23253492fe3039400366e6440ee883de3e44addb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/23253492fe3039400366e6440ee883de3e44addb/cProxyHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
3536,
967,
2566,
635,
276,
3886,
4670,
364,
1517,
590,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
3536,
967,
2566,
635,
276,
3886,
4670,
364,
1517,
590,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
import fpformat | def __repr__(self): taskNameWidth = 32 dtWidth = 10 priorityWidth = 10 totalDt = 0 totalAvgDt = 0 str = "The taskMgr is handling:\n" str += ('taskList'.ljust(taskNameWidth) + 'dt(ms)'.rjust(dtWidth) + 'avg'.rjust(dtWidth) + 'max'.rjust(dtWidth) + 'priority'.rjust(priorityWidth) + '\n') str += '-------------------------------------------------------------------------\n' for taskPriList in self.taskList: priority = `taskPriList.getPriority()` for task in taskPriList: if task is None: break if task.isRemoved(): taskName = '(R)' + task.name else: taskName = task.name if self.taskTimerVerbose: import fpformat totalDt = totalDt + task.dt totalAvgDt = totalAvgDt + task.avgDt str += (taskName.ljust(taskNameWidth) + fpformat.fix(task.dt*1000, 2).rjust(dtWidth) + fpformat.fix(task.avgDt*1000, 2).rjust(dtWidth) + fpformat.fix(task.maxDt*1000, 2).rjust(dtWidth) + priority.rjust(priorityWidth) + '\n') else: str += (task.name.ljust(taskNameWidth) + '----'.rjust(dtWidth) + '----'.rjust(dtWidth) + '----'.rjust(dtWidth) + priority.rjust(priorityWidth) + '\n') str += '-------------------------------------------------------------------------\n' str += 'pendingTasks\n' str += '-------------------------------------------------------------------------\n' for pri, taskList in self.pendingTaskDict.items(): for task in taskList: if task.isRemoved(): taskName = '(PR)' + task.name else: taskName = '(P)' + task.name if (self.taskTimerVerbose): import fpformat str += (' ' + taskName.ljust(taskNameWidth-2) + fpformat.fix(pri, 2).rjust(dtWidth) + '\n') else: str += (' ' + taskName.ljust(taskNameWidth-2) + '----'.rjust(dtWidth) + '\n') str += '-------------------------------------------------------------------------\n' str += ('doLaterList'.ljust(taskNameWidth) + 'waitTime(s)'.rjust(dtWidth) + '\n') str += '-------------------------------------------------------------------------\n' # When we print, show the doLaterList in actual sorted order. # The priority heap is not actually in order - it is a tree # Make a shallow copy so we can sort it sortedDoLaterList = self.__doLaterList[:] sortedDoLaterList.sort(lambda a, b: cmp(a.wakeTime, b.wakeTime)) sortedDoLaterList.reverse() for task in sortedDoLaterList: remainingTime = ((task.wakeTime) - self.currentTime) if task.isRemoved(): taskName = '(R)' + task.name else: taskName = task.name if (self.taskTimerVerbose): import fpformat str += (' ' + taskName.ljust(taskNameWidth-2) + fpformat.fix(remainingTime, 2).rjust(dtWidth) + '\n') else: str += (' ' + taskName.ljust(taskNameWidth-2) + '----'.rjust(dtWidth) + '\n') str += '-------------------------------------------------------------------------\n' if (self.taskTimerVerbose): import fpformat str += ('total'.ljust(taskNameWidth) + fpformat.fix(totalDt*1000, 2).rjust(dtWidth) + fpformat.fix(totalAvgDt*1000, 2).rjust(dtWidth) + '\n') else: str += ('total'.ljust(taskNameWidth) + '----'.rjust(dtWidth) + '----'.rjust(dtWidth) + '\n') str += "End of taskMgr info\n" return str | d300812b0d426bcde501f23e5e4f8a87f04857f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/d300812b0d426bcde501f23e5e4f8a87f04857f0/Task.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
20172,
2384,
273,
3847,
3681,
2384,
273,
1728,
4394,
2384,
273,
1728,
2078,
19739,
273,
374,
2078,
22823,
19739,
273,
374,
609,
273,
315,
1986,
1562,
9455... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
972,
12,
2890,
4672,
20172,
2384,
273,
3847,
3681,
2384,
273,
1728,
4394,
2384,
273,
1728,
2078,
19739,
273,
374,
2078,
22823,
19739,
273,
374,
609,
273,
315,
1986,
1562,
9455... | |
for server in self.serverList: server.sendCommandString(commandString) | else: for server in self.serverList: server.sendCommandString(commandString) | def __call__(self, commandString, fLocally = 1, serverNum = None): # Execute remotely if serverNum is not None: self.serverList[serverNum].sendCommandString(commandString) for server in self.serverList: server.sendCommandString(commandString) if fLocally: # Execute locally exec( commandString, __builtins__ ) | f37df36261c8d4e3fa4429c1c80ab929ccac466d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/f37df36261c8d4e3fa4429c1c80ab929ccac466d/ClusterClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1296,
780,
16,
284,
1333,
1230,
273,
404,
16,
1438,
2578,
273,
599,
4672,
468,
7903,
26693,
2357,
309,
1438,
2578,
353,
486,
599,
30,
365,
18,
3567,
682,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1991,
972,
12,
2890,
16,
1296,
780,
16,
284,
1333,
1230,
273,
404,
16,
1438,
2578,
273,
599,
4672,
468,
7903,
26693,
2357,
309,
1438,
2578,
353,
486,
599,
30,
365,
18,
3567,
682,... |
def get_content_types(*actions): types = Change.objects.filter(action__in=actions)\ | def get_content_types(app_models, *actions): lookup_args = dict(action__in=actions) if app_models is not None: ct_list = [ContentType.objects.get_for_model(model) for model in app_models] lookup_args.update(dict(content_type__in=ct_list)) types = Change.objects.filter(models.Q(**lookup_args))\ | def get_content_types(*actions): types = Change.objects.filter(action__in=actions)\ .values_list('content_type', flat=True)\ .distinct() return ContentType.objects.filter(pk__in=types) | 37d63969ac742928cd0a05ebf798f66bfa0d226e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4645/37d63969ac742928cd0a05ebf798f66bfa0d226e/index.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
2352,
12,
2910,
67,
7665,
16,
380,
4905,
4672,
3689,
67,
1968,
273,
2065,
12,
1128,
972,
267,
33,
4905,
13,
309,
595,
67,
7665,
353,
486,
599,
30,
5691,
67,
1098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
2352,
12,
2910,
67,
7665,
16,
380,
4905,
4672,
3689,
67,
1968,
273,
2065,
12,
1128,
972,
267,
33,
4905,
13,
309,
595,
67,
7665,
353,
486,
599,
30,
5691,
67,
1098,
... |
gl.mapcolor(index, r, g, b) | map.append(index, r, g, b) | def _initcmap(self): if self.format in ('mono', 'grey4') and self.mustunpack: convcolor = conv_grey else: convcolor = choose_conversion(self.format) maxbits = gl.getgdesc(GL.GD_BITS_NORM_SNG_CMODE) if maxbits > 11: maxbits = 11 c0bits = self.c0bits c1bits = self.c1bits c2bits = self.c2bits if c0bits+c1bits+c2bits > maxbits: if self.fallback and c0bits < maxbits: # Cannot display frames in this mode, use grey self.skipchrom = 1 c1bits = c2bits = 0 convcolor = choose_conversion('grey') else: raise Error, 'Sorry, '+`maxbits`+ \ ' bits max on this machine' maxc0 = 1 << c0bits maxc1 = 1 << c1bits maxc2 = 1 << c2bits if self.offset == 0 and maxbits == 11: offset = 2048 else: offset = self.offset if maxbits <> 11: offset = offset & ((1<<maxbits)-1) self.color0 = None self.fixcolor0 = 0 for c0 in range(maxc0): c0v = c0/float(maxc0-1) for c1 in range(maxc1): if maxc1 == 1: c1v = 0 else: c1v = c1/float(maxc1-1) for c2 in range(maxc2): if maxc2 == 1: c2v = 0 else: c2v = c2/float(maxc2-1) index = offset + c0 + (c1<<c0bits) + \ (c2 << (c0bits+c1bits)) if index < MAXMAP: rv, gv, bv = \ convcolor(c0v, c1v, c2v) r, g, b = int(rv*255.0), \ int(gv*255.0), \ int(bv*255.0) gl.mapcolor(index, r, g, b) if self.color0 == None: self.color0 = \ index, r, g, b # Permanently make the first color index current gl.color(self.color0[0]) gl.gflush() # send the colormap changes to the X server | 2939a4cf1a86f3e9f0e09b8f34d2ee221f414e1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2939a4cf1a86f3e9f0e09b8f34d2ee221f414e1f/VFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
22738,
12,
2890,
4672,
309,
365,
18,
2139,
316,
7707,
2586,
83,
2187,
296,
11556,
93,
24,
6134,
471,
365,
18,
11926,
17309,
30,
6292,
3266,
273,
6292,
67,
11556,
93,
469,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
22738,
12,
2890,
4672,
309,
365,
18,
2139,
316,
7707,
2586,
83,
2187,
296,
11556,
93,
24,
6134,
471,
365,
18,
11926,
17309,
30,
6292,
3266,
273,
6292,
67,
11556,
93,
469,
30... |
if doTrain: processAndTrain(vtrainspam, vspam, bayes, True) processAndTrain(vtrainham, vham, bayes, False) | def run(bdbname, useDBM, ldbname, rdbname, foldname, doTrain, doClassify): if useDBM: bayes = storage.DBDictClassifier(bdbname) else: bayes = storage.PickledClassifier(bdbname) sess = win32com.client.Dispatch("Lotus.NotesSession") sess.initialize() db = sess.GetDatabase("",ldbname) vinbox = db.getView('($Inbox)') vspam = db.getView("%s\Spam" % (foldname)) vham = db.getView("%s\Ham" % (foldname)) vtrainspam = db.getView("%s\Train as Spam" % (foldname)) vtrainham = db.getView("%s\Train as Ham" % (foldname)) if rdbname: print "Replicating..." db.Replicate(rdbname) print "Done" if doTrain: processAndTrain(vtrainspam, vspam, bayes, True) # for some reason, using inbox as a target here loses the mail processAndTrain(vtrainham, vham, bayes, False) if doClassify: classifyInbox(vinbox, vspam, bayes, ldbname) bayes.store() | d157df0b94ba030675a5557e78bbe08945d099e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/d157df0b94ba030675a5557e78bbe08945d099e0/notesfilter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
70,
20979,
16,
999,
2290,
49,
16,
328,
20979,
16,
436,
20979,
16,
11590,
529,
16,
741,
23419,
16,
741,
797,
1164,
4672,
225,
309,
999,
2290,
49,
30,
324,
528,
281,
273,
250... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
70,
20979,
16,
999,
2290,
49,
16,
328,
20979,
16,
436,
20979,
16,
11590,
529,
16,
741,
23419,
16,
741,
797,
1164,
4672,
225,
309,
999,
2290,
49,
30,
324,
528,
281,
273,
250... | |
self.lastratinglabel = -1 | def toleranceHBoxSetter (widget, visible): assert type(visible) is bool if visible: self.widgets["toleranceHBox"].show() else: self.widgets["toleranceHBox"].hide() | 722dcd889fab912f15e7688b07f1ddcedb21e013 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/722dcd889fab912f15e7688b07f1ddcedb21e013/ICLounge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10673,
44,
3514,
8465,
261,
6587,
16,
6021,
4672,
1815,
618,
12,
8613,
13,
353,
1426,
309,
6021,
30,
365,
18,
18148,
9614,
25456,
44,
3514,
6,
8009,
4500,
1435,
469,
30,
365,
18,
18148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10673,
44,
3514,
8465,
261,
6587,
16,
6021,
4672,
1815,
618,
12,
8613,
13,
353,
1426,
309,
6021,
30,
365,
18,
18148,
9614,
25456,
44,
3514,
6,
8009,
4500,
1435,
469,
30,
365,
18,
18148... | |
if not ticket['resolution'] and ticket['status'] == 'closed': | if not ticket['resolution'] and ticket['status'] == "closed": | def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla if BZ_VERSION == '2.11': print 'Using Buzvilla v%s schema.' % BZ_VERSION activityFields['removed'] = 'oldvalue' activityFields['added'] = 'newvalue' # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % (_db, _host, _user, _password) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "cleaning all tickets..." c = trac.db().cursor() c.execute("""DELETE FROM ticket_change""") trac.db().commit() c.execute("""DELETE FROM ticket""") trac.db().commit() c.execute("""DELETE FROM attachment""") os.system('rm -rf %s' % trac.env.get_attachments_dir()) os.mkdir(trac.env.get_attachments_dir()) trac.db().commit() print print "1. import severities..." severities = (('blocker', '1'), ('critical', '2'), ('major', '3'), ('normal', '4'), ('minor', '5'), ('trivial', '6'), ('enhancement', '7')) trac.setSeverityList(severities) print print "2. import components..." sql = "SELECT value, initialowner AS owner FROM components" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'value') print print "3. import priorities..." priorities = (('P1', '1'), ('P2', '2'), ('P3', '3'), ('P4', '4'), ('P5', '5')) trac.setPriorityList(priorities) print print "4. import versions..." sql = "SELECT DISTINCTROW value FROM versions" if PRODUCTS: sql += " WHERE %s" % productFilter('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print print "5. import milestones..." mysql_cur.execute("SELECT value FROM milestones") milestones = mysql_cur.fetchall() if milestones[0] == '---': trac.setMilestoneList(milestones, 'value') else: trac.setMilestoneList([], '') print print '6. retrieving bugs...' sql = "SELECT * FROM bugs " if PRODUCTS: sql += " WHERE %s" % productFilter('product', PRODUCTS) sql += " ORDER BY bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print print "7. import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] ticket['component'] = bug['component'] ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s" % bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] if bug['target_milestone'] == '---': ticket['milestone'] = '' else: ticket['milestone'] = bug['target_milestone'] bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] keywords = string.split(bug['keywords'], ' ') mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time=desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value=desc['thetext']) mysql_cur.execute("SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == 'resolution' or field_name == 'bug_status': removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == 'resolution': resolution = added.lower() keywordChange = False oldKeywords = string.join(keywords, " ") # convert bugzilla field names... if field_name == 'bug_severity': field_name = 'severity' elif field_name == 'assigned_to': field_name = 'owner' elif field_name == 'bug_status': field_name = 'status' if removed in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[added] keywords.append(kw) keywordChange = True added = statusXlator[added] removed = statusXlator[removed] elif field_name == 'short_desc': field_name = 'summary' elif field_name == 'product': if removed in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[removed] if kw in keywords: keywords.remove(kw) else: oldKeywords = string.join(keywords + [ kw ], " ") keywordChange = True if added in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[added] keywords.append(kw) keywordChange = True ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if keywordChange: newKeywords = string.join(keywords, " ") ticketChangeKw = ticketChange ticketChangeKw['field'] = 'keywords' ticketChangeKw['oldvalue'] = oldKeywords ticketChangeKw['newvalue'] = newKeywords #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field='keywords', oldvalue=oldKeywords, newvalue=newKeywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # skip changes that have no effect (think translation!) if added == removed: continue # bugzilla splits large summary changes into two records for oldChange in ticketChanges: if (field_name == 'summary' and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break else: #trac.addTicketChange(ticket=bugid, time=activity['bug_when'], # author=trac.getLoginName(mysql_cur, activity['who']), # field=field_name, oldvalue=removed, newvalue=added) ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # for some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == 'closed': ticket['resolution'] = resolution if bug['bug_status'] in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug['bug_status']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) if bug['product'] in PRODUCT_KEYWORDS: kw = PRODUCT_KEYWORDS[bug['product']] # may have already been added during activity import if kw not in keywords: keywords.append(kw) mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) tracAttachment = Attachment(a['filename'], a['thedata']) trac.addAttachment(bugid, tracAttachment, a['description'], author) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) print "Success!" | d0a718cdc641402f4871e728629c7ce1e81b3158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/d0a718cdc641402f4871e728629c7ce1e81b3158/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1765,
24899,
1966,
16,
389,
2564,
16,
389,
1355,
16,
389,
3664,
16,
389,
3074,
16,
389,
5734,
4672,
5728,
2314,
273,
2286,
12233,
1435,
225,
468,
2236,
364,
12156,
5244,
434,
7934,
15990... |
self.status = _(u"You subscribed successfully.") elif form.status: self.status = form.status | editform.status = form.status | def contents(self): z2.switch_on(self) | 69578eb98a8fae581e2332e3c8acd458f0064594 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9843/69578eb98a8fae581e2332e3c8acd458f0064594/subscribe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2939,
12,
2890,
4672,
998,
22,
18,
9610,
67,
265,
12,
2890,
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,
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,
2939,
12,
2890,
4672,
998,
22,
18,
9610,
67,
265,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
action = wikiutil.escape(action, 1) | def renderInText(self): """ Render macro in text context | 878fa797f0311dd2d0f240414a0e3c7cbfc7b8c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/878fa797f0311dd2d0f240414a0e3c7cbfc7b8c0/Action.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
382,
1528,
12,
2890,
4672,
3536,
6987,
11522,
316,
977,
819,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1743,
382,
1528,
12,
2890,
4672,
3536,
6987,
11522,
316,
977,
819,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
reactor.connectSSL(host, port, factory, ssl.ClientContextFactory(useM2=1)) | reactor.connectSSL(host, port, self.factory, ssl.ClientContextFactory(useM2=1)) | def __getMail(self): | cd0d773c52b7eb7870b5e37e0d7c668e7d25477c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cd0d773c52b7eb7870b5e37e0d7c668e7d25477c/imap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
6759,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
6759,
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,
-1... |
self.picked = 0 | def __init__(self, at1, at2): """create a bond from atom at1 to atom at2. the key created will be the same whichever order the atoms are given, and is used to compare bonds. """ self.atom1 = at1 self.atom2 = at2 self.picked = 0 self.key = 65536*min(at1.key,at2.key)+max(at1.key,at2.key) | 06438827b0e8c767698eab722a3560397d34cddb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/06438827b0e8c767698eab722a3560397d34cddb/chem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
622,
21,
16,
622,
22,
4672,
3536,
2640,
279,
8427,
628,
3179,
622,
21,
358,
3179,
622,
22,
18,
326,
498,
2522,
903,
506,
326,
1967,
600,
335,
580,
502,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
622,
21,
16,
622,
22,
4672,
3536,
2640,
279,
8427,
628,
3179,
622,
21,
358,
3179,
622,
22,
18,
326,
498,
2522,
903,
506,
326,
1967,
600,
335,
580,
502,... | |
file_root = path.join(avatars_root, str(self.size)) file_name, defaulting = self.get_filename(profile) | file_root, file_name, defaulting = self.get_file(profile) | def render(self, context): try: # If size is not an int, then it's a Variable, so try to resolve it. if not isinstance(self.size, int): self.size = int(self.size.resolve(context)) self.user = self.get_user(context) except Exception, e: print e return '' # just die... if self.size > _settings.DEFAULT_AVATAR_WIDTH: return '' # unacceptable profile = self.get_profile() # Avatar's heaven, where all the avatars go. avatars_root = path.join(_settings.AVATARS_DIR, slugify(self.user.username)) file_root = path.join(avatars_root, str(self.size)) file_name, defaulting = self.get_filename(profile) if defaulting: file_root = _settings.AVATARS_DIR if self.size_equals(): return self.as_url(path.join(file_root, file_name)) if not path.exists(file_root): makedirs(file_root) file_path = path.join(file_root, file_name) # I can't return an absolute path... can I? if not defaulting: if path.exists(file_path): file_url = self.as_url(file_path) return file_url else: if not profile.avatar: file_root = _settings.AVATARS_DIR file_path = path.join(file_root, _settings.DEFAULT_AVATAR) # Oops, I din't find it, let's try to generate it. if path.exists(file_path): orig_file = Image(file_path) dest_root = path.join(avatars_root, str(self.size)) try: makedirs(dest_root) except Exception, e: print e # Save the new path for later... dest_path = path.join(dest_root, file_name) else: # Did my best... return '' # fail silently orig_file.scale(self.size) if orig_file.write(dest_path): return self.as_url(dest_path) else: print '=== ERROR ===' return '' # damn! Close but no cigar... | fb471fc66a6fd102cc4193eb8a9f22fae8639041 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12976/fb471fc66a6fd102cc4193eb8a9f22fae8639041/avatars.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
819,
4672,
775,
30,
468,
971,
963,
353,
486,
392,
509,
16,
1508,
518,
1807,
279,
7110,
16,
1427,
775,
358,
2245,
518,
18,
309,
486,
1549,
12,
2890,
18,
1467,
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,
1743,
12,
2890,
16,
819,
4672,
775,
30,
468,
971,
963,
353,
486,
392,
509,
16,
1508,
518,
1807,
279,
7110,
16,
1427,
775,
358,
2245,
518,
18,
309,
486,
1549,
12,
2890,
18,
1467,
16,
... |
mesh.elements, mesh.elemFamily = self._getElems(fileRoot) | mesh.elements, mesh.elemFamilies = self._getElems(fileRoot) | def generate(self, fileRoot): """Get a finite element mesh.""" | 6b41ba3ce12f694fa0d2b888493f6336611ca2f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8645/6b41ba3ce12f694fa0d2b888493f6336611ca2f3/MeshImporterTecton.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
585,
2375,
4672,
3536,
967,
279,
25922,
930,
6986,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
585,
2375,
4672,
3536,
967,
279,
25922,
930,
6986,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
raise Error, "Incorrect resource-datasize, diff="+`self.rlen` | raise Error, "Incorrect resource-datasize, diff="+`self.rlen` | def close(self): | f1d302d15f45741d8b0d5e81b4b0e5a61c6fa580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f1d302d15f45741d8b0d5e81b4b0e5a61c6fa580/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
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,
1746,
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,
-... |
oldctx = dict(self.localcontext) | def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): oldctx = dict(self.localcontext) for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.localcontext) except GeneratorExit: continue except Exception: logging.getLogger('report').exception() continue if n.get('rml_tag'): try: (tag,attr) = eval(n.get('rml_tag'),{}, self.localcontext) n2 = copy.deepcopy(n) n2.tag = tag n2.attrib.update(attr) yield n2 except GeneratorExit: yield n except Exception: logging.getLogger('report').exception() yield n else: yield n self.localcontext = oldctx continue if self and self.localcontext and n.get('rml_except'): try: eval(n.get('rml_except'), {}, self.localcontext) except GeneratorExit: continue except Exception: logging.getLogger('report').exception() continue if self and self.localcontext and n.get('rml_tag'): try: (tag,attr) = eval(n.get('rml_tag'),{}, self.localcontext) n2 = copy.deepcopy(n) n2.tag = tag n2.attrib.update(attr or {}) yield n2 tagname = '' except GeneratorExit: pass except Exception: logging.getLogger('report').exception() pass if (tagname is None) or (n.tag==tagname): yield n | 9f74749726b709621092bee198e71b720bcf15d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9f74749726b709621092bee198e71b720bcf15d2/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3624,
67,
588,
12,
2159,
16,
365,
33,
7036,
16,
25586,
33,
7036,
4672,
364,
290,
316,
756,
30,
309,
365,
471,
365,
18,
3729,
2472,
471,
290,
18,
588,
2668,
86,
781,
67,
6498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3624,
67,
588,
12,
2159,
16,
365,
33,
7036,
16,
25586,
33,
7036,
4672,
364,
290,
316,
756,
30,
309,
365,
471,
365,
18,
3729,
2472,
471,
290,
18,
588,
2668,
86,
781,
67,
6498,
... | |
product_context.update(uom=line.product_uom.id) | product_context.update(uom=line.product_uom.id,date=inv.date) | def action_confirm(self, cr, uid, ids, context=None): """ Confirm the inventory and writes its finished date @return: True """ if context is None: context = {} # to perform the correct inventory corrections we need analyze stock location by # location, never recursively, so we use a special context product_context = dict(context, compute_child=False) | 16f6a1eebc8fbc9a60923408704bdf6fe22f8217 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/16f6a1eebc8fbc9a60923408704bdf6fe22f8217/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
10927,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
3536,
17580,
326,
13086,
471,
7262,
2097,
6708,
1509,
632,
2463,
30,
1053,
3536,
309,
819,
353,
599,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
10927,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
3536,
17580,
326,
13086,
471,
7262,
2097,
6708,
1509,
632,
2463,
30,
1053,
3536,
309,
819,
353,
599,
3... |
def _arg_arg_op_with_imm(self, gv_x, gv_y, opcode, opcodei, | def _arg_uimm_op(self, gv_x, gv_imm, opcode): assert gv_imm.fits_in_uimm() gv_result = Var() self.insns.append( insn.Insn_GPR__GPR_IMM(opcode, gv_result, [gv_x, gv_imm])) return gv_result def _arg_arg_op_with_simm(self, gv_x, gv_y, opcode, opcodei, | def _arg_arg_op_with_imm(self, gv_x, gv_y, opcode, opcodei, commutative=False): if gv_y.fits_in_immediate(): return self._arg_imm_op(gv_x, gv_y, opcodei) elif gv_x.fits_in_immediate() and commutative: return self._arg_imm_op(gv_y, gv_x, opcodei) else: return self._arg_arg_op(gv_x, gv_y, opcode) | 1a13bb2e4052fbbe77efb6b6dbf2fa6c38d03672 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/1a13bb2e4052fbbe77efb6b6dbf2fa6c38d03672/rgenop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3175,
67,
89,
381,
81,
67,
556,
12,
2890,
16,
11404,
67,
92,
16,
11404,
67,
381,
81,
16,
11396,
4672,
1815,
11404,
67,
381,
81,
18,
18352,
67,
267,
67,
89,
381,
81,
1435,
1140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3175,
67,
89,
381,
81,
67,
556,
12,
2890,
16,
11404,
67,
92,
16,
11404,
67,
381,
81,
16,
11396,
4672,
1815,
11404,
67,
381,
81,
18,
18352,
67,
267,
67,
89,
381,
81,
1435,
1140... |
result = result + self.classlink(c, modname, classes) | result = result + self.classlink(c, modname) | def formattree(self, tree, modname, classes={}, parent=None): """Produce HTML for a class tree as given by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): c, bases = entry result = result + '<dt><font face="helvetica, arial"><small>' result = result + self.classlink(c, modname, classes) if bases and bases != (parent,): parents = [] for base in bases: parents.append(self.classlink(base, modname, classes)) result = result + '(' + join(parents, ', ') + ')' result = result + '\n</small></font></dt>' elif type(entry) is type([]): result = result + '<dd>\n%s</dd>\n' % self.formattree( entry, modname, classes, c) return '<dl>\n%s</dl>\n' % result | b7a48300cd653964c82ae34eae9fab9bebef3578 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b7a48300cd653964c82ae34eae9fab9bebef3578/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
3413,
12,
2890,
16,
2151,
16,
16037,
16,
3318,
28793,
982,
33,
7036,
4672,
3536,
25884,
3982,
364,
279,
667,
2151,
487,
864,
635,
5334,
18,
588,
830,
345,
334,
992,
1435,
12123,
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,
740,
3413,
12,
2890,
16,
2151,
16,
16037,
16,
3318,
28793,
982,
33,
7036,
4672,
3536,
25884,
3982,
364,
279,
667,
2151,
487,
864,
635,
5334,
18,
588,
830,
345,
334,
992,
1435,
12123,
5... |
troveFlavors, | troveFlavors, | def nextVersions(repos, db, sourceBinaryList, alwaysBumpCount=False): # search for all the packages that are being created by this cook - # we take the max of all of these versions as our latest. query = {} if repos: for sourceVersion, troveNames, troveFlavors in sourceBinaryList: if sourceVersion.isOnLocalHost(): continue pkgNames = set([x.split(':')[-1] for x in troveNames]) for pkgName in pkgNames: if pkgName not in query: query[pkgName] = {} query[pkgName][sourceVersion.getBinaryVersion().branch()] = None if repos and not sourceVersion.isOnLocalHost(): d = repos.getTroveVersionsByBranch(query, troveTypes = repos.TROVE_QUERY_ALL) else: d = {} nextVersions = [] for sourceVersion, troveNames, troveFlavors in sourceBinaryList: if not isinstance(troveFlavors, (list, tuple, set)): troveFlavors = set([troveFlavors]) else: troveFlavors = set(troveFlavors) newVersion = _nextVersionFromQuery(d, db, troveNames, sourceVersion, troveFlavors, alwaysBumpCount=alwaysBumpCount) nextVersions.append(newVersion) return nextVersions | 2cc6dee88328f8de3a806a1ab97e2315001b8307 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/2cc6dee88328f8de3a806a1ab97e2315001b8307/nextversion.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
5940,
12,
15564,
16,
1319,
16,
1084,
5905,
682,
16,
3712,
38,
2801,
1380,
33,
8381,
4672,
468,
1623,
364,
777,
326,
5907,
716,
854,
3832,
2522,
635,
333,
15860,
300,
468,
732,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5940,
12,
15564,
16,
1319,
16,
1084,
5905,
682,
16,
3712,
38,
2801,
1380,
33,
8381,
4672,
468,
1623,
364,
777,
326,
5907,
716,
854,
3832,
2522,
635,
333,
15860,
300,
468,
732,
48... |
open_tag_re = re.compile(r'<(\w+)\s.*?[^/]?>') | open_tag_re = re.compile(r'<(\w+)(\s.*)?[^/]?>') | def _html_splitlines(lines): """Tracks open and close tags in lines of HTML text and yields lines that have no tags spanning more than one line.""" open_tag_re = re.compile(r'<(\w+)\s.*?[^/]?>') close_tag_re = re.compile(r'</(\w+)>') open_tags = [] for line in lines: # Reopen tags still open from the previous line for tag in open_tags: line = tag.group(0) + line open_tags = [] # Find all tags opened on this line for tag in open_tag_re.finditer(line): open_tags.append(tag) # Find all tags closed on this line for ctag in close_tag_re.finditer(line): for otag in open_tags: if otag.group(1) == ctag.group(1): open_tags.remove(otag) break # Close all tags still open at the end of line, they'll get reopened at # the beginning of the next line for tag in open_tags: line += '</%s>' % tag.group(1) yield line | 56ce9867ecf56d0e520d7c913f7eafa28bffa44e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/56ce9867ecf56d0e520d7c913f7eafa28bffa44e/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2620,
67,
4939,
3548,
12,
3548,
4672,
3536,
22138,
1696,
471,
1746,
2342,
316,
2362,
434,
3982,
977,
471,
16932,
2362,
716,
1240,
1158,
2342,
1694,
10903,
1898,
2353,
1245,
980,
12123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2620,
67,
4939,
3548,
12,
3548,
4672,
3536,
22138,
1696,
471,
1746,
2342,
316,
2362,
434,
3982,
977,
471,
16932,
2362,
716,
1240,
1158,
2342,
1694,
10903,
1898,
2353,
1245,
980,
12123... |
n = 0 for zz in range(chg.shape[2]): for yy in range(chg.shape[1]): for xx in range(chg.shape[0]): if format.lower() == 'chg': fobj.write(' % n += 1 else: fobj.write(' %17.10E' % (chg[xx, yy, zz] * volume)) n += 2 if n % 10 == 0: fobj.write('\n') | chgtmp=chg.T.ravel() chgtmp=chgtmp*volume chgtmp=tuple(chgtmp) if format.lower() == 'chg': for ii in range((len(chgtmp)-1)/10): fobj.write(' % % ) if len(chgtmp)%10==0: fobj.write(' % % else: for ii in range(len(chgtmp)%10): fobj.write((' % else: for ii in range((len(chgtmp)-1)/5): fobj.write(' %17.10E %17.10E %17.10E %17.10E %17.10E\n' % chgtmp[ii*5:(ii+1)*5]) if len(chgtmp)%5==0: fobj.write(' %17.10E %17.10E %17.10E %17.10E %17.10E' % chgtmp[len(chgtmp)-5:len(chgtmp)]) else: for ii in range(len(chgtmp)%5): fobj.write((' %17.10E') % chgtmp[len(chgtmp)-len(chgtmp)%5+ii]) fobj.write('\n') del chgtmp | def _write_chg(self, fobj, chg, volume, format='chg'): """Write charge density | efccf425cd5b219de0c47a831bea0635af694e37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5572/efccf425cd5b219de0c47a831bea0635af694e37/vasp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
343,
75,
12,
2890,
16,
24705,
16,
462,
75,
16,
3940,
16,
740,
2218,
343,
75,
11,
4672,
3536,
3067,
13765,
12142,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
343,
75,
12,
2890,
16,
24705,
16,
462,
75,
16,
3940,
16,
740,
2218,
343,
75,
11,
4672,
3536,
3067,
13765,
12142,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
assert (false) | assert (False) | def ConvertDrawableObjectToDataObject (self, x, y): """ You must implement this routine to create data object for drag and drop """ assert (false) | c0cecfcb7704c0cc4c05de4b417e49f03bc3a0f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/c0cecfcb7704c0cc4c05de4b417e49f03bc3a0f8/SimpleCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4037,
16149,
921,
774,
21881,
261,
2890,
16,
619,
16,
677,
4672,
3536,
4554,
1297,
2348,
333,
12245,
358,
752,
501,
733,
364,
8823,
471,
3640,
3536,
1815,
261,
5743,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4037,
16149,
921,
774,
21881,
261,
2890,
16,
619,
16,
677,
4672,
3536,
4554,
1297,
2348,
333,
12245,
358,
752,
501,
733,
364,
8823,
471,
3640,
3536,
1815,
261,
5743,
13,
2,
-100,
-100,
... |
raise ValueError("__package__ not set to a string") base = package.rsplit('.', level)[0] | raise ValueError("'package' not set to a string") try: dot_rindex = package.rindex('.', level)[0] base = package[:dot_rindex] except ValueError: base = package | def _resolve_name(name, package, level): """Return the absolute name of the module to be imported.""" level -= 1 try: if package.count('.') < level: raise ValueError("attempted relative import beyond top-level " "package") except AttributeError: raise ValueError("__package__ not set to a string") base = package.rsplit('.', level)[0] if name: return "%s.%s" % (base, name) else: return base | 2af50c847ff337e97ca0e0085fe50bc750d063c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/2af50c847ff337e97ca0e0085fe50bc750d063c6/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
67,
529,
12,
529,
16,
2181,
16,
1801,
4672,
3536,
990,
326,
4967,
508,
434,
326,
1605,
358,
506,
9101,
12123,
1801,
3947,
404,
775,
30,
309,
2181,
18,
1883,
2668,
1093,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10828,
67,
529,
12,
529,
16,
2181,
16,
1801,
4672,
3536,
990,
326,
4967,
508,
434,
326,
1605,
358,
506,
9101,
12123,
1801,
3947,
404,
775,
30,
309,
2181,
18,
1883,
2668,
1093,
13,... |
self.state_vec[(ver,val)] = self.cursor.fetchone()[0] | self.state_vec[ifo][(ver,val)] = self.cursor.fetchone()[0] | def publish_state(self, ifo, start_time, start_time_ns, end_time, end_time_ns, ver, val ): """ Publish a state segment for a state vector in the database """ | f244b54b9d47667fad81e311fc9edc9f74c51291 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/f244b54b9d47667fad81e311fc9edc9f74c51291/statedb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
67,
2019,
12,
2890,
16,
21479,
16,
787,
67,
957,
16,
787,
67,
957,
67,
2387,
16,
679,
67,
957,
16,
679,
67,
957,
67,
2387,
16,
1924,
16,
1244,
262,
30,
3536,
9761,
279,
919,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3808,
67,
2019,
12,
2890,
16,
21479,
16,
787,
67,
957,
16,
787,
67,
957,
67,
2387,
16,
679,
67,
957,
16,
679,
67,
957,
67,
2387,
16,
1924,
16,
1244,
262,
30,
3536,
9761,
279,
919,
... |
P = V3fVectorData() P.append( V3f( -1, 0, -1 ) ) P.append( V3f( -1, 0, 1 ) ) P.append( V3f( 1, 0, 1 ) ) P.append( V3f( -0.9, 0, -0.9 ) ) | P = V3dVectorData() P.append( V3d( -1, 0, -1 ) ) P.append( V3d( -1, 0, 1 ) ) P.append( V3d( 1, 0, 1 ) ) P.append( V3d( -0.9, 0, -0.9 ) ) | def testConcave( self ) : """ Test TriangulateOp with a concave polygon""" verticesPerFace = IntVectorData() verticesPerFace.append( 4 ) vertexIds = IntVectorData() vertexIds.append( 0 ) vertexIds.append( 1 ) vertexIds.append( 2 ) vertexIds.append( 3 ) P = V3fVectorData() P.append( V3f( -1, 0, -1 ) ) P.append( V3f( -1, 0, 1 ) ) P.append( V3f( 1, 0, 1 ) ) P.append( V3f( -0.9, 0, -0.9 ) ) m = MeshPrimitive( verticesPerFace, vertexIds ) m["P"] = PrimitiveVariable( PrimitiveVariable.Interpolation.Vertex, P ) op = TriangulateOp() op.parameters().input = m # Concave faces not supported by default self.assertRaises( RuntimeError, op ) op.parameters().throwExceptions = False result = op() | c85c506c1f8c222aa0f06b7bd7067fb9a7dd4070 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/c85c506c1f8c222aa0f06b7bd7067fb9a7dd4070/TriangulateOp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
442,
71,
836,
12,
365,
262,
294,
3536,
7766,
10000,
539,
6243,
3817,
598,
279,
20570,
836,
7154,
8395,
225,
6928,
2173,
11824,
273,
3094,
5018,
751,
1435,
6928,
2173,
11824,
18,
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,
442,
71,
836,
12,
365,
262,
294,
3536,
7766,
10000,
539,
6243,
3817,
598,
279,
20570,
836,
7154,
8395,
225,
6928,
2173,
11824,
273,
3094,
5018,
751,
1435,
6928,
2173,
11824,
18,
69... |
self.penaltyRules.append(Rule('false declaration of mah jongg by two players', r'.*\bm||Aabsolute payers=2 payees=2', points = -150)) self.penaltyRules.append(Rule('false declaration of mah jongg by three players', r'.*\bm||Aabsolute payers=3', points = -100)) | self.penaltyRules.append(Rule('false declaration of mah jongg by two players', r'.*\bm||Aabsolute payers=2 payees=2', points = -300)) self.penaltyRules.append(Rule('false declaration of mah jongg by three players', r'.*\bm||Aabsolute payers=3', points = -300)) | def addPenaltyRules(self): self.penaltyRules.append(Rule('false naming of discard, claimed for chi', r'.*', points = -50)) self.penaltyRules.append(Rule('false naming of discard, claimed for pung/kong', r'.*', points = -100)) self.penaltyRules.append(Rule('false naming of discard, claimed for mah jongg', r'.*\bm||Aabsolute payees=3', points = -300)) self.penaltyRules.append(Rule('false naming of discard, claimed for mah jongg and false declaration of mah jongg', r'.*\bm||Aabsolute payers=2 payees=2', points = -300)) self.penaltyRules.append(Rule('false declaration of mah jongg by one player', r'.*\bm||Aabsolute payees=3', points = -300)) self.penaltyRules.append(Rule('false declaration of mah jongg by two players', r'.*\bm||Aabsolute payers=2 payees=2', points = -150)) self.penaltyRules.append(Rule('false declaration of mah jongg by three players', r'.*\bm||Aabsolute payers=3', points = -100)) self.manualRules.append(Rule('dangerous game', r'.*\bm||Apayforall')) | 303d87e51d8bec8833d26ac23efe77a21a95b8a3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1679/303d87e51d8bec8833d26ac23efe77a21a95b8a3/rulesets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
24251,
15006,
4478,
12,
2890,
4672,
365,
18,
1907,
15006,
4478,
18,
6923,
12,
2175,
2668,
5743,
14634,
434,
10388,
16,
7516,
329,
364,
17198,
2187,
436,
11,
4509,
2187,
3143,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
24251,
15006,
4478,
12,
2890,
4672,
365,
18,
1907,
15006,
4478,
18,
6923,
12,
2175,
2668,
5743,
14634,
434,
10388,
16,
7516,
329,
364,
17198,
2187,
436,
11,
4509,
2187,
3143,
273,
3... |
<< DataProperty("MJD", mjd) | << DataProperty("MJD", mjd) \ << LogRec.endr | def process(self): """ Execute the needed processing code for this Stage | f015d097d46a39a35abed2040495371af8cb0bb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6518/f015d097d46a39a35abed2040495371af8cb0bb9/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
4672,
3536,
7903,
326,
3577,
4929,
981,
364,
333,
16531,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12,
2890,
4672,
3536,
7903,
326,
3577,
4929,
981,
364,
333,
16531,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
base = url + "/" logging.info("Guessed base = %s", base) return base if required: ErrorExit("Can't find URL in output from svn info") return None | content = RunShell("svn cat", [filename]) keywords = RunShell("svn -rBASE propget svn:keywords", [filename], silent_ok=True) if keywords: content = self._CollapseKeywords(content, keywords) else: StatusUpdate("svn status returned unexpected output: %s" % status) sys.exit(False) return content | def GuessBase(required): """Returns the SVN base URL. Args: required: If true, exits if the url can't be guessed, otherwise None is returned. """ info = RunShell("svn info") for line in info.splitlines(): words = line.split() if len(words) == 2 and words[0] == "URL:": url = words[1] scheme, netloc, path, params, query, fragment = urlparse.urlparse(url) if netloc.endswith("svn.python.org"): if netloc == "svn.python.org": if path.startswith("/projects/"): path = path[9:] elif netloc != "pythondev@svn.python.org": ErrorExit("Unrecognized Python URL: %s" % url) base = "http://svn.python.org/view/*checkout*%s/" % path logging.info("Guessed Python base = %s", base) elif netloc.endswith("svn.collab.net"): if path.startswith("/repos/"): path = path[6:] base = "http://svn.collab.net/viewvc/*checkout*%s/" % path logging.info("Guessed CollabNet base = %s", base) elif netloc.endswith(".googlecode.com"): base = url + "/" if base.startswith("https"): base = "http" + base[5:] logging.info("Guessed Google Code base = %s", base) else: base = url + "/" logging.info("Guessed base = %s", base) return base if required: ErrorExit("Can't find URL in output from svn info") return None | 372b635f16b9051bf467c481e9fdbfc5f451cc3a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/372b635f16b9051bf467c481e9fdbfc5f451cc3a/upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30282,
2171,
12,
4718,
4672,
3536,
1356,
326,
29537,
50,
1026,
1976,
18,
225,
6634,
30,
1931,
30,
971,
638,
16,
19526,
309,
326,
880,
848,
1404,
506,
3058,
281,
730,
16,
3541,
599,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30282,
2171,
12,
4718,
4672,
3536,
1356,
326,
29537,
50,
1026,
1976,
18,
225,
6634,
30,
1931,
30,
971,
638,
16,
19526,
309,
326,
880,
848,
1404,
506,
3058,
281,
730,
16,
3541,
599,
353... |
s = _('1 week') | _weeks = int(self.day / 7) s = self.ngettext("%(number)s week", "%(number)s weeks", _weeks) % {'number': _weeks} | def pretty(self): ''' print up the date date using one of these nice formats.. ''' if self.year: if self.year == 1: s = _('1 year') else: s = _('%(number)s years')%{'number': self.year} elif self.month or self.day > 13: days = (self.month * 30) + self.day if days > 28: if int(days/30) > 1: s = _('%(number)s months')%{'number': int(days/30)} else: s = _('1 month') else: s = _('%(number)s weeks')%{'number': int(days/7)} elif self.day > 7: s = _('1 week') elif self.day > 1: s = _('%(number)s days')%{'number': self.day} elif self.day == 1 or self.hour > 12: if self.sign > 0: return _('tomorrow') else: return _('yesterday') elif self.hour > 1: s = _('%(number)s hours')%{'number': self.hour} elif self.hour == 1: if self.minute < 15: s = _('an hour') elif self.minute/15 == 2: s = _('1 1/2 hours') else: s = _('1 %(number)s/4 hours')%{'number': self.minute/15} elif self.minute < 1: if self.sign > 0: return _('in a moment') else: return _('just now') elif self.minute == 1: s = _('1 minute') elif self.minute < 15: s = _('%(number)s minutes')%{'number': self.minute} elif int(self.minute/15) == 2: s = _('1/2 an hour') else: s = _('%(number)s/4 hour')%{'number': int(self.minute/15)} if self.sign < 0: s = s + _(' ago') else: s = _('in ') + s return s | 57c5533dd07b22f90fb954d2494eab65061eef34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/57c5533dd07b22f90fb954d2494eab65061eef34/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7517,
12,
2890,
4672,
9163,
1172,
731,
326,
1509,
1509,
1450,
1245,
434,
4259,
13752,
6449,
838,
9163,
309,
365,
18,
6874,
30,
309,
365,
18,
6874,
422,
404,
30,
272,
273,
389,
2668,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7517,
12,
2890,
4672,
9163,
1172,
731,
326,
1509,
1509,
1450,
1245,
434,
4259,
13752,
6449,
838,
9163,
309,
365,
18,
6874,
30,
309,
365,
18,
6874,
422,
404,
30,
272,
273,
389,
2668,
21... |
print (1) | def keyDown_ (self, event): if (not self.reqHandler): print (1) return if (self.sx != None and self.sy != None): mods = event.modifierFlags () if (mods == 256): # remember that the image is flipped vertically imageID = self.mapping[self.frameNo] height = self.frameBuffers[imageID].height key = event.characters ()[0] # update the RequestHandlerClass fields self.reqHandler.x = self.sx self.reqHandler.y = height - self.sy self.reqHandler.key = key self.reqHandler.frame = self.frameNo self.reqHandler.gotKey = True self.reqHandler = None else: sys.stderr.write ('no self.sx and/or no self.sy\n') return | 52c2a4ca79f0690dbaca69ecc01d542f6f0eb6ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2360/52c2a4ca79f0690dbaca69ecc01d542f6f0eb6ea/PyOpenGLView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
4164,
67,
261,
2890,
16,
871,
4672,
309,
261,
902,
365,
18,
3658,
1503,
4672,
327,
225,
309,
261,
2890,
18,
30319,
480,
599,
471,
365,
18,
9009,
480,
599,
4672,
15546,
273,
871,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
498,
4164,
67,
261,
2890,
16,
871,
4672,
309,
261,
902,
365,
18,
3658,
1503,
4672,
327,
225,
309,
261,
2890,
18,
30319,
480,
599,
471,
365,
18,
9009,
480,
599,
4672,
15546,
273,
871,
... | |
return Expression.__call__(self, pars) | return Expression.__call__(self, *pars) | def __call__(self, pars): for par in pars: if isinstance(par, Expression): return Expression.__call__(self, pars) return self.Value(*pars) | 0aea67b6248de24bf5c20988f84fdf8ba68e066d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12571/0aea67b6248de24bf5c20988f84fdf8ba68e066d/primitives.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
13249,
4672,
364,
779,
316,
13249,
30,
309,
1549,
12,
1065,
16,
5371,
4672,
327,
5371,
16186,
1991,
972,
12,
2890,
16,
380,
8954,
13,
327,
365,
18,
620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
1991,
972,
12,
2890,
16,
13249,
4672,
364,
779,
316,
13249,
30,
309,
1549,
12,
1065,
16,
5371,
4672,
327,
5371,
16186,
1991,
972,
12,
2890,
16,
380,
8954,
13,
327,
365,
18,
620,
... |
self.thread=MyThread(self) self.lock=thread.allocate_lock() self.terminateThread=False | self.searching=False | def __init__(self, parent=None, signalManager=None, name="SVM"): OWWidget.__init__(self, parent, signalManager, name) self.inputs=[("Example Table", ExampleTable, self.setData)] self.outputs=[("Learner", orange.Learner),("Classifier", orange.Classifier),("Support Vectors", ExampleTable)] | a017a62eeb64cb8f18353a5ad8eaccb9881945cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/a017a62eeb64cb8f18353a5ad8eaccb9881945cf/OWSVM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
33,
7036,
16,
508,
1546,
55,
7397,
6,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
508,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
33,
7036,
16,
508,
1546,
55,
7397,
6,
4672,
18233,
4609,
16186,
2738,
972,
12,
2890,
16,
982,
16,
4277,
1318,
16,
508,
1... |
if q.lower().strip() != 'y': | if q.lower().strip() != _('y'): | def do_remove_custom_column(db, label, force): if not force: q = raw_input(_('You will lose all data in the column: %r.' ' Are you sure (y/n)? ')%label) if q.lower().strip() != 'y': return db.delete_custom_column(label=label) prints('Column %r removed.'%label) | 6f07ecab4a5b3c2cdb3c04a3cd39d6f82119ea10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/6f07ecab4a5b3c2cdb3c04a3cd39d6f82119ea10/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4479,
67,
3662,
67,
2827,
12,
1966,
16,
1433,
16,
2944,
4672,
309,
486,
2944,
30,
1043,
273,
1831,
67,
2630,
24899,
2668,
6225,
903,
29612,
777,
501,
316,
326,
1057,
30,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4479,
67,
3662,
67,
2827,
12,
1966,
16,
1433,
16,
2944,
4672,
309,
486,
2944,
30,
1043,
273,
1831,
67,
2630,
24899,
2668,
6225,
903,
29612,
777,
501,
316,
326,
1057,
30,
738,
... |
maxWidths[0] = maxWidths[0] - (bulletRight - style.firstLineIndent) | maxWidths[0] = maxWidths[0] - (bulletRight - indent) | def _handleBulletWidth(bulletText,style,maxWidths): '''work out bullet width and adjust maxWidths[0] if neccessary ''' if bulletText <> None: if type(bulletText) is StringType: bulletWidth = stringWidth( bulletText, style.bulletFontName, style.bulletFontSize) else: #it's a list of fragments bulletWidth = 0 for f in bulletText: bulletWidth = bulletWidth + stringWidth(f.text, f.fontName, f.fontSize) bulletRight = style.bulletIndent + bulletWidth if bulletRight > style.firstLineIndent: #..then it overruns, and we have less space available on line 1 maxWidths[0] = maxWidths[0] - (bulletRight - style.firstLineIndent) | b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
38,
19994,
2384,
12,
70,
19994,
1528,
16,
4060,
16,
1896,
22407,
4672,
9163,
1252,
596,
31650,
1835,
471,
5765,
17681,
87,
63,
20,
65,
309,
290,
557,
614,
814,
9163,
309,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
38,
19994,
2384,
12,
70,
19994,
1528,
16,
4060,
16,
1896,
22407,
4672,
9163,
1252,
596,
31650,
1835,
471,
5765,
17681,
87,
63,
20,
65,
309,
290,
557,
614,
814,
9163,
309,
31... |
if _arguments.has_key('errn'): | if _arguments.get('errn', 0): | def run(self, _no_object=None, _attributes={}, **_arguments): """run: Run the Terminal application Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'core' _subcode = 'oapp' | d883fe0f8edb19c1db13af7f62ca177c49791de6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d883fe0f8edb19c1db13af7f62ca177c49791de6/Terminal_Suite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
389,
2135,
67,
1612,
33,
7036,
16,
389,
4350,
28793,
2826,
67,
7099,
4672,
3536,
2681,
30,
1939,
326,
18778,
2521,
18317,
1237,
389,
4350,
30,
1716,
1802,
1133,
1566,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1086,
12,
2890,
16,
389,
2135,
67,
1612,
33,
7036,
16,
389,
4350,
28793,
2826,
67,
7099,
4672,
3536,
2681,
30,
1939,
326,
18778,
2521,
18317,
1237,
389,
4350,
30,
1716,
1802,
1133,
1566,... |
'psf': psf | 'psf': psf, 'apCorr': apCorr | def sfmPipe(calexp, psf): clip = { 'scienceExposure': calexp, 'psf': psf } clip = runStage(measPipe.SourceDetectionStage, """#<?cfg paf policy?> inputKeys: { exposure: scienceExposure psf: psf } outputKeys: { positiveDetection: positiveFootprintSet } backgroundPolicy: { algorithm: NONE } """, clip) clip = runStage(measPipe.SourceMeasurementStage, """#<?cfg paf policy?> inputKeys: { exposure: scienceExposure psf: psf positiveDetection: positiveFootprintSet } outputKeys: { sources: sourceSet } """, clip) clip = runStage(measPipe.ComputeSourceSkyCoordsStage, """#<?cfg paf policy?> inputKeys: { apCorr: apCorr sourceSet: sourceSet } """, clip) clip = runStage(measPipe.ComputeSourceSkyCoordsStage, """#<?cfg paf policy?> inputKeys: { sources: sourceSet exposure: scienceExposure } """, clip) | 499935c71000a91e541c2d2da2db2ce4f70d9f11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6538/499935c71000a91e541c2d2da2db2ce4f70d9f11/SFM_ImSim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9033,
81,
11546,
12,
771,
2749,
16,
28687,
4672,
6807,
273,
288,
296,
1017,
6254,
424,
11291,
4278,
1443,
2749,
16,
296,
1121,
74,
4278,
28687,
16,
296,
438,
6217,
86,
4278,
513,
6217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9033,
81,
11546,
12,
771,
2749,
16,
28687,
4672,
6807,
273,
288,
296,
1017,
6254,
424,
11291,
4278,
1443,
2749,
16,
296,
1121,
74,
4278,
28687,
16,
296,
438,
6217,
86,
4278,
513,
6217,
... |
opts, args = getopt.getopt(argv[1:], "hm:p:", ["help","month=","probe=","output=","with-panda"]) | opts, args = getopt.getopt(argv[1:], "hm:p:", ["help","month=","probe=","output=","with-panda","groupby="]) | def UseArgs(argv): global gProbename,gOutput,gWithPanda if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "hm:p:", ["help","month=","probe=","output=","with-panda"]) except getopt.error, msg: raise Usage(msg) # more code, unchanged except Usage, err: print >>sys.stderr, err.msg print >>sys.stderr, "for help use --help" return 2 start = "" end = "" if len(argv) > len(opts) + 1: start = argv[len(opts)+1] if len(argv) > len(opts) + 2: end = argv[len(opts)+2] SetDate(start,end) for o, a in opts: if o in ("-m","--month"): month = a; if o in ("-p","--probe"): gProbename = a; if o in ("--output"): gOutput = a if o in ("--with-panda"): gWithPanda = True | 55368fa17dc9f81d3651509634f0008b9277083b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/55368fa17dc9f81d3651509634f0008b9277083b/PSACCTReport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2672,
2615,
12,
19485,
4672,
2552,
314,
9152,
1069,
16,
75,
1447,
16,
75,
1190,
52,
464,
69,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
775,
30,
775,
30,
1500,
16,
833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2672,
2615,
12,
19485,
4672,
2552,
314,
9152,
1069,
16,
75,
1447,
16,
75,
1190,
52,
464,
69,
225,
309,
5261,
353,
599,
30,
5261,
273,
2589,
18,
19485,
775,
30,
775,
30,
1500,
16,
833... |
namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not rstrip(lines[1]): if lines[0]: namesec = namesec + ' - ' + lines[0] lines = lines[2:] result = self.section('NAME', namesec) | synop, desc = splitdoc(getdoc(object)) result = self.section('NAME', name + (synop and ' - ' + synop)) | def docmodule(self, object, name=None): """Produce text documentation for a given module object.""" name = object.__name__ # ignore the passed-in name namesec = name lines = split(strip(getdoc(object)), '\n') if len(lines) == 1: if lines[0]: namesec = namesec + ' - ' + lines[0] lines = [] elif len(lines) >= 2 and not rstrip(lines[1]): if lines[0]: namesec = namesec + ' - ' + lines[0] lines = lines[2:] result = self.section('NAME', namesec) | 4483cbd7eb6854684bc5af9c43d558ab8a2bcacf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4483cbd7eb6854684bc5af9c43d558ab8a2bcacf/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
4672,
3536,
25884,
977,
7323,
364,
279,
864,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305,
326,
2275,
17,
267,
508,
1257... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
997,
2978,
12,
2890,
16,
733,
16,
508,
33,
7036,
4672,
3536,
25884,
977,
7323,
364,
279,
864,
1605,
733,
12123,
508,
273,
733,
16186,
529,
972,
468,
2305,
326,
2275,
17,
267,
508,
1257... |
keys = targets.keys() | keys = list(targets.keys()) | def testSingleComplexTarget(self): targets = {1: [0, 1, 2]} with mock_contextmanager_generator() as targets[1][0]: self.assertEqual(targets.keys(), [1]) self.assertEqual(targets[1][0].__class__, MockResource) with mock_contextmanager_generator() as targets.values()[0][1]: self.assertEqual(targets.keys(), [1]) self.assertEqual(targets[1][1].__class__, MockResource) with mock_contextmanager_generator() as targets[2]: keys = targets.keys() keys.sort() self.assertEqual(keys, [1, 2]) class C: pass blah = C() with mock_contextmanager_generator() as blah.foo: self.assertEqual(hasattr(blah, "foo"), True) | ddc0591fc1e00011e1f13156dfecc93370652395 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ddc0591fc1e00011e1f13156dfecc93370652395/test_with.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5281,
12795,
2326,
12,
2890,
4672,
5774,
273,
288,
21,
30,
306,
20,
16,
404,
16,
576,
18322,
598,
5416,
67,
2472,
4181,
67,
8812,
1435,
487,
5774,
63,
21,
6362,
20,
14542,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5281,
12795,
2326,
12,
2890,
4672,
5774,
273,
288,
21,
30,
306,
20,
16,
404,
16,
576,
18322,
598,
5416,
67,
2472,
4181,
67,
8812,
1435,
487,
5774,
63,
21,
6362,
20,
14542,
365,
... |
def table(self, uid="", rows_per_page=5, filters={}): | def table(self, rows_per_page=5, filters=None): | def table(self, uid="", rows_per_page=5, filters={}): if isinstance(rows_per_page, basestring): rows_per_page = int(rows_per_page) | c1eb61cc928200975be31277441c211605ab5dcc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12732/c1eb61cc928200975be31277441c211605ab5dcc/memberships.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1014,
12,
2890,
16,
2595,
67,
457,
67,
2433,
33,
25,
16,
3415,
33,
7036,
4672,
309,
1549,
12,
3870,
67,
457,
67,
2433,
16,
10699,
4672,
2595,
67,
457,
67,
2433,
273,
509,
12,
3870,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1014,
12,
2890,
16,
2595,
67,
457,
67,
2433,
33,
25,
16,
3415,
33,
7036,
4672,
309,
1549,
12,
3870,
67,
457,
67,
2433,
16,
10699,
4672,
2595,
67,
457,
67,
2433,
273,
509,
12,
3870,
... |
resonly = 0 | resonly = False | def _test(): if len(sys.argv) < 3 or sys.argv[1] == '-r' and len(sys.argv) != 4: print 'Usage: applesingle.py [-r] applesinglefile decodedfile' sys.exit(1) if sys.argv[1] == '-r': resonly = 1 del sys.argv[1] else: resonly = 0 decode(sys.argv[1], sys.argv[2], resonly=resonly) | fa1c2ccc6635269e46076f8c940dd11ffad44229 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fa1c2ccc6635269e46076f8c940dd11ffad44229/applesingle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
309,
562,
12,
9499,
18,
19485,
13,
411,
890,
578,
2589,
18,
19485,
63,
21,
65,
422,
2400,
86,
11,
471,
562,
12,
9499,
18,
19485,
13,
480,
1059,
30,
1172,
296,
5357,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3813,
13332,
309,
562,
12,
9499,
18,
19485,
13,
411,
890,
578,
2589,
18,
19485,
63,
21,
65,
422,
2400,
86,
11,
471,
562,
12,
9499,
18,
19485,
13,
480,
1059,
30,
1172,
296,
5357,... |
try: 1/0 | try: 1./0 | def f(p): try: 1/0 except: pass | bb86314d227aa1b695b7c968a2cdf42146cacf29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/bb86314d227aa1b695b7c968a2cdf42146cacf29/test_profilehooks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
12,
84,
4672,
775,
30,
404,
18,
19,
20,
1335,
30,
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,
... | [
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,
284,
12,
84,
4672,
775,
30,
404,
18,
19,
20,
1335,
30,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
length = models.PositiveSmallIntegerField() | def __unicode__(self): return "%s is playing %s" % (self.user, self.track) | 18af5d7529fe5c780b1689e97ab637f952b6b5ec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6447/18af5d7529fe5c780b1689e97ab637f952b6b5ec/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9124,
972,
12,
2890,
4672,
327,
2213,
87,
353,
23982,
738,
87,
6,
738,
261,
2890,
18,
1355,
16,
365,
18,
4101,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9124,
972,
12,
2890,
4672,
327,
2213,
87,
353,
23982,
738,
87,
6,
738,
261,
2890,
18,
1355,
16,
365,
18,
4101,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.PLAYLIST_LISTING[metadata.id] = (metadata.parent_id, metadata.title) | self.PLAYLIST_LISTING[self.object_next_id] = (int(metadata.parent_id), metadata.title, []) | def create_playlist(self, metadata): self.object_next_id+=1 metadata.id = str(self.object_next_id) self.PLAYLIST_LISTING[metadata.id] = (metadata.parent_id, metadata.title) print "DUMMY: play list created: %s" % metadata.to_string() return metadata | ebcb8fec20eb11116ea210cec22e9709e9a913a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2271/ebcb8fec20eb11116ea210cec22e9709e9a913a6/dummyDevice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1601,
1098,
12,
2890,
16,
1982,
4672,
365,
18,
1612,
67,
4285,
67,
350,
15,
33,
21,
1982,
18,
350,
273,
609,
12,
2890,
18,
1612,
67,
4285,
67,
350,
13,
365,
18,
52,
7868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1601,
1098,
12,
2890,
16,
1982,
4672,
365,
18,
1612,
67,
4285,
67,
350,
15,
33,
21,
1982,
18,
350,
273,
609,
12,
2890,
18,
1612,
67,
4285,
67,
350,
13,
365,
18,
52,
7868,
... |
parser.add_option("--arch", action ="store", dest="arch", | parser.add_option("--target", "--arch", action ="store", dest="arch", | def command_parse(config_opts): """return options and args from parsing the command line""" parser = OptionParser(usage=__doc__, version=__VERSION__) # modes (basic commands) parser.add_option("--rebuild", action="store_const", const="rebuild", dest="mode", default='rebuild', help="rebuild the specified SRPM(s)") parser.add_option("--shell", action="store_const", const="shell", dest="mode", help="run the specified command interactively within the chroot." " Default command: /bin/sh") parser.add_option("--chroot", action="store_const", const="chroot", dest="mode", help="run the specified command noninteractively within the chroot.") parser.add_option("--clean", action="store_const", const="clean", dest="mode", help="completely remove the specified chroot") parser.add_option("--init", action="store_const", const="init", dest="mode", help="initialize the chroot, do not build anything") parser.add_option("--installdeps", action="store_const", const="installdeps", dest="mode", help="install build dependencies for a specified SRPM") parser.add_option("--install", action="store_const", const="install", dest="mode", help="install packages using yum") parser.add_option("--update", action="store_const", const="update", dest="mode", help="update installed packages using yum") parser.add_option("--orphanskill", action="store_const", const="orphanskill", dest="mode", help="Kill all processes using specified buildroot.") parser.add_option("--copyin", action="store_const", const="copyin", dest="mode", help="Copy file(s) into the specified chroot") parser.add_option("--copyout", action="store_const", const="copyout", dest="mode", help="Copy file(s) from the specified chroot") # options parser.add_option("-r", action="store", type="string", dest="chroot", help="chroot name/config file name default: %default", default='default') parser.add_option("--offline", action="store_false", dest="online", default=True, help="activate 'offline' mode.") parser.add_option("--no-clean", action ="store_false", dest="clean", help="do not clean chroot before building", default=True) parser.add_option("--cleanup-after", action ="store_true", dest="cleanup_after", default=None, help="Clean chroot after building. Use with --resultdir." " Only active for 'rebuild'.") parser.add_option("--no-cleanup-after", action ="store_false", dest="cleanup_after", default=None, help="Dont clean chroot after building. If automatic" " cleanup is enabled, use this to disable.", ) parser.add_option("--arch", action ="store", dest="arch", default=None, help="target build arch") parser.add_option("--define", action="append", dest="rpmmacros", default=[], type="string", metavar="'MACRO EXPR'", help="define an rpm macro (may be used more than once)") parser.add_option("--with", action="append", dest="rpmwith", default=[], type="string", metavar="option", help="enable configure option for build (may be used more than once)") parser.add_option("--without", action="append", dest="rpmwithout", default=[], type="string", metavar="option", help="disable configure option for build (may be used more than once)") parser.add_option("--resultdir", action="store", type="string", default=None, help="path for resulting files to be put") parser.add_option("--uniqueext", action="store", type="string", default=None, help="Arbitrary, unique extension to append to buildroot" " directory name") parser.add_option("--configdir", action="store", dest="configdir", default=None, help="Change where config files are found") parser.add_option("--rpmbuild_timeout", action="store", dest="rpmbuild_timeout", type="int", default=None, help="Fail build if rpmbuild takes longer than 'timeout'" " seconds ") # verbosity parser.add_option("-v", "--verbose", action="store_const", const=2, dest="verbose", default=1, help="verbose build") parser.add_option("-q", "--quiet", action="store_const", const=0, dest="verbose", help="quiet build") parser.add_option("--trace", action="store_true", default=False, dest="trace", help="quiet build") # plugins parser.add_option("--enable-plugin", action="append", dest="enabled_plugins", type="string", default=[], help="Enable plugin. Currently-available plugins: %s" % repr(config_opts['plugins'])) parser.add_option("--disable-plugin", action="append", dest="disabled_plugins", type="string", default=[], help="Disable plugin. Currently-available plugins: %s" % repr(config_opts['plugins'])) (options, args) = parser.parse_args() if len(args) and args[0] in ('chroot', 'shell', 'rebuild', 'install', 'installdeps', 'init', 'clean'): options.mode = args[0] args = args[1:] return (options, args) | c9d02fffbedc34d38823ed635bc4ff21b0a21e63 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/c9d02fffbedc34d38823ed635bc4ff21b0a21e63/mock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
67,
2670,
12,
1425,
67,
4952,
4672,
3536,
2463,
702,
471,
833,
628,
5811,
326,
1296,
980,
8395,
2082,
273,
18862,
12,
9167,
33,
972,
2434,
972,
16,
1177,
33,
972,
5757,
972,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
67,
2670,
12,
1425,
67,
4952,
4672,
3536,
2463,
702,
471,
833,
628,
5811,
326,
1296,
980,
8395,
2082,
273,
18862,
12,
9167,
33,
972,
2434,
972,
16,
1177,
33,
972,
5757,
972,
13,
... |
versions.append(('msvc '+version, targets)) | versions.append(('msvc '+version+vcvar, targets)) | def gather_msvc_versions(conf, versions): # checks SmartPhones SDKs try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Windows CE Tools\\SDKs') except WindowsError: try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows CE Tools\\SDKs') except WindowsError: ce_sdk = '' if ce_sdk: supported_wince_platforms = [] ce_index = 0 while 1: try: sdk_device = _winreg.EnumKey(ce_sdk, ce_index) except WindowsError: break ce_index = ce_index + 1 sdk = _winreg.OpenKey(ce_sdk, sdk_device) path,type = _winreg.QueryValueEx(sdk, 'SDKRootDir') path=str(path) path,device = os.path.split(path) if not device: path,device = os.path.split(path) for arch,compiler in all_wince_platforms: platforms = [] if os.path.isdir(os.path.join(path, device, 'Lib', arch)): platforms.append((arch, compiler, os.path.join(path, device, 'Include'), os.path.join(path, device, 'Lib', arch))) if platforms: supported_wince_platforms.append((device, platforms)) # checks MSVC version_pattern = re.compile('^..?\...?') for vcver,vcvar in [('VCExpress','exp'), ('VisualStudio','')]: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\'+vcver) except WindowsError: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\'+vcver) except WindowsError: continue index = 0 while 1: try: version = _winreg.EnumKey(all_versions, index) except WindowsError: break index = index + 1 if not version_pattern.match(version): continue try: msvc_version = _winreg.OpenKey(all_versions, version + "\\Setup\\VS") path,type = _winreg.QueryValueEx(msvc_version, 'ProductDir') path=str(path) targets = [] if os.path.isfile(os.path.join(path, 'VC', 'vcvarsall.bat')): for target,realtarget in all_msvc_platforms[::-1]: try: targets.append((target, (realtarget, conf.get_msvc_version('msvc', version, target, os.path.join(path, 'VC', 'vcvarsall.bat'))))) except: pass elif os.path.isfile(os.path.join(path, 'Common7', 'Tools', 'vsvars32.bat')): try: targets.append(('x86', ('x86', conf.get_msvc_version('msvc', version, 'x86', os.path.join(path, 'Common7', 'Tools', 'vsvars32.bat'))))) except Configure.ConfigurationError: pass versions.append(('msvc '+version, targets)) if ce_sdk: for device,platforms in supported_wince_platforms: cetargets = [] for platform,compiler,include,lib in platforms: winCEpath = os.path.join(path, 'VC', 'ce') if os.path.isdir(winCEpath): common_bindirs,_1,_2 = conf.get_msvc_version('msvc', version, 'x86', os.path.join(path, 'Common7', 'Tools', 'vsvars32.bat')) if os.path.isdir(os.path.join(winCEpath, 'lib', platform)): bindirs = [os.path.join(winCEpath, 'bin', compiler), os.path.join(winCEpath, 'bin', 'x86_'+compiler)] + common_bindirs incdirs = [include, os.path.join(winCEpath, 'include'), os.path.join(winCEpath, 'atlmfc', 'include')] libdirs = [lib, os.path.join(winCEpath, 'lib', platform), os.path.join(winCEpath, 'atlmfc', 'lib', platform)] cetargets.append((platform, (platform, (bindirs,incdirs,libdirs)))) versions.append((device+' '+version, cetargets)) except WindowsError: continue | 05495af483649bfc6f90e3fef7d4b6f6cdb27e4d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7302/05495af483649bfc6f90e3fef7d4b6f6cdb27e4d/msvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11090,
67,
959,
4227,
67,
10169,
12,
3923,
16,
5244,
4672,
468,
4271,
19656,
3731,
5322,
3881,
87,
775,
30,
5898,
67,
20907,
273,
389,
8082,
1574,
18,
3678,
653,
24899,
8082,
1574,
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,
11090,
67,
959,
4227,
67,
10169,
12,
3923,
16,
5244,
4672,
468,
4271,
19656,
3731,
5322,
3881,
87,
775,
30,
5898,
67,
20907,
273,
389,
8082,
1574,
18,
3678,
653,
24899,
8082,
1574,
18,
... |
test2 = gtk.gdk.pixbuf_new_from_file(file) return True except: return False else: return True def image_flip(self, old_pix, vertical): width = old_pix.get_width() height = old_pix.get_height() d = None if vertical == True: d, w, h, rws = imgfuncs.vert(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) else: d, w, h, rws = imgfuncs.horiz(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) if d: new_pix = gtk.gdk.pixbuf_new_from_data(d, old_pix.get_colorspace(), old_pix.get_has_alpha(), old_pix.get_bits_per_sample(), w, h, rws) return new_pix return old_pix def image_rotate(self, old_pix, full_angle): width = old_pix.get_width() height = old_pix.get_height() angle = full_angle - (int(full_angle) / 360) * 360 if angle: d = None if angle % 270 == 0: d, w, h, rws = imgfuncs.right(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) elif angle % 180 == 0: d, w, h, rws = imgfuncs.mirror(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) elif angle % 90 == 0: d, w, h, rws = imgfuncs.left(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) if d: new_pix = gtk.gdk.pixbuf_new_from_data(d, old_pix.get_colorspace(), old_pix.get_has_alpha(), old_pix.get_bits_per_sample(), w, h, rws) return new_pix return old_pix def toggle_slideshow(self, action): if len(self.image_list) > 1: if self.slideshow_mode == False: | test2 = gtk.gdk.pixbuf_new_from_file(file) return True except: return False else: return True def image_flip(self, old_pix, vertical): width = old_pix.get_width() height = old_pix.get_height() d = None if vertical == True: d, w, h, rws = imgfuncs.vert(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) else: d, w, h, rws = imgfuncs.horiz(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) if d: new_pix = gtk.gdk.pixbuf_new_from_data(d, old_pix.get_colorspace(), old_pix.get_has_alpha(), old_pix.get_bits_per_sample(), w, h, rws) return new_pix return old_pix def image_rotate(self, old_pix, full_angle): width = old_pix.get_width() height = old_pix.get_height() angle = full_angle - (int(full_angle) / 360) * 360 if angle: d = None if angle % 270 == 0: d, w, h, rws = imgfuncs.right(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) elif angle % 180 == 0: d, w, h, rws = imgfuncs.mirror(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) elif angle % 90 == 0: d, w, h, rws = imgfuncs.left(old_pix.get_pixels(), width, height, old_pix.get_rowstride(), old_pix.get_n_channels()) if d: new_pix = gtk.gdk.pixbuf_new_from_data(d, old_pix.get_colorspace(), old_pix.get_has_alpha(), old_pix.get_bits_per_sample(), w, h, rws) return new_pix return old_pix def toggle_slideshow(self, action): if len(self.image_list) > 1: if self.slideshow_mode == False: | def valid_image(self, file): test = gtk.gdk.pixbuf_get_file_info(file) if test == None: return False elif test[0]['name'] == "wbmp": # some regular files are thought to be wbmp for whatever reason, | a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
923,
67,
2730,
12,
2890,
16,
585,
4672,
1842,
273,
22718,
18,
75,
2883,
18,
14861,
4385,
67,
588,
67,
768,
67,
1376,
12,
768,
13,
309,
1842,
422,
599,
30,
327,
1083,
1327,
1842,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
923,
67,
2730,
12,
2890,
16,
585,
4672,
1842,
273,
22718,
18,
75,
2883,
18,
14861,
4385,
67,
588,
67,
768,
67,
1376,
12,
768,
13,
309,
1842,
422,
599,
30,
327,
1083,
1327,
1842,
63,
... |
self.toolsStartOverAction.setIconSet(QIconSet(self.image66)) | self.toolsStartOverAction.setIconSet(QIconSet(self.image62)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | 2bdc60455ab85cd2792604c15ae9034d3632b0df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/2bdc60455ab85cd2792604c15ae9034d3632b0df/MainWindowUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
2938,
273,
599,
16,
529,
273,
599,
16,
2242,
273,
374,
4672,
2238,
6376,
3829,
16186,
2738,
972,
12,
2890,
16,
2938,
16,
529,
16,
2242,
13,
365,
18,
23... |
tx = s[2][0] | try: tx = s[2][0] except IndexError: tx = [''] | def interpret(self,s,text=''): "interpret parsed code from compile" tok = s[0] # print 'INTERPRET ', s if text != '': self.Expression.text=text if tok == self.EOF: return None try: tok=tok.lower() except AttributeError: pass if tok in self.__interrupts: self.interrupt = self.__interrupts.index(tok) if tok == 'return': self.retval = self.expr_eval(s[1]) return elif tok == 'del': s[1].reverse() xtok = s[1].pop() nvar = s[1].pop() if xtok != opcodes.list: raise EvalException, 'Invalid "del" statement' try: for i in range(nvar): xtok = s[1].pop() vname = s[1].pop() if xtok != opcodes.variable: raise EvalException, 'cannot delete %s ' % vname self.symbolTable.deleteSymbol(vname) except: raise EvalException, 'Invalid "del" statement' elif tok == 'print': if len(s[1])>0: for i in self.expr_eval(s[1]): self.output.write('%s ' % str(i)) self.output.write('\n') elif tok == 'defvar': if len(s[1]) != 2 or s[1][1] != opcodes.symbol: raise EvalException, 'Invalid "def" statement' x = self.symbolTable.setDefVariable(s[1][0], s[2], s[3]) elif tok == 'assign': lhs = self.expr_eval(s[1]) rhs = self.expr_eval(s[2]) self.do_assign(lhs,rhs) elif tok == 'eval': return self.expr_eval(s[1]) elif tok == 'try': do_except = False for sx in s[1][1]: try: ret = self.interpret(sx) except: do_except = True break if do_except: for sx in s[2][1]: ret = self.interpret(sx) | d0335fdee64e7efe121c90260271a4efee99ab7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11796/d0335fdee64e7efe121c90260271a4efee99ab7e/Eval.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10634,
12,
2890,
16,
87,
16,
955,
2218,
11,
4672,
315,
24713,
2707,
981,
628,
4074,
6,
946,
273,
272,
63,
20,
65,
468,
1172,
296,
9125,
3670,
56,
2265,
272,
309,
977,
480,
875,
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,
10634,
12,
2890,
16,
87,
16,
955,
2218,
11,
4672,
315,
24713,
2707,
981,
628,
4074,
6,
946,
273,
272,
63,
20,
65,
468,
1172,
296,
9125,
3670,
56,
2265,
272,
309,
977,
480,
875,
30,
... |
self.sliderCutLow = OWGUI.qwtHSlider(box, self, 'CutLow', label='Low:', labelWidth=33, minValue=-100, maxValue=0, step=0.1, precision=1, ticks=0, maxWidth=80, callback=self.drawDistanceMap) self.sliderCutHigh = OWGUI.qwtHSlider(box, self, 'CutHigh', label='High:', labelWidth=33, minValue=0, maxValue=100, step=0.1, precision=1, ticks=0, maxWidth=80, callback=self.drawDistanceMap) | self.sliderCutLow = OWGUI.qwtHSlider(box, self, 'CutLow', label='Low:', labelWidth=33, minValue=-100, maxValue=0, step=0.1, precision=1, ticks=0, maxWidth=80, callback=self.drawDistanceMap) self.sliderCutHigh = OWGUI.qwtHSlider(box, self, 'CutHigh', label='High:', labelWidth=33, minValue=0, maxValue=100, step=0.1, precision=1, ticks=0, maxWidth=80, callback=self.drawDistanceMap) | def __init__(self, parent=None, signalManager = None): self.callbackDeposit = [] # deposit for OWGUI callback function OWWidget.__init__(self, parent, signalManager, 'Distance Map') | 9dec2648a439fbcedb4a6e19f89488c157b33964 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9dec2648a439fbcedb4a6e19f89488c157b33964/OWDistanceMap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
365,
18,
3394,
758,
1724,
273,
5378,
468,
443,
1724,
364,
18233,
43,
5370,
1348,
445,
18233,
4609,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
16,
4277,
1318,
273,
599,
4672,
365,
18,
3394,
758,
1724,
273,
5378,
468,
443,
1724,
364,
18233,
43,
5370,
1348,
445,
18233,
4609,
16186,
... |
simple.GL_TEXTURE_MIN_FILTER: (1,), | simple.GL_TEXTURE_MIN_FILTER: (1,), | def GL_GET_PIXEL_MAP_SIZE( pname ): """Given a pname, lookup the size using a glGet query...""" constant = PIXEL_MAP_SIZE_CONSTANT_MAP[ pname ] return glGetIntegerv( constant ) | 779beb78d8242dd156d555119ccab07062fb4bf3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1545/779beb78d8242dd156d555119ccab07062fb4bf3/glget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10252,
67,
3264,
67,
27381,
2247,
67,
8352,
67,
4574,
12,
19952,
262,
30,
3536,
6083,
279,
19952,
16,
3689,
326,
963,
1450,
279,
5118,
967,
843,
7070,
3660,
5381,
273,
7024,
60,
2247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10252,
67,
3264,
67,
27381,
2247,
67,
8352,
67,
4574,
12,
19952,
262,
30,
3536,
6083,
279,
19952,
16,
3689,
326,
963,
1450,
279,
5118,
967,
843,
7070,
3660,
5381,
273,
7024,
60,
2247,
... |
customHeader = EmailMessage(self.mail_header(self, REQUEST, getValueFor=self.getValueFor, title=self.getValueFor('title'), mail=headers, body=msg.body, file_ids=file_ids, post_id=post_id).strip()) | mail_header = self.mail_header(self, REQUEST, getValueFor=self.getValueFor, title=self.getValueFor('title'), mail=headers, body=msg.body, file_ids=file_ids, post_id=post_id) mail_header = mail_header.encode('utf-8', 'ignore').strip() customHeader = EmailMessage(mail_header) | def listMail(self, REQUEST): # Shifted from MailBoxer till reintegration project # Send a mail to all members of the list. mailString = getMailFromRequest(REQUEST) msg = EmailMessage(mailString, list_title=self.getProperty('title', ''), group_id=self.getId(), site_id=self.getProperty('siteId', ''), sender_id_cb=self.get_mailUserId) m = '%s (%s) Listing message %s from <%s>' %\ (self.getProperty('title', ''), self.getId(), msg.post_id, msg.sender) log.info(m) # store mail in the archive? get context for the mail... post_id = msg.post_id if self.getValueFor('archived') != self.archive_options[0]: (post_id, file_ids) = self.manage_addMail(msg) # The custom header is actually capable of replacing the top of the # message, for example with a banner, so we need to parse it again headers = {} for item in msg.message.items(): headers[item[0].lower()] = item[1] customHeader = EmailMessage(self.mail_header(self, REQUEST, getValueFor=self.getValueFor, title=self.getValueFor('title'), mail=headers, body=msg.body, file_ids=file_ids, post_id=post_id).strip()) # If customBody is not empty, use it as new mailBody, and we need to # fetch it before any other changes are made, since changing the # header can affect the way the body is decoded if customHeader.body.strip(): body = customHeader.body else: body = msg.body | 9e9bc1cf28d7cce305bbf98dc16d65ba16f21ef5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6274/9e9bc1cf28d7cce305bbf98dc16d65ba16f21ef5/XWFMailingList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
6759,
12,
2890,
16,
12492,
4672,
468,
21444,
329,
628,
11542,
3514,
264,
21364,
283,
27667,
1984,
225,
468,
2479,
279,
4791,
358,
777,
4833,
434,
326,
666,
18,
4791,
780,
273,
31991... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
6759,
12,
2890,
16,
12492,
4672,
468,
21444,
329,
628,
11542,
3514,
264,
21364,
283,
27667,
1984,
225,
468,
2479,
279,
4791,
358,
777,
4833,
434,
326,
666,
18,
4791,
780,
273,
31991... |
else: | else: | def __checkJobs(self): """Retrieves waiting jobs and loops over the selection. """ self.log.debug('Preparing list of waiting jobs') workload = self.__getWaitingJobs() if not workload['OK']: return workload jobs = workload['Value'] | e4e152162784e68280a5aedde1e5bad201fa5992 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/e4e152162784e68280a5aedde1e5bad201fa5992/AgentDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
7276,
12,
2890,
4672,
3536,
6960,
7336,
6550,
471,
14075,
1879,
326,
4421,
18,
3536,
365,
18,
1330,
18,
4148,
2668,
1386,
12583,
666,
434,
7336,
6550,
6134,
1440,
945,
273,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
7276,
12,
2890,
4672,
3536,
6960,
7336,
6550,
471,
14075,
1879,
326,
4421,
18,
3536,
365,
18,
1330,
18,
4148,
2668,
1386,
12583,
666,
434,
7336,
6550,
6134,
1440,
945,
273,
3... |
def test_compare_bytes_to_bytearray(self): self.assertEqual(b"abc" == bytes(b"abc"), True) self.assertEqual(b"ab" != bytes(b"abc"), True) self.assertEqual(b"ab" <= bytes(b"abc"), True) self.assertEqual(b"ab" < bytes(b"abc"), True) self.assertEqual(b"abc" >= bytes(b"ab"), True) self.assertEqual(b"abc" > bytes(b"ab"), True) self.assertEqual(b"abc" != bytes(b"abc"), False) self.assertEqual(b"ab" == bytes(b"abc"), False) self.assertEqual(b"ab" > bytes(b"abc"), False) self.assertEqual(b"ab" >= bytes(b"abc"), False) self.assertEqual(b"abc" < bytes(b"ab"), False) self.assertEqual(b"abc" <= bytes(b"ab"), False) self.assertEqual(bytes(b"abc") == b"abc", True) self.assertEqual(bytes(b"ab") != b"abc", True) self.assertEqual(bytes(b"ab") <= b"abc", True) self.assertEqual(bytes(b"ab") < b"abc", True) self.assertEqual(bytes(b"abc") >= b"ab", True) self.assertEqual(bytes(b"abc") > b"ab", True) self.assertEqual(bytes(b"abc") != b"abc", False) self.assertEqual(bytes(b"ab") == b"abc", False) self.assertEqual(bytes(b"ab") > b"abc", False) self.assertEqual(bytes(b"ab") >= b"abc", False) self.assertEqual(bytes(b"abc") < b"ab", False) self.assertEqual(bytes(b"abc") <= b"ab", False) | def test_compare_bytes_to_bytearray(self): self.assertEqual(b"abc" == bytes(b"abc"), True) self.assertEqual(b"ab" != bytes(b"abc"), True) self.assertEqual(b"ab" <= bytes(b"abc"), True) self.assertEqual(b"ab" < bytes(b"abc"), True) self.assertEqual(b"abc" >= bytes(b"ab"), True) self.assertEqual(b"abc" > bytes(b"ab"), True) | 510711d598f1432afb021a01c2457b14334c6157 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/510711d598f1432afb021a01c2457b14334c6157/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9877,
67,
3890,
67,
869,
67,
7229,
1126,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
70,
6,
18947,
6,
422,
1731,
12,
70,
6,
18947,
6,
3631,
1053,
13,
365,
18,
11231,
5812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9877,
67,
3890,
67,
869,
67,
7229,
1126,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
70,
6,
18947,
6,
422,
1731,
12,
70,
6,
18947,
6,
3631,
1053,
13,
365,
18,
11231,
5812,
... | |
- ``length`` - length of state space. (default: ``None``) | - ``length`` - length of state space (default: ``None``) | def lin_matrix(self, length=None): """ Return the ``Lin`` matrix. If no ``length`` is provided the standard state space size is used. The key schedule calls this method with an explicit length argument because only ``self.r`` S-Box applications are performed in the key schedule. INPUT: - ``length`` - length of state space. (default: ``None``) EXAMPLE:: sage: sr = mq.SR(1, 1, 1, 4, gf2=True) sage: sr.lin_matrix() [1 0 1 1] [1 1 0 1] [1 1 1 0] [0 1 1 1] """ r, c, e = self.r, self.c, self.e | 8851127220b91c29eb0dc162b4b9ae01cfac9a9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8851127220b91c29eb0dc162b4b9ae01cfac9a9f/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4739,
67,
5667,
12,
2890,
16,
769,
33,
7036,
4672,
3536,
2000,
326,
12176,
48,
267,
10335,
3148,
18,
225,
971,
1158,
12176,
2469,
10335,
353,
2112,
326,
4529,
919,
3476,
963,
353,
1399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4739,
67,
5667,
12,
2890,
16,
769,
33,
7036,
4672,
3536,
2000,
326,
12176,
48,
267,
10335,
3148,
18,
225,
971,
1158,
12176,
2469,
10335,
353,
2112,
326,
4529,
919,
3476,
963,
353,
1399,
... |
if mins == "1": mins_text = _('minute') else: mins_text = _('minutes') | mins_text = gettext.ngettext('minute', 'minutes', int(mins)) | def update_statusbar(self): if self.conn and self.status and self.show_statusbar: hours = None mins = None total_time = convert_time(self.total_time) try: mins = total_time.split(":")[-2] hours = total_time.split(":")[-3] except: pass if mins: if mins.startswith('0') and len(mins) > 1: mins = mins[1:] if mins == "1": mins_text = _('minute') else: mins_text = _('minutes') if hours: if hours.startswith('0'): hours = hours[1:] if hours == "1": hours_text = _('hour and') else: hours_text = _('hours and') # Show text: if self.status.playlistlength == "1": songs_text = _('song') else: songs_text = _('songs') if hours: status_text = str(self.status.playlistlength) + ' ' + songs_text + ', ' + hours + ' ' + hours_text + ' ' + mins + ' ' + mins_text elif mins: status_text = str(self.status.playlistlength) + ' ' + songs_text + ', ' + mins + ' ' + mins_text else: status_text = "" self.statusbar.push(self.statusbar.get_context_id(""), status_text) elif self.show_statusbar: self.statusbar.push(self.statusbar.get_context_id(""), "") | f2a930d518c53af8d132699dccd579a48fa7f7f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/f2a930d518c53af8d132699dccd579a48fa7f7f9/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2327,
3215,
12,
2890,
4672,
309,
365,
18,
4646,
471,
365,
18,
2327,
471,
365,
18,
4500,
67,
2327,
3215,
30,
7507,
273,
599,
26381,
273,
599,
2078,
67,
957,
273,
1765,
67,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
2327,
3215,
12,
2890,
4672,
309,
365,
18,
4646,
471,
365,
18,
2327,
471,
365,
18,
4500,
67,
2327,
3215,
30,
7507,
273,
599,
26381,
273,
599,
2078,
67,
957,
273,
1765,
67,
9... |
def __init__(self, cache, tiles_queue): | def __init__(self, cache, tiles_queue, dry_run=False): | def __init__(self, cache, tiles_queue): multiprocessing.Process.__init__(self) self.cache = cache self.tiles_queue = tiles_queue | 8a76fbe818b1f2029a43f9e5ddf0b7a242144c6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11249/8a76fbe818b1f2029a43f9e5ddf0b7a242144c6b/seed_ng.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
12568,
67,
4000,
16,
10299,
67,
2681,
33,
8381,
4672,
21828,
18,
2227,
16186,
2738,
972,
12,
2890,
13,
365,
18,
2493,
273,
1247,
365,
18,
28366... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1247,
16,
12568,
67,
4000,
16,
10299,
67,
2681,
33,
8381,
4672,
21828,
18,
2227,
16186,
2738,
972,
12,
2890,
13,
365,
18,
2493,
273,
1247,
365,
18,
28366... |
if executive.run_command([self.script_path("build-dumprendertree")], | build_drt_command = [self.script_path("build-dumprendertree")] if self._options.target == "Debug": build_drt_command.append('--debug') if executive.run_command(build_drt_command, | def check_build(self, needs_http): if executive.run_command([self.script_path("build-dumprendertree")], return_exit_code=True): return False | 62e49e14f2b216c68d63e0d29be2cdc37cf2b72b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/62e49e14f2b216c68d63e0d29be2cdc37cf2b72b/mac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
3510,
12,
2890,
16,
4260,
67,
2505,
4672,
1361,
67,
3069,
88,
67,
3076,
273,
306,
2890,
18,
4263,
67,
803,
2932,
3510,
17,
8481,
5902,
3413,
7923,
65,
309,
365,
6315,
2116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
866,
67,
3510,
12,
2890,
16,
4260,
67,
2505,
4672,
1361,
67,
3069,
88,
67,
3076,
273,
306,
2890,
18,
4263,
67,
803,
2932,
3510,
17,
8481,
5902,
3413,
7923,
65,
309,
365,
6315,
2116,
... |
if _SOCK and _SOCK.hostname != host and _SOCK.port != port: | if _SOCK and (_SOCK.hostname != host or _SOCK.port != port): | def db_exec(host, port, method, *args): global _SOCK _SEMAPHORE.acquire() try: try: if _SOCK and _SOCK.hostname != host and _SOCK.port != port: _SOCK.disconnect() _SOCK = None if _SOCK is None: _SOCK= pysocket.PySocket() _SOCK.connect(host, port) _SOCK.send(('db', method) + args) res = _SOCK.receive() finally: _SEMAPHORE.release() return res except: _SOCK = None raise | aec78c6f634f28aa1c6c03a025be4703fd6d3436 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/aec78c6f634f28aa1c6c03a025be4703fd6d3436/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1319,
67,
4177,
12,
2564,
16,
1756,
16,
707,
16,
380,
1968,
4672,
2552,
389,
3584,
3507,
389,
1090,
8352,
7995,
862,
18,
1077,
1039,
1435,
775,
30,
775,
30,
309,
389,
3584,
3507,
471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1319,
67,
4177,
12,
2564,
16,
1756,
16,
707,
16,
380,
1968,
4672,
2552,
389,
3584,
3507,
389,
1090,
8352,
7995,
862,
18,
1077,
1039,
1435,
775,
30,
775,
30,
309,
389,
3584,
3507,
471,
... |
t.type | t.type_id | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" CREATE view report_project_task_user as SELECT (select 1 ) AS nbr, t.id as id, to_char(date_start, 'YYYY') as year, to_char(date_start, 'MM') as month, to_char(date_start, 'YYYY-MM-DD') as day, date_trunc('day',t.date_start) as date_start, date_trunc('day',t.date_end) as date_end, to_date(to_char(t.date_deadline, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_deadline, | 233223b2a5102d950d6803b118283109f97dbb94 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/233223b2a5102d950d6803b118283109f97dbb94/project_report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
8513,
18,
4669,
18,
7285,
67,
1945,
67,
430,
67,
1808,
12,
3353,
16,
296,
6006,
67,
4406,
67,
4146,
67,
1355,
6134,
4422,
18,
8837,
2932,
3660,
13278,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
4422,
4672,
8513,
18,
4669,
18,
7285,
67,
1945,
67,
430,
67,
1808,
12,
3353,
16,
296,
6006,
67,
4406,
67,
4146,
67,
1355,
6134,
4422,
18,
8837,
2932,
3660,
13278,
... |
if type(retcolsBlacklist) == str: cKey = res[-1] if not cacheCaseSensitive and type(cKey) == str: | if len(self.param) == 1: cKey = res[0] if not self.cacheCaseSensitive and type(cKey) == str: | def __cacheAllRefresh(self): """This method has to be called from synchronized block.""" if self.allDataCacheRefresh > time.time(): return | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2493,
1595,
8323,
12,
2890,
4672,
3536,
2503,
707,
711,
358,
506,
2566,
628,
3852,
1203,
12123,
309,
365,
18,
454,
751,
1649,
8323,
405,
813,
18,
957,
13332,
327,
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,
1001,
2493,
1595,
8323,
12,
2890,
4672,
3536,
2503,
707,
711,
358,
506,
2566,
628,
3852,
1203,
12123,
309,
365,
18,
454,
751,
1649,
8323,
405,
813,
18,
957,
13332,
327,
2,
-100,
-100,
... |
print "addCreature", self, ':', creatureName | def addCreature(self, creatureName): print "addCreature", self, ':', creatureName if (self.getHeight() >= 7 and self.child1 is None): raise RuntimeError, "Tried adding to 7-high legion" ci = CreatureInfo(creatureName, True, False) self.creatures.append(ci) | d3360650260167e99d819d46c099993d6e0f1f9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3755/d3360650260167e99d819d46c099993d6e0f1f9e/predictsplits.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
1996,
1231,
12,
2890,
16,
1519,
1231,
461,
4672,
309,
261,
2890,
18,
588,
2686,
1435,
1545,
2371,
471,
365,
18,
3624,
21,
353,
599,
4672,
1002,
7265,
16,
315,
29847,
6534,
358,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1996,
1231,
12,
2890,
16,
1519,
1231,
461,
4672,
309,
261,
2890,
18,
588,
2686,
1435,
1545,
2371,
471,
365,
18,
3624,
21,
353,
599,
4672,
1002,
7265,
16,
315,
29847,
6534,
358,
23... | |
madeup.predict(newdata1, stderr=False) | madeup.predict(newdata1, stderror=False) | def test_2d_pred_nostderr(self): "2D prediction - no stderr" (x, y, results, newdata1, newdata2, madeup) = self.d madeup.model.span = 0.5 madeup.model.normalize = True madeup.predict(newdata1, stderr=False) assert_almost_equal(madeup.predicted.values, results[4], 5) # madeup_pred = madeup.predict(newdata1, stderr=False) assert_almost_equal(madeup_pred.values, results[4], 5) | 919c250ab7301620f56106270779ae6e4e5f4c6c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11143/919c250ab7301620f56106270779ae6e4e5f4c6c/pyloess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22,
72,
67,
6510,
67,
8265,
72,
370,
12,
2890,
4672,
315,
22,
40,
8239,
300,
1158,
4514,
6,
261,
92,
16,
677,
16,
1686,
16,
394,
892,
21,
16,
394,
892,
22,
16,
7165,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22,
72,
67,
6510,
67,
8265,
72,
370,
12,
2890,
4672,
315,
22,
40,
8239,
300,
1158,
4514,
6,
261,
92,
16,
677,
16,
1686,
16,
394,
892,
21,
16,
394,
892,
22,
16,
7165,
41... |
headerB.update('CRPIX1', headerB['CRPIX1'] - 1024) | headerB.update('CRPIX1', headerB['CRPIX1'] - 1023) | def splitCcd(header, data, infile, ccd, rootdir='/lsst/images/repository/input/', isMask=False): basename = re.sub('.fits', '', os.path.basename(infile)) basename = re.sub('o', '', basename) basedir = os.path.join(rootdir, basename) expdir = os.path.join(basedir, '0') if not os.path.isdir(basedir): os.mkdir(basedir) if not os.path.isdir(expdir): os.mkdir(expdir) # We have to undo whatever imsplice has done # # HISTORY imsplice: FLIPS ver 2.0 - Elixir by CFHT - Thu Jun 5 2003 - 22:11:29 # HISTORY imsplice: Splicing the two readouts (A&B) per CCD into a unique image # HISTORY imsplice: Splicing results in all detectors as if read from A amplifier # HISTORY imsplice: NEXTEND keyword updated (/2) = number of CCDs vs. amplifiers # HISTORY imsplice: EXTNAME keyword becomes `ccdxx` instead of `ampxx` # HISTORY imsplice: AMPNAME keyword now covers both amplifiers (eg `29a + 29b') # HISTORY imsplice: keyword {GAIN, RDNOISE, MAXLIN} replaced by two keywords [A,B] # HISTORY imsplice: DATASEC and DETSEC keywords now reflect the entire CCD # HISTORY imsplice: BIASSEC becomes irrelevant -> replaced by BSECA & BSECB # HISTORY imsplice: New keywords are DETSECA, DETSECB, DSECA, DSECB, TSECA, TSECB # HISTORY imsplice: New keywords are ASECA, ASECB, CSECA, CSECB # http://cfht.hawaii.edu/Instruments/Imaging/MegaPrime/rawdata.html # Summary: # The CCD images are 2k x 4k. # We will chop into CFHT amp images 1k x 4k. # And then into LSST amp images 1k x 1k. # Details: # The CCD images are 2112 by 4644. # # We ignore the overscan on top (TSA) # # A pixels : 1:1056 1:4612 # B pixels : 1057:2112 1:4612 # note that pyfits convetion is y, x cfhtAmpA = data[0:4612, 0:1056] cfhtAmpB = data[0:4612, 1056:2112] nPixY = 1153 for i in range(4): y0 = i * nPixY y1 = y0 + nPixY lsstAmpA = cfhtAmpA[y0:y1, 33:1056] lsstAmpB = cfhtAmpB[y0:y1, 0:(1056-33)] headerA = header.copy() headerB = header.copy() # which cfht amp? headerA.update('AMPLIST', 'A') headerB.update('AMPLIST', 'B') # which lsst amp? Aid = i + 0 Bid = i + 4 headerA.update('LSSTAMP', Aid) headerB.update('LSSTAMP', Bid) # how did we get these data? headerA.update('LSSTSS1', '[0:4612,0:1056]', 'pyfits substamp from original CFHT image') headerB.update('LSSTSS1', '[0:4612,1057:4644]', 'pyfits substamp from original CFHT image') # again... headerA.update('LSSTSS2', '[%d:%d, 0:1056]' % (y0, y1), 'pyfits substamp from trimmed CFHT image') headerB.update('LSSTSS2', '[%d:%d, 0:1056]' % (y0, y1), 'pyfits substamp from trimmed CFHT image') # exposure id headerA.update('EXPID', 0, 'LSST VISIT') headerB.update('EXPID', 0, 'LSST VISIT') # DONT FORGET TO RESIZE headerA.update('NAXIS1', lsstAmpA.shape[0]) headerB.update('NAXIS1', lsstAmpB.shape[0]) headerA.update('NAXIS2', lsstAmpA.shape[1]) headerB.update('NAXIS2', lsstAmpB.shape[1]) if not isMask: # reset the appropriate readnoise headerA.update('RDNOISE', headerA['RDNOISEA']) headerB.update('RDNOISE', headerB['RDNOISEB']) # reset the appropriate gain headerA.update('GAIN', headerA['GAINA']) headerB.update('GAIN', headerB['GAINB']) # set the appropriate overscan headerA.update('BIASSEC', '[1:32,1:%d]' % (nPixY)) headerB.update('BIASSEC', '[1025:1056,1:%d]' % (nPixY)) # set the appropriate datasec headerA.update('DATASEC', '[33:1056,1:%d]' % (nPixY)) headerB.update('DATASEC', '[1:1024,1:%d]' % (nPixY)) # set the appropriate trimsec headerA.update('TRIMSEC', headerA['DATASEC']) headerB.update('TRIMSEC', headerB['DATASEC']) # set the appropriate crpix1 headerA.update('CRPIX1', headerA['CRPIX1']) headerB.update('CRPIX1', headerB['CRPIX1'] - 1024) # set the appropriate crpix2 headerA.update('CRPIX2', headerA['CRPIX2'] - y0) headerB.update('CRPIX2', headerB['CRPIX2'] - y0) # EMPERICAL # 33 PIXELS IS OVERSCAN SIZE... # Maybe its the top overscan that we just got rid of? if i > 17: headerA.update('CRPIX1', headerA['CRPIX1'] - 33) else: headerB.update('CRPIX1', headerB['CRPIX1'] - 33) outfileA = newName(int(basename), 0, ccd, Aid) outfileB = newName(int(basename), 0, ccd, Bid) print '# Writing', outfileA pyfits.PrimaryHDU(lsstAmpA, headerA).writeto(outfileA, output_verify='silentfix', clobber=True) print '# Writing', outfileB pyfits.PrimaryHDU(lsstAmpB, headerB).writeto(outfileB, output_verify='silentfix', clobber=True) | d88ef2e5a6a84bd11f63e685b9d22e0f5c53a76b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6548/d88ef2e5a6a84bd11f63e685b9d22e0f5c53a76b/stageCfhtForDc3a.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
39,
4315,
12,
3374,
16,
501,
16,
14568,
16,
276,
4315,
16,
1365,
1214,
2218,
19,
3251,
334,
19,
7369,
19,
9071,
19,
2630,
19,
2187,
353,
5796,
33,
8381,
4672,
4882,
273,
283,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
39,
4315,
12,
3374,
16,
501,
16,
14568,
16,
276,
4315,
16,
1365,
1214,
2218,
19,
3251,
334,
19,
7369,
19,
9071,
19,
2630,
19,
2187,
353,
5796,
33,
8381,
4672,
4882,
273,
283,
1... |
n = integer_ring.ZZ(n)-1 | n = integer_ring.ZZ(n)+1 | def next_prime(n, proof=True): """ The next prime greater than the integer n. If n is prime, then this function does not return n, but the next prime after n. If the optional argument proof is False (the default), this function only returns a pseudo-prime, as defined by the PARI nextprime function. INPUT: n -- integer proof -- bool (default: True) EXAMPLES: sage: next_prime(-100) 2 Notice that the next_prime(5) is not 5 but 7. sage: next_prime(5) 7 sage: next_prime(2004) 2011 """ n = integer_ring.ZZ(n)-1 if n < 2: # negatives are not prime. return integer_ring.ZZ(2) if n == 2: return integer_ring.ZZ(3) if not proof: # pari nextprime is probabilistic (according to their docs) return integer_ring.ZZ((eval(str(pari(n+1).nextprime())))) if n % 2 == 0: n += 1 else: n += 2 while not is_prime(n): # pari isprime is provably correct n += 2 return integer_ring.ZZ(n) | 3b21be66ad22b9104e635e6f4fa84e7144db66c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3b21be66ad22b9104e635e6f4fa84e7144db66c3/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
67,
16382,
12,
82,
16,
14601,
33,
5510,
4672,
3536,
1021,
1024,
17014,
6802,
2353,
326,
3571,
290,
18,
225,
971,
290,
353,
17014,
16,
1508,
333,
445,
1552,
486,
327,
290,
16,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
16382,
12,
82,
16,
14601,
33,
5510,
4672,
3536,
1021,
1024,
17014,
6802,
2353,
326,
3571,
290,
18,
225,
971,
290,
353,
17014,
16,
1508,
333,
445,
1552,
486,
327,
290,
16,
149... |
if self.escChar: ret = re.sub(self.escCharReplacePattern,"\g<1>",ret) if self.escQuote: ret.replace(self.escQuote, self.quoteChar) return loc,ret | if isinstance(ret,basestring): if self.escChar: ret = re.sub(self.escCharReplacePattern,"\g<1>",ret) if self.escQuote: ret = ret.replace(self.escQuote, self.quoteChar) return loc, ret | def parseImpl( self, instring, loc, doActions=True ): result = instring[loc] == self.firstQuoteChar and self.re.match(instring,loc) or None if not result: exc = self.myException exc.loc = loc exc.pstr = instring raise exc loc = result.end() ret = ParseResults(result.group()) if self.unquoteResults: # strip off quotes quoteLen = len(self.quoteChar) ret = ret[quoteLen:-quoteLen] # replace escaped characters if self.escChar: ret = re.sub(self.escCharReplacePattern,"\g<1>",ret) | fc374eb717c1a588cb73ceb556379c52474f65a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12364/fc374eb717c1a588cb73ceb556379c52474f65a4/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2828,
12,
365,
16,
316,
1080,
16,
1515,
16,
741,
6100,
33,
5510,
262,
30,
563,
273,
316,
1080,
63,
1829,
65,
422,
365,
18,
3645,
10257,
2156,
471,
365,
18,
266,
18,
1916,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2828,
12,
365,
16,
316,
1080,
16,
1515,
16,
741,
6100,
33,
5510,
262,
30,
563,
273,
316,
1080,
63,
1829,
65,
422,
365,
18,
3645,
10257,
2156,
471,
365,
18,
266,
18,
1916,
12,
... |
def executeRequest(self): | def executeRequest( self ): | def executeRequest(self): ################################################ # Get a request from request DB gMonitor.addMark( "Iteration", 1 ) res = self.RequestDBClient.getRequest('removal') if not res['OK']: gLogger.info("RemovalAgent.execute: Failed to get request from database.") return S_OK() elif not res['Value']: gLogger.info("RemovalAgent.execute: No requests to be executed found.") return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] sourceServer= res['Value']['Server'] try: jobID = int(res['Value']['JobID']) except: jobID = 0 gLogger.info("RemovalAgent.execute: Obtained request %s" % requestName) | 639c184ef75c7730d44d5168750f1731c63bf98b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/639c184ef75c7730d44d5168750f1731c63bf98b/RemovalAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
691,
12,
365,
262,
30,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
314,
7187,
18,
1289,
3882,
12,
315,
10795,
3113,
404,
262,
400,
273,
365,
18,
691,
2290,
1227,
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,
1836,
691,
12,
365,
262,
30,
19709,
26487,
13151,
468,
968,
279,
590,
628,
590,
2383,
314,
7187,
18,
1289,
3882,
12,
315,
10795,
3113,
404,
262,
400,
273,
365,
18,
691,
2290,
1227,
18,... |
img.thumbnail((self.tnX,self.tnY)) | img.thumbnail((int(self.tnX),int(self.tnY))) | def handle(self, body): "Get news from text and attachment if present" | 13900bbc21e9ff63b342d7b3d397939b0f32ae79 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3144/13900bbc21e9ff63b342d7b3d397939b0f32ae79/NewsHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
1417,
4672,
315,
967,
14783,
628,
977,
471,
6042,
309,
3430,
6,
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,
1640,
12,
2890,
16,
1417,
4672,
315,
967,
14783,
628,
977,
471,
6042,
309,
3430,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.__username = "ChuckNoris" self.__server_address = "http://10.200.132.22/bscw" self.__columns = ["user_id", "name", "longname", "email", "used_memory", "last_login", "locked"] self.__col_dialog_geometry = QtCore.QRect(100,100,100,100) self.__main_window_geometry = QtCore.QRect(100,100,800,800) self.__user_details_geometry = QtCore.QRect(100,100,100,100) self.__show_user_details = True | def __init__(self, p_parent = None): # initialisiere Objekt QtCore.QObject.__init__(self, p_parent) | 824a511487ba06871f904b5354e4fbc422d5d389 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4919/824a511487ba06871f904b5354e4fbc422d5d389/Settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
293,
67,
2938,
273,
599,
4672,
468,
2172,
291,
77,
822,
18760,
3839,
88,
20193,
18,
53,
921,
16186,
2738,
972,
12,
2890,
16,
293,
67,
2938,
13,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
293,
67,
2938,
273,
599,
4672,
468,
2172,
291,
77,
822,
18760,
3839,
88,
20193,
18,
53,
921,
16186,
2738,
972,
12,
2890,
16,
293,
67,
2938,
13,
2,
-100... | |
def setLineinVolume(self, volume): self._setVolume(self.SOUND_MIXER_WRITE_LINE, volume) def setMicVolume(self, volume): self._setVolume(self.SOUND_MIXER_WRITE_MIC, volume) | def incIgainVolume( self ): self.igainVolume += 5 if self.igainVolume > 100: self.igainVolume = 100 os.popen( 'aumix -i+5' ) def setOgainVolume( self, volume ): """For Ogain on SB Live Cards""" if volume > 100: volume = 100 elif volume < 0: volume = 0 self.ogainVolume = volume os.popen( 'aumix -o' + str(volume) ) | def setLineinVolume(self, volume): self._setVolume(self.SOUND_MIXER_WRITE_LINE, volume) | d45a1691780cfade4256053e94dd8d0ad73ddff2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/d45a1691780cfade4256053e94dd8d0ad73ddff2/mixer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26482,
267,
4545,
12,
2890,
16,
3940,
4672,
365,
6315,
542,
4545,
12,
2890,
18,
3584,
5240,
67,
7492,
60,
654,
67,
11677,
67,
5997,
16,
3940,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26482,
267,
4545,
12,
2890,
16,
3940,
4672,
365,
6315,
542,
4545,
12,
2890,
18,
3584,
5240,
67,
7492,
60,
654,
67,
11677,
67,
5997,
16,
3940,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
... |
result = pdb.Pdb.trace_dispatch(self, *args) sys.stdout = save_stdout return result | try: return pdb.Pdb.trace_dispatch(self, *args) finally: sys.stdout = save_stdout | def trace_dispatch(self, *args): # Redirect stdout to the given stream. save_stdout = sys.stdout sys.stdout = self.__out # Call Pdb's trace dispatch method. result = pdb.Pdb.trace_dispatch(self, *args) # Restore stdout. sys.stdout = save_stdout return result | bfedf0427d37679213b16f09b0989f999df6b421 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bfedf0427d37679213b16f09b0989f999df6b421/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
67,
10739,
12,
2890,
16,
380,
1968,
4672,
468,
9942,
3909,
358,
326,
864,
1407,
18,
1923,
67,
10283,
273,
2589,
18,
10283,
2589,
18,
10283,
273,
365,
16186,
659,
468,
3049,
453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2606,
67,
10739,
12,
2890,
16,
380,
1968,
4672,
468,
9942,
3909,
358,
326,
864,
1407,
18,
1923,
67,
10283,
273,
2589,
18,
10283,
2589,
18,
10283,
273,
365,
16186,
659,
468,
3049,
453,
... |
size = '0' | pass | def get_contentlength(self, cursor, user, uri, context=None, cache=None): attachment_obj = self.pool.get('ir.attachment') | 993ff2d321de105954db9e2ba9648c6707becb87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/993ff2d321de105954db9e2ba9648c6707becb87/webdav.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
2469,
12,
2890,
16,
3347,
16,
729,
16,
2003,
16,
819,
33,
7036,
16,
1247,
33,
7036,
4672,
6042,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
11461,
6134,
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,
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,
1745,
2469,
12,
2890,
16,
3347,
16,
729,
16,
2003,
16,
819,
33,
7036,
16,
1247,
33,
7036,
4672,
6042,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
11461,
6134,
2,
... |
for i in xrange(self.p.l): ret = self.p.index[i] | for i, ret in enumerate(self.p.index): | def __iter__(self): yield nullid for i in xrange(self.p.l): ret = self.p.index[i] if not ret: self.p.loadindex(i) ret = self.p.index[i] if isinstance(ret, str): ret = _unpack(indexformatng, ret) yield ret[7] | ce1028352c273f7d249afe32d60f1ba9f1629b58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/ce1028352c273f7d249afe32d60f1ba9f1629b58/revlog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2165,
972,
12,
2890,
4672,
2824,
446,
350,
364,
277,
16,
325,
316,
4241,
12,
2890,
18,
84,
18,
1615,
4672,
309,
486,
325,
30,
365,
18,
84,
18,
945,
1615,
12,
77,
13,
325,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2165,
972,
12,
2890,
4672,
2824,
446,
350,
364,
277,
16,
325,
316,
4241,
12,
2890,
18,
84,
18,
1615,
4672,
309,
486,
325,
30,
365,
18,
84,
18,
945,
1615,
12,
77,
13,
325,
273... |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 3f8fdffe72485d69e9e31bdeb4796c1cca750eba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3f8fdffe72485d69e9e31bdeb4796c1cca750eba/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
print "Grouping module %s" % mod | if self.debug_output >= moduleloader.DEBUG_ALL: print "Grouping module %s" % mod | def run(self): while self.parent.valid_running > 0 or self.parent.group_status < self.parent.total_loaded_mod: self.parent.group_pool_lock.acquire() if self.parent.group_status < self.parent.total_loaded_mod: mod = self.parent.valid_modules[self.parent.group_status] self.parent.group_status = self.parent.group_status + 1 self.parent.group_pool_lock.release() print "Grouping module %s" % mod for cat in mod.category: if not cat in self.parent.module_groupings: if self.parent.debug_output >= moduleloader.DEBUG_ALL: print " Group %s not found, adding" % cat self.parent.dict_lock.acquire() self.parent.module_groupings[cat] = [mod] self.parent.dict_lock.release() else: if self.parent.debug_output >= moduleloader.DEBUG_ALL: print " Group %s found, appending" % mod.category self.parent.dict_lock.acquire() self.parent.module_groupings[cat].append(mod) self.parent.dict_lock.release() else : self.parent.group_pool_lock.release() time.sleep(0.01) self.parent.group_pool_lock.acquire() self.parent.group_running = self.parent.group_running - 1 self.parent.group_pool_lock.release() | b7c19c0a52682adab242efd9d664209d1185033f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/635/b7c19c0a52682adab242efd9d664209d1185033f/logmoduleloader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
365,
18,
2938,
18,
877,
67,
8704,
405,
374,
578,
365,
18,
2938,
18,
1655,
67,
2327,
411,
365,
18,
2938,
18,
4963,
67,
4230,
67,
1711,
30,
365,
18,
2938,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
365,
18,
2938,
18,
877,
67,
8704,
405,
374,
578,
365,
18,
2938,
18,
1655,
67,
2327,
411,
365,
18,
2938,
18,
4963,
67,
4230,
67,
1711,
30,
365,
18,
2938,
... |
Id: 9 | Id: 10 | def exercise_modifiers(verbose=0): if (verbose): out = sys.stdout mtz_object = mtz.object() mtz_object.set_title(title="012345678") assert mtz_object.title() == "012345678" mtz_object.set_title(title="012345678", append=True) assert mtz_object.title() == "012345678 012345678" mtz_object.set_title(title="0123456789"*10+"012345678", append=True) assert mtz_object.title() == "012345678 "*2 + "0123456789"*5 mtz_object.set_title("0123456789"*100) assert mtz_object.title() == "0123456789"*7 mtz_object.add_history(lines=flex.std_string(["a1", "a2"])) assert list(mtz_object.history()) == ["a1", "a2"] mtz_object.add_history(lines=flex.std_string(["b1", "b2"])) assert list(mtz_object.history()) == ["b1", "b2", "a1", "a2"] mtz_object.add_history(line="c1") assert list(mtz_object.history()) == ["c1", "b1", "b2", "a1", "a2"] mtz_object.set_space_group_name(name="sg"*100) assert mtz_object.space_group_name() == "sgsgsgsgsgsgsgsgsgsg" mtz_object.set_space_group_number(number=12) assert mtz_object.space_group_number() == 12 mtz_object.set_point_group_name(name="pg"*100) assert mtz_object.point_group_name() == "pgpgpgpgpg" mtz_object.set_lattice_centring_type(symbol="C") assert mtz_object.lattice_centring_type() == "C" for space_group_symbols in sgtbx.space_group_symbol_iterator(): space_group = sgtbx.space_group(space_group_symbols) mtz_object.set_space_group(space_group) assert mtz_object.space_group() == space_group assert mtz_object.n_symmetry_matrices() == space_group.order_z() mtz_object = mtz.object() \ .set_title(title="exercise") \ .add_history(lines=flex.std_string(["h2"])) \ .add_history(line="h1") \ .set_space_group_name("sg") \ .set_space_group_number(123) \ .set_point_group_name("pg") \ .set_space_group(sgtbx.space_group_info(number=123).group()) assert mtz_object.title() == "exercise" assert list(mtz_object.history()) == ["h1", "h2"] for stage in [0,1]: for i_crystal in xrange(3): if (stage == 0): if (i_crystal % 2 == 0): crystal = mtz_object.add_crystal( name="crystal_%d"%i_crystal, project_name="project_%d"%i_crystal, unit_cell_parameters=(10+i_crystal,20,20,90,90,120)) else: crystal = mtz_object.add_crystal( name="crystal_%d"%i_crystal, project_name="project_%d"%i_crystal, unit_cell=uctbx.unit_cell((10+i_crystal,20,20,90,90,120))) else: crystal = mtz_object.crystals()[i_crystal] assert crystal.i_crystal() == i_crystal assert crystal.name() == "crystal_%d"%i_crystal assert crystal.project_name() == "project_%d"%i_crystal assert approx_equal(crystal.unit_cell_parameters(), (10+i_crystal,20,20,90,90,120)) if (not verbose): out = StringIO() mtz_object.show_summary(out=out) if (not verbose): assert out.getvalue() == """\ | c3cf0722281a181a283d00bb69ac8271125a2ef3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/c3cf0722281a181a283d00bb69ac8271125a2ef3/tst_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
15432,
12,
11369,
33,
20,
4672,
309,
261,
11369,
4672,
596,
273,
2589,
18,
10283,
5874,
94,
67,
1612,
273,
5874,
94,
18,
1612,
1435,
5874,
94,
67,
1612,
18,
542,
67,
2649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24165,
67,
15432,
12,
11369,
33,
20,
4672,
309,
261,
11369,
4672,
596,
273,
2589,
18,
10283,
5874,
94,
67,
1612,
273,
5874,
94,
18,
1612,
1435,
5874,
94,
67,
1612,
18,
542,
67,
2649,
... |
entlist = [] | opt_entlist = [] req_entlist = [] | def save_settings(self, nettype, networkid, networkentry): """ Verifies and saves the settings for the network entry. """ entry = networkentry.advanced_dialog entlist = [] # First make sure all the Addresses entered are valid. if entry.chkbox_static_ip.get_active(): req_entlist = [entry.txt_ip, enty.txt_netmask] opt_entlist = [entry.txt_gateway] if entry.chkbox_static_dns.get_active() and \ not entry.chkbox_global_dns.get_active(): req_entlist.append(entry.txt_dns_1) # Only append additional dns entries if they're entered. for ent in [entry.txt_dns_2, entry.txt_dns_3]: if ent.get_text() != "": opt_entlist.append(ent) # Required entries. for lblent in req_entlist: if not misc.IsValidIP(lblent.get_text()): error(self.window, language['invalid_address']. replace('$A', lblent.label.get_label())) return False # Optional entries, only check for validity if they're entered. for lblent in opt_entlist: if lblent.get_text() and not misc.IsValidIP(lblent.get_text()): error(self.window, language['invalid_address']. replace('$A', lblent.label.get_label())) return False | 2f8250064c9239dabfc800ee80c7a46f64ff94fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/353/2f8250064c9239dabfc800ee80c7a46f64ff94fa/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
4272,
12,
2890,
16,
2901,
723,
16,
2483,
350,
16,
2483,
4099,
4672,
3536,
6160,
5032,
471,
14649,
326,
1947,
364,
326,
2483,
1241,
18,
3536,
1241,
273,
2483,
4099,
18,
27080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
4272,
12,
2890,
16,
2901,
723,
16,
2483,
350,
16,
2483,
4099,
4672,
3536,
6160,
5032,
471,
14649,
326,
1947,
364,
326,
2483,
1241,
18,
3536,
1241,
273,
2483,
4099,
18,
27080,
... |
X = rings.PolynomialRing(Fp2).gen() | X = rings.PolynomialRing(Fp2, 'x').gen() | def supersingular_points(self): try: return (self._ss_points_dic, self._ss_points) except: pass Fp2 = self.__finite_field level = self.__level prime = Fp2.characteristic() X = rings.PolynomialRing(Fp2).gen() jinv = supersingular_j(Fp2) | ccbd9ae70ebd4617998efe053a50aa9acfdbc634 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/ccbd9ae70ebd4617998efe053a50aa9acfdbc634/ssmod.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1169,
414,
17830,
67,
4139,
12,
2890,
4672,
775,
30,
327,
261,
2890,
6315,
1049,
67,
4139,
67,
15859,
16,
365,
6315,
1049,
67,
4139,
13,
1335,
30,
1342,
478,
84,
22,
273,
365,
16186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1169,
414,
17830,
67,
4139,
12,
2890,
4672,
775,
30,
327,
261,
2890,
6315,
1049,
67,
4139,
67,
15859,
16,
365,
6315,
1049,
67,
4139,
13,
1335,
30,
1342,
478,
84,
22,
273,
365,
16186,
... |
- An iterator through a list of invertible residues modulo self, i.e. a list of elements in the ring of integers `R`represnting the elements of (R/self)^*. METHOD: Use pari's \emph{idealstar} to find the group structure and generators of the multiplicative group modulo the ideal. AUTHOR: John Cremona | - An iterator through a list of invertible residues modulo this ideal `I`, i.e. a list of elements in the ring of integers `R` representing the elements of `(R/I)^*`. METHOD: Use pari's ``idealstar`` to find the group structure and generators of the multiplicative group modulo the ideal. | def invertible_residues(self, reduce=True): """ Returns a iterator through a list of invertible residues modulo this integral ideal. | e462b4d226d7b8f741f48ed1e071494aa5463b8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/e462b4d226d7b8f741f48ed1e071494aa5463b8a/number_field_ideal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9848,
1523,
67,
15567,
3610,
12,
2890,
16,
5459,
33,
5510,
4672,
3536,
2860,
279,
2775,
3059,
279,
666,
434,
9848,
1523,
25435,
26109,
333,
21423,
23349,
18,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
9848,
1523,
67,
15567,
3610,
12,
2890,
16,
5459,
33,
5510,
4672,
3536,
2860,
279,
2775,
3059,
279,
666,
434,
9848,
1523,
25435,
26109,
333,
21423,
23349,
18,
2,
-100,
-100,
-100,
-100,
-... |
verbose_write(str(self) + " start listening") | def setUp(self): verbose_write(self) self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) verbose_write(str(self) + " socket created") global PORT PORT = test_support.bind_port(self.serv, HOST, PORT) verbose_write(str(self) + " start listening") self.serv.listen(1) verbose_write(str(self) + " started") | 94c52b456919e43021e0d219db4595f8bac9df47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/94c52b456919e43021e0d219db4595f8bac9df47/test_socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3988,
67,
2626,
12,
2890,
13,
365,
18,
23039,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
365,
18,
23039,
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,
24292,
12,
2890,
4672,
3988,
67,
2626,
12,
2890,
13,
365,
18,
23039,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
365,
18,
23039,
18,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.