rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
btn = QPushButton(text, widget) btn.setDisabled(disabled) if callback: master.connect(btn, SIGNAL("clicked()"), callback) return btn | btn = QPushButton(text, widget) btn.setDisabled(disabled) if callback: master.connect(btn, SIGNAL("clicked()"), callback) return btn | def button(widget, master, text, callback = None, disabled=0): btn = QPushButton(text, widget) btn.setDisabled(disabled) if callback: master.connect(btn, SIGNAL("clicked()"), callback) return btn | ec58355f0e4e6cbc25734f2c717e88966d659bd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/ec58355f0e4e6cbc25734f2c717e88966d659bd7/OWGUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
12,
6587,
16,
4171,
16,
977,
16,
1348,
273,
599,
16,
5673,
33,
20,
4672,
10638,
273,
2238,
7621,
3616,
12,
955,
16,
3604,
13,
10638,
18,
542,
8853,
12,
9278,
13,
309,
1348,
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,
3568,
12,
6587,
16,
4171,
16,
977,
16,
1348,
273,
599,
16,
5673,
33,
20,
4672,
10638,
273,
2238,
7621,
3616,
12,
955,
16,
3604,
13,
10638,
18,
542,
8853,
12,
9278,
13,
309,
1348,
30,... |
INPUT: | INPUT:: | def explain_picklejar(dir, catch_exceptions=True): r""" Given a directory or a .tar.bz2 of pickles, we unpickle each of them three times: once with cPickle, once with explain_pickle with in_current_sage=True, and once with explain_pickle with in_current_sage=False. We verify that each of these gives the same answer (where we check using repr(a)==repr(b), in case equality is not defined on all of these objects). INPUT: dir -- string; a directory or name of a .tar.bz2 file that decompresses to give a directory full of pickles. catch_exceptions -- boolean; default True: if True, then unpickling exceptions will be caught (and if all three unpicklers raise an exception, then that will be counted as a match). If False, then exceptions will not be caught, and will terminate this function. EXAMPLES: sage: std = os.environ['SAGE_DATA'] + '/extcode/pickle_jar/pickle_jar.tar.bz2' sage: from sage.misc.explain_pickle import * sage: explain_picklejar(std) # long time (~45s on my computer) doctest:...: DeprecationWarning: Your data is stored in an old format. Please use the save() function to store your data in a more recent format. doctest:...: DeprecationWarning: Your data is stored in an old format. Please use the save() function to store your data in a more recent format. doctest:...: DeprecationWarning: RQDF is deprecated; use RealField(212) instead. doctest:...: DeprecationWarning: RQDF is deprecated; use RealField(212) instead. doctest:...: DeprecationWarning: RQDF is deprecated; use RealField(212) instead. 4... matches; 0 mismatches """ # Largely copied from unpickle_all in sage_object.pyx from sage.structure.sage_object import load obj_at = re.compile('object at 0x[0-9a-f]+') n_success = 0 failed = [] if dir.endswith('.tar.bz2'): # create a temporary directory from sage.misc.all import tmp_dir T = tmp_dir() # extract tarball to it os.system('cd "%s"; bunzip2 -c "%s" | tar fx - '%(T, os.path.abspath(dir))) # Now use the directory in the tarball instead of dir dir = T + "/" + os.listdir(T)[0] for A in os.listdir(dir): if A.endswith('.sobj'): fn = dir + '/' + A try: v1 = load(fn) v1r = repr(v1) except Exception, msg: # if not catch_exceptions: raise v1r = 'error' try: exp_current = explain_pickle(file=fn, in_current_sage=True) import sys sys.stderr.write(exp_current) v2 = sage_eval(exp_current) v2r = repr(v2) except Exception, msg: if not catch_exceptions: raise v2r = 'error' try: exp_generic = explain_pickle(file=fn) import sys sys.stderr.write(exp_generic) v3 = sage_eval(exp_generic) v3r = repr(v3) except Exception, msg: if not catch_exceptions: raise v3r = 'error' v1r = obj_at.sub('object at 0x...', v1r) v2r = obj_at.sub('object at 0x...', v2r) v3r = obj_at.sub('object at 0x...', v3r) if v1r == v2r == v3r: n_success += 1 else: print "Mismatch on %s" % fn print v1r, v2r, v3r failed.append(A) print "%d matches; %d mismatches" % (n_success, len(failed)) print '\n'.join(failed) | 3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19765,
67,
20847,
11930,
12,
1214,
16,
1044,
67,
11855,
33,
5510,
4672,
436,
8395,
16803,
279,
1867,
578,
279,
263,
11718,
18,
25292,
22,
434,
6002,
1040,
16,
732,
640,
20847,
1517,
434,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19765,
67,
20847,
11930,
12,
1214,
16,
1044,
67,
11855,
33,
5510,
4672,
436,
8395,
16803,
279,
1867,
578,
279,
263,
11718,
18,
25292,
22,
434,
6002,
1040,
16,
732,
640,
20847,
1517,
434,... |
def grid_slaves(self, master, row=None, column=None): args = (master,) | def grid_slaves(self, row=None, column=None): args = () | def grid_slaves(self, master, row=None, column=None): args = (master,) if row: args = args + ('-row', row) if column: args = args + ('-column', column) return map(self._nametowidget, self.tk.splitlist( apply(self.tk.call, ('grid', 'slaves', self._w) + args))) | 6b09d018d485cb74cf8a3a10aa38b03b7ddc7d13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6b09d018d485cb74cf8a3a10aa38b03b7ddc7d13/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3068,
67,
2069,
6606,
12,
2890,
16,
1027,
33,
7036,
16,
1057,
33,
7036,
4672,
833,
273,
1832,
309,
1027,
30,
833,
273,
833,
397,
7707,
17,
492,
2187,
1027,
13,
309,
1057,
30,
833,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3068,
67,
2069,
6606,
12,
2890,
16,
1027,
33,
7036,
16,
1057,
33,
7036,
4672,
833,
273,
1832,
309,
1027,
30,
833,
273,
833,
397,
7707,
17,
492,
2187,
1027,
13,
309,
1057,
30,
833,
27... |
Qd.PaintRect(inner_rect) l, t, r, b = inner_rect r = int(l + (r-l)*value/self.maxval) inner_rect = l, t, r, b Qd.ForeColor(QuickDraw.blackColor) Qd.BackColor(QuickDraw.blackColor) Qd.PaintRect(inner_rect) | Qd.PaintRect((int(l + (r-l)*value/self.maxval), t, r, b)) | def _update(self, value): tp, h, bar_rect = self.d.GetDialogItem(3) Qd.SetPort(self.d) Qd.FrameRect(bar_rect) # Draw outline inner_rect = Qd.InsetRect(bar_rect, 1, 1) Qd.ForeColor(QuickDraw.whiteColor) Qd.BackColor(QuickDraw.whiteColor) Qd.PaintRect(inner_rect) # Clear internal l, t, r, b = inner_rect r = int(l + (r-l)*value/self.maxval) inner_rect = l, t, r, b Qd.ForeColor(QuickDraw.blackColor) Qd.BackColor(QuickDraw.blackColor) Qd.PaintRect(inner_rect) # Draw bar # Restore settings Qd.ForeColor(QuickDraw.blackColor) Qd.BackColor(QuickDraw.whiteColor) # Test for cancel button if ModalDialog(_ProgressBar_filterfunc) == 1: raise KeyboardInterrupt | 3a4b3b0132a553444b29bbb9a04b28af71852660 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a4b3b0132a553444b29bbb9a04b28af71852660/EasyDialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
12,
2890,
16,
460,
4672,
8071,
16,
366,
16,
4653,
67,
2607,
273,
365,
18,
72,
18,
967,
6353,
1180,
12,
23,
13,
2238,
72,
18,
694,
2617,
12,
2890,
18,
72,
13,
225,
2238,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2725,
12,
2890,
16,
460,
4672,
8071,
16,
366,
16,
4653,
67,
2607,
273,
365,
18,
72,
18,
967,
6353,
1180,
12,
23,
13,
2238,
72,
18,
694,
2617,
12,
2890,
18,
72,
13,
225,
2238,
... |
def __init__(self, allow_none=False): SimpleXMLRPCDispatcher.__init__(self, allow_none) | def __init__(self, allow_none=False, encoding=None): SimpleXMLRPCDispatcher.__init__(self, allow_none, encoding) | def __init__(self, allow_none=False): SimpleXMLRPCDispatcher.__init__(self, allow_none) | c1f5320ba578927a5354c476e71e897980966204 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c1f5320ba578927a5354c476e71e897980966204/SimpleXMLRPCServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1699,
67,
6102,
33,
8381,
4672,
4477,
4201,
8087,
6681,
16186,
2738,
972,
12,
2890,
16,
1699,
67,
6102,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1699,
67,
6102,
33,
8381,
4672,
4477,
4201,
8087,
6681,
16186,
2738,
972,
12,
2890,
16,
1699,
67,
6102,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.addstr(0, 0, "Task View") self.color_at(0, 0, self.wid, base_clr, 'title') | if self.hei <= 0: return | def draw(self): base_clr = deque() base_clr.append('in_taskview') lst = self.get_list() | 86594dde3122e6c58319b93568ce390b15dedba0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/86594dde3122e6c58319b93568ce390b15dedba0/taskview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
1026,
67,
830,
86,
273,
21147,
1435,
1026,
67,
830,
86,
18,
6923,
2668,
267,
67,
4146,
1945,
6134,
9441,
273,
365,
18,
588,
67,
1098,
1435,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
12,
2890,
4672,
1026,
67,
830,
86,
273,
21147,
1435,
1026,
67,
830,
86,
18,
6923,
2668,
267,
67,
4146,
1945,
6134,
9441,
273,
365,
18,
588,
67,
1098,
1435,
2,
-100,
-100,
-100,
... |
self._dkeys = self._dict.keys() self._dkeys.sort() | def __init__(self, *args): unittest.TestCase.__init__(self, *args) self._dkeys = self._dict.keys() self._dkeys.sort() | 364183b4af2d44f1a3884a43e228457696971120 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/364183b4af2d44f1a3884a43e228457696971120/test_dumbdbm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
2836,
3813,
18,
4709,
2449,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
13,
365,
6315,
72,
2452,
273,
365,
6315,
1576,
18,
2452,
1435,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
4672,
2836,
3813,
18,
4709,
2449,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
13,
365,
6315,
72,
2452,
273,
365,
6315,
1576,
18,
2452,
1435,
36... | |
cty.c_int, [cty.POINTER(FL_OBJECT), cty.c_int], | cty.c_int, [cty.POINTER(FL_OBJECT), cty.c_int], | def fl_set_menu_entries(ob, ent): """ fl_set_menu_entries(ob, ent) -> num. """ retval = _fl_set_menu_entries(ob, ent) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
5414,
67,
8219,
12,
947,
16,
3281,
4672,
3536,
1183,
67,
542,
67,
5414,
67,
8219,
12,
947,
16,
3281,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
67,
542,
67,
5414,
67,
8219,
12,
947,
16,
3281,
4672,
3536,
1183,
67,
542,
67,
5414,
67,
8219,
12,
947,
16,
3281,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
542,
... |
Subgroup of Mordell Weil group: [[1547:-2967:343], [2707496766203306:864581029138191:2969715140223272], [-13422227300:-49322830557:12167000000]] | Subgroup of Mordell-Weil group: [[1547:-2967:343], [2707496766203306:864581029138191:2969715140223272], [-13422227300:-49322830557:12167000000]] | def saturate(self, max_prime=-1, odd_primes_only=False): r""" Saturate this subgroup of the Mordell-Weil group. INPUT: - ``max_prime`` (int, default -1) -- saturation is performed for all primes up to `max_prime`. If `-1` (default) then an upper bound is computed for the primes at which the subgroup may not be saturated, and this is used; however, if the computed bound is greater than a value set by the eclib library (currently 97) then no saturation will be attempted at primes above this. - ``odd_primes_only`` (bool, default False) -- only do saturation at odd primes. (If the points have been found via 2-descent they should alreday be 2-saturated.) | c2ebf8bfa15bcdb4318f58bfcf2982e3a69cce87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/c2ebf8bfa15bcdb4318f58bfcf2982e3a69cce87/interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5942,
295,
340,
12,
2890,
16,
943,
67,
16382,
29711,
21,
16,
14800,
67,
683,
4485,
67,
3700,
33,
8381,
4672,
436,
8395,
25793,
295,
340,
333,
720,
1655,
434,
326,
490,
517,
1165,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5942,
295,
340,
12,
2890,
16,
943,
67,
16382,
29711,
21,
16,
14800,
67,
683,
4485,
67,
3700,
33,
8381,
4672,
436,
8395,
25793,
295,
340,
333,
720,
1655,
434,
326,
490,
517,
1165,
17,
... |
count = 1 | def sqrt(self, context=None): """Return the square root of self. | 2f6e41627262bfdd840d793613bcbe4a6112bf97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2f6e41627262bfdd840d793613bcbe4a6112bf97/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5700,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
990,
326,
8576,
1365,
434,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
5700,
12,
2890,
16,
819,
33,
7036,
4672,
3536,
990,
326,
8576,
1365,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
whole, may be cashed; this implementation does not support the enumeration of private fields | whole, may not be cashed; this implementation does not support the enumeration of private fields | def parse(self, *args, **kwargs): """ return the time value (in seconds since 1970) """ value = self.__call__(*args, **kwargs) if value: try: return mktime_tz(parsedate_tz(value)) except TypeError: raise HTTPBadRequest(( "Received an ill-formed timestamp for %s: %s\r\n") % (self.name, value)) | 74c8cfe93867f6b65436c8d806519ede20e99b6d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2097/74c8cfe93867f6b65436c8d806519ede20e99b6d/httpheaders.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
327,
326,
813,
460,
261,
267,
3974,
3241,
5342,
7301,
13,
3536,
460,
273,
365,
16186,
1991,
972,
30857,
1968,
16,
2826,
4333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
327,
326,
813,
460,
261,
267,
3974,
3241,
5342,
7301,
13,
3536,
460,
273,
365,
16186,
1991,
972,
30857,
1968,
16,
2826,
4333,
... |
options.external_api_file.append(val) | options.external_api_file.extend(_str_to_list(val)) | def parse_configfiles(configfiles, options, names): configparser = ConfigParser.ConfigParser() # ConfigParser.read() silently ignores errors, so open the files # manually (since we want to notify the user of any errors). for configfile in configfiles: fp = open(configfile, 'r') # may raise IOError. configparser.readfp(fp, configfile) fp.close() for optname in configparser.options('epydoc'): val = configparser.get('epydoc', optname, vars=os.environ).strip() optname = optname.lower().strip() if optname in ('modules', 'objects', 'values', 'module', 'object', 'value'): names.extend(val.replace(',', ' ').split()) elif optname == 'target': options.target = val elif optname == 'output': if val.lower() not in ACTIONS: raise ValueError('"%s" expected one of: %s' % (optname, ', '.join(ACTIONS))) options.action = val.lower() elif optname == 'verbosity': options.verbosity = _str_to_int(val, optname) elif optname == 'debug': options.debug = _str_to_bool(val, optname) elif optname in ('simple-term', 'simple_term'): options.simple_term = _str_to_bool(val, optname) # Generation options elif optname == 'docformat': options.docformat = val elif optname == 'parse': options.parse = _str_to_bool(val, optname) elif optname == 'introspect': options.introspect = _str_to_bool(val, optname) elif optname == 'exclude': options.exclude.append(val) elif optname in ('exclude-parse', 'exclude_parse'): options.exclude_parse.append(val) elif optname in ('exclude-introspect', 'exclude_introspect'): options.exclude_introspect.append(val) elif optname == 'inheritance': if val.lower() not in INHERITANCE_STYLES: raise ValueError('"%s" expected one of: %s.' % (optname, ', '.join(INHERITANCE_STYLES))) options.inerhitance = val.lower() elif optname =='private': options.private = _str_to_bool(val, optname) elif optname =='imports': options.imports = _str_to_bool(val, optname) elif optname == 'sourcecode': options.include_source_code = _str_to_bool(val, optname) elif optname in ('include-log', 'include_log'): options.include_log = _str_to_bool(val, optname) # Output options elif optname == 'name': options.prj_name = val elif optname == 'css': options.css = val elif optname == 'url': options.prj_url = val elif optname == 'link': options.prj_link = val elif optname == 'top': options.top_page = val elif optname == 'help': options.help_file = val elif optname =='frames': options.show_frames = _str_to_bool(val, optname) elif optname in ('separate-classes', 'separate_classes'): options.list_classes_separately = _str_to_bool(val, optname) # External API elif optname in ('external-api', 'external_api'): options.external_api.extend(val.replace(',', ' ').split()) elif optname in ('external-api-file', 'external_api_file'): options.external_api_file.append(val) elif optname in ('external-api-root', 'external_api_root'): options.external_api_root.append(val) # Graph options elif optname == 'graph': graphtypes = val.replace(',', '').split() for graphtype in graphtypes: if graphtype not in GRAPH_TYPES + ('all',): raise ValueError('"%s" expected one of: all, %s.' % (optname, ', '.join(GRAPH_TYPES))) options.graphs.extend(graphtypes) elif optname == 'dotpath': options.dotpath = val elif optname in ('graph-font', 'graph_font'): options.graph_font = val elif optname in ('graph-font-size', 'graph_font_size'): options.graph_font_size = _str_to_int(val, optname) elif optname == 'pstat': options.pstat_files.extend(val.replace(',', ' ').split()) # Return value options elif optname in ('failon', 'fail-on', 'fail_on'): if val.lower().strip() in ('error', 'errors'): options.fail_on = log.ERROR elif val.lower().strip() in ('warning', 'warnings'): options.fail_on = log.WARNING elif val.lower().strip() in ('docstring_warning', 'docstring_warnings'): options.fail_on = log.DOCSTRING_WARNING else: raise ValueError("%r expected one of: error, warning, " "docstring_warning" % optname) else: raise ValueError('Unknown option %s' % optname) | 3bca6441a73225e1642dce166c7f09fd5de1cb46 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11420/3bca6441a73225e1642dce166c7f09fd5de1cb46/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1425,
2354,
12,
1425,
2354,
16,
702,
16,
1257,
4672,
642,
4288,
273,
25076,
18,
809,
2678,
1435,
468,
25076,
18,
896,
1435,
22274,
17868,
1334,
16,
1427,
1696,
326,
1390,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
1425,
2354,
12,
1425,
2354,
16,
702,
16,
1257,
4672,
642,
4288,
273,
25076,
18,
809,
2678,
1435,
468,
25076,
18,
896,
1435,
22274,
17868,
1334,
16,
1427,
1696,
326,
1390,
468,
... |
l1 = '--- /dev/null%s' % datetag(epoch) | l1 = '--- /dev/null%s' % datetag(epoch, False) | def h(v): # md5 is used instead of sha1 because md5 is supposedly faster return md5.new(v).digest() | 0833625741df2e0a90361e01fdb8571e859522e4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/0833625741df2e0a90361e01fdb8571e859522e4/mdiff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
12,
90,
4672,
468,
3481,
25,
353,
1399,
3560,
434,
6056,
21,
2724,
3481,
25,
353,
18405,
715,
12063,
327,
3481,
25,
18,
2704,
12,
90,
2934,
10171,
1435,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
12,
90,
4672,
468,
3481,
25,
353,
1399,
3560,
434,
6056,
21,
2724,
3481,
25,
353,
18405,
715,
12063,
327,
3481,
25,
18,
2704,
12,
90,
2934,
10171,
1435,
2,
-100,
-100,
-100,
-100,... |
self.__automorphisms = Auts | def _automorphisms(self): """ Compute the automorphisms of self. These are always given by raising to a power, so the return value is a list of integers. | 9c9051916e82d8e6549f10cbafc69b92d5f2a89f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/9c9051916e82d8e6549f10cbafc69b92d5f2a89f/dirichlet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5854,
362,
7657,
23749,
12,
2890,
4672,
3536,
8155,
326,
18472,
7657,
23749,
434,
365,
18,
8646,
854,
3712,
864,
635,
28014,
358,
279,
7212,
16,
1427,
326,
327,
460,
353,
279,
666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5854,
362,
7657,
23749,
12,
2890,
4672,
3536,
8155,
326,
18472,
7657,
23749,
434,
365,
18,
8646,
854,
3712,
864,
635,
28014,
358,
279,
7212,
16,
1427,
326,
327,
460,
353,
279,
666,
... | |
lu = lu_class(self, op, self.cfg, self.sstore) | lu = lu_class(self, op, self.cfg, sstore) | def ChainOpCode(self, op): """Chain and execute an opcode. | c6868e1d7fd7ce6179942b2b909686d0a9ec2b0b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/c6868e1d7fd7ce6179942b2b909686d0a9ec2b0b/mcpu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7824,
3817,
1085,
12,
2890,
16,
1061,
4672,
3536,
3893,
471,
1836,
392,
11396,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
7824,
3817,
1085,
12,
2890,
16,
1061,
4672,
3536,
3893,
471,
1836,
392,
11396,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def _btn_close_on_click(self, e): self.Close() | def _btn_del_on_click(self, e): selection = self.lst_categories.GetSelection() if selection != wx.NOT_FOUND: ok_to_delete = wx.MessageBox('Are you sure to delete?', 'Question', wx.YES_NO|wx.CENTRE|wx.NO_DEFAULT, self) == wx.YES if ok_to_delete: cat = self.lst_categories.GetClientData(selection) self.timeline.delete_category(cat) | db1db121b58188192a5f4f1b8f84ae03b8306f15 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5252/db1db121b58188192a5f4f1b8f84ae03b8306f15/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
11898,
67,
3771,
67,
265,
67,
7475,
12,
2890,
16,
425,
4672,
4421,
273,
365,
18,
16923,
67,
8995,
18,
967,
6233,
1435,
309,
4421,
480,
7075,
18,
4400,
67,
9294,
30,
1529,
67,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11898,
67,
3771,
67,
265,
67,
7475,
12,
2890,
16,
425,
4672,
4421,
273,
365,
18,
16923,
67,
8995,
18,
967,
6233,
1435,
309,
4421,
480,
7075,
18,
4400,
67,
9294,
30,
1529,
67,
86... | |
ok = True | ok = True | def do_check(self, cr, uid, action, obj, context={}): """ check Action @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param context: A standard dictionary for contextual values """ | 75cd7834c59be91ea8c8725d95db63052257d8a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/75cd7834c59be91ea8c8725d95db63052257d8a2/base_action_rule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1893,
12,
2890,
16,
4422,
16,
4555,
16,
1301,
16,
1081,
16,
819,
12938,
4672,
3536,
866,
4382,
632,
891,
365,
30,
1021,
733,
4407,
632,
891,
4422,
30,
326,
783,
1027,
16,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
12,
2890,
16,
4422,
16,
4555,
16,
1301,
16,
1081,
16,
819,
12938,
4672,
3536,
866,
4382,
632,
891,
365,
30,
1021,
733,
4407,
632,
891,
4422,
30,
326,
783,
1027,
16,
62... |
print "* ",som1[0] print "* ",som1[1] print "* ",som1[2] | print "* ", som1[0] print "* ", som1[1] print "* ", som1[2] | def sum_all_spectra(obj,**kwargs): """ This function takes all the SOs in a SOM and sums them together using the summing by weights concept. All of the SOs are assumed to have the same axis scale. Parameters: ---------- -> obj is a SOM in which all of the SOs are to be summed together Returns: ------- <- A SOM containing a single spectrum Exceptions: ---------- <- TypeError is raised if anything other than a SOM is given """ # import the helper functions import hlr_utils o_descr=hlr_utils.get_descr(obj) if o_descr != "SOM": raise TypeError, "Function argument must be a SOM" # Have a SOM, go on else: pass (result,res_descr)=hlr_utils.empty_result(obj) result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) # iterate through the values import common_lib so_id_list = [] val1 = hlr_utils.get_value(obj,0,o_descr,"all") val2 = hlr_utils.get_value(obj,1,o_descr,"all") value = common_lib.add_ncerr(val1, val2) so_id_list.append(val1.id) so_id_list.append(val2.id) for i in range(2,hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"all") value = common_lib.add_ncerr(val, value) so_id_list.append(val.id) hlr_utils.result_insert(result,res_descr,value,None,"all") result.attr_list["Summed IDs"] = so_id_list result[0].id = 0 return result | 8179af3e8a7df82b7cb8133f15d0deb02bebabd4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/8179af3e8a7df82b7cb8133f15d0deb02bebabd4/hlr_sum_all_spectra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2142,
67,
454,
67,
13234,
354,
12,
2603,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
777,
326,
7460,
87,
316,
279,
348,
1872,
471,
26608,
2182,
9475,
1450,
326,
2142,
11987,
635,
5376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2142,
67,
454,
67,
13234,
354,
12,
2603,
16,
636,
4333,
4672,
3536,
1220,
445,
5530,
777,
326,
7460,
87,
316,
279,
348,
1872,
471,
26608,
2182,
9475,
1450,
326,
2142,
11987,
635,
5376,
... |
gui.app.normalize_window() | if self.fullscreen: gui.app.fullscreen_window(False) else: gui.app.normalize_window() | def onGuestPropertyChange(self, name, newValue, flags): # Shared folder management if os.path.dirname(name) == "/UFO/Com/GuestToHost/Shares/UserAccept": share_label = os.path.basename(name) share_name, share_mntpt = newValue.split(";") self.vbox.current_machine.add_shared_folder(share_label, share_mntpt, writable = True) self.vbox.current_machine.set_guest_property("/UFO/Com/HostToGuest/Shares/ReadyToMount/" + share_label, share_name) elif os.path.dirname(name) == "/UFO/Com/HostToGuest/Shares/Remove": self.vbox.current_machine.remove_shared_folder(os.path.basename(name)) # UFO settings management elif os.path.dirname(name) == "/UFO/Settings": cp = ConfigParser() cp.read(conf.conf_file) if not cp.has_section("guest"): cp.add_section("guest") cp.set("guest", os.path.basename(name), newValue) cp.write(open(conf.conf_file, "w")) # Credentials management elif os.path.dirname(name) == "/UFO/Credentials": if os.path.basename(name) == "Status": if newValue == "OK": if self.remember_pass: self.set_password(self.remember_pass) gui.app.authentication(_("Opening session...")) elif newValue == "FAILED" or newValue == "NO_PASSWORD": if newValue == "FAILED" and self.keyring_valid: self.set_password("") gui.app.hide_balloon() gui.app.normalize_window() gui.app.set_tooltip(_("UFO: authenticating")) # Boot progress management elif name == "/UFO/Boot/Progress": if not self.vbox.current_machine.is_booting: self.vbox.current_machine.is_booting = True gui.app.update_progress(gui.app.tray.progress, newValue) # Resolution changes management elif name == "/VirtualBox/GuestAdd/Vbgl/Video/SavedMode": # We NEVER receive last percent event, # so we use /VirtualBox/GuestAdd/Vbgl/Video/SavedMode event # raised at slim startup to catch end of oot progress if self.vbox.current_machine.is_booting and \ not self.vbox.current_machine.is_booted: gui.app.update_progress(gui.app.tray.progress, str("1.000")) gui.app.authentication(_("Authenticating...")) self.vbox.current_machine.is_booted = True # Overlay data reintegration infos elif name == "/UFO/Overlay/Size": self.vbox.current_machine.overlay_data_size = int(newValue) # Custom machine state management elif name == "/UFO/State": if newValue == "LOGGED_IN": # Start usb check loop gui.app.start_usb_check_timer(5, self.check_usb_devices) | 8dd77e2e1cc4208fece910344be925d3ded58b3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/8dd77e2e1cc4208fece910344be925d3ded58b3a/osbackend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
12978,
1396,
3043,
12,
2890,
16,
508,
16,
6129,
16,
2943,
4672,
468,
10314,
3009,
11803,
309,
1140,
18,
803,
18,
12287,
12,
529,
13,
422,
2206,
57,
3313,
19,
799,
19,
12978,
774,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
12978,
1396,
3043,
12,
2890,
16,
508,
16,
6129,
16,
2943,
4672,
468,
10314,
3009,
11803,
309,
1140,
18,
803,
18,
12287,
12,
529,
13,
422,
2206,
57,
3313,
19,
799,
19,
12978,
774,
... |
if getattr(checker, 'reports', None): | if reports: | def print_full_documentation(self): """output a full documentation in ReST format""" for checker in sort_checkers(self._checkers.values()): if checker.name == 'master': prefix = 'Main ' if checker.options: for section, options in checker.options_by_section(): if section is None: title = 'General options' else: title = '%s options' % section.capitalize() print title print '~' * len(title) rest_format_section(sys.stdout, None, options) print else: prefix = '' title = '%s checker' % checker.name.capitalize() print title print '-' * len(title) if checker.__doc__: # __doc__ is None with -OO print linesep.join([l.strip() for l in checker.__doc__.splitlines()]) if checker.options: title = 'Options' print title print '~' * len(title) for section, options in checker.options_by_section(): rest_format_section(sys.stdout, section, options) print if checker.msgs: title = ('%smessages' % prefix).capitalize() print title print '~' * len(title) self.list_checkers_messages( checker) print if getattr(checker, 'reports', None): title = ('%sreports' % prefix).capitalize() print title print '~' * len(title) for report in checker.reports: print ':%s: %s' % report[:2] print print | 116d7011f303fd219acc40aabb14bbdc46eb52b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/928/116d7011f303fd219acc40aabb14bbdc46eb52b6/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
2854,
67,
26941,
12,
2890,
4672,
3536,
2844,
279,
1983,
7323,
316,
868,
882,
740,
8395,
364,
12489,
316,
1524,
67,
1893,
414,
12,
2890,
6315,
1893,
414,
18,
2372,
1435,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
67,
2854,
67,
26941,
12,
2890,
4672,
3536,
2844,
279,
1983,
7323,
316,
868,
882,
740,
8395,
364,
12489,
316,
1524,
67,
1893,
414,
12,
2890,
6315,
1893,
414,
18,
2372,
1435,
4672,
... |
"""class to hold iw_point data """ | """ Class to hold iw_point data. """ | def setNoiselevel(self, val): # currently not implemented # XXX self.nlevel = val | 05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3159/05b40a3d0b9e46299ea3a7ddfd32be4a1e2ba258/iwlibs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2279,
291,
6516,
941,
12,
2890,
16,
1244,
4672,
468,
4551,
486,
8249,
468,
11329,
365,
18,
82,
2815,
273,
1244,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2279,
291,
6516,
941,
12,
2890,
16,
1244,
4672,
468,
4551,
486,
8249,
468,
11329,
365,
18,
82,
2815,
273,
1244,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def test_seek(self): self.failUnlessEqual(self.mpc.position, 0.0) self.mpc.seek(15) self.failUnlessEqual(self.mpc.position, 15.0) self.failUnless(self.mpc.read()) self.failUnless(self.mpc.position > 15.0) def test_seek_fail(self): self.failUnlessRaises(IOError, self.mpc.seek, 10000) def test_end(self): self.mpc.seek(self.mpc.length) self.mpc.read() self.failIf(self.mpc.read()) | def printErrorList(self, flavour, errors): for test, err in errors: sys.stdout.write(self.separator1 + "\n") sys.stdout.write("%s: %s\n" % (flavour, str(test))) sys.stdout.write(self.separator2 + "\n") sys.stdout.write("%s\n" % err) | def test_seek(self): self.failUnlessEqual(self.mpc.position, 0.0) self.mpc.seek(15) self.failUnlessEqual(self.mpc.position, 15.0) self.failUnless(self.mpc.read()) self.failUnless(self.mpc.position > 15.0) | bff271d03b4b3ad7e7dbb804c3484ad1b8453be7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/bff271d03b4b3ad7e7dbb804c3484ad1b8453be7/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
16508,
12,
2890,
4672,
365,
18,
6870,
984,
2656,
5812,
12,
2890,
18,
1291,
71,
18,
3276,
16,
374,
18,
20,
13,
365,
18,
1291,
71,
18,
16508,
12,
3600,
13,
365,
18,
6870,
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,
1842,
67,
16508,
12,
2890,
4672,
365,
18,
6870,
984,
2656,
5812,
12,
2890,
18,
1291,
71,
18,
3276,
16,
374,
18,
20,
13,
365,
18,
1291,
71,
18,
16508,
12,
3600,
13,
365,
18,
6870,
9... |
args += self._get_override("-m", "umask", oct(self.options.umask)) | if self.options.umask: args += self._get_override("-m", "umask", oct(self.options.umask)) | def do_start(self, arg): self.get_status() if not self.zd_up: args = [ self.options.python, self.options.zdrun, ] args += self._get_override("-S", "schemafile") args += self._get_override("-C", "configfile") args += self._get_override("-b", "backofflimit") args += self._get_override("-d", "daemon", flag=1) args += self._get_override("-f", "forever", flag=1) args += self._get_override("-s", "sockname") args += self._get_override("-u", "user") args += self._get_override("-m", "umask", oct(self.options.umask)) args += self._get_override( "-x", "exitcodes", ",".join(map(str, self.options.exitcodes))) args += self._get_override("-z", "directory") args.extend(self.options.program) if self.options.daemon: flag = os.P_NOWAIT else: flag = os.P_WAIT os.spawnvp(flag, args[0], args) elif not self.zd_pid: self.send_action("start") else: print "daemon process already running; pid=%d" % self.zd_pid return self.awhile(lambda: self.zd_pid, "daemon process started, pid=%(zd_pid)d") | 2cea6fb27fc85082865b8560d5696495eacd7567 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9782/2cea6fb27fc85082865b8560d5696495eacd7567/zdctl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1937,
12,
2890,
16,
1501,
4672,
365,
18,
588,
67,
2327,
1435,
309,
486,
365,
18,
94,
72,
67,
416,
30,
833,
273,
306,
365,
18,
2116,
18,
8103,
16,
365,
18,
2116,
18,
94,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
1937,
12,
2890,
16,
1501,
4672,
365,
18,
588,
67,
2327,
1435,
309,
486,
365,
18,
94,
72,
67,
416,
30,
833,
273,
306,
365,
18,
2116,
18,
8103,
16,
365,
18,
2116,
18,
94,
... |
this = apply(_quickfix.new_NetworkRequestID, args) | this = _quickfix.new_NetworkRequestID(*args) | def __init__(self, *args): this = apply(_quickfix.new_NetworkRequestID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
3906,
691,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
3906,
691,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
36... |
line['account_analytic_lines'] = line.get('account_analytic_lines', False) and line['account_analytic_lines'][0] if 'sale_order_lines' in line: line['sale_order_lines'] = [(6,0, line.get('sale_order_lines', [])) ] | line['account_analytic_lines'] = [(6,0, line.get('account_analytic_lines', [])) ] | def _refund_cleanup_lines(self, lines): for line in lines: if 'fleet_id' in line: line['fleet_id'] = line.get('fleet_id', False) and line['fleet_id'][0] if 'account_analytic_lines' in line: line['account_analytic_lines'] = line.get('account_analytic_lines', False) and line['account_analytic_lines'][0] if 'sale_order_lines' in line: line['sale_order_lines'] = [(6,0, line.get('sale_order_lines', [])) ] return super(account_invoice, self)._refund_cleanup_lines(lines) | 1466ee2e17c8d12a073140f4879b7583de3aa0b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/1466ee2e17c8d12a073140f4879b7583de3aa0b3/invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1734,
1074,
67,
16732,
67,
3548,
12,
2890,
16,
2362,
4672,
364,
980,
316,
2362,
30,
309,
296,
74,
8270,
67,
350,
11,
316,
980,
30,
980,
3292,
74,
8270,
67,
350,
3546,
273,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1734,
1074,
67,
16732,
67,
3548,
12,
2890,
16,
2362,
4672,
364,
980,
316,
2362,
30,
309,
296,
74,
8270,
67,
350,
11,
316,
980,
30,
980,
3292,
74,
8270,
67,
350,
3546,
273,
980,
... |
return self.storage.readCoordinates(self.stamp, rowNumbers, current) | self.logger.info("%s.readCoordinates(size=%s)", self, slen(rowNumbers)) self.storage.readCoordinates(self.stamp, rowNumbers, current) | def readCoordinates(self, rowNumbers, current = None): return self.storage.readCoordinates(self.stamp, rowNumbers, current) | 9e444d0db2c86402ac13ce5872a3a228f326640d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/9e444d0db2c86402ac13ce5872a3a228f326640d/tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
13431,
12,
2890,
16,
1027,
10072,
16,
783,
273,
599,
4672,
327,
365,
18,
5697,
18,
896,
13431,
12,
2890,
18,
14317,
16,
1027,
10072,
16,
783,
13,
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,
855,
13431,
12,
2890,
16,
1027,
10072,
16,
783,
273,
599,
4672,
327,
365,
18,
5697,
18,
896,
13431,
12,
2890,
18,
14317,
16,
1027,
10072,
16,
783,
13,
2,
-100,
-100,
-100,
-100,
-100,
... |
os.setreuid(-1, -1) | def test_setreuid_neg1(self): import subprocess subprocess.check_call([ sys.executable, '-c', 'import os,sys;os.setreuid(-1,-1);sys.exit(0)']) | def test_setreuid(self): if os.getuid() != 0: self.assertRaises(os.error, os.setreuid, 0, 0) self.assertRaises(OverflowError, os.setreuid, 1<<32, 0) self.assertRaises(OverflowError, os.setreuid, 0, 1<<32) os.setreuid(-1, -1) # Does nothing, but it needs to accept -1 | d6e6c449a7c5b423698ef3102ab596c5b188d4c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/d6e6c449a7c5b423698ef3102ab596c5b188d4c7/test_os.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
266,
1911,
12,
2890,
4672,
309,
1140,
18,
588,
1911,
1435,
480,
374,
30,
365,
18,
11231,
12649,
6141,
12,
538,
18,
1636,
16,
1140,
18,
542,
266,
1911,
16,
374,
16,
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,
1842,
67,
542,
266,
1911,
12,
2890,
4672,
309,
1140,
18,
588,
1911,
1435,
480,
374,
30,
365,
18,
11231,
12649,
6141,
12,
538,
18,
1636,
16,
1140,
18,
542,
266,
1911,
16,
374,
16,
374... |
Sub(lat, "value").text = "50.579498" Sub(lat, "uncertainty").text = "2.240000" | Sub(lat, "value").text = '%s' % self.threeDlocEventLat Sub(lat, "uncertainty").text = '%s' % self.threeDlocEventErrY | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i in range(len(self.streams)): if self.dicts[i].has_key('P'): pick = Sub(xml, "pick") wave = Sub(pick, "waveform") wave.set("networkCode", self.streams[i][0].stats.network) wave.set("stationCode", self.streams[i][0].stats.station) wave.set("channelCode", self.streams[i][0].stats.channel) wave.set("locationCode", "") date = Sub(pick, "time") # prepare time of pick picktime = self.streams[i][0].stats.starttime picktime += (self.dicts[i]['P'] / self.streams[i][0].stats.sampling_rate) Sub(date, "value").text = (picktime.isoformat() + '.%06i' % picktime.microsecond) if self.dicts[i].has_key('PErr1') and self.dicts[i].has_key('PErr2'): temp = float(self.dicts[i].has_key('PErr2') - self.dicts[i].has_key('PErr1')) temp /= self.streams[i][0].stats.sampling_rate Sub(date, "uncertainty").text = str(temp) else: Sub(date, "uncertainty") Sub(pick, "phaseHint").text = "P" if self.dicts[i].has_key('POnset'): if self.dicts[i]['POnset'] == 'impulsive': Sub(pick, "onset").text = 'impulsive' elif self.dicts[i]['POnset'] == 'emergent': Sub(pick, "onset").text = 'emergent' else: Sub(pick, "onset") if self.dicts[i].has_key('PPol'): if self.dicts[i]['PPol'] == 'Up' or self.dicts[i]['PPol'] == 'PoorUp': Sub(pick, "polarity").text = 'positive' elif self.dicts[i]['PPol'] == 'Down' or self.dicts[i]['PPol'] == 'PoorDown': Sub(pick, "polarity").text = 'negative' else: Sub(pick, "polarity") if self.dicts[i].has_key('PWeight'): Sub(pick, "weight").text = '%i' % self.dicts[i]['PWeight'] else: Sub(pick, "weight") Sub(Sub(pick, "min_amp"), "value").text = "0.00000" #XXX what is min_amp??? Sub(pick, "phase_compu").text = "IPU0" Sub(Sub(pick, "phase_res"), "value").text = "0.17000" Sub(Sub(pick, "phase_weight"), "value").text = "1.00000" Sub(Sub(pick, "phase_delay"), "value").text = "0.00000" Sub(Sub(pick, "azimuth"), "value").text = "1.922043" Sub(Sub(pick, "incident"), "value").text = "96.00000" Sub(Sub(pick, "epi_dist"), "value").text = "44.938843" Sub(Sub(pick, "hyp_dist"), "value").text = "45.30929" | 74f68db5096834aa7cf8785b28082e2c08e155f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/74f68db5096834aa7cf8785b28082e2c08e155f2/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8925,
40,
1333,
22,
4201,
12,
2890,
4672,
3536,
2860,
876,
434,
890,
72,
1829,
487,
2025,
585,
3536,
2025,
273,
225,
3010,
2932,
2575,
7923,
2592,
12,
1676,
12,
2902,
16,
315,
2575,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8925,
40,
1333,
22,
4201,
12,
2890,
4672,
3536,
2860,
876,
434,
890,
72,
1829,
487,
2025,
585,
3536,
2025,
273,
225,
3010,
2932,
2575,
7923,
2592,
12,
1676,
12,
2902,
16,
315,
2575,
67... |
if not self.theobject.__dict__.has_key(key): | if key not in self.theobject.__dict__: | def __call__(self, *args, **keywords): | fa9edb56f50b842cb78ae20ba338bbee0ea22809 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/fa9edb56f50b842cb78ae20ba338bbee0ea22809/recipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
11771,
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,
... | [
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,
1001,
1991,
972,
12,
2890,
16,
380,
1968,
16,
2826,
11771,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print event | def _addTimetableException(self, event, replacement): """Add or change a timetable exception for a timetable event. | bf999b44b532b8f397c35c56003a7cb7405086fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/bf999b44b532b8f397c35c56003a7cb7405086fd/cal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
10178,
278,
429,
503,
12,
2890,
16,
871,
16,
6060,
4672,
3536,
986,
578,
2549,
279,
26668,
429,
1520,
364,
279,
26668,
429,
871,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
10178,
278,
429,
503,
12,
2890,
16,
871,
16,
6060,
4672,
3536,
986,
578,
2549,
279,
26668,
429,
1520,
364,
279,
26668,
429,
871,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
return http.Response(stream=message(success)) | return HTMLResponse(stream=message(success)) | def render(self, request): if not notebook.conf()['email']: return http.Response(stream=message('The confirmation system is not active.')) key = request.args['key'][0] invalid_confirm_key = """\ | 39855fabbbbe971c1c1d64566b1625e9c1c6d482 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/39855fabbbbe971c1c1d64566b1625e9c1c6d482/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
590,
4672,
309,
486,
14718,
18,
3923,
1435,
3292,
3652,
3546,
30,
327,
1062,
18,
1064,
12,
3256,
33,
2150,
2668,
1986,
14296,
2619,
353,
486,
2695,
1093,
3719,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
590,
4672,
309,
486,
14718,
18,
3923,
1435,
3292,
3652,
3546,
30,
327,
1062,
18,
1064,
12,
3256,
33,
2150,
2668,
1986,
14296,
2619,
353,
486,
2695,
1093,
3719,
498,
... |
if not ('channel' in f and 'items'in f): | if not f['channel']: | def add_feed(feed_xml): """Try to add a feed. Return values: tuple (status, feed_uid) -1: unknown error 0: feed added normally 1: feed added via autodiscovery 2: feed not added, already present 3: feed not added, connection or parse error""" from singleton import db c = db.cursor() try: f = feedparser.parse(feed_xml) normalize.normalize_feed(f) if not ('channel' in f and 'items'in f): return 3, None feed = { 'xmlUrl': f['url'], 'htmlUrl': str(f['channel']['link']), 'etag': f['etag'], 'title': f['channel']['title'].encode('ascii', 'xmlcharrefreplace'), 'desc': f['channel']['description'].encode('ascii', 'xmlcharrefreplace') } for key, value in feed.items(): if type(value) == str: feed[key] = escape(value) try: c.execute("""insert into fm_feeds (feed_xml, feed_etag, feed_html, feed_title, feed_desc) values ('%(xmlUrl)s', '%(etag)s', '%(htmlUrl)s', '%(title)s', '%(desc)s')""" % feed) feed_uid = db.sqlite_last_insert_rowid() process_parsed_feed(f, c, feed_uid) db.commit() return 0, feed_uid except sqlite.IntegrityError, e: if 'feed_xml' not in str(e): return -1, None else: # duplicate attempt return 2, None finally: c.close() | d7a5016e1043f610bd1bc56354c0f002fa522a44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/d7a5016e1043f610bd1bc56354c0f002fa522a44/update.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7848,
12,
7848,
67,
2902,
4672,
3536,
7833,
358,
527,
279,
4746,
18,
2000,
924,
30,
3193,
261,
2327,
16,
4746,
67,
1911,
13,
300,
21,
30,
5917,
555,
374,
30,
4746,
3096,
158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7848,
12,
7848,
67,
2902,
4672,
3536,
7833,
358,
527,
279,
4746,
18,
2000,
924,
30,
3193,
261,
2327,
16,
4746,
67,
1911,
13,
300,
21,
30,
5917,
555,
374,
30,
4746,
3096,
158... |
EXAMPLE: | EXAMPLE:: | def maximal_linear_bias_relative(self): """ Return maximal bias of all linear approximations of this S-box. | dd81b4a97db8b232434d8623d237dba45e418834 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dd81b4a97db8b232434d8623d237dba45e418834/sbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
943,
2840,
67,
12379,
67,
13931,
67,
11626,
12,
2890,
4672,
3536,
2000,
943,
2840,
12005,
434,
777,
9103,
26962,
1012,
434,
333,
348,
17,
2147,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
943,
2840,
67,
12379,
67,
13931,
67,
11626,
12,
2890,
4672,
3536,
2000,
943,
2840,
12005,
434,
777,
9103,
26962,
1012,
434,
333,
348,
17,
2147,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
print 'MultiSelectionGroup.selectCtrl' | def selectCtrl(self, ctrl, compn): print 'MultiSelectionGroup.selectCtrl' SelectionGroup.selectCtrl(self, ctrl, compn) self.inspSel = None self.inspector.cleanup() self.inspector.multiSelectObject(None, self.designer) | 2dfc26470222dc7c48c18810d65dc6cd09f6688b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2dfc26470222dc7c48c18810d65dc6cd09f6688b/SelectionTags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
12418,
12,
2890,
16,
6414,
16,
1161,
82,
4672,
12977,
1114,
18,
4025,
12418,
12,
2890,
16,
6414,
16,
1161,
82,
13,
365,
18,
267,
1752,
1877,
273,
599,
365,
18,
12009,
280,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
12418,
12,
2890,
16,
6414,
16,
1161,
82,
4672,
12977,
1114,
18,
4025,
12418,
12,
2890,
16,
6414,
16,
1161,
82,
13,
365,
18,
267,
1752,
1877,
273,
599,
365,
18,
12009,
280,
18,
... | |
difference_file.write(difflib.HtmlDiff().make_file(repr(input_mesh.pipeline_value()).splitlines(1), repr(reference.output_mesh).splitlines(1), "Test Geometry", "Reference Geometry")) | difference_file.write(difflib.HtmlDiff().make_file(str(input_mesh.pipeline_value()).splitlines(1), str(reference.output_mesh).splitlines(1), "Test Geometry", "Reference Geometry")) | def mesh_comparison_to_reference(document, input_mesh, reference_mesh_name, threshold): mesh_writer = document.new_node("K3DMeshWriter") mesh_writer.file = k3d.filesystem.generic_path(binary_path() + "/" + reference_mesh_name + ".output.k3d") document.set_dependency(mesh_writer.get_property("input_mesh"), input_mesh) reference = document.new_node("K3DMeshReader") reference.center = False reference.scale_to_size = False difference = get_mesh_difference(document, input_mesh, reference.get_property("output_mesh"), threshold) for index in range(1, 100): reference_file = k3d.filesystem.generic_path(source_path() + "/meshes/" + reference_mesh_name + ".reference." + str(index) + ".k3d") if not os.path.exists(str(reference_file)): if index == 1: raise Exception("missing reference file: " + str(reference_file)) else: break reference.file = reference_file if not difference.get_property("input_a").pipeline_value() or not difference.get_property("input_b").pipeline_value(): raise Exception("missing mesh comparison input") if difference.equal: return # if there is a difference, output it difference_file = open(str(k3d.filesystem.generic_path(binary_path() + "/" + reference_mesh_name + ".difference.html")), "w") difference_file.write(difflib.HtmlDiff().make_file(repr(input_mesh.pipeline_value()).splitlines(1), repr(reference.output_mesh).splitlines(1), "Test Geometry", "Reference Geometry")) difference_file.close() print "**** Test Mesh ****" print input_mesh.pipeline_value() print "**** Reference Mesh ****" print reference.output_mesh output_mesh_difference(input_mesh.pipeline_value(), reference.output_mesh, threshold) raise Exception("output mesh differs from reference") | 7a7c69489f2986d301fe573672cce61e5ba89e9e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11286/7a7c69489f2986d301fe573672cce61e5ba89e9e/testing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6986,
67,
23050,
67,
869,
67,
6180,
12,
5457,
16,
810,
67,
15557,
16,
2114,
67,
15557,
67,
529,
16,
5573,
4672,
225,
6986,
67,
6299,
273,
1668,
18,
2704,
67,
2159,
2932,
47,
23,
1612... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6986,
67,
23050,
67,
869,
67,
6180,
12,
5457,
16,
810,
67,
15557,
16,
2114,
67,
15557,
67,
529,
16,
5573,
4672,
225,
6986,
67,
6299,
273,
1668,
18,
2704,
67,
2159,
2932,
47,
23,
1612... |
self.__galois_closure = K | self.__galois_closure = K.change_names(names) | def galois_closure(self, names=None): """ Return number field $K$ that is the Galois closure of self, i.e., is generated by all roots of the defining polynomial of self | a9aea27aa0acf9a498267c901faff9e3e1683ff3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/a9aea27aa0acf9a498267c901faff9e3e1683ff3/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24902,
19606,
67,
20823,
12,
2890,
16,
1257,
33,
7036,
4672,
3536,
2000,
1300,
652,
271,
47,
8,
716,
353,
326,
611,
287,
19606,
7213,
434,
365,
16,
277,
18,
73,
12990,
353,
4374,
635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24902,
19606,
67,
20823,
12,
2890,
16,
1257,
33,
7036,
4672,
3536,
2000,
1300,
652,
271,
47,
8,
716,
353,
326,
611,
287,
19606,
7213,
434,
365,
16,
277,
18,
73,
12990,
353,
4374,
635,
... |
[ ('__key__', lambda x: x.to_path()[1], None) | [ ('__key__', lambda x: x.to_path()[1], None), | def __init__(self): bulkloader.Exporter.__init__(self, 'DbInvocation', [ ('__key__', lambda x: x.to_path()[1], None) ('who', lambda x: x.to_path()[1], None), ('startTime', str, None), ('endTime', str, '') ]) | 1087140c7d82ac26eb030b86fe4ecb5dbfd1bb30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10256/1087140c7d82ac26eb030b86fe4ecb5dbfd1bb30/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
8280,
6714,
18,
22305,
16186,
2738,
972,
12,
2890,
16,
296,
4331,
9267,
2187,
306,
7707,
972,
856,
972,
2187,
3195,
619,
30,
619,
18,
869,
67,
803,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4672,
8280,
6714,
18,
22305,
16186,
2738,
972,
12,
2890,
16,
296,
4331,
9267,
2187,
306,
7707,
972,
856,
972,
2187,
3195,
619,
30,
619,
18,
869,
67,
803,
143... |
self.Z_dww = npy.empty((self.Ndir, Nw, Nw), self.dtype) | def initialize(self, calc, initialwannier=None, seed=None, bloch=False): calc = wrap(calc) Nw = self.nwannier Nb = self.nbands self.Z_dww = npy.empty((self.Ndir, Nw, Nw), self.dtype) self.Z_dkww = npy.empty((self.Ndir, self.Nk, Nw, Nw), self.dtype) self.Z_dknn = npy.empty((self.Ndir, self.Nk, Nb, Nb), self.dtype) | 79066eb5b3194c2a4618377dbbf174cd173b34a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/79066eb5b3194c2a4618377dbbf174cd173b34a9/wannier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
16,
7029,
16,
2172,
91,
1072,
2453,
33,
7036,
16,
5009,
33,
7036,
16,
324,
383,
343,
33,
8381,
4672,
7029,
273,
2193,
12,
12448,
13,
423,
91,
273,
365,
18,
82,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
16,
7029,
16,
2172,
91,
1072,
2453,
33,
7036,
16,
5009,
33,
7036,
16,
324,
383,
343,
33,
8381,
4672,
7029,
273,
2193,
12,
12448,
13,
423,
91,
273,
365,
18,
82,
91,
... | |
elif isinstance(obj, unittest.TestSuite): | elif isinstance(obj, TestSuite): | def loadTestsFromName(self, name, module=None): """Return a suite of all tests cases given a string specifier. | 99c020b458dc7210f2c230a25c6760727a00cc4d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/99c020b458dc7210f2c230a25c6760727a00cc4d/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
29732,
12,
2890,
16,
508,
16,
1605,
33,
7036,
4672,
3536,
990,
279,
11371,
434,
777,
7434,
6088,
864,
279,
533,
24562,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
14650,
29732,
12,
2890,
16,
508,
16,
1605,
33,
7036,
4672,
3536,
990,
279,
11371,
434,
777,
7434,
6088,
864,
279,
533,
24562,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
exit = self.test_queue.get() log.debug("Pulled off %s for test.", exit.idhex) self.exit_test(exit) if test_length_average is None: test_length_average = router.last_test_length else: test_length_average = (test_length_average + exit.last_test_length) / 2.0 log.debug("%s: test completed in %f sec (%f average).", exit.nickname, exit.last_test_length, test_length_average) self.test_queue.task_done() | if test_average_len is None: test_average_len = exit.last_test_length else: test_average_len = (test_average_len + exit.last_test_length) / 2.0 log.debug("%s: test completed in %f sec (%f average).", exit.nickname, exit.last_test_length, test_average_len) log.debug("%s: %s working, %s failed", exit.nickname, exit.working_ports, exit.failed_ports) self.test_queue.task_done() tests += 1 log.debug("Completed %d tests!", tests) if tests % 10 == 0: self.export_csv() except Queue.Empty: log.debug("Empty test queue; pending circuits: %s", str(self.pending_circuits)) | def test_thread_func(self): log.debug("Starting test thread...") test_length_average = None | 4c865d62c51c3e1a9d19c722ba2e4c12fc91c4eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9986/4c865d62c51c3e1a9d19c722ba2e4c12fc91c4eb/torbel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5930,
67,
644,
12,
2890,
4672,
613,
18,
4148,
2932,
11715,
1842,
2650,
7070,
13,
1842,
67,
2469,
67,
15621,
273,
599,
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,
1842,
67,
5930,
67,
644,
12,
2890,
4672,
613,
18,
4148,
2932,
11715,
1842,
2650,
7070,
13,
1842,
67,
2469,
67,
15621,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
has_tz = sql_lyr.GetFeatureCount() != 0 ds.ReleaseResultSet(sql_lyr) | if sql_lyr is None: has_tz = True else: has_tz = sql_lyr.GetFeatureCount() != 0 ds.ReleaseResultSet(sql_lyr) | def ogr_pg_14(): if gdaltest.pg_ds is None: return 'skip' ds = ogr.Open( 'PG:' + gdaltest.pg_connection_string, update = 1 ) ds.ExecuteSQL( 'set timezone to "UTC"' ) lyr = ds.GetLayerByName( 'datetest' ) feat = lyr.GetNextFeature() if feat.GetFieldAsString('ogrdatetime') != '2005/10/12 15:41:33+00' \ or feat.GetFieldAsString('ogrdate') != '2005/10/12' \ or feat.GetFieldAsString('ogrtime') != '10:41:33' \ or feat.GetFieldAsString('tsz') != '2005/10/12 15:41:33+00' \ or feat.GetFieldAsString('ts') != '2005/10/12 10:41:33' \ or feat.GetFieldAsString('dt') != '2005/10/12' \ or feat.GetFieldAsString('tm') != '10:41:33': gdaltest.post_reason( 'UTC value wrong' ) feat.DumpReadable() return 'fail' sql_lyr = ds.ExecuteSQL( "select * from pg_timezone_names where name = 'Canada/Newfoundland'" ) has_tz = sql_lyr.GetFeatureCount() != 0 ds.ReleaseResultSet(sql_lyr) if has_tz: ds.ExecuteSQL( 'set timezone to "Canada/Newfoundland"' ) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetFieldAsString('ogrdatetime') != '2005/10/12 13:11:33-0230' \ or feat.GetFieldAsString('tsz') != '2005/10/12 13:11:33-0230' \ or feat.GetFieldAsString('ts') != '2005/10/12 10:41:33' \ or feat.GetFieldAsString('dt') != '2005/10/12' \ or feat.GetFieldAsString('tm') != '10:41:33': gdaltest.post_reason( 'Newfoundland value wrong' ) feat.DumpReadable() return 'fail' ds.ExecuteSQL( 'set timezone to "+5"' ) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetFieldAsString('ogrdatetime') != '2005/10/12 20:41:33+05' \ or feat.GetFieldAsString('tsz') != '2005/10/12 20:41:33+05': gdaltest.post_reason( '+5 value wrong' ) feat.DumpReadable() return 'fail' feat = None ds.Destroy() return 'success' | 63448471b171acc360d64ab6ad0910e6bce988b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10289/63448471b171acc360d64ab6ad0910e6bce988b7/ogr_pg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
320,
3197,
67,
8365,
67,
3461,
13332,
309,
15551,
2390,
395,
18,
8365,
67,
2377,
353,
599,
30,
327,
296,
7457,
11,
225,
3780,
273,
320,
3197,
18,
3678,
12,
296,
18679,
2497,
397,
15551... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
320,
3197,
67,
8365,
67,
3461,
13332,
309,
15551,
2390,
395,
18,
8365,
67,
2377,
353,
599,
30,
327,
296,
7457,
11,
225,
3780,
273,
320,
3197,
18,
3678,
12,
296,
18679,
2497,
397,
15551... |
@param id: structure type ID | @param sid: structure type ID | def SetStrucComment(id, comment, repeatable): """ Change structure comment @param id: structure type ID @param comment: new comment of the structure @param repeatable: 1: change repeatable comment 0: change regular comment @return: != 0 - ok """ return idaapi.set_struc_cmt(id, comment, repeatable) | 244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1585,
5286,
4469,
12,
350,
16,
2879,
16,
7666,
429,
4672,
3536,
7576,
3695,
2879,
225,
632,
891,
7348,
30,
3695,
618,
1599,
632,
891,
2879,
30,
394,
2879,
434,
326,
3695,
632,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1585,
5286,
4469,
12,
350,
16,
2879,
16,
7666,
429,
4672,
3536,
7576,
3695,
2879,
225,
632,
891,
7348,
30,
3695,
618,
1599,
632,
891,
2879,
30,
394,
2879,
434,
326,
3695,
632,
89... |
mock = self.mocker({name: 'path/to/mod'}) | mock = self.mocker({name: os.path.join('path', 'to', 'mod')}) | def test_state_after_failure(self): name = "mod" module = imp.new_module(name) module.blah = None mock = self.mocker({name: 'path/to/mod'}) mock.source = b"1/0" with util.uncache(name): sys.modules[name] = module self.assertRaises(ZeroDivisionError, mock.load_module, name) self.assert_(sys.modules[name] is module) self.assert_(hasattr(module, 'blah')) return mock | a95a3b71fe15ce3e077b3c8fe143ceab7e7cb20a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/a95a3b71fe15ce3e077b3c8fe143ceab7e7cb20a/test_abc_loader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2019,
67,
5205,
67,
12251,
12,
2890,
4672,
508,
273,
315,
1711,
6,
1605,
273,
1646,
18,
2704,
67,
2978,
12,
529,
13,
1605,
18,
3083,
9795,
273,
599,
5416,
273,
365,
18,
81,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2019,
67,
5205,
67,
12251,
12,
2890,
4672,
508,
273,
315,
1711,
6,
1605,
273,
1646,
18,
2704,
67,
2978,
12,
529,
13,
1605,
18,
3083,
9795,
273,
599,
5416,
273,
365,
18,
81,... |
def __init__(self, order=None, params=None, dtype=0): | def __init__(self, order, params=None, dtype=0): | def __init__(self, order=None, params=None, dtype=0): functional.__init__(self, name="oddpoly", order=order, params= params, dtype=dtype) if params is None: self.set_parameters([v+1. for v in self.parameters()]) | 181fc45332a548d05739eb951d6b72074ad435a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7472/181fc45332a548d05739eb951d6b72074ad435a8/functional.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1353,
16,
859,
33,
7036,
16,
3182,
33,
20,
4672,
18699,
16186,
2738,
972,
12,
2890,
16,
508,
1546,
31755,
16353,
3113,
1353,
33,
1019,
16,
859,
33,
859,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1353,
16,
859,
33,
7036,
16,
3182,
33,
20,
4672,
18699,
16186,
2738,
972,
12,
2890,
16,
508,
1546,
31755,
16353,
3113,
1353,
33,
1019,
16,
859,
33,
859,
... |
_add_entry(prefix, root) | _add_entry(root) | def _add_entry(prefix, node): name = node.path[len(root.path):] if name.startswith('/'): name = name[1:] if node.isdir: for entry in node.get_entries(): _add_entry(os.path.join(prefix, name), entry) else: info = tarfile.TarInfo(os.path.join(prefix, name)) info.type = tarfile.REGTYPE info.mtime = node.last_modified info.size = node.content_length tar.addfile(info, node.get_content()) | 6f823e9d8724a55a4d8908d5da52149fc1251f42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4547/6f823e9d8724a55a4d8908d5da52149fc1251f42/archive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
4099,
12,
3239,
16,
756,
4672,
508,
273,
756,
18,
803,
63,
1897,
12,
3085,
18,
803,
4672,
65,
309,
508,
18,
17514,
1918,
2668,
2473,
4672,
508,
273,
508,
63,
21,
26894... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1289,
67,
4099,
12,
3239,
16,
756,
4672,
508,
273,
756,
18,
803,
63,
1897,
12,
3085,
18,
803,
4672,
65,
309,
508,
18,
17514,
1918,
2668,
2473,
4672,
508,
273,
508,
63,
21,
26894... |
def getImageVariation(self, item, attributeName, isReadOnly, isDown, isSelected, isOver): | def getImageVariation(self, item, attributeName, isReadOnly, isDown, isSelected, isOver, justClicked): | def getImageVariation(self, item, attributeName, isReadOnly, isDown, isSelected, isOver): """ Pick the right variation """ readOnly = isReadOnly and IconAttributeEditor.readOnlyBit or 0 selected = isSelected and IconAttributeEditor.selectedBit or 0 mouseDown = isDown and IconAttributeEditor.mouseDownBit or 0 rolledOver = isOver and IconAttributeEditor.rolledOverBit or 0 return IconAttributeEditor.variationMap[readOnly | selected | mouseDown | rolledOver] | 440772ccef3ed50abba62d982c18cdd1eb945c90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/440772ccef3ed50abba62d982c18cdd1eb945c90/AttributeEditors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10567,
23771,
12,
2890,
16,
761,
16,
9734,
16,
26249,
16,
353,
4164,
16,
20956,
16,
353,
4851,
16,
2537,
27633,
4672,
3536,
23038,
326,
2145,
14761,
3536,
15075,
273,
26249,
471,
16011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10567,
23771,
12,
2890,
16,
761,
16,
9734,
16,
26249,
16,
353,
4164,
16,
20956,
16,
353,
4851,
16,
2537,
27633,
4672,
3536,
23038,
326,
2145,
14761,
3536,
15075,
273,
26249,
471,
16011,
... |
self.host = self.ec2_url url_parts = self.ec2_url.split(':') if len(url_parts) > 1: self.host = url_parts[0] path_parts = url_parts[1].split('/', 1) if len(path_parts) > 1: self.port = int(path_parts[0]) self.service_path = self.service_path + path_parts[1] else: self.port = int(url_parts[1]) | self.host = rslt.netloc l = self.host.split(':') if len(l) > 1: self.host = l[0] self.port = int(l[1]) if rslt.path: self.service_path = rslt.path | def make_connection(self): if not self.ec2_user_access_key: self.ec2_user_access_key = self.environ['EC2_ACCESS_KEY'] if not self.ec2_user_access_key: print 'EC2_ACCESS_KEY environment variable must be set.' raise ConnectionFailed | a12a64b1a029d43a86b59fd430318d27918f5918 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/a12a64b1a029d43a86b59fd430318d27918f5918/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
4071,
12,
2890,
4672,
309,
486,
365,
18,
557,
22,
67,
1355,
67,
3860,
67,
856,
30,
365,
18,
557,
22,
67,
1355,
67,
3860,
67,
856,
273,
365,
18,
28684,
3292,
7228,
22,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
4071,
12,
2890,
4672,
309,
486,
365,
18,
557,
22,
67,
1355,
67,
3860,
67,
856,
30,
365,
18,
557,
22,
67,
1355,
67,
3860,
67,
856,
273,
365,
18,
28684,
3292,
7228,
22,
67,... |
elif len(pidf.notes > 0): | elif len(pidf.notes) > 0: | def display_person(person, pidf, buf): # display class if person.rpid_class is not None: buf.append(" Class: %s" % person.rpid_class) # display notes if len(person.notes) > 0: for note in person.notes: buf.append(" %s" % format_note(note)) elif len(pidf.notes > 0): for note in pidf.notes: buf.append(" %s" % format_note(note)) # display activities if person.activities is not None: activities = person.activities.values if len(activities) > 0: text = " Activities" if person.activities.since is not None or person.activities.until is not None: text += " valid" if person.activities.since is not None: text += " from %s" % person.activities.since if person.activities.until is not None: text += " until %s" % person.activities.until text += ": %s" % ', '.join(str(activity) for activity in activities) buf.append(text) if len(person.activities.notes) > 0: for note in person.activities.notes: buf.append(" %s" % format_note(note)) # display mood if person.mood is not None: moods = person.mood.values if len(moods) > 0: text = " Mood" if person.mood.since is not None or person.mood.until is not None: text += " valid" if person.mood.since is not None: text += " from %s" % person.mood.since if person.mood.until is not None: text += " until %s" % person.mood.until text += ": %s" % ', '.join(str(mood) for mood in moods) buf.append(text) if len(person.mood.notes) > 0: for note in person.mood.notes: buf.append(" %s" % format_note(note)) # display place is if person.place_is is not None: buf.append(" Place information:") if person.place_is.audio is not None: buf.append(" Audio: %s" % person.place_is.audio.values[0]) if person.place_is.video is not None: buf.append(" Video: %s" % person.place_is.video.values[0]) if person.place_is.text is not None: buf.append(" Text: %s" % person.place_is.text.values[0]) # display privacy if person.privacy is not None: text = " Communication that is private: " private = [] if person.privacy.audio: private.append("audio") if person.privacy.video: private.append("video") if person.privacy.text: private.append("text") text += ", ".join(private) buf.append(text) # display sphere if person.sphere is not None: buf.append(" Current sphere: %s" % person.sphere.values[0]) # display status icon if person.status_icon is not None: buf.append(" Status icon: %s" % person.status_icon) # display time offset if person.time_offset is not None: buf.append(" Time offset: %s minutes %s" % (person.time_offset, (person.time_offset.description is not None and ('(%s)' % person.time_offset.description) or ''))) # display user input if person.user_input is not None: buf.append(" User is %s" % person.user_input) if person.user_input.last_input: buf.append(" Last input at: %s" % person.user_input.last_input) if person.user_input.idle_threshold: buf.append(" Idle threshold: %s seconds" % person.user_input.idle_threshold) | ea2d6ae6f16097641fa242c43042facf596af00f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/ea2d6ae6f16097641fa242c43042facf596af00f/sip_subscribe_presence.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
12479,
12,
12479,
16,
4231,
74,
16,
1681,
4672,
468,
2562,
667,
309,
6175,
18,
86,
6610,
67,
1106,
353,
486,
599,
30,
1681,
18,
6923,
2932,
565,
1659,
30,
738,
87,
6,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2562,
67,
12479,
12,
12479,
16,
4231,
74,
16,
1681,
4672,
468,
2562,
667,
309,
6175,
18,
86,
6610,
67,
1106,
353,
486,
599,
30,
1681,
18,
6923,
2932,
565,
1659,
30,
738,
87,
6,
738,
... |
version = '3.8.2dev', | version = '3.8.2', | def read(*rnames): text = open(os.path.join(os.path.dirname(__file__), *rnames)).read() return text | b2e3aae745775b064ded9b487938cb9c24864b39 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10009/b2e3aae745775b064ded9b487938cb9c24864b39/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
30857,
86,
1973,
4672,
977,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
380,
86,
1973,
13,
2934,
896,
1435,
327,
977,
225,
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,
855,
30857,
86,
1973,
4672,
977,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3631,
380,
86,
1973,
13,
2934,
896,
1435,
327,
977,
225,
2,
... |
sidebars = self.default_sidebars[:-1] + [sidebars] + \ self.default_sidebars[-1:] return sidebars | customsidebar = sidebars sidebars = None ctx['sidebars'] = sidebars ctx['customsidebar'] = customsidebar | def has_wildcard(pattern): return any(char in pattern for char in '*?[') | 03b9d79b347737f73d05b0d3e47782e3183840c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/03b9d79b347737f73d05b0d3e47782e3183840c7/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
22887,
12,
4951,
4672,
327,
1281,
12,
3001,
316,
1936,
364,
1149,
316,
14609,
35,
3292,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
711,
67,
22887,
12,
4951,
4672,
327,
1281,
12,
3001,
316,
1936,
364,
1149,
316,
14609,
35,
3292,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
wc.log.debug(wc.LOG_PROXY, "%s write SSL tunneled data to client %s", self, self.client) self.client.write(self.read()) | data = self.read() if data: wc.log.debug(wc.LOG_PROXY, "%s send %d bytes SSL tunneled data to client %s", self, len(data), self.client) self.client.write(data) | def process_client (self): """gets called on SSL tunneled connections, delegates server data directly to the client without filtering""" if not self.client: # delay return wc.log.debug(wc.LOG_PROXY, "%s write SSL tunneled data to client %s", self, self.client) self.client.write(self.read()) | 62269c4d81468ab25aef7067fb2e3ec8bbd33133 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/62269c4d81468ab25aef7067fb2e3ec8bbd33133/HttpServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2625,
261,
2890,
4672,
3536,
14665,
2566,
603,
7419,
14825,
329,
5921,
16,
22310,
1438,
501,
5122,
358,
326,
1004,
2887,
11346,
8395,
309,
486,
365,
18,
2625,
30,
468,
4624,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2625,
261,
2890,
4672,
3536,
14665,
2566,
603,
7419,
14825,
329,
5921,
16,
22310,
1438,
501,
5122,
358,
326,
1004,
2887,
11346,
8395,
309,
486,
365,
18,
2625,
30,
468,
4624,
32... |
self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) | self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) | def testCreateExpando(self): disp = self.site.engine_script.GetScriptDispatch('test') disp = disp.QueryInterface(pythoncom.IID_IDispatchEx) # name should not exist. self.assertRaisesCOMError(disp.GetIDsOfNames, 0, 'expando', hresult=winerror.DISP_E_UNKNOWNNAME) # Now define it lcid = 0 dispid = disp.GetDispID('expando', pythoncom.fdexNameEnsure) # should be undefined. ret = disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYGET, True) # do we want a result? self.failUnlessEqual(ret, None) # set it disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYPUT, False, # do we want a result? 'hello') # get it ret = disp.Invoke(dispid, lcid, pythoncom.DISPATCH_PROPERTYGET, True) # do we want a result? self.failUnlessEqual(ret, 'hello') | baacafd65e3bb8ec83b755227ee245134eed13c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13395/baacafd65e3bb8ec83b755227ee245134eed13c0/testEngine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1684,
12271,
83,
12,
2890,
4672,
16232,
273,
365,
18,
4256,
18,
8944,
67,
4263,
18,
967,
3651,
5325,
2668,
3813,
6134,
16232,
273,
16232,
18,
1138,
1358,
12,
8103,
832,
18,
45,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1684,
12271,
83,
12,
2890,
4672,
16232,
273,
365,
18,
4256,
18,
8944,
67,
4263,
18,
967,
3651,
5325,
2668,
3813,
6134,
16232,
273,
16232,
18,
1138,
1358,
12,
8103,
832,
18,
45,
7... |
for dir in dirs: for file in FileUtilities.children_in_directory(dir, False): yield file | for dirname in dirs: for filename in FileUtilities.children_in_directory(dirname, False): yield filename | def list_files(self): # browser cache if self.options["cache"][1]: dirs = glob.glob(os.path.expanduser(self.profile_dir + "/Cache/")) dirs += glob.glob(os.path.expanduser(self.profile_dir + "/OfflineCache/")) for dir in dirs: for file in FileUtilities.children_in_directory(dir, False): yield file files = [] # cookies if self.options["cookies"][1]: files += glob.glob(os.path.expanduser(self.profile_dir + "/cookies.txt")) files += glob.glob(os.path.expanduser(self.profile_dir + "/cookies.sqlite")) # download history if self.options["download_history"][1]: # Firefox version 1 files += glob.glob(os.path.expanduser(self.profile_dir + "/downloads.rdf")) # Firefox version 3 files += glob.glob(os.path.expanduser(self.profile_dir + "/downloads.sqlite")) # forms if self.options["forms"][1]: files += glob.glob(os.path.expanduser(self.profile_dir + "/formhistory.sqlite")) files += glob.glob(os.path.expanduser(self.profile_dir + "/formhistory.dat")) # places database if self.options["places"][1]: # Firefox version 1 files += glob.glob(os.path.expanduser(self.profile_dir + "/history.dat")) # Firefox version 3 files += glob.glob(os.path.expanduser(self.profile_dir + "/places.sqlite")) files += glob.glob(os.path.expanduser(self.profile_dir + "/places.sqlite-journal")) # session restore if self.options["session_restore"][1]: files += glob.glob(os.path.expanduser(self.profile_dir + "/sessionstore.js")) # sign ons if self.options["signons"][1]: files += glob.glob(os.path.expanduser(self.profile_dir + "/signons.txt")) files += glob.glob(os.path.expanduser(self.profile_dir + "/signons[2-3].txt")) for file in files: yield file | 737a941d1a6026b292895c42a857f9ec0bf05cea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/737a941d1a6026b292895c42a857f9ec0bf05cea/CleanerBackend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
12,
2890,
4672,
468,
4748,
1247,
309,
365,
18,
2116,
9614,
2493,
6,
6362,
21,
14542,
7717,
273,
4715,
18,
10581,
12,
538,
18,
803,
18,
12320,
1355,
12,
2890,
18,
5040,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2354,
12,
2890,
4672,
468,
4748,
1247,
309,
365,
18,
2116,
9614,
2493,
6,
6362,
21,
14542,
7717,
273,
4715,
18,
10581,
12,
538,
18,
803,
18,
12320,
1355,
12,
2890,
18,
5040,
... |
putSocket.bind(('', self.port)) | self.random_bind(putSocket, self.bind_address) | def put(self, path): putSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) putSocket.bind(('', self.port)) putSocket.listen(1) with open(path) as putFile: ft = FilePutThread(putSocket, putFile) ft.start() res = self.fs.put(self.local_address, self.port) putSocket.close() return res | d1d5e2cc010645e6d7248da478536c73a03867ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9479/d1d5e2cc010645e6d7248da478536c73a03867ad/FileStorageLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
12,
2890,
16,
589,
4672,
1378,
4534,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
365,
18,
9188,
67,
4376,
12,
458,
4534,
16,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
12,
2890,
16,
589,
4672,
1378,
4534,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
365,
18,
9188,
67,
4376,
12,
458,
4534,
16,
36... |
stat = os.stat(path) | info = os.stat(path) | def check_lockfile(path): """ Return (user, modification time) of lockfile, or (None, None). """ path = os.path.join(path, LOCKFILE) if os.path.exists(path): try: stat = os.stat(path) except OSError, exc: print 'Cannot access lockfile:', exc sys.exit(1) else: user = pwd.getpwuid(stat.st_uid).pw_name mtime = time.asctime(time.localtime(stat.st_mtime)) return (user, mtime) else: return (None, None) | 5070bcba30f4213c12dbc66d6a5580dd2dddf97c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/5070bcba30f4213c12dbc66d6a5580dd2dddf97c/repo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
739,
768,
12,
803,
4672,
3536,
2000,
261,
1355,
16,
11544,
813,
13,
434,
2176,
768,
16,
578,
261,
7036,
16,
599,
2934,
3536,
589,
273,
1140,
18,
803,
18,
5701,
12,
803,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
739,
768,
12,
803,
4672,
3536,
2000,
261,
1355,
16,
11544,
813,
13,
434,
2176,
768,
16,
578,
261,
7036,
16,
599,
2934,
3536,
589,
273,
1140,
18,
803,
18,
5701,
12,
803,
16,
... |
class CharacterTest(StringTest): typecode = 'c' example = '\x01azAZ\x00\xfe' smallerexample = '\x01azAY\x00\xfe' biggerexample = '\x01azAZ\x00\xff' outside = '\x33' minitemsize = 1 def test_subbclassing(self): class EditableString(array.array): def __new__(cls, s, *args, **kwargs): return array.array.__new__(cls, 'c', s) def __init__(self, s, color='blue'): self.color = color def strip(self): self[:] = array.array('c', self.tostring().strip()) def __repr__(self): return 'EditableString(%r)' % self.tostring() s = EditableString("\ttest\r\n") s.strip() self.assertEqual(s.tostring(), "test") self.assertEqual(s.color, "blue") s.color = "red" self.assertEqual(s.color, "red") self.assertEqual(list(s.__dict__.keys()), ["color"]) def test_nounicode(self): a = array.array(self.typecode, self.example) self.assertRaises(ValueError, a.fromunicode, str('')) self.assertRaises(ValueError, a.tounicode) tests.append(CharacterTest) | def test_setitem(self): super().test_setitem() a = array.array(self.typecode, self.example) self.assertRaises(TypeError, a.__setitem__, 0, self.example[:2]) | 31f72d72b1e0c772becbfa9bbd3ab1827c704726 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/31f72d72b1e0c772becbfa9bbd3ab1827c704726/test_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
1726,
12,
2890,
4672,
2240,
7675,
3813,
67,
542,
1726,
1435,
279,
273,
526,
18,
1126,
12,
2890,
18,
723,
710,
16,
365,
18,
8236,
13,
365,
18,
11231,
12649,
6141,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
542,
1726,
12,
2890,
4672,
2240,
7675,
3813,
67,
542,
1726,
1435,
279,
273,
526,
18,
1126,
12,
2890,
18,
723,
710,
16,
365,
18,
8236,
13,
365,
18,
11231,
12649,
6141,
12,
1... | |
self.rpmdb.dropCachedData() | def buildTransaction(self, unfinished_transactions_check=True): """go through the packages in the transaction set, find them in the packageSack or rpmdb, and pack up the ts accordingly""" if (unfinished_transactions_check and misc.find_unfinished_transactions(yumlibpath=self.conf.persistdir)): msg = _('There are unfinished transactions remaining. You might ' \ 'consider running yum-complete-transaction first to finish them.' ) self.logger.critical(msg) self.yumUtilsMsg(self.logger.critical, "yum-complete-transaction") time.sleep(3) # XXX - we could add a conditional here to avoid running the plugins and # limit_installonly_pkgs, etc - if we're being run from yum-complete-transaction # and don't want it to happen. - skv self.plugins.run('preresolve') ds_st = time.time() | 8a3c10072407640724399f547ef60d6916db6b93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/8a3c10072407640724399f547ef60d6916db6b93/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
3342,
12,
2890,
16,
640,
13527,
67,
20376,
67,
1893,
33,
5510,
4672,
3536,
3240,
3059,
326,
5907,
316,
326,
2492,
444,
16,
1104,
2182,
316,
326,
2181,
55,
484,
578,
8715,
27574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
3342,
12,
2890,
16,
640,
13527,
67,
20376,
67,
1893,
33,
5510,
4672,
3536,
3240,
3059,
326,
5907,
316,
326,
2492,
444,
16,
1104,
2182,
316,
326,
2181,
55,
484,
578,
8715,
27574,
... | |
"'\xf5': '& | def _load(self, project): Repository._load(self, project) cget = project.config.get self.EXECUTABLE = cget(self.name, 'darcs-command', 'darcs') init_options = cget(self.name, 'init-options', '') if init_options: self.init_options = tuple(init_options.split(' ')) else: self.init_options = None self.use_look_for_adds = cget(self.name, 'look-for-adds', 'False') self.post_commit_check = cget(self.name, 'post-commit-check', 'False') self.replace_badchars = eval(cget(self.name, 'replace-badchars', "{" "'\xb4': '´'," "'\xc1': 'Á'," "'\xc9': 'É'," "'\xcd': 'Í'," "'\xd3': 'Ó'," "'\xd6': 'Ö'," "'\xd5': 'Ő'," "'\xda': 'Ú'," "'\xdc': 'Ü'," "'\xdb': 'Ű'," "'\xe1': 'á'," "'\xe9': 'é'," "'\xed': 'í'," "'\xf3': 'ó'," "'\xf6': 'ö'," "'\xf5': 'ő'," "'\xfa': 'ú'," "'\xfc': 'ü'," "'\xfb': 'ű'," "'\xf1': 'ñ'," "'\xdf': 'ß'," "'\xe5': 'å'" "}")) | bdad3b27ea7576b4c81b5836cdb72c061d1c162c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5981/bdad3b27ea7576b4c81b5836cdb72c061d1c162c/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
12,
2890,
16,
1984,
4672,
6281,
6315,
945,
12,
2890,
16,
1984,
13,
276,
588,
273,
1984,
18,
1425,
18,
588,
365,
18,
15271,
1693,
2782,
273,
276,
588,
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,
389,
945,
12,
2890,
16,
1984,
4672,
6281,
6315,
945,
12,
2890,
16,
1984,
13,
276,
588,
273,
1984,
18,
1425,
18,
588,
365,
18,
15271,
1693,
2782,
273,
276,
588,
12,
2890,
18,
529,
16,... | |
print 'Parser(%s)(%s)-->'%(s[2:],repr(x)),r, | print '%s.Parser(%s)(%s)-->'%(_pyRXP.__name__,s[2:],repr(x)),r, | def goodTest(x,t,tb=0,**kw): try: P=pyRXP.Parser(**kw) r = P(x) rb = 0 except: et, ev, None = sys.exc_info() r = '%s %s' % (et.__name__, str(ev)) rb = 1 s = '' for k,v in kw.items(): s = s+', %s=%s' % (k,str(v)) if type(t) is type(''): t = t.replace('\r','\\r') t = t.replace('\n','\\n') if type(r) is type(''): r = r.replace('\r','\\r') r = r.replace('\n','\\n') print 'Parser(%s)(%s)-->'%(s[2:],repr(x)),r, if r==t and rb==tb: print 'OK' else: print '!!!!!BAD!!!!! should --> ', t | 5968710b4c84f6d8e4d6f53f0baa2916c7342c36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5968710b4c84f6d8e4d6f53f0baa2916c7342c36/t.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7494,
4709,
12,
92,
16,
88,
16,
18587,
33,
20,
16,
636,
9987,
4672,
775,
30,
453,
33,
2074,
54,
60,
52,
18,
2678,
12,
636,
9987,
13,
436,
273,
453,
12,
92,
13,
7138,
273,
374,
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,
7494,
4709,
12,
92,
16,
88,
16,
18587,
33,
20,
16,
636,
9987,
4672,
775,
30,
453,
33,
2074,
54,
60,
52,
18,
2678,
12,
636,
9987,
13,
436,
273,
453,
12,
92,
13,
7138,
273,
374,
13... |
'''Return message matching the given uid''' | '''Return message (no substance) matching the given uid.''' | def __getitem__(self, key): '''Return message matching the given uid''' imap.SelectFolder(self.name) # We really want to use RFC822.PEEK here, as that doesn't effect # the status of the message. Unfortunately, it appears that not # all IMAP servers support this, even though it is in RFC1730 response = imap.uid("FETCH", key, self.rfc822_command) if response[0] != "OK": self.rfc822_command = "RFC822" response = imap.uid("FETCH", key, self.rfc822_command) self._check(response, "uid fetch") data = _extract_fetch_data(response[1][0]) messageText = data["RFC822"] | 45610578e8bf57cdff5c97b52604a84face29038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/45610578e8bf57cdff5c97b52604a84face29038/imapfilter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
9163,
990,
883,
261,
2135,
720,
593,
13,
3607,
326,
864,
4555,
1093,
6309,
282,
20226,
18,
3391,
3899,
12,
2890,
18,
529,
13,
468,
1660,
8654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31571,
972,
12,
2890,
16,
498,
4672,
9163,
990,
883,
261,
2135,
720,
593,
13,
3607,
326,
864,
4555,
1093,
6309,
282,
20226,
18,
3391,
3899,
12,
2890,
18,
529,
13,
468,
1660,
8654... |
def build_makefile(): with open('makefile', 'r+') as fmk: content = fmk.read() fmk.close() content = re.sub('CC_PACKET:= (\w+(-\w+)?)', repl_compil, content) content = re.sub('TARGET:= (\w+)', repl_target, content) content = re.sub('CCFLAGS:= ([A-Za-z0-9_\- content = re.sub('LDFLAGS:= ([A-Za-z0-9_\- with open('makefile', 'w+') as fmk: fmk.write(content) fmk.close() with open('src/makefile', 'r+') as fmk: content = fmk.read() fmk.close() content = re.sub('all: ([a-z ]+)', repl_all, content) with open('src/makefile', 'w+') as fmk: fmk.write(content) fmk.close() | def repl_ldflag(m): repl = "LDFLAGS:= " + common_var["Ldflags"].get() return repl | 6385f0785811600dab651549032609c9c60f04f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2128/6385f0785811600dab651549032609c9c60f04f1/configure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6831,
67,
1236,
6420,
12,
81,
4672,
6831,
273,
315,
48,
4577,
6552,
55,
30,
33,
315,
397,
2975,
67,
1401,
9614,
48,
2180,
80,
1341,
6,
8009,
588,
1435,
327,
6831,
225,
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,
6831,
67,
1236,
6420,
12,
81,
4672,
6831,
273,
315,
48,
4577,
6552,
55,
30,
33,
315,
397,
2975,
67,
1401,
9614,
48,
2180,
80,
1341,
6,
8009,
588,
1435,
327,
6831,
225,
2,
-100,
-100,... | |
'ir.actions.report.xml': 'model', | 'ir.actions.report.xml': 'model', | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | 68017084b1988d7a40dfe6539b43037f0a730561 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/68017084b1988d7a40dfe6539b43037f0a730561/ir_ui_menu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
4555,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
17172,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
309,
819,
353,
599,
30,
819,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
4555,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
17172,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
309,
819,
353,
599,
30,
819,
27... |
environment["INPUTLFCS"]+="lfc[%d]=\\\"%s\\\";" % (j,lfc.strip()) | environment["INPUTLFCS"]+="lfc[%d]='%s';" % (j,lfc.strip()) | def prepare(self,app,appconfig,appmasterconfig,jobmasterconfig): """Prepare the job""" | bb4a1164c4cccc4248a45d316f26ddc54548e735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/bb4a1164c4cccc4248a45d316f26ddc54548e735/AthenaMCLCGRTHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
2910,
16,
2910,
1425,
16,
2910,
7525,
1425,
16,
4688,
7525,
1425,
4672,
3536,
7543,
326,
1719,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
2910,
16,
2910,
1425,
16,
2910,
7525,
1425,
16,
4688,
7525,
1425,
4672,
3536,
7543,
326,
1719,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
_strandA_list, name = gensym("Strand", self.assy), group = dnaGroup, color = env.prefs[dnaDefaultStrand1Color_prefs_key]) | _strandA_list, name = gensym("Strand", self.assy), group = dnaGroup, color = env.prefs[dnaDefaultStrand1Color_prefs_key]) | def _regroup(self, dnaGroup): """ Regroups I{dnaGroup} into group containing three chunks: I{StrandA}, I{StrandB} and I{Axis} of the DNA duplex. | 2937dd0cfe13ce5cba6560a12fe467c224444ffe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/2937dd0cfe13ce5cba6560a12fe467c224444ffe/DnaDuplex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1574,
656,
12,
2890,
16,
31702,
1114,
4672,
3536,
868,
4650,
467,
95,
5176,
69,
1114,
97,
1368,
1041,
4191,
8925,
6055,
30,
467,
95,
1585,
464,
37,
5779,
467,
95,
1585,
464,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1574,
656,
12,
2890,
16,
31702,
1114,
4672,
3536,
868,
4650,
467,
95,
5176,
69,
1114,
97,
1368,
1041,
4191,
8925,
6055,
30,
467,
95,
1585,
464,
37,
5779,
467,
95,
1585,
464,
38,
... |
self.widgets.qToolButton_debug.setEnabled(False) | self.widgets.qToolButton_debug.setEnabled(True) | def __init__(self, client, streams, options, keys): """ Standard init. """ self.client = client self.streams = streams self.options = options self.keys = keys # init the GUI stuff QtGui.QMainWindow.__init__(self) # Init the widgets from the autogenerated file. # All GUI elements will be accessible via self.widgets.name_of_element self.widgets = Ui_qMainWindow_obsPyck() self.widgets.setupUi(self) self.qMain = self.widgets.centralwidget self.__enableTextBrowserWrite() # Matplotlib figure. # we bind the figure to the FigureCanvas, so that it will be # drawn using the specific backend graphic functions self.canv = self.widgets.qMplCanvas self.fig = self.widgets.qMplCanvas.fig self.toolbar = QNavigationToolbar(self.widgets.qMplCanvas, self.widgets.qWidget_toolbar) | 7c785f3421a581f0f28164feecf96f7680e94fff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/7c785f3421a581f0f28164feecf96f7680e94fff/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1004,
16,
8205,
16,
702,
16,
1311,
4672,
3536,
8263,
1208,
18,
3536,
365,
18,
2625,
273,
1004,
365,
18,
16320,
273,
8205,
365,
18,
2116,
273,
702,
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,
1001,
2738,
972,
12,
2890,
16,
1004,
16,
8205,
16,
702,
16,
1311,
4672,
3536,
8263,
1208,
18,
3536,
365,
18,
2625,
273,
1004,
365,
18,
16320,
273,
8205,
365,
18,
2116,
273,
702,
365,
... |
f = open(self.src, 'rb') | try: f = open(self.src, 'rb') except IOError, e: sys.stderr.write('%s\n' % e) return None | def fill(self, verbose=False): verbose = True # XXX if verbose: sys.stdout.write('Hashing %r... ' % self.src) sys.stdout.flush() | ef0c889e6b860a33e3563a751fac9ad31ab50ab2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10990/ef0c889e6b860a33e3563a751fac9ad31ab50ab2/hashes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
12,
2890,
16,
3988,
33,
8381,
4672,
3988,
273,
1053,
468,
11329,
309,
3988,
30,
2589,
18,
10283,
18,
2626,
2668,
2310,
310,
738,
86,
2777,
296,
738,
365,
18,
4816,
13,
2589,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3636,
12,
2890,
16,
3988,
33,
8381,
4672,
3988,
273,
1053,
468,
11329,
309,
3988,
30,
2589,
18,
10283,
18,
2626,
2668,
2310,
310,
738,
86,
2777,
296,
738,
365,
18,
4816,
13,
2589,
18,
... |
_trace_data = Property(Array, depends_on=['index', 'value', 'yindex', 'amplitude', 'scale', 'offset']) | _trace_data = Property(Array, depends_on=['index', 'index.data_changed', 'value', 'value.data_changed', 'yindex', 'yindex.data_changed', 'amplitude', 'scale', 'offset']) | def time_ms(t): s = "%5.1f ms" % (t * 1000) return s | eb14d19aaa402da30b0bd30fcbb86efe697af92a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13167/eb14d19aaa402da30b0bd30fcbb86efe697af92a/multi_line_plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
813,
67,
959,
12,
88,
4672,
272,
273,
2213,
25,
18,
21,
74,
4086,
6,
738,
261,
88,
380,
4336,
13,
327,
272,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
813,
67,
959,
12,
88,
4672,
272,
273,
2213,
25,
18,
21,
74,
4086,
6,
738,
261,
88,
380,
4336,
13,
327,
272,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return dict(resulttype='mirrorlist', returncode=200, results=[], message=repo_information) | return return_error(kwargs, message=repo_information) | def do_mirrorlist(kwargs): global debug global logfile if not (kwargs.has_key('repo') and kwargs.has_key('arch')) and not kwargs.has_key('path'): return dict(resulttype='mirrorlist', returncode=200, results=[], message='# either path=, or repo= and arch= must be specified') file = None cache = None pathIsDirectory = False if kwargs.has_key('path'): path = kwargs['path'].strip('/') # Strip duplicate "//" from the path path = path.replace('//', '/') header = "# path = %s " % (path) sdir = path.split('/') try: # path was to a directory cache = mirrorlist_cache['/'.join(sdir)] pathIsDirectory=True except KeyError: # path was to a file, try its directory file = sdir[-1] sdir = sdir[:-1] try: cache = mirrorlist_cache['/'.join(sdir)] except KeyError: return dict(resulttype='mirrorlist', returncode=200, results=[], message=header + 'error: invalid path') dir = '/'.join(sdir) else: if u'source' in kwargs['repo']: kwargs['arch'] = u'source' repo = repo_redirect.get(kwargs['repo'], kwargs['repo']) arch = kwargs['arch'] header = "# repo = %s arch = %s " % (repo, arch) if repo in disabled_repositories: return dict(resulttype='mirrorlist', returncode=200, results=[], message=header + 'repo disabled') try: dir = repo_arch_to_directoryname[(repo, arch)] if 'metalink' in kwargs and kwargs['metalink']: dir += '/repodata' file = 'repomd.xml' else: pathIsDirectory=True cache = mirrorlist_cache[dir] except KeyError: repos = repo_arch_to_directoryname.keys() repos.sort() repo_information = header + "error: invalid repo or arch\n" repo_information += "# following repositories are available:\n" for i in repos: if i[0] is not None and i[1] is not None: repo_information += "# repo=%s, arch=%s\n" % i return dict(resulttype='mirrorlist', returncode=200, results=[], message=repo_information) ordered_mirrorlist = cache.get('ordered_mirrorlist', default_ordered_mirrorlist) done = 0 netblock_results = set() internet2_results = set() country_results = set() geoip_results = set() continent_results = set() global_results = set() requested_countries = [] if kwargs.has_key('country'): requested_countries = uniqueify([c.upper() for c in kwargs['country'].split(',') ]) # if they specify a country, don't use netblocks if not 'country' in kwargs: header, netblock_results = do_netblocks(kwargs, cache, header) if len(netblock_results) > 0: if not ordered_mirrorlist: done=1 client_ip = kwargs['client_ip'] clientCountry = gi.country_code_by_addr(client_ip) if clientCountry is None: print_client_country = "N/A" else: print_client_country = clientCountry if debug: if kwargs.has_key('repo') and kwargs.has_key('arch'): print ("IP: " + client_ip + "; DATE: " + time.strftime("%Y-%m-%d") + "; COUNTRY: " + print_client_country + "; REPO: " + kwargs['repo'] + "; ARCH: " + kwargs['arch']) if logfile is not None: if kwargs.has_key('repo') and kwargs.has_key('arch'): logfile.write("IP: " + client_ip + "; DATE: " + time.strftime("%Y-%m-%d") + "; COUNTRY: " + print_client_country + "; REPO: " + kwargs['repo'] + "; ARCH: " + kwargs['arch'] + "\n") logfile.flush() if not done: header, internet2_results = do_internet2(kwargs, cache, clientCountry, header) if len(internet2_results) + len(netblock_results) >= 3: if not ordered_mirrorlist: done = 1 if not done and 'country' in kwargs: header, country_results = do_country(kwargs, cache, clientCountry, requested_countries, header) if len(country_results) == 0: header, continent_results = do_continent(kwargs, cache, clientCountry, requested_countries, header) done = 1 if not done: header, geoip_results = do_geoip(kwargs, cache, clientCountry, header) if len(geoip_results) >= 3: if not ordered_mirrorlist: done = 1 if not done: header, continent_results = do_continent(kwargs, cache, clientCountry, [], header) if len(geoip_results) + len(continent_results) >= 3: done = 1 if not done: header, global_results = do_global(kwargs, cache, clientCountry, header) def _random_shuffle(s): l = list(s) random.shuffle(l) return l netblock_hosts = _random_shuffle(netblock_results) internet2_hosts = _random_shuffle(internet2_results) country_hosts = shuffle(country_results) geoip_hosts = shuffle(geoip_results) continent_hosts = shuffle(continent_results) global_hosts = shuffle(global_results) allhosts = uniqueify(netblock_hosts + internet2_hosts + country_hosts + geoip_hosts + continent_hosts + global_hosts) hosts_and_urls = append_path(allhosts, cache, file, pathIsDirectory=pathIsDirectory) if 'metalink' in kwargs and kwargs['metalink']: (resulttype, returncode, results)=metalink(dir, file, hosts_and_urls) d = dict(message=None, resulttype=resulttype, returncode=returncode, results=results) return d else: host_url_list = trim_to_preferred_protocols(hosts_and_urls) d = dict(message=header, resulttype='mirrorlist', returncode=200, results=host_url_list) return d | 2f698c8027b88597bbdef9712dee43e6e9d48e18 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13031/2f698c8027b88597bbdef9712dee43e6e9d48e18/mirrorlist_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
27197,
1098,
12,
4333,
4672,
2552,
1198,
2552,
15204,
225,
309,
486,
261,
4333,
18,
5332,
67,
856,
2668,
7422,
6134,
471,
1205,
18,
5332,
67,
856,
2668,
991,
26112,
471,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
27197,
1098,
12,
4333,
4672,
2552,
1198,
2552,
15204,
225,
309,
486,
261,
4333,
18,
5332,
67,
856,
2668,
7422,
6134,
471,
1205,
18,
5332,
67,
856,
2668,
991,
26112,
471,
486,
... |
assert (isinstance(id_or_name1, (int, long)) and isinstance(id_or_name2, basestring)) return unichr(0) | if (not isinstance(id_or_name1, (int, long)) or not isinstance(id_or_name2, basestring)): raise KeyRangeError("Wrong key order: %r, %r" % (id_or_name1, id_or_name2)) zero_ch = unichr(0) if id_or_name2 == zero_ch: return (id_or_name1 + 2**63 - 1) / 2 return zero_ch | def _split_id_or_name(id_or_name1, id_or_name2, batch_size, maintain_batches): """Return an id_or_name that is between id_or_name1 an id_or_name2. | 825c3336ff36acbb75aa63d1be97c3c75e582bd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10629/825c3336ff36acbb75aa63d1be97c3c75e582bd9/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4939,
67,
350,
67,
280,
67,
529,
12,
350,
67,
280,
67,
529,
21,
16,
612,
67,
280,
67,
529,
22,
16,
2581,
67,
1467,
16,
17505,
67,
21233,
4672,
3536,
990,
392,
612,
67,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4939,
67,
350,
67,
280,
67,
529,
12,
350,
67,
280,
67,
529,
21,
16,
612,
67,
280,
67,
529,
22,
16,
2581,
67,
1467,
16,
17505,
67,
21233,
4672,
3536,
990,
392,
612,
67,
280,
... |
"""Returns if a path is safe still valid (i.e. deemed collision free)""" if not (path[0] == self.position and path[-1] == self.goal): return None | """Returns if a path is safe (i.e. deemed collision free)""" | def path_valid(self, path, view): """Returns if a path is safe still valid (i.e. deemed collision free)""" if not (path[0] == self.position and path[-1] == self.goal): return None #must go between current position and goal ctime = 0 freeprob = 1.0 a1 = self.angle p1 = self.position | 0484f9f3f562dab318bf38b4cbce4815517c3c34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9407/0484f9f3f562dab318bf38b4cbce4815517c3c34/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
589,
67,
877,
12,
2890,
16,
589,
16,
1476,
4672,
3536,
1356,
309,
279,
589,
353,
4183,
261,
77,
18,
73,
18,
443,
351,
329,
17740,
4843,
15574,
468,
11926,
1960,
3086,
783,
1754,
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,
589,
67,
877,
12,
2890,
16,
589,
16,
1476,
4672,
3536,
1356,
309,
279,
589,
353,
4183,
261,
77,
18,
73,
18,
443,
351,
329,
17740,
4843,
15574,
468,
11926,
1960,
3086,
783,
1754,
471,
... |
doc="""Information on the contact points between the objects.""") | doc="""Information on the contact points between the objects. Return [`Contact`]""") | def _get_contacts(self): if self._contacts is None: self._contacts = [] for i in range(self._arbitercontents.numContacts): self.contacts.append(Contact(self._arbitercontents.contacts[i])) return self._contacts | ec723fba07092f4662895cf1e6f8bb282228aa78 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8535/ec723fba07092f4662895cf1e6f8bb282228aa78/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
20777,
12,
2890,
4672,
309,
365,
6315,
20777,
353,
599,
30,
365,
6315,
20777,
273,
5378,
364,
277,
316,
1048,
12,
2890,
6315,
6779,
2165,
3980,
18,
2107,
20017,
4672,
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,
389,
588,
67,
20777,
12,
2890,
4672,
309,
365,
6315,
20777,
353,
599,
30,
365,
6315,
20777,
273,
5378,
364,
277,
316,
1048,
12,
2890,
6315,
6779,
2165,
3980,
18,
2107,
20017,
4672,
365,
... |
self.screen.set_cursor(self.l, self.c) | def read(self, timeout = 1): # {{{ # read from subprocess output = self.proc.read(timeout) # and strip null chars output = output.replace(chr(0), '') | 111540473791d4978e558a043a691315a65d25f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8972/111540473791d4978e558a043a691315a65d25f0/conque.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
2021,
273,
404,
4672,
468,
10179,
95,
468,
855,
628,
6652,
876,
273,
365,
18,
9381,
18,
896,
12,
4538,
13,
468,
471,
2569,
446,
5230,
876,
273,
876,
18,
2079,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
2021,
273,
404,
4672,
468,
10179,
95,
468,
855,
628,
6652,
876,
273,
365,
18,
9381,
18,
896,
12,
4538,
13,
468,
471,
2569,
446,
5230,
876,
273,
876,
18,
2079,
12,
... | |
print 'lfc registration result ', result | def get_output(self,jobid,directory,out,wms_proxy=False): '''Retrieve the output of a job on the grid''' | 846134a85a4f612381877f1bf6c0b871a6ff92c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/846134a85a4f612381877f1bf6c0b871a6ff92c1/NG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2844,
12,
2890,
16,
4688,
350,
16,
5149,
16,
659,
16,
91,
959,
67,
5656,
33,
8381,
4672,
9163,
5767,
326,
876,
434,
279,
1719,
603,
326,
3068,
26418,
2,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2844,
12,
2890,
16,
4688,
350,
16,
5149,
16,
659,
16,
91,
959,
67,
5656,
33,
8381,
4672,
9163,
5767,
326,
876,
434,
279,
1719,
603,
326,
3068,
26418,
2,
-100,
-100,
-100,
-1... | |
(rc,k) = semanage_node_key_create(self.sh, addr, mask, proto) | (rc, k) = semanage_node_key_create(self.sh, addr, mask, proto) | def __delete(self, addr, mask, proto): if addr == "": raise ValueError(_("Node Address is required")) | 8ad29a27255b6eb5a4f8e1083ce9832034f3e205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7147/8ad29a27255b6eb5a4f8e1083ce9832034f3e205/seobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
12,
2890,
16,
3091,
16,
3066,
16,
3760,
4672,
309,
3091,
422,
1408,
30,
1002,
2068,
24899,
2932,
907,
5267,
353,
1931,
6,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3733,
12,
2890,
16,
3091,
16,
3066,
16,
3760,
4672,
309,
3091,
422,
1408,
30,
1002,
2068,
24899,
2932,
907,
5267,
353,
1931,
6,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
(self.api_key, self.api_secret, self.session_key) = network._get_ws_auth(False) | (self.api_key, self.api_secret, self.session_key) = network._get_ws_auth() | def __init__(self, network, method_name, params = {}): self.params = params self.network = network (self.api_key, self.api_secret, self.session_key) = network._get_ws_auth(False) self.params["api_key"] = self.api_key self.params["method"] = method_name if network.is_caching_enabled(): self.cache = network._get_cache_backend() if self.session_key: self.params["sk"] = self.session_key self.sign_it() | 83bbe31b6656d9dbb03d26c06d278a468b8c730e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9926/83bbe31b6656d9dbb03d26c06d278a468b8c730e/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2483,
16,
707,
67,
529,
16,
859,
273,
2618,
4672,
225,
365,
18,
2010,
273,
859,
365,
18,
5185,
273,
2483,
225,
261,
2890,
18,
2425,
67,
856,
16,
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,
1001,
2738,
972,
12,
2890,
16,
2483,
16,
707,
67,
529,
16,
859,
273,
2618,
4672,
225,
365,
18,
2010,
273,
859,
365,
18,
5185,
273,
2483,
225,
261,
2890,
18,
2425,
67,
856,
16,
365,
... |
r" \(api:(\d+)/proto:(\d+)\)") | r" \(api:(\d+)/proto:(\d+)(?:-(\d+))?\)") | def Close(self): """Notifies that the device will no longer be used for I/O. | c3f9340c1bd2d6dcab5111774089caeba0dad332 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/c3f9340c1bd2d6dcab5111774089caeba0dad332/bdev.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3527,
12,
2890,
4672,
3536,
1248,
5032,
716,
326,
2346,
903,
1158,
7144,
506,
1399,
364,
467,
19,
51,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3527,
12,
2890,
4672,
3536,
1248,
5032,
716,
326,
2346,
903,
1158,
7144,
506,
1399,
364,
467,
19,
51,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Assemble = Assemble + " --32" Assemble = (Assemble + ({ | AssemblerFlags = AssemblerFlags + " --32" AssemblerFlags = (AssemblerFlags + ({ | def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32_VMS": cc = "cc" cflags = " " elif Config == "ALPHA64_VMS": cc = "cc" cflags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": cc = "/usr/bin/cc" cflags = "-g -mt -xldscope=symbolic " else: # gcc platforms cc = { "SOLgnu" : "/usr/sfw/bin/gcc", }.get(Config) or "gcc" cflags = { "I386_INTERIX" : "-g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " cflags = cflags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "I386_LINUX" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", "SOLsun" : " -xarch=v8plus -xcode=pic32 ", "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = "$(CC) $(CFLAGS) *.mo *.io *.o " # link flags if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # add -c to compiler but not link (i.e. not cflags) Compile = "$(CC) $(CFLAGS) " if not StringTagged(Config, "VMS"): Compile = Compile + " -c " AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget # pick assembler if StringTagged(Target, "VMS") and AssembleOnTarget: Assemble = "macro /alpha " # not right, come back to it later elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " # set assembler flags if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32")): Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", # -s puts symbols where linker won't automatically strip them "I386_SOLARIS" : " -s ", "AMD64_SOLARIS" : " -s -xarch=amd64 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: cc = GnuPlatformPrefix + cc Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at ends # cflags = re.sub(" +", " ", cflags) cflags = re.sub(" +$", "", cflags) cflags = re.sub("^ +", "", cflags) Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") VmsLink = open(os.path.join(BootDir, "vmslink.opt"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = { } Makefile.write(".SUFFIXES:\n" + ".SUFFIXES: .c .is .ms .s .o .obj .io .mo\n\n" + "all: cm3\n\n" + "clean:\n" + "\trm -rf *.io *.mo *.o *.obj\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\n" + "set -e\n" + "set -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n" + "CC ?= " + cc + "\n" + "CFLAGS ?= " + cflags + "\n" + "Compile=" + Compile + "\n" + "Assemble=" + Assemble + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for a in [Make]: a.write("# edit up here\n\n" + "CC=${CC:-" + cc + "}\n" + "CFLAGS=${CFLAGS:-" + cflags + "}\n" + "Compile=" + Compile + "\n" + "Assemble=" + Assemble + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".is") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or AssembleOnTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) if Objects.get(Object): continue Objects[Object] = 1 if ext_c: VmsMake.write("$ " + Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = Assemble + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write("$ " + Assemble + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") Makefile.write(".c.o:\n" + "\t$(Compile) -o $@ $<\n\n" + ".c.obj:\n" + "\t$(Compile) -o $@ $<\n\n" + ".is.io:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".s.o:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".ms.mo:\n" + "\t$(Assemble) -o $@ $<\n\n") Makefile.write("cm3:") Objects = Objects.keys() Objects.sort() k = 4 for a in Objects: k = k + 1 + len(a) if k > 76: # line wrap Makefile.write(" \\\n") k = 1 + len(a) Makefile.write(" " + a) Makefile.write("\n\t") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.o\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.obj\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.mo\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.io\n") VmsMake.write("$ link /executable=cm3.exe vmslink/options\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() if vms or StringTagged(Config, "NT") or Config == "NT386": _MakeZip(BootDir[2:]) else: _MakeTGZ(BootDir[2:]) | c35fdb46ab081a89157be8ee1623b9566eef3714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/c35fdb46ab081a89157be8ee1623b9566eef3714/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
300,
16125,
23,
6743,
67,
16374,
1546,
397,
1903,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
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,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
300,
16125,
23,
6743,
67,
16374,
1546,
397,
1903,
225,
4049,
273,
315,
21,
6,
225,
468,
1220,
1779,
353... |
Input.__init__(self,identifier,title,abstract=None, | Input.__init__(self,identifier,title,abstract=abstract, | def __init__(self,identifier,title,abstract=None, metadata=[],minOccurs=1,maxOccurs=1,dataType=types.StringType, uoms=(),values=("*"),spacing=None,default=None): """Init the literal value type of input | 110c19656387fcffbf5f96fd71c12a98a50b64a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10967/110c19656387fcffbf5f96fd71c12a98a50b64a3/InAndOutputs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5644,
16,
2649,
16,
17801,
33,
7036,
16,
1982,
22850,
6487,
1154,
31084,
33,
21,
16,
1896,
31084,
33,
21,
16,
892,
559,
33,
2352,
18,
780,
559,
16,
582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5644,
16,
2649,
16,
17801,
33,
7036,
16,
1982,
22850,
6487,
1154,
31084,
33,
21,
16,
1896,
31084,
33,
21,
16,
892,
559,
33,
2352,
18,
780,
559,
16,
582... |
'staff': v.status==STAFF, | 'administrateur': v.status>COACH, | def logs(request): """View: log des visites """ # récup visiteur v = request.session['v'] us = Utilisateur.objects.filter(groupe__in=v.groupes_list()) logs = Log.objects.filter(utilisateur__in=us) v.lastw = datetime.datetime.now() request.session['v'] = v v.save() return list_detail.object_list( request, queryset=logs, paginate_by= 23, allow_empty= True, extra_context = { 'visiteur': v.prenom_nom(), 'staff': v.status==STAFF, }, ) | 5622003147f995391ac97c1031fcc18f24ef8d30 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11552/5622003147f995391ac97c1031fcc18f24ef8d30/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5963,
12,
2293,
4672,
3536,
1767,
30,
613,
2832,
2281,
2997,
3536,
468,
436,
132,
107,
71,
416,
2281,
1137,
295,
331,
273,
590,
18,
3184,
3292,
90,
3546,
584,
273,
3564,
24954,
18,
691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5963,
12,
2293,
4672,
3536,
1767,
30,
613,
2832,
2281,
2997,
3536,
468,
436,
132,
107,
71,
416,
2281,
1137,
295,
331,
273,
590,
18,
3184,
3292,
90,
3546,
584,
273,
3564,
24954,
18,
691... |
ERROR_UNHANDLED_ERROR = 0xFFFFFFFFL | ERROR_UNHANDLED_ERROR = 0xFFFFFFFF | def DEVICE_TYPE_FROM_CTL_CODE(ctrlCode): return (ctrlCode & 0xffff0000L) >> 16 | a5e168c82a8f27171f14324614a0fe58633b3c87 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/a5e168c82a8f27171f14324614a0fe58633b3c87/winioctlcon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23996,
67,
2399,
67,
11249,
67,
1268,
48,
67,
5572,
12,
16277,
1085,
4672,
327,
261,
16277,
1085,
473,
374,
20431,
2787,
48,
13,
1671,
2872,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23996,
67,
2399,
67,
11249,
67,
1268,
48,
67,
5572,
12,
16277,
1085,
4672,
327,
261,
16277,
1085,
473,
374,
20431,
2787,
48,
13,
1671,
2872,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.assertEqual(len(w.warnings), 2) self.assertWarning(None, w.warnings[0], "Overriding __cmp__ blocks inheritance of __hash__ in 3.x") | self.assertEqual(len(w.warnings), 1) | def __eq__(self, other): pass | f4c9b609a329f3f3eb716a6bccc68b23e7e43370 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f4c9b609a329f3f3eb716a6bccc68b23e7e43370/test_py3kwarn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
1001,
11253,
972,
12,
2890,
16,
1308,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
print >>self.stdout, """alias [name [command [parameter parameter ...] ]] | print >>self.stdout, """alias [name [command [parameter parameter ...]]] | def help_alias(self): print >>self.stdout, """alias [name [command [parameter parameter ...] ]] | 808bceb672e6d4a10cdc6d497a54f0725722f27e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/808bceb672e6d4a10cdc6d497a54f0725722f27e/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
4930,
12,
2890,
4672,
1172,
1671,
2890,
18,
10283,
16,
3536,
4930,
306,
529,
306,
3076,
306,
6775,
1569,
1372,
65,
12011,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2809,
67,
4930,
12,
2890,
4672,
1172,
1671,
2890,
18,
10283,
16,
3536,
4930,
306,
529,
306,
3076,
306,
6775,
1569,
1372,
65,
12011,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
app.db.update_obj(self) | def __init__(self, *args, **kwargs): self.in_db_init = True signals.SignalEmitter.__init__(self, 'removed') | c71b221a848e0396bc6f78262f39d628e18fde76 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/c71b221a848e0396bc6f78262f39d628e18fde76/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
267,
67,
1966,
67,
2738,
273,
1053,
11505,
18,
11208,
13476,
16186,
2738,
972,
12,
2890,
16,
296,
14923,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
267,
67,
1966,
67,
2738,
273,
1053,
11505,
18,
11208,
13476,
16186,
2738,
972,
12,
2890,
16,
296,
14923,
6134,
... | |
- ``n`` - number of rounds (default: None) - ``rc`` - number of rows \* number of cols (default: None) - ``e`` - exponent of base field (default: None) | - ``n`` - number of rounds (default: ``None``) - ``rc`` - number of rows \* number of cols (default: ``None``) - ``e`` - exponent of base field (default: ``None``) | def varformatstr(self, name, n=None, rc=None, e=None): """ Return a format string which is understood by print et al. If a numerical value is omitted, the default value of self is used. The numerical values (n, rc, e) are used to determine the width of the respective fields in the format string. INPUT: - ``name`` - name of the variable - ``n`` - number of rounds (default: None) - ``rc`` - number of rows \* number of cols (default: None) - ``e`` - exponent of base field (default: None) EXAMPLE:: sage: sr = mq.SR(1, 2, 2, 4) sage: sr.varformatstr('x') 'x%01d%01d%01d' sage: sr.varformatstr('x', n=1000) 'x%03d%03d%03d' """ if n is None: n = self.n if rc is None: rc = self.r * self.c if e is None: e = self.e l = str(max([ len(str(rc-1)), len(str(n-1)), len(str(e-1)) ] )) if name not in ("k", "s"): pf = self._postfix else: pf = "" format_string = name + pf + "%0" + l + "d" + "%0" + l + "d" + "%0" + l + "d" return format_string | f145241e51a69266a2640a052ee008637b5d9160 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f145241e51a69266a2640a052ee008637b5d9160/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
569,
2139,
701,
12,
2890,
16,
508,
16,
290,
33,
7036,
16,
4519,
33,
7036,
16,
425,
33,
7036,
4672,
3536,
2000,
279,
740,
533,
1492,
353,
31727,
4773,
635,
1172,
3393,
524,
18,
225,
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,
569,
2139,
701,
12,
2890,
16,
508,
16,
290,
33,
7036,
16,
4519,
33,
7036,
16,
425,
33,
7036,
4672,
3536,
2000,
279,
740,
533,
1492,
353,
31727,
4773,
635,
1172,
3393,
524,
18,
225,
9... |
if self.GetMinimumDistance(R) < self.couplingradius: | if self.GetMinimumDistance(R) < self.couplingradius: | def get_hamiltonian_kpoint(self, kpt_c, calc): """Get Hamiltonian at some new arbitrary k-vector | 79066eb5b3194c2a4618377dbbf174cd173b34a9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/79066eb5b3194c2a4618377dbbf174cd173b34a9/wannier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
76,
11580,
1917,
2779,
67,
79,
1153,
12,
2890,
16,
417,
337,
67,
71,
16,
7029,
4672,
3536,
967,
670,
11580,
1917,
2779,
622,
2690,
394,
11078,
417,
17,
7737,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
76,
11580,
1917,
2779,
67,
79,
1153,
12,
2890,
16,
417,
337,
67,
71,
16,
7029,
4672,
3536,
967,
670,
11580,
1917,
2779,
622,
2690,
394,
11078,
417,
17,
7737,
2,
-100,
-100,
... |
c += SemistandardTableaux(part).cardinality() | c += SemistandardTableaux_p(part, self.max_entry).cardinality() | def cardinality(self): """ EXAMPLES:: sage: SemistandardTableaux(3).cardinality() 19 sage: SemistandardTableaux(4).cardinality() 116 sage: ns = range(1, 6) sage: ssts = [ SemistandardTableaux(n) for n in ns ] sage: all([sst.cardinality() == len(sst.list()) for sst in ssts]) True """ c = 0 for part in partition.Partitions(self.n): c += SemistandardTableaux(part).cardinality() return c | 2449cd5519bef0332aa3a713d5bed46b08be54fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2449cd5519bef0332aa3a713d5bed46b08be54fa/tableau.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14379,
12,
2890,
4672,
3536,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
15661,
376,
2958,
1388,
18196,
12,
23,
2934,
3327,
9232,
1435,
5342,
272,
410,
30,
15661,
376,
2958,
1388,
18196,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14379,
12,
2890,
4672,
3536,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
15661,
376,
2958,
1388,
18196,
12,
23,
2934,
3327,
9232,
1435,
5342,
272,
410,
30,
15661,
376,
2958,
1388,
18196,
... |
intersection = lang.intersection(region) if intersection: return intersection | intersect = lang.intersection(region) if intersect: return intersect | def f9(lang, country, region): '''9. Lang ^ Country ^ Region, Lang ^ Region, Lang ^ Country, Lang''' intersect = lang.intersection(country).intersection(region) if intersection: return intersect else: intersection = lang.intersection(region) if intersection: return intersection else: intersection = lang.intersection(country) if intersection: return intersection else: return lang | e696c88745d210c2b85958eb1d08ee2bba59969a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8937/e696c88745d210c2b85958eb1d08ee2bba59969a/classifier_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
29,
12,
4936,
16,
5251,
16,
3020,
4672,
9163,
29,
18,
13346,
3602,
19394,
3602,
9164,
16,
13346,
3602,
9164,
16,
13346,
3602,
19394,
16,
13346,
26418,
9136,
273,
3303,
18,
30231,
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,
284,
29,
12,
4936,
16,
5251,
16,
3020,
4672,
9163,
29,
18,
13346,
3602,
19394,
3602,
9164,
16,
13346,
3602,
9164,
16,
13346,
3602,
19394,
16,
13346,
26418,
9136,
273,
3303,
18,
30231,
12... |
(str(changes), changes.exit_status, output.read())) | (str(output), changes.exit_status, output.read())) | def _checkoutUpstreamRevision(self, basedir, repository, module, revision, subdir=None, logger=None, **kwargs): """ Concretely do the checkout of the upstream revision. """ | d671e4328a112a07abb518198fbdd52d8880ba88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/d671e4328a112a07abb518198fbdd52d8880ba88/svn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
17300,
1211,
3256,
7939,
12,
2890,
16,
15573,
16,
3352,
16,
1605,
16,
6350,
16,
16921,
33,
7036,
16,
1194,
33,
7036,
16,
2826,
4333,
4672,
3536,
735,
71,
1349,
2357,
741,
326,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
17300,
1211,
3256,
7939,
12,
2890,
16,
15573,
16,
3352,
16,
1605,
16,
6350,
16,
16921,
33,
7036,
16,
1194,
33,
7036,
16,
2826,
4333,
4672,
3536,
735,
71,
1349,
2357,
741,
326,
139... |
cls._receivers.setdefault(ws,set()).add(receiver) | cls._receivers.setdefault(ws,set()).add(rcv) | def subscribe(cls,sender,receiver,hold=False): """Call `receiver` with events of this type from `sender` | 5259eb938c76c9ba0582d350509eaa9bbbc38af9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/5259eb938c76c9ba0582d350509eaa9bbbc38af9/events.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9129,
12,
6429,
16,
15330,
16,
24454,
16,
21056,
33,
8381,
4672,
3536,
1477,
1375,
24454,
68,
598,
2641,
434,
333,
618,
628,
1375,
15330,
68,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9129,
12,
6429,
16,
15330,
16,
24454,
16,
21056,
33,
8381,
4672,
3536,
1477,
1375,
24454,
68,
598,
2641,
434,
333,
618,
628,
1375,
15330,
68,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
with io.open(support.TESTFN, "wb") as f: | with self.open(support.TESTFN, "wb") as f: | def test_threads(self): try: # Write out many bytes with exactly the same number of 0's, # 1's... 255's. This will help us check that concurrent reading # doesn't duplicate or forget contents. N = 1000 l = list(range(256)) * N random.shuffle(l) s = bytes(bytearray(l)) with io.open(support.TESTFN, "wb") as f: f.write(s) with io.open(support.TESTFN, self.read_mode, buffering=0) as raw: bufio = self.tp(raw, 8) errors = [] results = [] def f(): try: # Intra-buffer read then buffer-flushing read for n in cycle([1, 19]): s = bufio.read(n) if not s: break # list.append() is atomic results.append(s) except Exception as e: errors.append(e) raise threads = [threading.Thread(target=f) for x in range(20)] for t in threads: t.start() time.sleep(0.02) # yield for t in threads: t.join() self.assertFalse(errors, "the following exceptions were caught: %r" % errors) s = b''.join(results) for i in range(256): c = bytes(bytearray([i])) self.assertEqual(s.count(c), N) finally: support.unlink(support.TESTFN) | 1eb8e6fd9a20dd970536c19c924ca697ad648652 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/1eb8e6fd9a20dd970536c19c924ca697ad648652/test_io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12495,
12,
2890,
4672,
775,
30,
468,
2598,
596,
4906,
1731,
598,
8950,
326,
1967,
1300,
434,
374,
1807,
16,
468,
404,
1807,
2777,
4561,
1807,
18,
1220,
903,
2809,
584,
866,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12495,
12,
2890,
4672,
775,
30,
468,
2598,
596,
4906,
1731,
598,
8950,
326,
1967,
1300,
434,
374,
1807,
16,
468,
404,
1807,
2777,
4561,
1807,
18,
1220,
903,
2809,
584,
866,
7... |
self.indexed.append(page) | def run(self): while len(self.queue) > 0: print "Queue len:", len(self.queue) page = self.queue.pop() print "Crawling", page self.crawl(page) self.indexed.append(page) | b0be527ef6a1f029d19420ceb0333083835e95bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6425/b0be527ef6a1f029d19420ceb0333083835e95bd/crawler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
562,
12,
2890,
18,
4000,
13,
405,
374,
30,
1172,
315,
3183,
562,
2773,
16,
562,
12,
2890,
18,
4000,
13,
1363,
273,
365,
18,
4000,
18,
5120,
1435,
1172,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1323,
562,
12,
2890,
18,
4000,
13,
405,
374,
30,
1172,
315,
3183,
562,
2773,
16,
562,
12,
2890,
18,
4000,
13,
1363,
273,
365,
18,
4000,
18,
5120,
1435,
1172,
31... | |
@bigmemtest(minsize=_2G + 10, memuse=8) | @bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5) | def test_extend_large(self, size): return self.basic_test_extend(size) | 2b6fe565c924c2484fedcdb9e497475584b0716e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2b6fe565c924c2484fedcdb9e497475584b0716e/test_bigmem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
14313,
67,
14095,
12,
2890,
16,
963,
4672,
327,
365,
18,
13240,
67,
3813,
67,
14313,
12,
1467,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
14313,
67,
14095,
12,
2890,
16,
963,
4672,
327,
365,
18,
13240,
67,
3813,
67,
14313,
12,
1467,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not self.processDir: try: self.processDir = self.wps.getConfigValue("server", "processesPath") except: pass | if self.processDir: self.wps.debug("PYWPS_PROCESSES set from environment variable to %s" %self.processDir) else: try: self.processDir = self.wps.getConfigValue("server", "processesPath") self.wps.debug("PYWPS_PROCESSES: set from configuration file to [%s]" %self.processDir) except: self.wps.debug("'processesPath' not found in the 'server' section of pywps configuration file") | def __init__(self,wps): self.wps = wps | fc07a18fdce06b3d6f513db21ec70b4a2845b7f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10967/fc07a18fdce06b3d6f513db21ec70b4a2845b7f7/Response.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
91,
1121,
4672,
365,
18,
91,
1121,
273,
341,
1121,
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,
1001,
2738,
972,
12,
2890,
16,
91,
1121,
4672,
365,
18,
91,
1121,
273,
341,
1121,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def read(self, size=-1, chars=-1): | def read(self, size=-1, chars=-1, firstline=False): | def read(self, size=-1, chars=-1): | 027542bf97f91868a12206db4f0f75685721665b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/027542bf97f91868a12206db4f0f75685721665b/codecs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
29711,
21,
16,
5230,
29711,
21,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
855,
12,
2890,
16,
963,
29711,
21,
16,
5230,
29711,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if __debug__: print "stop colorizing" | if DEBUG: print "stop colorizing" | def toggle_colorize_event(self, event): if self.after_id: after_id = self.after_id self.after_id = None if __debug__: print "cancel scheduled recolorizer" self.after_cancel(after_id) if self.allow_colorizing and self.colorizing: if __debug__: print "stop colorizing" self.stop_colorizing = 1 self.allow_colorizing = not self.allow_colorizing if self.allow_colorizing and not self.colorizing: self.after_id = self.after(1, self.recolorize) if __debug__: print "auto colorizing turned", self.allow_colorizing and "on" or "off" return "break" | 3cc1250f168209f3333e4f60e71f65efb1e8f18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3cc1250f168209f3333e4f60e71f65efb1e8f18b/ColorDelegator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10486,
67,
3266,
554,
67,
2575,
12,
2890,
16,
871,
4672,
309,
365,
18,
5205,
67,
350,
30,
1839,
67,
350,
273,
365,
18,
5205,
67,
350,
365,
18,
5205,
67,
350,
273,
599,
309,
1001,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10486,
67,
3266,
554,
67,
2575,
12,
2890,
16,
871,
4672,
309,
365,
18,
5205,
67,
350,
30,
1839,
67,
350,
273,
365,
18,
5205,
67,
350,
365,
18,
5205,
67,
350,
273,
599,
309,
1001,
4... |
if self.locked == True: | if self.offline or self.locked: print "Queuing: %s - %s" % (store["artist"], store["title"]) | def submit_song_helper(self): enabled = getattr(self, 'PMEnFlag', False) if enabled and self.disabled: print "Plugin re-enabled - accepting new songs." self.disabled = False if self.submission_tid != -1: gobject.source_remove(self.submission_tid); self.submission_tid = -1 elif not enabled and not self.disabled: #if we've already printed print "Plugin disabled - not accepting any new songs." self.disabled = True if len(self.queue) > 0: self.submission_tid = gobject.timeout_add(120 * 1000, self.submit_song_helper) print "Attempts will continue to submit the last %d songs." % len(self.queue) | 2370bf2e3faa6a570880e6644b18436a90e05433 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/2370bf2e3faa6a570880e6644b18436a90e05433/qlscrobbler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
67,
816,
75,
67,
4759,
12,
2890,
4672,
3696,
273,
3869,
12,
2890,
16,
296,
12728,
664,
4678,
2187,
1083,
13,
309,
3696,
471,
365,
18,
9278,
30,
1172,
315,
3773,
283,
17,
5745,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
67,
816,
75,
67,
4759,
12,
2890,
4672,
3696,
273,
3869,
12,
2890,
16,
296,
12728,
664,
4678,
2187,
1083,
13,
309,
3696,
471,
365,
18,
9278,
30,
1172,
315,
3773,
283,
17,
5745,
... |
self.remove(self.game_board) | self.board_box.remove(self.game_board) | def update(self): """ Update the GUI based on the current state of the game. """ if game.check_update_game_board(): self.remove(self.game_board) self.game_board = GameBoard() self.game_board.set_size(self.get_width(), self.get_height()) self.add(self.game_board) self.game_board.lower_bottom() if game.check_timeout_beep(): logging.debug("****************** BZZZZZT! ******************") tex = cluttergst.VideoTexture() tex.set_filename(config.sound_timeout) tex.set_playing(True) if game.check_flash_player_name(): player_name = game.players[game.buzzed_player].name self.player_buzz_overlay.set_opacity(255) self.player_buzz_overlay.set_text(player_name) self.player_buzz_overlay.animate(clutter.EASE_IN_CUBIC, 1000, 'opacity', 0) if game.check_flash_player_score(): player = game.players[game.buzzed_player] text = '%s\n$%d' % (player.name, player.score) self.player_buzz_overlay.set_opacity(255) self.player_buzz_overlay.set_text(text) self.player_buzz_overlay.animate(clutter.EASE_IN_CUBIC, 1000, 'opacity', 0) if game.check_flash_daily_double(): self.daily_double_overlay.set_opacity(255) tex = cluttergst.VideoTexture() tex.set_filename(config.sound_daily_double) tex.set_playing(True) if game.check_clear_daily_double(): self.daily_double_overlay.animate(clutter.EASE_IN_CUBIC, 1000, 'opacity', 0) | 8ee11e0cc92310df1931380e880ca1b02cf41ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10391/8ee11e0cc92310df1931380e880ca1b02cf41ee9/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
3536,
2315,
326,
10978,
2511,
603,
326,
783,
919,
434,
326,
7920,
18,
3536,
309,
7920,
18,
1893,
67,
2725,
67,
13957,
67,
3752,
13332,
365,
18,
3752,
67,
2147,
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,
1089,
12,
2890,
4672,
3536,
2315,
326,
10978,
2511,
603,
326,
783,
919,
434,
326,
7920,
18,
3536,
309,
7920,
18,
1893,
67,
2725,
67,
13957,
67,
3752,
13332,
365,
18,
3752,
67,
2147,
18... |
self.__conductor = misc.mul([d.conductor() for d in self.decomposition()]) return self.__conductor | return misc.mul([d.conductor() for d in self.decomposition()]) | def conductor(self): """ Computes and returns the conductor of this character. | 9c9051916e82d8e6549f10cbafc69b92d5f2a89f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/9c9051916e82d8e6549f10cbafc69b92d5f2a89f/dirichlet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
356,
1828,
280,
12,
2890,
4672,
3536,
14169,
281,
471,
1135,
326,
356,
1828,
280,
434,
333,
3351,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
356,
1828,
280,
12,
2890,
4672,
3536,
14169,
281,
471,
1135,
326,
356,
1828,
280,
434,
333,
3351,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
sock.close() | finally: serv.close() evt.set() | def run(self): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) global PORT PORT = test_support.bind_port(sock, HOST, PORT) sock.listen(1) conn, client = sock.accept() self.captured = "" while 1: data = conn.recv(10) if '\n' in data: break self.captured = self.captured + data | dd84c30abb9991f454be17968df61db451c62b5d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/dd84c30abb9991f454be17968df61db451c62b5d/test_asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
7313,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
7313,
18,
4424,
27844,
12,
7814,
18,
19815,
67,
25699,
16,
2987... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7313,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
7313,
18,
4424,
27844,
12,
7814,
18,
19815,
67,
25699,
16,
2987... |
'UserSet':False, 'Cli_arg_long':None, 'Cli_arg_short':None, | 'UserSet':True, 'Cli_arg_long':"interferometer", 'Cli_arg_short':"i", | def __init__(self): self.attr = { | 2aeab4d32c1031c6a6ce70b32191fd63e5b6158c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/2aeab4d32c1031c6a6ce70b32191fd63e5b6158c/LSCfileAdd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
1747,
273,
288,
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,... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
1747,
273,
288,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.