rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
yield Partition_class([]) | yield [] | def iterator(self): """ An iterator a list of the partitions of n. | 123bae9f1675cfea61bf2d4b5b0a8dbbeafae83b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/123bae9f1675cfea61bf2d4b5b0a8dbbeafae83b/partition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2775,
12,
2890,
4672,
3536,
1922,
2775,
279,
666,
434,
326,
10060,
434,
290,
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,
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,
2775,
12,
2890,
4672,
3536,
1922,
2775,
279,
666,
434,
326,
10060,
434,
290,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.tmp_file_prefix = os.path.join(simFilesPath, "%s-minimize-pid%d" % (basename, os.getpid())) | timestampString = "" if (self.background): timestamp = datetime.today() timestampString = timestamp.strftime(".%y%m%d%H%M%S") self.tmp_file_prefix = \ os.path.join(simFilesPath, "%s-minimize-pid%d%s" % (basename, os.getpid(), timestampString)) | def set_options_errQ(self): #e maybe split further into several setup methods? #bruce 051115 removed unused 'options' arg """ Set movie alist (from simaspect or entire part); debug-msg if it was already set (and always ignore old value). Figure out and set filenames, including sim executable path. All inputs and outputs are self attrs or globals or other obj attrs... except, return error code if sim executable missing or on other errors detected by subrs. | db577c710d68147b29e19e07c975b40966936f56 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/db577c710d68147b29e19e07c975b40966936f56/runSim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2116,
67,
370,
53,
12,
2890,
4672,
468,
73,
6944,
1416,
9271,
1368,
11392,
3875,
2590,
35,
468,
2848,
3965,
15331,
2499,
3600,
3723,
10197,
296,
2116,
11,
1501,
3536,
1000,
2136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2116,
67,
370,
53,
12,
2890,
4672,
468,
73,
6944,
1416,
9271,
1368,
11392,
3875,
2590,
35,
468,
2848,
3965,
15331,
2499,
3600,
3723,
10197,
296,
2116,
11,
1501,
3536,
1000,
2136... |
color = pattern >> i if (color & 0x0202) != 0: | color = (pattern >> i) & 0x0202 if color != 0: | def draw_object_flipped(self, x, pattern, mask, caller): color = pattern << 1 if (color & 0x0202) != 0: caller.call(x, color, mask) for i in range(0, 7): color = pattern >> i if (color & 0x0202) != 0: caller.call(x + i + 1, color, mask) | 8b5b5f32d0988528f804a029851baab7a760b40e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/8b5b5f32d0988528f804a029851baab7a760b40e/video.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
1612,
67,
12357,
1845,
12,
2890,
16,
619,
16,
1936,
16,
3066,
16,
4894,
4672,
2036,
273,
1936,
2296,
404,
309,
261,
3266,
473,
374,
92,
3103,
3103,
13,
480,
374,
30,
4894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
1612,
67,
12357,
1845,
12,
2890,
16,
619,
16,
1936,
16,
3066,
16,
4894,
4672,
2036,
273,
1936,
2296,
404,
309,
261,
3266,
473,
374,
92,
3103,
3103,
13,
480,
374,
30,
4894,
... |
def _oid_col(self): | def _locate_oid_column(self): | def _oid_col(self): if self.engine is None: return None # OID remains a little hackish so far if not hasattr(self, '_oid_column'): if self.engine.oid_column_name() is not None: self._oid_column = schema.Column(self.engine.oid_column_name(), sqltypes.Integer, hidden=True) self._oid_column._set_parent(self) self._orig_columns()[self._oid_column.original] = self._oid_column else: self._oid_column = None return self._oid_column | 753b7c2d3ebe8753d70ff8ed33dfbcdddb5e5d29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/753b7c2d3ebe8753d70ff8ed33dfbcdddb5e5d29/sql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
25450,
67,
839,
67,
2827,
12,
2890,
4672,
309,
365,
18,
8944,
353,
599,
30,
327,
599,
468,
18026,
22632,
279,
12720,
11769,
1468,
1427,
10247,
309,
486,
3859,
12,
2890,
16,
2070,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25450,
67,
839,
67,
2827,
12,
2890,
4672,
309,
365,
18,
8944,
353,
599,
30,
327,
599,
468,
18026,
22632,
279,
12720,
11769,
1468,
1427,
10247,
309,
486,
3859,
12,
2890,
16,
2070,
... |
i. e. such that j(E) has negative valuation | i.e., such that j(E) has negative valuation | def __init__(self,E,p): """ INPUT: E -- an elliptic curve p -- a prime where E has multiplicative reduction, i. e. such that j(E) has negative valuation | 100c4751d7d02dd3f46744ed6504322763ea6da7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/100c4751d7d02dd3f46744ed6504322763ea6da7/ell_tate_curve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
41,
16,
84,
4672,
3536,
12943,
30,
512,
1493,
392,
415,
549,
21507,
8882,
293,
1493,
279,
17014,
1625,
512,
711,
3309,
28884,
20176,
16,
277,
18,
425,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
41,
16,
84,
4672,
3536,
12943,
30,
512,
1493,
392,
415,
549,
21507,
8882,
293,
1493,
279,
17014,
1625,
512,
711,
3309,
28884,
20176,
16,
277,
18,
425,
18... |
n = arange(1,2*N,2) | n = Num.arange(1,2*N,2) | def cheb2ap(N,rs): """Return (z,p,k) zero, pole, gain for Nth order Chebyshev type II lowpass analog filter prototype with rs decibels of ripple in the stopband. """ de = 1.0/sqrt(10**(0.1*rs)-1) mu = arcsinh(1.0/de)/N if N % 2: m = N - 1 n = Num.concatenate((arange(1,N-1,2),arange(N+2,2*N,2))) else: m = N n = arange(1,2*N,2) z = conjugate(1j / cos(n*pi/(2.0*N))) p = exp(1j*(pi*arange(1,2*N,2)/(2.0*N) + pi/2.0)) p = sinh(mu) * p.real + 1j*cosh(mu)*p.imag p = 1.0 / p k = (MLab.prod(-p)/MLab.prod(-z)).real return z, p, k | 78dbcc11384c4361dd850305b138d97d4c6ff715 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/78dbcc11384c4361dd850305b138d97d4c6ff715/filter_design.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19315,
70,
22,
438,
12,
50,
16,
5453,
4672,
3536,
990,
261,
94,
16,
84,
16,
79,
13,
3634,
16,
25320,
16,
17527,
364,
423,
451,
1353,
22682,
1637,
87,
580,
90,
618,
23076,
4587,
5466,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19315,
70,
22,
438,
12,
50,
16,
5453,
4672,
3536,
990,
261,
94,
16,
84,
16,
79,
13,
3634,
16,
25320,
16,
17527,
364,
423,
451,
1353,
22682,
1637,
87,
580,
90,
618,
23076,
4587,
5466,... |
mc = iformats.ModelConnector(chosen_port) | mc = imodel.ModelConnector(chosen_port) | def connect_action(self, event): | de47abc9e4a970bf3795d020996328aa85b5ed0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3067/de47abc9e4a970bf3795d020996328aa85b5ed0c/totalopenstation-gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
67,
1128,
12,
2890,
16,
871,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
67,
1128,
12,
2890,
16,
871,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
iq.swapAttribs("to", "from") | iq.swapAttributeValues("to", "from") | def onActivateStream(self, iq): sid = hashSID(iq.query["sid"], iq["from"], str(iq.query.activate)) | 26dc22b4b597351de5bae35a9b6ca4059e4c0a95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5317/26dc22b4b597351de5bae35a9b6ca4059e4c0a95/proxy65.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
21370,
1228,
12,
2890,
16,
24288,
4672,
7348,
273,
1651,
30287,
12,
18638,
18,
2271,
9614,
7453,
6,
6487,
24288,
9614,
2080,
6,
6487,
609,
12,
18638,
18,
2271,
18,
10014,
3719,
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,
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,
603,
21370,
1228,
12,
2890,
16,
24288,
4672,
7348,
273,
1651,
30287,
12,
18638,
18,
2271,
9614,
7453,
6,
6487,
24288,
9614,
2080,
6,
6487,
609,
12,
18638,
18,
2271,
18,
10014,
3719,
2,
... |
else: aThread = Thread(dwThreadId, hThread, self) self.__add_thread(aThread) | def __add_created_thread(self, event): dwThreadId = event.get_tid() hThread = event.get_thread_handle() if self.has_thread(dwThreadId): aThread = self.get_thread(dwThreadId) if hThread != win32.INVALID_HANDLE_VALUE: aThread.hThread = hThread # may have more privileges else: aThread = Thread(dwThreadId, hThread, self) self.__add_thread(aThread) | a8072bd0a8ca30e6afda2eaa58d3b1a0f619b43b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/a8072bd0a8ca30e6afda2eaa58d3b1a0f619b43b/system.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
67,
4824,
67,
5930,
12,
2890,
16,
871,
4672,
12394,
3830,
548,
225,
273,
871,
18,
588,
67,
18081,
1435,
366,
3830,
377,
273,
871,
18,
588,
67,
5930,
67,
4110,
1435,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1289,
67,
4824,
67,
5930,
12,
2890,
16,
871,
4672,
12394,
3830,
548,
225,
273,
871,
18,
588,
67,
18081,
1435,
366,
3830,
377,
273,
871,
18,
588,
67,
5930,
67,
4110,
1435,
309,
... | |
document.write("<center><a href='%sindex.html?page=%s'>show framing</a></center>") </script>""" % ( '../' * depth, name ) | document.write("<center><a href='%s%s?page=%s'>show framing</a></center>") </script>""" % ( '../' * depth, self.frontpage, name ) | def add_restoreframing_js(self, name, text): name = re.sub('/+', '/', name) depth = name.count('/') | 3be63c17aa7dbbb09b4bbf0251add8eba8886698 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5198/3be63c17aa7dbbb09b4bbf0251add8eba8886698/CHM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
13991,
74,
1940,
310,
67,
2924,
12,
2890,
16,
508,
16,
977,
4672,
508,
273,
283,
18,
1717,
2668,
19,
15,
2187,
2023,
16,
508,
13,
3598,
273,
508,
18,
1883,
2668,
2473,
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,
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,
527,
67,
13991,
74,
1940,
310,
67,
2924,
12,
2890,
16,
508,
16,
977,
4672,
508,
273,
283,
18,
1717,
2668,
19,
15,
2187,
2023,
16,
508,
13,
3598,
273,
508,
18,
1883,
2668,
2473,
13,
... |
if field.raw_data is None or not field.raw_data or not field.raw_data[0].strip(): | if not field.raw_data or isinstance(field.raw_data[0], basestring) and not field.raw_data[0].strip(): | def __call__(self, form, field): if field.raw_data is None or not field.raw_data or not field.raw_data[0].strip(): field.errors[:] = [] raise StopValidation() | 60126d9d09ad3a727df23ad76131ad15a7a17ad5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8614/60126d9d09ad3a727df23ad76131ad15a7a17ad5/validators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
646,
16,
652,
4672,
309,
486,
652,
18,
1899,
67,
892,
578,
1549,
12,
1518,
18,
1899,
67,
892,
63,
20,
6487,
10699,
13,
471,
486,
652,
18,
1899,
67,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
646,
16,
652,
4672,
309,
486,
652,
18,
1899,
67,
892,
578,
1549,
12,
1518,
18,
1899,
67,
892,
63,
20,
6487,
10699,
13,
471,
486,
652,
18,
1899,
67,
8... |
vbox.pack(filename_textbox, expand=True) | vbox.pack(cellpack.align_bottom(filename_textbox), expand=True) | def pack_main(self, layout): vbox = cellpack.VBox() layout.set_font(1.1, family=widgetset.ITEM_TITLE_FONT, bold=True) layout.set_text_color(self.ITEM_TITLE_COLOR) title = layout.textbox(self.data.name) # FIXME - title should wrap to the next line instead of being # truncated; ben said this might be hard/impossible if not self.show_details: vbox.pack(cellpack.ClippedTextBox(title)) else: main_width = self._calculate_main_width(layout) title.set_width(main_width) vbox.pack(title) | 9ef7eb2c1ce9caf5dc467af911e5ca42155bd398 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/9ef7eb2c1ce9caf5dc467af911e5ca42155bd398/style.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2298,
67,
5254,
12,
2890,
16,
3511,
4672,
331,
2147,
273,
2484,
2920,
18,
58,
3514,
1435,
3511,
18,
542,
67,
5776,
12,
21,
18,
21,
16,
6755,
33,
6587,
542,
18,
12674,
67,
14123,
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,
2298,
67,
5254,
12,
2890,
16,
3511,
4672,
331,
2147,
273,
2484,
2920,
18,
58,
3514,
1435,
3511,
18,
542,
67,
5776,
12,
21,
18,
21,
16,
6755,
33,
6587,
542,
18,
12674,
67,
14123,
67,
... |
self.__prog__ = 'findVetosJob' | def __init__(self, opts,cp, dir='', tag_base="VETOS"): """ """ self.__conditionalLoadDefaults__(findVetosJob.defaults,cp) self.__prog__ = 'findVetosJob' self.__executable = string.strip(cp.get('fu-condor','vetoflags')) self.__universe = string.strip(cp.get('fu-condor','universe')) pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) self.add_condor_cmd('getenv','True') self.setupJob(self.__prog__,tag_base=tag_base, dir=dir) | e7dc96264f8fa6761fca7488785053e6db4d6c14 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/e7dc96264f8fa6761fca7488785053e6db4d6c14/stfu_pipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1500,
16,
4057,
16,
1577,
2218,
2187,
1047,
67,
1969,
1546,
58,
1584,
4618,
6,
4672,
3536,
3536,
365,
16186,
22019,
2563,
7019,
972,
12,
4720,
58,
278,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1500,
16,
4057,
16,
1577,
2218,
2187,
1047,
67,
1969,
1546,
58,
1584,
4618,
6,
4672,
3536,
3536,
365,
16186,
22019,
2563,
7019,
972,
12,
4720,
58,
278,
5... | |
lines = [' LIT>|'+(indent-6)*' '+line for line in childstr.split('\n')] | lines = [' LIT>|'+(indent-5)*' '+line for line in childstr.split('\n')] | def to_debug(tree, indent=4, seclevel=0): """ Given the DOM tree for an epytext string (as returned by C{parse()}), return a string encoding it in plaintext. This function is similar to C{to_epytext()}; however, it prints escaped characters in unescaped form, removes colorizing, etc... """ if isinstance(tree, Text): return tree.data if tree.tagName == 'section': seclevel += 1 children = [to_debug(c, indent+2, seclevel) for c in tree.childNodes] childstr = ''.join(children) if tree.tagName == 'para': lines = [' |'+l for l in wordwrap(childstr, indent-6).split('\n')] return '\n'.join(lines)+'\n' elif tree.tagName == 'li': bulletAttr = tree.getAttributeNode('bullet') if bulletAttr: bullet = bulletAttr.value else: bullet = '-' return ' LI>|'+(indent-6)*' '+ bullet + ' ' + childstr[6:].lstrip() elif tree.tagName == 'heading': uline = len(childstr)*_HEADING_CHARS[seclevel-1] return ('SEC'+`seclevel`+'>|'+(indent-6)*' ' + childstr + '\n' + ' |'+(indent-6)*' ' + uline + '\n') elif tree.tagName == 'doctestblock': lines = ['DTST>|'+(indent-6)*' '+line for line in childstr.split('\n')] return '\n'.join(lines) + '\n' elif tree.tagName == 'literalblock': lines = [' LIT>|'+(indent-6)*' '+line for line in childstr.split('\n')] return '\n'.join(lines) + '\n' elif tree.tagName in ('olist', 'ulist'): return 'LIST>|'+(indent-6)*' '+childstr[indent:] elif tree.tagName == 'field': if (len(tree.childNodes) > 1 and tree.childNodes[1].tagName == 'arg'): return (' FLD>|'+(indent-6)*' '+children[0]+'('+ children[1]+'):\n'+''.join(children[2:])) else: return (' FLD>|'+(indent-6)*' '+children[0]+':\n'+ ''.join(children[1:])) elif tree.tagName in ('fieldlist', 'tag', 'arg', 'epytext', 'section'): return childstr else: # Assume that anything else is colorizing. return '<'+tree.tagName+'>'+childstr+'</'+tree.tagName+'>' | 0cc72bd3422be83752480f57dbecac32d991815f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/0cc72bd3422be83752480f57dbecac32d991815f/epytext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
4148,
12,
3413,
16,
3504,
33,
24,
16,
1428,
2815,
33,
20,
4672,
3536,
16803,
326,
4703,
2151,
364,
392,
425,
2074,
955,
533,
261,
345,
2106,
635,
385,
95,
2670,
17767,
3631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
4148,
12,
3413,
16,
3504,
33,
24,
16,
1428,
2815,
33,
20,
4672,
3536,
16803,
326,
4703,
2151,
364,
392,
425,
2074,
955,
533,
261,
345,
2106,
635,
385,
95,
2670,
17767,
3631,
... |
sys.argv[0] = "/foo/bar/baz.py" parser = OptionParser("usage: %prog ...", version="%prog 1.2") expected_usage = "usage: baz.py ...\n" self.assertUsage(parser, expected_usage) self.assertVersion(parser, "baz.py 1.2") self.assertHelp(parser, expected_usage + "\n" + "options:\n" " --version show program's version number and exit\n" " -h, --help show this help message and exit\n") | save_argv = sys.argv[:] try: sys.argv[0] = "/foo/bar/baz.py" parser = OptionParser("usage: %prog ...", version="%prog 1.2") expected_usage = "usage: baz.py ...\n" self.assertUsage(parser, expected_usage) self.assertVersion(parser, "baz.py 1.2") self.assertHelp(parser, expected_usage + "\n" + "options:\n" " --version show program's version number and exit\n" " -h, --help show this help message and exit\n") finally: sys.argv[:] = save_argv | def test_default_progname(self): # Make sure that program name taken from sys.argv[0] by default. sys.argv[0] = "/foo/bar/baz.py" parser = OptionParser("usage: %prog ...", version="%prog 1.2") expected_usage = "usage: baz.py ...\n" self.assertUsage(parser, expected_usage) self.assertVersion(parser, "baz.py 1.2") self.assertHelp(parser, expected_usage + "\n" + "options:\n" " --version show program's version number and exit\n" " -h, --help show this help message and exit\n") | ffa2f1fce27d3c32978c9c3f9d26562703247989 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ffa2f1fce27d3c32978c9c3f9d26562703247989/test_optparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1886,
67,
14654,
529,
12,
2890,
4672,
468,
4344,
3071,
716,
5402,
508,
9830,
628,
2589,
18,
19485,
63,
20,
65,
635,
805,
18,
2589,
18,
19485,
63,
20,
65,
273,
2206,
11351,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1886,
67,
14654,
529,
12,
2890,
4672,
468,
4344,
3071,
716,
5402,
508,
9830,
628,
2589,
18,
19485,
63,
20,
65,
635,
805,
18,
2589,
18,
19485,
63,
20,
65,
273,
2206,
11351,
... |
relPath = os.path.join(os.pardir, os.pardir, "qooxdoo", "0.8.3") | relPath = os.path.join(os.pardir, os.pardir, "qooxdoo", QOOXDOO_VERSION) | def patchSkeleton(dir, framework_dir, options): absPath = normalizePath(framework_dir) if absPath[-1] == "/": absPath = absPath[:-1] if sys.platform == 'cygwin': if re.match( r'^\.{1,2}\/', dir ): relPath = Path.rel_from_to(normalizePath(dir), framework_dir) elif re.match( r'^/cygdrive\b', dir): relPath = Path.rel_from_to(dir, framework_dir) else: relPath = Path.rel_from_to(normalizePath(dir), normalizePath(framework_dir)) else: relPath = Path.rel_from_to(normalizePath(dir), normalizePath(framework_dir)) relPath = re.sub(r'\\', "/", relPath) if relPath[-1] == "/": relPath = relPath[:-1] if not os.path.isdir(os.path.join(dir, relPath)): console.error("Relative path to qooxdoo directory is not correct: '%s'" % relPath) sys.exit(1) if options.type == "contribution": # TODO: in a final release the following "trunk" would need to be changed # to an actual version number like "0.8.3" relPath = os.path.join(os.pardir, os.pardir, "qooxdoo", "0.8.3") relPath = re.sub(r'\\', "/", relPath) for root, dirs, files in os.walk(dir): for file in files: split = file.split(".") if len(split) >= 3 and split[1] == "tmpl": outFile = os.path.join(root, split[0] + "." + ".".join(split[2:])) inFile = os.path.join(root, file) console.log("Patching file '%s'" % outFile) config = Template(open(inFile).read()) out = open(outFile, "w") out.write( config.substitute({ "Name": options.name, "Namespace": options.namespace, "REL_QOOXDOO_PATH": relPath, "ABS_QOOXDOO_PATH": absPath, "QOOXDOO_VERSION": "0.8.3", "Cache" : options.cache, }).encode('utf-8') ) out.close() os.remove(inFile) for root, dirs, files in os.walk(dir): for file in [file for file in files if file.endswith(".py")]: os.chmod(os.path.join(root, file), (stat.S_IRWXU |stat.S_IRGRP |stat.S_IXGRP |stat.S_IROTH |stat.S_IXOTH)) # 0755 | 51d9797a4d693259e50a811d8833bbe1e76a0df2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/51d9797a4d693259e50a811d8833bbe1e76a0df2/create-application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
28070,
12,
1214,
16,
8257,
67,
1214,
16,
702,
4672,
24939,
273,
20551,
12,
12303,
67,
1214,
13,
309,
24939,
18919,
21,
65,
422,
4016,
30,
24939,
273,
24939,
10531,
17,
21,
65,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
28070,
12,
1214,
16,
8257,
67,
1214,
16,
702,
4672,
24939,
273,
20551,
12,
12303,
67,
1214,
13,
309,
24939,
18919,
21,
65,
422,
4016,
30,
24939,
273,
24939,
10531,
17,
21,
65,
22... |
return self | def __init__(self, parent, parent_pool): """ Create a new pool that is a sub-pool of `parent_pool`, and arrange for `self.close` to be called up when the `parent` object is destroyed. The `parent` object must be weak-referenceable. The returned `Pool` instance will have the value of the newly created pool. """ self.pool = core.svn_pool_create(parent_pool) try: parent._pool_closer = weakref.ref(parent, self.close) except TypeError: self.close() raise return self | 2f7399f274ed5f1874a667d53ce9c76e31e4d8ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/2f7399f274ed5f1874a667d53ce9c76e31e4d8ea/svn_fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
982,
67,
6011,
4672,
3536,
1788,
279,
394,
2845,
716,
353,
279,
720,
17,
6011,
434,
1375,
2938,
67,
6011,
9191,
471,
2454,
726,
364,
1375,
2890,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
982,
67,
6011,
4672,
3536,
1788,
279,
394,
2845,
716,
353,
279,
720,
17,
6011,
434,
1375,
2938,
67,
6011,
9191,
471,
2454,
726,
364,
1375,
2890,... | |
'lstinline[%s]{%s}' % (params, inlinecode), | 'lstinline%s{%s}' % (params, inlinecode), | def revert_listings_inset(document): r''' Revert listings inset to \lstinline or \begin, \end lstlisting, translate | a8e9fe82d0461fa821b3ec70c83fe76f02eafcb0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/a8e9fe82d0461fa821b3ec70c83fe76f02eafcb0/lyx_1_5.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15226,
67,
1098,
899,
67,
267,
542,
12,
5457,
4672,
436,
26418,
868,
1097,
666,
899,
316,
542,
358,
521,
16923,
10047,
578,
521,
10086,
16,
521,
409,
9441,
21228,
16,
4204,
2,
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,
15226,
67,
1098,
899,
67,
267,
542,
12,
5457,
4672,
436,
26418,
868,
1097,
666,
899,
316,
542,
358,
521,
16923,
10047,
578,
521,
10086,
16,
521,
409,
9441,
21228,
16,
4204,
2,
-100,
-1... |
except BaseException, e: | except KeyboardInterrupt, e: result = "EXCEPTION RAISED" l2.debug( "EXCEPTION: %s\n" % e, exc_info=1) raise except Exception, e: | def trace(f, *args, **kw): # default to logger that was passed by module, but # can override by passing logger=foo as function parameter. # make sure this doesnt conflict with one of the parameters # you are expecting l2 = kw.get('logger', log) l2.debug("ENTER: %s(%s, %s)" % (f.func_name, args, kw)) try: result = "Bad exception raised: Exception was not a derived class of 'Exception'" try: result = f(*args, **kw) except BaseException, e: result = "EXCEPTION RAISED" l2.debug( "EXCEPTION: %s\n" % e, exc_info=1) raise finally: l2.debug( "LEAVE %s --> %s\n" % (f.func_name, result)) | 50f0bbbe1f913f1551b6476747cfc4be08321582 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/50f0bbbe1f913f1551b6476747cfc4be08321582/trace_decorator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
12,
74,
16,
380,
1968,
16,
2826,
9987,
4672,
468,
805,
358,
1194,
716,
1703,
2275,
635,
1605,
16,
1496,
468,
848,
3849,
635,
9588,
1194,
33,
11351,
487,
445,
1569,
18,
468,
1221,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
12,
74,
16,
380,
1968,
16,
2826,
9987,
4672,
468,
805,
358,
1194,
716,
1703,
2275,
635,
1605,
16,
1496,
468,
848,
3849,
635,
9588,
1194,
33,
11351,
487,
445,
1569,
18,
468,
1221,... |
entites, count, error = [], 0, True | entities, count, error = [], 0, True | def handle_GET(cls, request, context): entities = Entity.objects.order_by('title', 'id') error = False limit, offset = request.GET.get('limit', 100), request.GET.get('offset', 0) try: limit, offset = int(limit), int(offset) except (ValueError, TypeError): limit, offset = 100, 0 if 'type' in request.GET: entities = entities.filter(entity_type__slug = request.GET['type']) if 'source' in request.GET: entities = entities.filter(entity_type__source = request.GET['source']) if 'near' in request.GET: try: entities = entities.filter(location__isnull=False) entities = entities.distance(point).order_by('distance') point = Point(map(float, request.GET['near'].split(',')), srid=4326).transform(srid=27700, clone=True) | 2f051fad6fab0905a826203ca46b5d6c2d6fa231 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/2f051fad6fab0905a826203ca46b5d6c2d6fa231/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
3264,
12,
6429,
16,
590,
16,
819,
4672,
5140,
273,
3887,
18,
6911,
18,
1019,
67,
1637,
2668,
2649,
2187,
296,
350,
6134,
555,
273,
1083,
225,
1800,
16,
1384,
273,
590,
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,
1640,
67,
3264,
12,
6429,
16,
590,
16,
819,
4672,
5140,
273,
3887,
18,
6911,
18,
1019,
67,
1637,
2668,
2649,
2187,
296,
350,
6134,
555,
273,
1083,
225,
1800,
16,
1384,
273,
590,
18,
... |
adj = gtk.Adjustment(lower=0,upper=255,step_incr=1,page_incr=10) self.r_e = gtk.SpinButton(adj) self.g_e = gtk.SpinButton(adj) self.b_e = gtk.SpinButton(adj) | adj1 = gtk.Adjustment(lower=0,upper=255,step_incr=1,page_incr=10) adj2 = gtk.Adjustment(lower=0,upper=255,step_incr=1,page_incr=10) adj3 = gtk.Adjustment(lower=0,upper=255,step_incr=1,page_incr=10) self.r_e = gtk.SpinButton(adj1) self.g_e = gtk.SpinButton(adj2) self.b_e = gtk.SpinButton(adj3) | def __init__(self): gtk.VBox.__init__(self) self.color = (1,0,0) adj = gtk.Adjustment(lower=0,upper=255,step_incr=1,page_incr=10) self.r_e = gtk.SpinButton(adj) self.g_e = gtk.SpinButton(adj) self.b_e = gtk.SpinButton(adj) self.r_e.connect('focus-out-event', self.calc_color) self.g_e.connect('focus-out-event', self.calc_color) self.b_e.connect('focus-out-event', self.calc_color) hbox = gtk.HBox() hbox.pack_start(gtk.Label(_('R: ')), expand=False) hbox.pack_start(self.r_e, expand=True) self.pack_start(hbox) hbox = gtk.HBox() hbox.pack_start(gtk.Label(_('G: ')), expand=False) hbox.pack_start(self.g_e, expand=True) self.pack_start(hbox) hbox = gtk.HBox() hbox.pack_start(gtk.Label(_('B: ')), expand=False) hbox.pack_start(self.b_e, expand=True) self.pack_start(hbox) | 08d1cd9a9c045cb7c2bb8137147aff4f45427361 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7129/08d1cd9a9c045cb7c2bb8137147aff4f45427361/colorsamplerwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
22718,
18,
58,
3514,
16186,
2738,
972,
12,
2890,
13,
365,
18,
3266,
273,
261,
21,
16,
20,
16,
20,
13,
8307,
21,
273,
22718,
18,
19985,
12,
8167,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22718,
18,
58,
3514,
16186,
2738,
972,
12,
2890,
13,
365,
18,
3266,
273,
261,
21,
16,
20,
16,
20,
13,
8307,
21,
273,
22718,
18,
19985,
12,
8167,
33,
... |
i = find_token(document.body, "display", i) if i == -1: return if check_token(i, "none"): | i = find_token(document.body, "\tdisplay", i) if i == -1: return val = get_value(document.body, 'display', i) if val == "none": | def convert_display_enum(document): " Convert 'display foo' to 'display false/true'" i = 0 while True: i = find_token(document.body, "display", i) if i == -1: return if check_token(i, "none"): document.body[i] = document.body[i].replace('none', 'false') if check_token(i, "default"): document.body[i] = document.body[i].replace('default', 'true') if check_token(i, "monochrome"): document.body[i] = document.body[i].replace('monochrome', 'true') if check_token(i, "grayscale"): document.body[i] = document.body[i].replace('grayscale', 'true') if check_token(i, "color"): document.body[i] = document.body[i].replace('color', 'true') if check_token(i, "preview"): document.body[i] = document.body[i].replace('preview', 'true') | ae760fa72b9d2280ac43d72ac3a9d1638d5775e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/ae760fa72b9d2280ac43d72ac3a9d1638d5775e4/lyx_1_6.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
5417,
67,
7924,
12,
5457,
4672,
315,
4037,
296,
5417,
8431,
11,
358,
296,
5417,
629,
19,
3767,
4970,
277,
273,
374,
1323,
1053,
30,
277,
273,
1104,
67,
2316,
12,
5457,
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,
1765,
67,
5417,
67,
7924,
12,
5457,
4672,
315,
4037,
296,
5417,
8431,
11,
358,
296,
5417,
629,
19,
3767,
4970,
277,
273,
374,
1323,
1053,
30,
277,
273,
1104,
67,
2316,
12,
5457,
18,
... |
funcs = [d for d in self.valdocs if (isinstance(d, RoutineDoc) and not isinstance(self.docindex.container(d), (ClassDoc, types.NoneType)))] | funcs = [d for d in self.routine_list if not isinstance(self.docindex.container(d), (ClassDoc, types.NoneType))] | def write_project_toc(self, out): self.write_header(out, "Everything") out('<h1 class="tocheading">Everything</h1>\n') out('<hr />\n') | 28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
4406,
67,
1391,
12,
2890,
16,
596,
4672,
365,
18,
2626,
67,
3374,
12,
659,
16,
315,
21465,
4274,
7923,
596,
2668,
32,
76,
21,
667,
1546,
869,
343,
684,
310,
6441,
21465,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
4406,
67,
1391,
12,
2890,
16,
596,
4672,
365,
18,
2626,
67,
3374,
12,
659,
16,
315,
21465,
4274,
7923,
596,
2668,
32,
76,
21,
667,
1546,
869,
343,
684,
310,
6441,
21465,
42... |
if len(h.category_urls(c)) > 0: if _has_up2date_dirs(h, c): | if len(h.category_urls(hc.category.name)) > 0: if self._has_up2date_dirs(h, hc.category): | def _trim_hosts(hosts): '''remove hosts who have no public categories or hcurls''' orig_hosts = copy(hosts) i=0 for h in orig_hosts: i=i+1 found=False for c in h.categories: if not c.publiclist: continue if len(h.category_urls(c)) > 0: if _has_up2date_dirs(h, c): found=True break if not found: del hosts[i-1] return hosts | aa10d64835c32a13e295e59df8ee8c318d72da0e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13031/aa10d64835c32a13e295e59df8ee8c318d72da0e/controllers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5290,
67,
11588,
12,
11588,
4672,
9163,
4479,
7206,
10354,
1240,
1158,
1071,
6477,
578,
11684,
10518,
26418,
1647,
67,
11588,
273,
1610,
12,
11588,
13,
277,
33,
20,
364,
366,
316,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5290,
67,
11588,
12,
11588,
4672,
9163,
4479,
7206,
10354,
1240,
1158,
1071,
6477,
578,
11684,
10518,
26418,
1647,
67,
11588,
273,
1610,
12,
11588,
13,
277,
33,
20,
364,
366,
316,
1... |
"""Returns an interpolated SampledLISA object based on the position arrays | """Returns an interpolated SampledLISA object based on the position arrays | def stdSampledLISA(interp=1): | 2848eadedf1e8a14c8ed36a9a6fe90d642d7e992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/2848eadedf1e8a14c8ed36a9a6fe90d642d7e992/lisautils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2044,
55,
14814,
2053,
5233,
12,
24940,
33,
21,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2044,
55,
14814,
2053,
5233,
12,
24940,
33,
21,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
except OSError: pass def test(self): """Test to make sure that was and was not supposed to be created by using the .pth file occurred""" assert site.makepath(self.good_dir_path)[0] in sys.path assert self.imported in sys.modules assert not os.path.exists(self.bad_dir_path) | def cleanup(self): """Make sure that the .pth file is deleted, self.imported is not in sys.modules, and that both self.good_dirname and self.bad_dirname are not existing directories.""" try: os.remove(self.file_path) except OSError: pass try: del sys.modules[self.imported] except KeyError: pass try: os.rmdir(self.good_dir_path) except OSError: pass try: os.rmdir(self.bad_dir_path) except OSError: pass | e235021f403a7f5f981168683032ef931c8a9f92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e235021f403a7f5f981168683032ef931c8a9f92/test_site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6686,
12,
2890,
4672,
3536,
6464,
3071,
716,
326,
263,
2397,
585,
353,
4282,
16,
365,
18,
29266,
353,
486,
316,
2589,
18,
6400,
16,
471,
716,
3937,
365,
18,
19747,
67,
12287,
471,
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,
6686,
12,
2890,
4672,
3536,
6464,
3071,
716,
326,
263,
2397,
585,
353,
4282,
16,
365,
18,
29266,
353,
486,
316,
2589,
18,
6400,
16,
471,
716,
3937,
365,
18,
19747,
67,
12287,
471,
365,... | |
taskId =m.group(1) | def submitJob ( self, job, task=None, requirements=''): """ Need to copy the inputsandbox to WN before submitting a job""" | 42297ce3d840302a03cdaf66bfdb30f9cfbb4181 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/42297ce3d840302a03cdaf66bfdb30f9cfbb4181/SchedulerLsf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
2278,
261,
365,
16,
1719,
16,
1562,
33,
7036,
16,
8433,
2218,
11,
4672,
3536,
12324,
358,
1610,
326,
4540,
9069,
358,
678,
50,
1865,
4879,
1787,
279,
1719,
8395,
2,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
2278,
261,
365,
16,
1719,
16,
1562,
33,
7036,
16,
8433,
2218,
11,
4672,
3536,
12324,
358,
1610,
326,
4540,
9069,
358,
678,
50,
1865,
4879,
1787,
279,
1719,
8395,
2,
-100,
-100,
-... | |
join information_schema.table_constraints pk | join information_schema.table_constraints pk | def get_relations(self, cursor, table_name): source_field_dict = self._name_to_index(cursor, table_name) sql = """ | 672a3bf79aaf9caebe9d1386b47cf42345466cd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/672a3bf79aaf9caebe9d1386b47cf42345466cd3/introspection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15018,
12,
2890,
16,
3347,
16,
1014,
67,
529,
4672,
1084,
67,
1518,
67,
1576,
273,
365,
6315,
529,
67,
869,
67,
1615,
12,
9216,
16,
1014,
67,
529,
13,
225,
1847,
273,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
15018,
12,
2890,
16,
3347,
16,
1014,
67,
529,
4672,
1084,
67,
1518,
67,
1576,
273,
365,
6315,
529,
67,
869,
67,
1615,
12,
9216,
16,
1014,
67,
529,
13,
225,
1847,
273,
3536,
... |
print 'DEBUG: >> Joine %s' % channel | self.log.log('Verbindung','Channel %s betreten' % channel) | def join(self,channel,key=''): '''betritt Channel''' print 'DEBUG: >> Joine %s' % channel self.rawsend('JOIN %s %s' % (channel, key)) | d1895b8c3cae4ec425f2295d072b6123a804a1b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2469/d1895b8c3cae4ec425f2295d072b6123a804a1b9/ircbot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
2890,
16,
4327,
16,
856,
2218,
11,
4672,
9163,
70,
278,
583,
88,
5307,
26418,
365,
18,
1330,
18,
1330,
2668,
3945,
4376,
20651,
17023,
2909,
738,
87,
2701,
1349,
275,
11,
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,
1233,
12,
2890,
16,
4327,
16,
856,
2218,
11,
4672,
9163,
70,
278,
583,
88,
5307,
26418,
365,
18,
1330,
18,
1330,
2668,
3945,
4376,
20651,
17023,
2909,
738,
87,
2701,
1349,
275,
11,
738... |
def delete(self, repo, patches, keep=False): | def delete(self, repo, patches, opts): | def delete(self, repo, patches, keep=False): realpatches = [] for patch in patches: patch = self.lookup(patch, strict=True) info = self.isapplied(patch) if info: raise util.Abort(_("cannot delete applied patch %s") % patch) if patch not in self.series: raise util.Abort(_("patch %s not in series file") % patch) realpatches.append(patch) | 51580bdfb468330b010bd4b9364c4461e97f7604 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/51580bdfb468330b010bd4b9364c4461e97f7604/mq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
3538,
16,
16482,
16,
1500,
4672,
2863,
30278,
273,
5378,
364,
4729,
316,
16482,
30,
4729,
273,
365,
18,
8664,
12,
2272,
16,
5490,
33,
5510,
13,
1123,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
12,
2890,
16,
3538,
16,
16482,
16,
1500,
4672,
2863,
30278,
273,
5378,
364,
4729,
316,
16482,
30,
4729,
273,
365,
18,
8664,
12,
2272,
16,
5490,
33,
5510,
13,
1123,
273,
365,
18,
... |
], id=tableId)] | ], id=str(self.server))] | def render_rows(self, context): tableId = self.allocator.host.replace(".", "_") + "_" + str(self.allocator.port) return [Template.Table(self.allocator.bots.values(), [ Nouvelle.AttributeColumn('nickname', 'nickname'), BotChannelsColumn(), ], id=tableId)] | ef55162408018d84e44ed59d4f844d9bca1a2968 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/ef55162408018d84e44ed59d4f844d9bca1a2968/BotStatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
3870,
12,
2890,
16,
819,
4672,
1014,
548,
273,
365,
18,
9853,
639,
18,
2564,
18,
2079,
2932,
1199,
16,
4192,
7923,
397,
8802,
397,
609,
12,
2890,
18,
9853,
639,
18,
655,
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,
1743,
67,
3870,
12,
2890,
16,
819,
4672,
1014,
548,
273,
365,
18,
9853,
639,
18,
2564,
18,
2079,
2932,
1199,
16,
4192,
7923,
397,
8802,
397,
609,
12,
2890,
18,
9853,
639,
18,
655,
13... |
self.password = wikipedia.input( u'Password for user %s on %s:' % (self.username, self.site), | self.password = pywikibot.input( u'Password for user %(name)s on %(site)s:' % {'name': self.username, 'site': self.site}, | def login(self, api = config.use_api_login, retry = False): if not self.password: # As we don't want the password to appear on the screen, we set # password = True self.password = wikipedia.input( u'Password for user %s on %s:' % (self.username, self.site), password = True) | 608981a1811e769d811dd6211e35a67e7339add5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/608981a1811e769d811dd6211e35a67e7339add5/login.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
1536,
273,
642,
18,
1202,
67,
2425,
67,
5819,
16,
3300,
273,
1083,
4672,
309,
486,
365,
18,
3664,
30,
468,
2970,
732,
2727,
1404,
2545,
326,
2201,
358,
9788,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
16,
1536,
273,
642,
18,
1202,
67,
2425,
67,
5819,
16,
3300,
273,
1083,
4672,
309,
486,
365,
18,
3664,
30,
468,
2970,
732,
2727,
1404,
2545,
326,
2201,
358,
9788,
603,
... |
html=urllib.urlopen('http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.findById&videoId='+REGEX_HTTP_VEOH_SUBID_EXTRACT.sub('\\1',uri[3:])+'&apiKey=54709C40-9415-B95B-A5C3-5802A4E91AF3') | html=urllib2.urlopen('http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.findById&videoId='+REGEX_HTTP_VEOH_SUBID_EXTRACT.sub('\\1',uri[3:])+'&apiKey=54709C40-9415-B95B-A5C3-5802A4E91AF3') | def getURI(self,uri): urllib.urlcleanup() if uri[0:3]=='yt:': # YouTube video, must grab download ticket before continuing. html=urllib.urlopen('http://www.youtube.com/watch?v='+uri[3:]) for i in html: res=REGEX_HTTP_YOUTUBE_TICKET_EXTRACT.search(i) if res: return ['http://www.youtube.com/get_video?video_id='+uri[3:]+'&t='+res.group(3)+'&fmt=18','http://www.youtube.com/get_video?video_id='+uri[3:]+'&t='+res.group(3)] # If there's no match, ffmpeg will error by itself. elif uri[0:3]=='gv:': html=urllib.urlopen('http://video.google.com/videoplay?docid='+uri[3:]) for i in html: res=REGEX_HTTP_GVIDEO_TICKET_EXTRACT.search(i) if res: return [res.group(1)] elif uri[0:3]=='vh:': print uri html=urllib.urlopen('http://www.veoh.com/rest/v2/execute.xml?method=veoh.video.findById&videoId='+REGEX_HTTP_VEOH_SUBID_EXTRACT.sub('\\1',uri[3:])+'&apiKey=54709C40-9415-B95B-A5C3-5802A4E91AF3') # Onoes it's an API key for i in html: res=REGEX_HTTP_VEOH_TICKET_EXTRACT.search(i) if res: return [res.group(1)] elif uri[0:3]=='dm:': html=urllib.urlopen(uri[3:]) for i in html: res=REGEX_HTTP_DAILYMOTION_TICKET_EXTRACT.search(i) if res: urls=urllib.unquote(res.group(3)).split('||') qualitys={} for j in urls: res2=REGEX_HTTP_DAILYMOTION_QUALITY.search(j) if res2: qualitys[j]=int(res2.group(1))*int(res2.group(2)) if len(qualitys): # This is quite ugly but it works keys=qualitys.values() keys.sort() finalurls=[] for j in keys: for l in qualitys.keys(): if qualitys[l]==j: if l.find('@@')!=-1: l=l[0:l.find('@@')] finalurls.append('http://www.dailymotion.com'+l) finalurls.reverse() # From best to worst quality. Note: this doesn't return a new reverse'd, array, it actually modifies the array itself return finalurls return [uri] | 7ad6098b40f1a39c4d76402fede5772f656b7b13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/7ad6098b40f1a39c4d76402fede5772f656b7b13/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21375,
12,
2890,
16,
1650,
4672,
11527,
18,
718,
16732,
1435,
309,
2003,
63,
20,
30,
23,
65,
18920,
93,
88,
2497,
30,
468,
4554,
27195,
6191,
16,
1297,
11086,
4224,
9322,
1865,
29702,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21375,
12,
2890,
16,
1650,
4672,
11527,
18,
718,
16732,
1435,
309,
2003,
63,
20,
30,
23,
65,
18920,
93,
88,
2497,
30,
468,
4554,
27195,
6191,
16,
1297,
11086,
4224,
9322,
1865,
29702,
... |
id = self.next_id | def get_next_id(self): id = self.next_id self.next_id += 1 return id | b05ff0a9e7f655cfa0f1e793ec877c71f81adbdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/b05ff0a9e7f655cfa0f1e793ec877c71f81adbdc/bbc_storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4285,
67,
350,
12,
2890,
4672,
365,
18,
4285,
67,
350,
1011,
404,
327,
612,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4285,
67,
350,
12,
2890,
4672,
365,
18,
4285,
67,
350,
1011,
404,
327,
612,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
print (Y1-Y2).max() | if verbose > 2: print (Y1-Y2).max() | def test_cdist_wminkowski_random_p4d6(self): "Tests cdist(X, 'wminkowski') on random data. (p=4.6)" eps = 1e-07 # Get the data: the input matrix and the right output. X1 = eo['cdist-X1'] X2 = eo['cdist-X2'] w = 1.0 / X1.std(axis=0) Y1 = cdist(X1, X2, 'wminkowski', p=4.6, w=w) Y2 = cdist(X1, X2, 'test_wminkowski', p=4.6, w=w) print (Y1-Y2).max() self.failUnless(within_tol(Y1, Y2, eps)) | 26b28dfbac8c0063b8d0b60b1a684c993c8fcf43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5882/26b28dfbac8c0063b8d0b60b1a684c993c8fcf43/test_distance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4315,
376,
67,
91,
81,
754,
543,
7771,
77,
67,
9188,
67,
84,
24,
72,
26,
12,
2890,
4672,
315,
14650,
276,
4413,
12,
60,
16,
296,
91,
81,
754,
543,
7771,
77,
6134,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4315,
376,
67,
91,
81,
754,
543,
7771,
77,
67,
9188,
67,
84,
24,
72,
26,
12,
2890,
4672,
315,
14650,
276,
4413,
12,
60,
16,
296,
91,
81,
754,
543,
7771,
77,
6134,
603,
... |
for tag in tags: | for tag in program.prefix_mode(*tags): | def blobs(program, *tags): """Usage: [-i] tag ... List all blobs reachable from tag[s]. """ ignore_missing = program.options.ignore_missing for tag in tags: for replicas in program.ddfs.blobs(tag, ignore_missing=ignore_missing): print '\t'.join(replicas) | e6aa9de2684f069606c67a8e46032ef03085c1b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/373/e6aa9de2684f069606c67a8e46032ef03085c1b3/ddfscli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21542,
12,
12890,
16,
380,
4156,
4672,
3536,
5357,
30,
23059,
77,
65,
1047,
1372,
225,
987,
777,
21542,
19234,
628,
1047,
63,
87,
8009,
3536,
2305,
67,
7337,
273,
5402,
18,
2116,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21542,
12,
12890,
16,
380,
4156,
4672,
3536,
5357,
30,
23059,
77,
65,
1047,
1372,
225,
987,
777,
21542,
19234,
628,
1047,
63,
87,
8009,
3536,
2305,
67,
7337,
273,
5402,
18,
2116,
18,
6... |
@in_foreign_locale def _run_in_foreign_locale(self, func, fail=False): np.testing.dec.knownfailureif(fail)(func)(self) | def test_tofile_format(self): x = np.array([1.51, 2, 3.51, 4], dtype=float) f = open(self.filename, 'w') x.tofile(f, sep=',', format='%.2f') f.close() f = open(self.filename, 'r') s = f.read() f.close() assert_equal(s, '1.51,2.00,3.51,4.00') | 948b64926eba319664e26e934d824a192dfe5684 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/948b64926eba319664e26e934d824a192dfe5684/test_multiarray.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
869,
768,
67,
2139,
12,
2890,
4672,
619,
273,
1130,
18,
1126,
3816,
21,
18,
10593,
16,
576,
16,
890,
18,
10593,
16,
1059,
6487,
3182,
33,
5659,
13,
284,
273,
1696,
12,
2890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
869,
768,
67,
2139,
12,
2890,
4672,
619,
273,
1130,
18,
1126,
3816,
21,
18,
10593,
16,
576,
16,
890,
18,
10593,
16,
1059,
6487,
3182,
33,
5659,
13,
284,
273,
1696,
12,
2890... | |
eval(z, globals, locals) | eval(z, globals) | def eval(self, x, globals={}, locals={}): x = x.strip() y = x.split('\n') if len(y) == 0: return '' s = '\n'.join(y[:-1]) + '\n' t = y[-1] try: z = compile(t + '\n', '', 'single') except SyntaxError: s += '\n' + t z = None #else: # s += '\n' + t eval(compile(s, '', 'exec'), globals, locals) if not z is None: eval(z, globals, locals) return '' | b156331973bc6603342cfc74395c348771584eba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b156331973bc6603342cfc74395c348771584eba/python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
619,
16,
10941,
28793,
8985,
12938,
4672,
619,
273,
619,
18,
6406,
1435,
677,
273,
619,
18,
4939,
2668,
64,
82,
6134,
309,
562,
12,
93,
13,
422,
374,
30,
327,
875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
12,
2890,
16,
619,
16,
10941,
28793,
8985,
12938,
4672,
619,
273,
619,
18,
6406,
1435,
677,
273,
619,
18,
4939,
2668,
64,
82,
6134,
309,
562,
12,
93,
13,
422,
374,
30,
327,
875... |
p.feed("<hTml>") | def _test(): p = HtmlPrinter() p.feed("<hTml>") p.feed("<a href>") p.feed("<a href=''>") p.feed('<a href="">') p.feed("<a href='a'>") p.feed('<a href="a">') p.feed("<a href=a>") p.feed("<a href='\"'>") p.feed("<a href=\"'\">") p.feed("<a href=' '>") p.feed("<a href=a href=b>") p.feed("<a/>") p.feed("<a href/>") p.feed("<a href=a />") p.feed("</a>") p.feed("<?bla foo?>") p.feed("<?bla?>") p.feed("<!-- - comment -->") p.feed("<!---->") p.feed("<!DOCTYPE \"vla foo>") p.flush() | 565cd78c4edea6916e60976b5fa0570f88e50d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/565cd78c4edea6916e60976b5fa0570f88e50d95/htmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
293,
273,
5430,
12149,
1435,
225,
293,
18,
7848,
2932,
32,
69,
3897,
2984,
13,
293,
18,
7848,
2932,
32,
69,
3897,
2218,
28533,
13,
293,
18,
7848,
2668,
32,
69,
3897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
293,
273,
5430,
12149,
1435,
225,
293,
18,
7848,
2932,
32,
69,
3897,
2984,
13,
293,
18,
7848,
2932,
32,
69,
3897,
2218,
28533,
13,
293,
18,
7848,
2668,
32,
69,
3897,
... | |
if self._options.indirect: return self.GetAnalyzeResultsIndirect() | def Analyze(self, check_sanity=False): if self._options.indirect: return self.GetAnalyzeResultsIndirect() filenames = glob.glob(self.TMP_DIR + "/tsan.*") use_gdb = common.IsMac() analyzer = tsan_analyze.TsanAnalyze(self._source_dir, filenames, use_gdb=use_gdb) ret = analyzer.Report(check_sanity) if ret != 0: logging.info("Please see http://dev.chromium.org/developers/how-tos/" "using-valgrind/threadsanitizer for the info on " "ThreadSanitizer") return ret | d889d58ad749f0c07c6b9646986202071639fd5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/d889d58ad749f0c07c6b9646986202071639fd5f/valgrind_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1922,
9508,
12,
2890,
16,
866,
67,
87,
10417,
33,
8381,
4672,
9066,
273,
4715,
18,
10581,
12,
2890,
18,
28259,
67,
4537,
397,
2206,
3428,
304,
4509,
7923,
999,
67,
75,
1966,
273,
2975,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1922,
9508,
12,
2890,
16,
866,
67,
87,
10417,
33,
8381,
4672,
9066,
273,
4715,
18,
10581,
12,
2890,
18,
28259,
67,
4537,
397,
2206,
3428,
304,
4509,
7923,
999,
67,
75,
1966,
273,
2975,... | |
thread = ClonableCoroutine(self.space) new_cspace = W_CSpace(self.space) thread._cspace = new_cspace | def w_clone(self): if not we_are_translated(): # build fresh cspace & distributor thread thread = ClonableCoroutine(self.space) new_cspace = W_CSpace(self.space) thread._cspace = new_cspace # new distributor instance old_dist = self.distributor new_dist = old_dist.__class__(self.space, old_dist._fanout) new_dist._cspace = new_cspace new_cspace.distributor = new_dist # copy the store for var in self._store.values(): new_cspace.register_var(var.copy(self.space)) # new distributor thunk & thread f = Function(self.space, app_fresh_distributor._code, self.space.newdict()) thunk = CSpaceThunk(self.space, f, argument.Arguments(self.space, [new_dist]), thread) thread.bind(thunk) sched.uler.add_new_thread(thread) # rebuild propagators new_cspace._last_choice = self._last_choice new_cspace._solution = newvar(self.space) # copy solution variables self.space.unify(new_cspace._solution, self.space.newlist([var.copy(self.space) for var in self._store.values()])) # constraints for const in self._constraints: ccopy = const.copy() new_cspace.tell(ccopy) new_cspace.wait_stable() return new_cspace else: # the theory is that # a) we create a (clonable) container thread for any 'newspace' # b) at clone-time, we clone that container, hoping that # indeed everything will come with it everything = self._container.w_clone() new_cspace = everything.cspace sched.uler.add_new_thread(everything) sched.uler.add_to_blocked_on(cspace._finished, everything) # however, we need to keep track of all threads created # from 'within' the space (propagators, or even app-level threads) # -> cspaces as thread groups return everything.cspace | 45f90a4163f6b117994a07cb425b6e3d123359a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/45f90a4163f6b117994a07cb425b6e3d123359a1/space.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
67,
14056,
12,
2890,
4672,
309,
486,
732,
67,
834,
67,
22899,
13332,
468,
1361,
12186,
2873,
909,
473,
1015,
19293,
2650,
565,
468,
394,
1015,
19293,
791,
1592,
67,
4413,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
67,
14056,
12,
2890,
4672,
309,
486,
732,
67,
834,
67,
22899,
13332,
468,
1361,
12186,
2873,
909,
473,
1015,
19293,
2650,
565,
468,
394,
1015,
19293,
791,
1592,
67,
4413,
273,
365,
... | |
raise error, 'don\'t know what to do with indexsubitem ' + `idxsi` | command = 'defcv' cat_class = 'exception' | def do_excdesc(length, buf, pp, i): startpoint = i-1 ch = pp[startpoint] wh = ch.where length, newi = getnextarg(length, buf, pp, i) excname = chunk(GROUP, wh, pp[i:newi]) del pp[i:newi] length = length - (newi-i) idxsi = hist.indexsubitem # words command = '' cat_class = '' class_class = '' if len(idxsi) == 2 and idxsi[1] == 'exception': command = 'defvr' cat_class = string.join(idxsi) elif len(idxsi) == 3 and idxsi[:2] == ['in', 'module']: command = 'defcv' cat_class = 'exception' class_class = string.join(idxsi[1:]) elif len(idxsi) == 4 and idxsi[:3] == ['exception', 'in', 'module']: command = 'defcv' cat_class = 'exception' class_class = string.join(idxsi[2:]) elif idxsi == ['built-in', 'exception', 'base', 'class']: command = 'defvr' cat_class = 'exception base class' else: raise error, 'don\'t know what to do with indexsubitem ' + `idxsi` ch.chtype = chunk_type[CSLINE] ch.data = command cslinearg = [chunk(GROUP, wh, [chunk(PLAIN, wh, cat_class)])] cslinearg.append(chunk(PLAIN, wh, ' ')) if class_class: cslinearg.append(chunk(GROUP, wh, [chunk(PLAIN, wh, class_class)])) cslinearg.append(chunk(PLAIN, wh, ' ')) cslinearg.append(excname) pp.insert(i, chunk(GROUP, wh, cslinearg)) i, length = i+1, length+1 hist.command = command return length, i | 4f6d6e487c786d1591c0e26e671322e470bdd244 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/4f6d6e487c786d1591c0e26e671322e470bdd244/partparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
338,
4315,
742,
12,
2469,
16,
1681,
16,
8228,
16,
277,
4672,
787,
1153,
273,
277,
17,
21,
462,
273,
8228,
63,
1937,
1153,
65,
600,
273,
462,
18,
6051,
769,
16,
394,
77,
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,
741,
67,
338,
4315,
742,
12,
2469,
16,
1681,
16,
8228,
16,
277,
4672,
787,
1153,
273,
277,
17,
21,
462,
273,
8228,
63,
1937,
1153,
65,
600,
273,
462,
18,
6051,
769,
16,
394,
77,
27... |
c = to_mpl_color(options['rgbcolor']) | from matplotlib.colors import rgb2hex c = rgb2hex(to_mpl_color(options['rgbcolor'])) | def _render_on_subplot(self,subplot): options = self.options() c = to_mpl_color(options['rgbcolor']) a = float(options['alpha']) s = int(options['pointsize']) faceted = options['faceted'] #faceted=True colors the edge of point scatteroptions={} if not faceted: scatteroptions['edgecolors'] = 'none' subplot.scatter(self.xdata, self.ydata, s=s, c=c, alpha=a, **scatteroptions) | 00c40862c91cac90bbe8d8fcb5f55bfea87dd47a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/00c40862c91cac90bbe8d8fcb5f55bfea87dd47a/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
265,
67,
24523,
12,
2890,
16,
24523,
4672,
702,
273,
365,
18,
2116,
1435,
4202,
628,
13892,
18,
9724,
1930,
6917,
22,
7118,
276,
273,
6917,
22,
7118,
12,
869,
67,
10514,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5902,
67,
265,
67,
24523,
12,
2890,
16,
24523,
4672,
702,
273,
365,
18,
2116,
1435,
4202,
628,
13892,
18,
9724,
1930,
6917,
22,
7118,
276,
273,
6917,
22,
7118,
12,
869,
67,
10514,... |
replaced = (str.replace('/','_').replace('\\','_').replace('?','_').replace(':','_'). replace('|','_').replace('*','_').replace('<','_').replace('>','_').replace('"','')) return str(replaced[:200].decode('ascii', 'ignore')) | unsafe_file = unsafe_file.decode('ascii', 'ignore') safe_file = re.sub(unsafe_filechars, "_", unsafe_file) return str(safe_file[:200]) | def safeFilename(self, str): ''' remove characters illegal in some systems and trim the string to a reasonable length ''' replaced = (str.replace('/','_').replace('\\','_').replace('?','_').replace(':','_'). replace('|','_').replace('*','_').replace('<','_').replace('>','_').replace('"','')) return str(replaced[:200].decode('ascii', 'ignore')) | 43f90d999a541ba9e3e8af0836b522510d7d62fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3762/43f90d999a541ba9e3e8af0836b522510d7d62fe/libsoat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4183,
5359,
12,
2890,
16,
609,
4672,
9163,
1206,
3949,
16720,
316,
2690,
14908,
471,
2209,
326,
533,
358,
279,
23589,
769,
9163,
8089,
273,
261,
701,
18,
2079,
2668,
19,
17023,
4623,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4183,
5359,
12,
2890,
16,
609,
4672,
9163,
1206,
3949,
16720,
316,
2690,
14908,
471,
2209,
326,
533,
358,
279,
23589,
769,
9163,
8089,
273,
261,
701,
18,
2079,
2668,
19,
17023,
4623,
293... |
QMessageBox.critical(None, 'Error!', 'Error loading template file ' + unicode(filename), 'OK') | QMessageBox.critical(None, 'Error!', \ "Error loading template file " + unicode(filename) \ + "\r\n\r\nPlease share this template file and your " \ + "Spellcraft.exe.log error report with the authors at " \ + "http://sourceforge.net/projects/kscraft", 'OK') | def openFile(self, *args): if self.modified: ret = QMessageBox.warning(self, 'Save Changes?', "This template has been changed.\n" "Do you want to save these changes?", QMessageBox.Yes, QMessageBox.No, QMessageBox.Cancel) if ret == QMessageBox.Cancel: return if ret == QMessageBox.Yes: self.saveFile() if self.modified: return if len(args) == 0: filename = QFileDialog.getOpenFileName(self, "Open Template", self.TemplatePath, "Templates (*.xml);;All Files (*.*)") else: filename = args[0] filename = unicode(filename) if filename is not None and filename != '': f = None try: f = open(filename, 'r') docstr = f.read() if docstr[0:5] == '<?xml': xmldoc = parseString(docstr) template = xmldoc.getElementsByTagName('SCTemplate') self.loadFromXML(template[0]) else: QMessageBox.critical(None, 'Error!', 'Unrecognized Template Type', 'OK') f.close() return except: traceback.print_exc() QMessageBox.critical(None, 'Error!', 'Error loading template file ' + unicode(filename), 'OK') if f is not None: f.close() return self.filename = os.path.abspath(filename) self.updateRecentFiles(self.filename) self.TemplatePath = os.path.dirname(self.filename) filetitle = os.path.basename(self.filename) self.setWindowTitle(filetitle +" - Kort's Spellcrafting Calculator") | d280253f621b6d1e91ce22b55f8a34f03dec1dd7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6671/d280253f621b6d1e91ce22b55f8a34f03dec1dd7/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31622,
12,
2890,
16,
380,
1968,
4672,
309,
365,
18,
7342,
30,
325,
273,
30728,
18,
8551,
12,
2890,
16,
296,
4755,
17776,
35,
2187,
315,
2503,
1542,
711,
2118,
3550,
8403,
82,
6,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31622,
12,
2890,
16,
380,
1968,
4672,
309,
365,
18,
7342,
30,
325,
273,
30728,
18,
8551,
12,
2890,
16,
296,
4755,
17776,
35,
2187,
315,
2503,
1542,
711,
2118,
3550,
8403,
82,
6,
315,
... |
self.loop_consts = regalloc.loop_consts | def __init__(self, assembler, tree, translate_support_code=False, regalloc=None, guard_op=None): # variables that have place in register self.assembler = assembler self.translate_support_code = translate_support_code if regalloc is None: self.reg_bindings = newcheckdict() self.stack_bindings = newcheckdict() # compute longevity of variables self._compute_vars_longevity(tree.inputargs, tree.operations) self.free_regs = REGS[:] self.dirty_stack = {} jump = tree.operations[-1] #self.startmp = mp #if guard_op: # loop_consts, sd = self._start_from_guard_op(guard_op, mp, jump) #else: loop_consts, sd = self._compute_loop_consts(tree.inputargs, jump) self.loop_consts = loop_consts self.current_stack_depth = sd else: inp = guard_op.inputargs self.reg_bindings = {} self.stack_bindings = {} self.dirty_stack = {} for arg in inp: if arg in regalloc.reg_bindings: self.reg_bindings[arg] = regalloc.reg_bindings[arg] if arg in regalloc.stack_bindings: self.stack_bindings[arg] = regalloc.stack_bindings[arg] if arg in regalloc.dirty_stack: self.dirty_stack[arg] = regalloc.dirty_stack[arg] allocated_regs = self.reg_bindings.values() self.free_regs = [v for v in REGS if v not in allocated_regs] self.loop_consts = regalloc.loop_consts # should never change self.current_stack_depth = regalloc.current_stack_depth self.longevity = guard_op.longevity jump_or_fail = guard_op.suboperations[-1] if jump_or_fail.opnum == rop.FAIL: self.jump_reg_candidates = {} else: self._create_jump_reg_candidates(jump_or_fail.jump_target) | 43943e378edbb2d7cacbcf34108f55157bd1a928 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/43943e378edbb2d7cacbcf34108f55157bd1a928/regalloc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
20489,
749,
16,
2151,
16,
4204,
67,
13261,
67,
710,
33,
8381,
16,
960,
9853,
33,
7036,
16,
11026,
67,
556,
33,
7036,
4672,
468,
3152,
716,
1240,
3166,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20489,
749,
16,
2151,
16,
4204,
67,
13261,
67,
710,
33,
8381,
16,
960,
9853,
33,
7036,
16,
11026,
67,
556,
33,
7036,
4672,
468,
3152,
716,
1240,
3166,
... | |
@see: getAttributeValue | @see: L{getAttributeValue} | def getAttributeValue_fragmented(self, obj_id, attr, allAsBinary = False): """ Same as L{getAttributeValue} except that when some attribute is sensitive or unknown an empty value (None) is retruned. Note: this is achived getting attributes one by one. @see: getAttributeValue """ # some attributes does not exists or is sensitive # but we don't know which ones. So try one by one valTemplate = PyKCS11.LowLevel.ckattrlist(1) res = [] for x in xrange(len(attr)): valTemplate[0].Reset() valTemplate[0].SetType(attr[x]) # first call to get the attribute size and reserve the memory rv = self.lib.C_GetAttributeValue(self.session, obj_id, valTemplate) if rv == CKR_ATTRIBUTE_TYPE_INVALID \ or rv == CKR_ATTRIBUTE_SENSITIVE: # append an empty value res.append(None) continue | 2fcad4b0bf8377d18d6bd13bd94a33bf62cc9ba0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6899/2fcad4b0bf8377d18d6bd13bd94a33bf62cc9ba0/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22777,
67,
11956,
329,
12,
2890,
16,
1081,
67,
350,
16,
1604,
16,
777,
1463,
5905,
273,
1083,
4672,
3536,
17795,
487,
511,
95,
588,
14942,
97,
1335,
716,
1347,
2690,
1566,
353,
16692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22777,
67,
11956,
329,
12,
2890,
16,
1081,
67,
350,
16,
1604,
16,
777,
1463,
5905,
273,
1083,
4672,
3536,
17795,
487,
511,
95,
588,
14942,
97,
1335,
716,
1347,
2690,
1566,
353,
16692,
... |
elif type(obj) in (types.ListType, types.TupleType): lst = [ ] if len(pathname) > 0: lastitem = pathname[-1] pathname = pathname[:-1] else: lastitem = "" for i in range(len(obj)): x = obj[i] if not self.exclude(i, x): y = pathname + [ lastitem + ("[%d]" % i) ] lst.append((i, x, y)) for i, v, pn in lst: if self.showThis(i, v): self.handleLeaf(v, depth+1, pn) for i, v, pn in lst: self.descend(v, depth+1, pn) def objectBrowse(obj, maxdepth=5, exclude=None): | def objectBrowse(obj, maxdepth=5, exclude=None, outf=sys.stderr): | def descend(self, obj, depth=0, pathname=[ ]): if obj in self.already: return self.already.append(obj) if depth == 0: self.handleLeaf(obj, depth, pathname) if depth >= self.maxdepth: return if (hasattr(obj, "__class__") or type(obj) in (types.InstanceType, types.ClassType, types.ModuleType, types.FunctionType)): ckeys = [ ] if True: # Look at instance variables, ignore class variables and methods if hasattr(obj, "__class__"): ckeys = self.getAttributes(obj.__class__) else: # Look at all variables and methods ckeys = ( ) keys = filter(lambda x: x not in ckeys, self.getAttributes(obj)) lst = [ ] for k in keys: x = getattr(obj, k) if not self.exclude(k, x): lst.append((k, x, pathname + [ k ])) for k, v, pn in lst: if self.showThis(k, v): self.handleLeaf(v, depth+1, pn) for k, v, pn in lst: self.descend(v, depth+1, pn) elif type(obj) in (types.ListType, types.TupleType): lst = [ ] if len(pathname) > 0: lastitem = pathname[-1] pathname = pathname[:-1] else: lastitem = "" for i in range(len(obj)): x = obj[i] if not self.exclude(i, x): y = pathname + [ lastitem + ("[%d]" % i) ] lst.append((i, x, y)) for i, v, pn in lst: if self.showThis(i, v): self.handleLeaf(v, depth+1, pn) for i, v, pn in lst: self.descend(v, depth+1, pn) | 60810ced4e7a52414958e94dc708323feb00a556 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/60810ced4e7a52414958e94dc708323feb00a556/debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10653,
12,
2890,
16,
1081,
16,
3598,
33,
20,
16,
9806,
22850,
308,
4672,
309,
1081,
316,
365,
18,
17583,
30,
327,
365,
18,
17583,
18,
6923,
12,
2603,
13,
309,
3598,
422,
374,
30,
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,
10653,
12,
2890,
16,
1081,
16,
3598,
33,
20,
16,
9806,
22850,
308,
4672,
309,
1081,
316,
365,
18,
17583,
30,
327,
365,
18,
17583,
18,
6923,
12,
2603,
13,
309,
3598,
422,
374,
30,
365... |
self.stop != other.stop or \ self.channel != other.channel | self.stop != other.stop | def __cmp__(self, other): """ compare function, return 0 if the objects are identical, 1 otherwise """ if not isinstance(other, (ProgramItem, kaa.epg.Program)): return 1 | 40fb3b379a7133a220fe8ddcb3c62d5a27c6b75d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11399/40fb3b379a7133a220fe8ddcb3c62d5a27c6b75d/program.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
3536,
3400,
445,
16,
327,
374,
309,
326,
2184,
854,
12529,
16,
404,
3541,
3536,
309,
486,
1549,
12,
3011,
16,
261,
9459,
1180,
16,
417,
7598,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
3536,
3400,
445,
16,
327,
374,
309,
326,
2184,
854,
12529,
16,
404,
3541,
3536,
309,
486,
1549,
12,
3011,
16,
261,
9459,
1180,
16,
417,
7598,... |
self.make_archive(os.path.join(self.dist_dir, archive_basename), self.format, root_dir=self.bdist_dir) | pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) if not self.relative: archive_root = self.bdist_dir else: if (self.distribution.has_ext_modules() and (install.install_base != install.install_platbase)): raise DistutilsPlatformError, \ ("can't make a dumb built distribution where " "base and platbase are different (%s, %s)" % (repr(install.install_base), repr(install.install_platbase))) else: archive_root = os.path.join(self.bdist_dir, ensure_relative(install.install_base)) self.make_archive(pseudoinstall_root, self.format, root_dir=archive_root) | def run (self): | 907684388e7725cdde587a53061abd2b263d5600 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/907684388e7725cdde587a53061abd2b263d5600/bdist_dumb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
putmask(x,isnan(x),-inf) | Numeric.putmask(x,isnan(x),-inf) | def nanargmax(x,axis=-1): """Find the maximum over the given axis ignoring nans. """ x = asarray(x).copy() putmask(x,isnan(x),-inf) return argmax(x,axis) | 6957b1997a4bf1c1019dfb8543e350e405a6b9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/6957b1997a4bf1c1019dfb8543e350e405a6b9b4/function_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6468,
3175,
1896,
12,
92,
16,
4890,
29711,
21,
4672,
3536,
3125,
326,
4207,
1879,
326,
864,
2654,
14398,
290,
634,
18,
3536,
619,
273,
10455,
12,
92,
2934,
3530,
1435,
16980,
18,
458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6468,
3175,
1896,
12,
92,
16,
4890,
29711,
21,
4672,
3536,
3125,
326,
4207,
1879,
326,
864,
2654,
14398,
290,
634,
18,
3536,
619,
273,
10455,
12,
92,
2934,
3530,
1435,
16980,
18,
458,
... |
html.DD[wiki_to_html(description, self.env, req)]) | html.DD[description]) | def get_macro_descr(): for macro_provider in wiki.macro_providers: for macro_name in macro_provider.get_macros(): if content and macro_name != content: continue descr = macro_provider.get_macro_description(macro_name) yield (macro_name, descr or '') | 3d2807f23ca7d22e27e3f04574a60c31be7d49a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3d2807f23ca7d22e27e3f04574a60c31be7d49a4/macros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26448,
67,
28313,
13332,
364,
11522,
67,
6778,
316,
9050,
18,
26448,
67,
17520,
30,
364,
11522,
67,
529,
316,
11522,
67,
6778,
18,
588,
67,
5821,
6973,
13332,
309,
913,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26448,
67,
28313,
13332,
364,
11522,
67,
6778,
316,
9050,
18,
26448,
67,
17520,
30,
364,
11522,
67,
529,
316,
11522,
67,
6778,
18,
588,
67,
5821,
6973,
13332,
309,
913,
471,
1... |
new_content = new_node.get_content().read() | if new_node: new_content = new_node.get_content().read() new_node_info = (new_node.path, new_node.rev) | def render_diff(self, req, repos, chgset, diff_options): """Raw Unified Diff version""" req.send_response(200) req.send_header('Content-Type', 'text/plain;charset=utf-8') req.send_header('Content-Disposition', 'filename=Changeset%s.diff' % req.args.get('rev')) req.end_headers() | 398635c4cfc9e6edb00c3397a70ab8f227d434aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/398635c4cfc9e6edb00c3397a70ab8f227d434aa/Changeset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
5413,
12,
2890,
16,
1111,
16,
13686,
16,
462,
75,
542,
16,
3122,
67,
2116,
4672,
3536,
4809,
1351,
939,
13008,
1177,
8395,
1111,
18,
4661,
67,
2740,
12,
6976,
13,
1111,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
5413,
12,
2890,
16,
1111,
16,
13686,
16,
462,
75,
542,
16,
3122,
67,
2116,
4672,
3536,
4809,
1351,
939,
13008,
1177,
8395,
1111,
18,
4661,
67,
2740,
12,
6976,
13,
1111,
18,
... |
[(0 : 0 : 1), (1 : 0 : 1), (2 : 0 : 1), (0 : 2 : 1), (1 : 2 : 1), (2 : 2 : 1), (0 : 1 : 0)] | [(0 : 0 : 1), (0 : 1 : 0), (0 : 2 : 1), (1 : 0 : 1), (1 : 2 : 1), (2 : 0 : 1), (2 : 2 : 1)] | def rational_points(self, F=None, bound=0): """ EXAMPLES: One can enumerate points up to a given bound on a projective scheme over the rationals. :: sage: E = EllipticCurve('37a') sage: E.rational_points(bound=8) [(0 : 0 : 1), (1 : 0 : 1), (-1 : 0 : 1), (0 : -1 : 1), (1 : -1 : 1), (-1 : -1 : 1), (2 : 2 : 1), (2 : -3 : 1), (1/4 : -3/8 : 1), (1/4 : -5/8 : 1), (0 : 1 : 0)] For a small finite field, the complete set of points can be enumerated. :: sage: Etilde = E.base_extend(GF(3)) sage: Etilde.rational_points() [(0 : 0 : 1), (1 : 0 : 1), (2 : 0 : 1), (0 : 2 : 1), (1 : 2 : 1), (2 : 2 : 1), (0 : 1 : 0)] The class of hyperelliptic curves does not (yet) support desingularization of the places at infinity into two points. :: sage: FF = FiniteField(7) sage: P.<x> = PolynomialRing(FiniteField(7)) sage: C = HyperellipticCurve(x^8+x+1) sage: C.rational_points() [(2 : 0 : 1), (4 : 0 : 1), (0 : 1 : 1), (6 : 1 : 1), (0 : 6 : 1), (6 : 6 : 1), (0 : 1 : 0)] TODO: 1. The above algorithms enumerate all projective points and test whether they lie on the scheme; Implement a more naive sieve at least for covers of the projective line. 2. Implement Stoll's model in weighted projective space to resolve singularities and find two points (1 : 1 : 0) and (-1 : 1 : 0) at infinity. """ if F == None: F = self.base_ring() X = self(F) if is_RationalField(F) or F == ZZ: if not bound > 0: raise TypeError, "A positive bound (= %s) must be specified."%bound try: return X.points(bound) except TypeError: raise TypeError, "Unable to enumerate points over %s."%F try: return X.points() except TypeError: raise TypeError, "Unable to enumerate points over %s."%F | f153ecf0cd0c852821dc4244bcfd825b943c6a52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f153ecf0cd0c852821dc4244bcfd825b943c6a52/algebraic_scheme.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
8371,
67,
4139,
12,
2890,
16,
478,
33,
7036,
16,
2489,
33,
20,
4672,
3536,
5675,
8900,
11386,
30,
225,
6942,
848,
4241,
3143,
731,
358,
279,
864,
2489,
603,
279,
1984,
688,
4355,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
8371,
67,
4139,
12,
2890,
16,
478,
33,
7036,
16,
2489,
33,
20,
4672,
3536,
5675,
8900,
11386,
30,
225,
6942,
848,
4241,
3143,
731,
358,
279,
864,
2489,
603,
279,
1984,
688,
4355,
... |
self.input('mosaic %f' % mosaic) | if self._mosflm_cell_ref_double_mosaic: self.input('mosaic %f' % (2.0 * mosaic)) else: self.input('mosaic %f' % mosaic) | def _mosflm_refine_cell(self, set_spacegroup = None): '''Perform the refinement of the unit cell. This will populate all of the information needed to perform the integration.''' | 03dcc9d97ebf051784cdaa2bd1b118c8d7d64ec5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3290/03dcc9d97ebf051784cdaa2bd1b118c8d7d64ec5/Mosflm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26719,
2242,
81,
67,
1734,
558,
67,
3855,
12,
2890,
16,
444,
67,
2981,
1655,
273,
599,
4672,
9163,
4990,
326,
25994,
820,
434,
326,
2836,
2484,
18,
1220,
903,
6490,
777,
434,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26719,
2242,
81,
67,
1734,
558,
67,
3855,
12,
2890,
16,
444,
67,
2981,
1655,
273,
599,
4672,
9163,
4990,
326,
25994,
820,
434,
326,
2836,
2484,
18,
1220,
903,
6490,
777,
434,
326,... |
def __init__(self, tp = None) : self.transsys_program = tp | def __init__(self, transsys_program = None) : self.transsys_program = transsys_program | def __init__(self, tp = None) : self.transsys_program = tp self.average = None self.standard_deviation = None self.shannon_entropy = None | 003b19b23e2f636663b2416183d5f877256908d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1770/003b19b23e2f636663b2416183d5f877256908d5/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
906,
9499,
67,
12890,
273,
599,
13,
294,
365,
18,
2338,
9499,
67,
12890,
273,
906,
9499,
67,
12890,
365,
18,
15621,
273,
599,
365,
18,
10005,
67,
323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
906,
9499,
67,
12890,
273,
599,
13,
294,
365,
18,
2338,
9499,
67,
12890,
273,
906,
9499,
67,
12890,
365,
18,
15621,
273,
599,
365,
18,
10005,
67,
323,
... |
return urldata, pd, fn | return urldata | def getdata(d): urldata = {} fn = bb.data.getVar('FILE', d, 1) pd = persist_data.PersistData(d) encdata = pd.getValue("BB_URLDATA", fn) if encdata: urldata = pickle.loads(str(encdata)) return urldata, pd, fn | 89853852ed422e5be7e488ea2389fc7760f97d29 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8123/89853852ed422e5be7e488ea2389fc7760f97d29/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
892,
12,
72,
4672,
880,
892,
273,
2618,
2295,
273,
7129,
18,
892,
18,
588,
1537,
2668,
3776,
2187,
302,
16,
404,
13,
4863,
273,
3898,
67,
892,
18,
12771,
751,
12,
72,
13,
2446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
892,
12,
72,
4672,
880,
892,
273,
2618,
2295,
273,
7129,
18,
892,
18,
588,
1537,
2668,
3776,
2187,
302,
16,
404,
13,
4863,
273,
3898,
67,
892,
18,
12771,
751,
12,
72,
13,
2446,
... |
(list) A list of ``WeierstrassIsomorphism``s consisting of all | (list) A list of ``WeierstrassIsomorphism`` objects consisting of all | def isomorphisms(self, other, field=None): """ Return the set of isomorphisms from self to other (as a list). INPUT: | 7f90fd3f5105ff112a9f5f68edb76d5cfa99c4da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7f90fd3f5105ff112a9f5f68edb76d5cfa99c4da/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
362,
7657,
23749,
12,
2890,
16,
1308,
16,
652,
33,
7036,
4672,
3536,
2000,
326,
444,
434,
353,
362,
7657,
23749,
628,
365,
358,
1308,
261,
345,
279,
666,
2934,
225,
12943,
30,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
362,
7657,
23749,
12,
2890,
16,
1308,
16,
652,
33,
7036,
4672,
3536,
2000,
326,
444,
434,
353,
362,
7657,
23749,
628,
365,
358,
1308,
261,
345,
279,
666,
2934,
225,
12943,
30,
2,
... |
thread_id = thread.id if 'thread' in request.REQUEST: thread_id = request.REQUEST['thread'] if thread_id: try: thread = Post.allobjects.get( pk = thread_id ) except Post.DoesNotExist: raise Http404 category = thread.category context['thread'] = thread | category = post.category else: if 'thread' in request.REQUEST: thread_id = request.REQUEST['thread'] if thread_id is not None: try: thread = Post.allobjects.get( pk = thread_id ) except Post.DoesNotExist: raise Http404 category = thread.category | def post(request, group = None, category_id = None, post_id = None, thread_id = None): if 'type' in request.REQUEST and request.REQUEST['type'] == 'preview': previewpost = Post( body = request.REQUEST['body'], markup = request.REQUEST.get('markup', None), ) return HttpResponse( unicode(previewpost.body_escaped()) ) post = None thread = None category = None context = { 'bbcodewysiwyg': enable_wysiwyg_editor() \ or (get_sph_setting('board_wysiwyg_testing') \ and request.REQUEST.get('wysiwyg', False)) } if post_id is None and 'post_id' in request.REQUEST: # if no post_id is given take it from the request. post_id = request.REQUEST['post_id'] if post_id: try: post = Post.allobjects.get( pk = post_id ) except Post.DoesNotExist: raise Http404 if not post.allowEditing(): raise PermissionDenied() thread = post.thread thread_id = thread.id if 'thread' in request.REQUEST: thread_id = request.REQUEST['thread'] if thread_id: try: thread = Post.allobjects.get( pk = thread_id ) except Post.DoesNotExist: raise Http404 category = thread.category context['thread'] = thread if not thread.allowPosting( request.user ): raise PermissionDenied() else: category = get_object_or_404(Category, pk = category_id) if not category.allowPostThread( request.user ): raise PermissionDenied() context['category'] = category category_type = category.get_category_type() MyPostForm = PostForm if category_type is not None: MyPostForm = category_type.get_post_form_class(thread, post) attachmentForm = None allow_attachments = get_sph_setting('board_allow_attachments') if request.method == 'POST': postForm = MyPostForm(request.POST) postForm.init_for_category_type(category_type, post) pollForm = PostPollForm(request.POST) create_post = True if allow_attachments: attachmentForm = PostAttachmentForm(request.POST, request.FILES, prefix = 'attachment') if 'cmd_addfile' in request.POST: create_post = False if attachmentForm.is_valid(): attachment = attachmentForm.save(commit = False) if attachment.fileupload: # Only save attachments if there was an upload... # If the form is valid, store the attachment if not post: # if there is no post yet.. we need to create a draft post = Post( category = category, author = request.user, thread = thread, is_hidden = 1, ) post.set_new( True ) post.save() # Reference the post and save the attachment attachment.post = post attachment.save() if create_post \ and postForm.is_valid() \ and ('createpoll' not in request.POST \ or pollForm.is_valid()): data = postForm.cleaned_data if post: newpost = post newpost.subject = data['subject'] newpost.body = data['body'] # make post visible newpost.is_hidden = 0 if not post.is_new() and category_type.append_edit_message_to_post(post): newpost.body += "\n\n" + _(u'--- Last Edited by %(username)s at %(edit_date)s ---') % {'username':get_user_displayname( request.user ), 'edit_date':format_date( datetime.today())} else: user = request.user.is_authenticated() and request.user or None newpost = Post( category = category, subject = data['subject'], body = data['body'], author = user, thread = thread, ) if 'markup' in data: newpost.markup = data['markup'] elif len( POST_MARKUP_CHOICES ) == 1: newpost.markup = POST_MARKUP_CHOICES[0][0] newpost.save(additional_data = data) #category_type.save_post( newpost, data ) # Creating monitor if request.POST.get( 'addmonitor', False ): newpost.toggle_monitor() if 'createpoll' in request.POST and request.POST['createpoll'] == '1': newpost.set_poll( True ); newpost.save() # Creating poll... polldata = pollForm.cleaned_data newpoll = Poll( post = newpost, question = polldata['question'], choices_per_user = polldata['choicesPerUser']) newpoll.save() choices = polldata['answers'].splitlines() i=0 for choice in choices: pollchoice = PollChoice( poll = newpoll, choice = choice, count = 0, sortorder = i) i+=1 pollchoice.save() if request.user.is_authenticated(): request.user.message_set.create( message = ugettext(u'Vote created successfully.') ) if request.user.is_authenticated(): if post: request.user.message_set.create( message = ugettext(u'Post edited successfully.') ) else: request.user.message_set.create( message = ugettext(u'Post created successfully.') ) if thread == None: thread = newpost return HttpResponseRedirect( newpost.get_absolute_url() ) else: postForm = MyPostForm( ) postForm.init_for_category_type(category_type, post) pollForm = PostPollForm() if allow_attachments: attachmentForm = PostAttachmentForm(prefix = 'attachment') if post: postForm.fields['subject'].initial = post.subject postForm.fields['body'].initial = post.body if 'markup' in postForm.fields: postForm.fields['markup'].initial = post.markup context['post'] = post context['thread'] = post.thread or post elif 'quote' in request.REQUEST: quotepost = Post.objects.get( pk = request.REQUEST['quote'] ) postForm.fields['subject'].initial = 'Re: %s' % thread.subject if quotepost.author == None: username = 'anonymous' else: username = quotepost.author.username postForm.fields['body'].initial = '[quote=%s;%s]\n%s\n[/quote]\n' % (username, quotepost.id, quotepost.body) elif thread: postForm.fields['subject'].initial = 'Re: %s' % thread.subject context['form'] = postForm # Only allow polls if this is a new _thread_ (not a reply) if (not thread and not post) or (post and post.is_new() and post.thread is None): context['pollform'] = pollForm context['attachmentForm'] = attachmentForm if 'createpoll' in request.REQUEST: context['createpoll'] = request.REQUEST['createpoll'] res = render_to_response( "sphene/sphboard/post.html", context, context_instance = RequestContext(request) ) # Maybe the user is in the 'edit' form, which should not be cached. res.sph_lastmodified = True return res | af28798b9636f84543fe9f7123d6d9fa383d0012 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11563/af28798b9636f84543fe9f7123d6d9fa383d0012/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
12,
2293,
16,
1041,
273,
599,
16,
3150,
67,
350,
273,
599,
16,
1603,
67,
350,
273,
599,
16,
2650,
67,
350,
273,
599,
4672,
309,
296,
723,
11,
316,
590,
18,
5519,
471,
590,
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,
1603,
12,
2293,
16,
1041,
273,
599,
16,
3150,
67,
350,
273,
599,
16,
1603,
67,
350,
273,
599,
16,
2650,
67,
350,
273,
599,
4672,
309,
296,
723,
11,
316,
590,
18,
5519,
471,
590,
18... |
self.assertEquals('object', typeof('var_mytime')) | self.assertEquals('object', typeof('var_mytime')) | def testExactConverter(self): class MyInteger(int, JSClass): pass class MyString(str, JSClass): pass class MyUnicode(unicode, JSClass): pass class MyDateTime(datetime.time, JSClass): pass class Global(JSClass): var_bool = True var_int = 1 var_float = 1.0 var_str = 'str' var_unicode = u'unicode' var_datetime = datetime.datetime.now() var_date = datetime.date.today() var_time = datetime.time() var_myint = MyInteger() var_mystr = MyString('mystr') var_myunicode = MyUnicode('myunicode') var_mytime = MyDateTime() with JSContext(Global()) as ctxt: typename = ctxt.eval("(function (name) { return this[name].constructor.name; })") typeof = ctxt.eval("(function (name) { return typeof(this[name]); })") self.assertEquals('Boolean', typename('var_bool')) self.assertEquals('Number', typename('var_int')) self.assertEquals('Number', typename('var_float')) self.assertEquals('String', typename('var_str')) self.assertEquals('String', typename('var_unicode')) self.assertEquals('Date', typename('var_datetime')) self.assertEquals('Date', typename('var_date')) self.assertEquals('Date', typename('var_time')) self.assertEquals('MyInteger', typename('var_myint')) self.assertEquals('MyString', typename('var_mystr')) self.assertEquals('MyUnicode', typename('var_myunicode')) self.assertEquals('MyDateTime', typename('var_mytime')) self.assertEquals('object', typeof('var_myint')) self.assertEquals('object', typeof('var_mystr')) self.assertEquals('object', typeof('var_myunicode')) self.assertEquals('object', typeof('var_mytime')) | 550f86f8e1997ee990877076421feaf1936da8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5451/550f86f8e1997ee990877076421feaf1936da8eb/PyV8.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14332,
5072,
12,
2890,
4672,
667,
8005,
4522,
12,
474,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
780,
12,
701,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
16532,
12,
9124,
16,
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,
1842,
14332,
5072,
12,
2890,
4672,
667,
8005,
4522,
12,
474,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
780,
12,
701,
16,
6756,
797,
4672,
1342,
225,
667,
8005,
16532,
12,
9124,
16,
67... |
edition["lccn"] = m.group(1) | edition["LCCN"] = m.group(1) | def find_lccn(r, edition): if 'a' not in r.get_field('010').contents: return lccn = r.get_field('010').contents['a'][0].strip() m = re_lccn.match(lccn) assert m edition["lccn"] = m.group(1) | ff7d799fee369e75ed16fa8589904b9827076755 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3913/ff7d799fee369e75ed16fa8589904b9827076755/parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
80,
952,
82,
12,
86,
16,
28432,
4672,
309,
296,
69,
11,
486,
316,
436,
18,
588,
67,
1518,
2668,
23254,
16063,
3980,
30,
327,
328,
952,
82,
273,
436,
18,
588,
67,
1518,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
80,
952,
82,
12,
86,
16,
28432,
4672,
309,
296,
69,
11,
486,
316,
436,
18,
588,
67,
1518,
2668,
23254,
16063,
3980,
30,
327,
328,
952,
82,
273,
436,
18,
588,
67,
1518,
26... |
self.CCPP.dir_perms_list.remove((self.base_rp, self.dir_update.getperms())) rpath.copy_attribs(self.dir_update, self.base_rp) | self.base_rp.chmod(0700 | self.dir_update.getperms()) | def end_process(self): """Finish processing directory""" if self.dir_update: assert self.base_rp.isdir() | 7532b3e9a676e917c4052928545f59ca3f581448 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/783/7532b3e9a676e917c4052928545f59ca3f581448/backup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2567,
12,
2890,
4672,
3536,
11641,
4929,
1867,
8395,
309,
365,
18,
1214,
67,
2725,
30,
1815,
365,
18,
1969,
67,
13832,
18,
291,
1214,
1435,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2567,
12,
2890,
4672,
3536,
11641,
4929,
1867,
8395,
309,
365,
18,
1214,
67,
2725,
30,
1815,
365,
18,
1969,
67,
13832,
18,
291,
1214,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
logger.Error("Can't create md: %s" % result.fail_reason) | logger.Error("Can't create md: %s: %s" % (result.fail_reason, result.output)) | def Create(cls, unique_id, children, size): """Create a new MD raid1 array. | 1a87dca7319a3ebdbc83e91a5042497abb15576e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/1a87dca7319a3ebdbc83e91a5042497abb15576e/bdev.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
12,
6429,
16,
3089,
67,
350,
16,
2325,
16,
963,
4672,
3536,
1684,
279,
394,
10852,
767,
350,
21,
526,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1788,
12,
6429,
16,
3089,
67,
350,
16,
2325,
16,
963,
4672,
3536,
1684,
279,
394,
10852,
767,
350,
21,
526,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
""" | """ | def fl_exe_command(p1, p2): """ fl_exe_command(p1, p2) -> num. """ retval = _fl_exe_command(p1, p2) 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,
14880,
67,
3076,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
14880,
67,
3076,
12,
84,
21,
16,
293,
22,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
14880,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
14880,
67,
3076,
12,
84,
21,
16,
293,
22,
4672,
3536,
1183,
67,
14880,
67,
3076,
12,
84,
21,
16,
293,
22,
13,
317,
818,
18,
3536,
225,
5221,
273,
389,
2242,
67,
14880,
67... |
if os.getcwd() != getConfig()['global']['workingDir'] or os.getcwd() != os.path.realpath( getConfig()['global']['workingDir'] ): os.chdir(getConfig()['global']['workingDir']) | if os.getcwd() != getConfig()['global']['workingDir'] or (os.getcwd() != os.path.realpath( getConfig()['global']['workingDir'] )): os.chdir(getConfig()['global']['workingDir']) | def run(): u"""Provides main functionality -- scans threads.""" global saved, rss, downloader, _action getConfig(filename=configFile, reload=True) setLogging(True) if isinstance(getConfig()['global']['umask'], int): os.umask( getConfig()['global']['umask'] ) if getConfig()['global']['urllib']: downloader = urllib2RetrievePage else: downloader = mechRetrievePage getSaved(unset=1) getSaved(getConfig()['global']['saveFile']) try: getSaved().lock() except Locked: logStatusMsg( u"Savefile is currently in use.", 2 ) raise Locked try: getSaved().load() except (EOFError, IOError, ValueError, IndexError), m: logStatusMsg(unicodeC(m) + os.linesep + u"didn't load SaveProcessor. Creating new saveFile.", 1) logStatusMsg(u"checking working dir, maybe changing dir", 5) if os.getcwd() != getConfig()['global']['workingDir'] or os.getcwd() != os.path.realpath( getConfig()['global']['workingDir'] ): os.chdir(getConfig()['global']['workingDir']) sys.path.insert(0, getConfig()['global']['workingDir']) # import userFunct if getConfig()['global']['runOnce'] and getSaved().lastChecked > ( int(time.time()) - (getConfig()['global']['scanMins']*60) ): raise SystemExit(u"Threads have already been scanned.") if getConfig()['global']['rssFeed']: logStatusMsg(u'trying to generate rss feed', 5) if getConfig()['global']['rssFilename']: logStatusMsg(u'rss filename set', 5) rss = MakeRss(filename=getConfig()['global']['rssFilename'], itemsQuaDictBool=True) if os.path.isfile( getConfig()['global']['rssFilename'] ): logStatusMsg(u'loading rss file', 5) rss.parse() rss.channelMeta['title'] = getConfig()['global']['rssTitle'] rss.channelMeta['description'] = getConfig()['global']['rssDescription'] rss.channelMeta['link'] = getConfig()['global']['rssLink'] else: logStatusMsg(u"no rssFilename set, cannot write feed to a file") userFunctHandling() if getSaved().failedDown: logStatusMsg(u"Scanning previously failed downloads", 4) for i in xrange( len( getSaved().failedDown) - 1, -1, -1 ): if not checkScanTime( getSaved().failedDown[i]['threadName'], failed=1 ): continue logStatusMsg(u" Attempting to download %s" % getSaved().failedDown[i]['link'], 4 ) if downloadFile( **getSaved().failedDown[i] ): logStatusMsg(u"Success!", 4) del getSaved().failedDown[ i ] getSaved().save() else: logStatusMsg(u"Failure on %s in failedDown" % getSaved().failedDown[i]['link'], 4) logStatusMsg( u"Scanning threads", 4 ) for key in getConfig()['threads'].keys(): if getConfig()['threads'][key]['active'] == False: continue # ignore inactive threads # if they specified a checkTime value, make sure we are in the specified range if not checkScanTime( key, failed=False): continue logStatusMsg( u"finding new downloads in thread %s" % key, 4 ) rssparse(key) if rss: rss.close(length=getConfig()['global']['rssLength']) rss.write() getSaved().lastChecked = int(time.time()) -30 getSaved().save() getSaved().unlock() | 633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
13332,
582,
8395,
17727,
2774,
14176,
1493,
19676,
7403,
12123,
2552,
5198,
16,
18817,
16,
28122,
16,
389,
1128,
4367,
12,
3459,
33,
1425,
812,
16,
7749,
33,
5510,
13,
444,
7735,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13332,
582,
8395,
17727,
2774,
14176,
1493,
19676,
7403,
12123,
2552,
5198,
16,
18817,
16,
28122,
16,
389,
1128,
4367,
12,
3459,
33,
1425,
812,
16,
7749,
33,
5510,
13,
444,
7735,
1... |
uri_name = 'review_requests' | uri_name = 'review-requests' | def watched_resource(self): """Return the watched resource. | 7c04d9cc43ae5dcc547df3fd5ee82d509fbc1557 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1600/7c04d9cc43ae5dcc547df3fd5ee82d509fbc1557/resources.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23135,
67,
3146,
12,
2890,
4672,
3536,
990,
326,
23135,
1058,
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,
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,
23135,
67,
3146,
12,
2890,
4672,
3536,
990,
326,
23135,
1058,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sage: print B[1, 1] | sage: B[1, 1] | def __getitem__(self, rc): """ If L is a LatinSquare then this method allows us to evaluate L[r, c]. | 79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
4519,
4672,
3536,
971,
511,
353,
279,
11134,
267,
22255,
1508,
333,
707,
5360,
584,
358,
5956,
511,
63,
86,
16,
276,
8009,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
4519,
4672,
3536,
971,
511,
353,
279,
11134,
267,
22255,
1508,
333,
707,
5360,
584,
358,
5956,
511,
63,
86,
16,
276,
8009,
2,
-100,
-100,
-100,
-100,
-1... |
def __init__(self, docformatter, container): self._container = container self._docformatter = docformatter self._docmap = docformatter._docmap def translate_identifier_xref(self, identifier, label=None): if label is None: label = identifier uid = findUID(identifier, container, self._docmap) if uid is None: self._failed_xrefs[identifier] = 1 return self._docformatter._uid_to_href(uid, label, 'link') def translate_indexterm(self, indexterm): anchor = self._docformatter._term_index_to_anchor(indexterm) return ('<a name="%s"></a><i class="indexterm">%s</i>' % (anchor, childstr)) def report_failed_xrefs(self): failed_xrefs = self._failed_xrefs.keys() if failed_xrefs: if sys.stderr.softspace: print >>sys.stderr if len(failed_xrefs) == 1: estr = 'could not find a UID for: ' + failed_xrefs[0] else: estr = 'could not find UIDs for: ' + ', '.join(failed_xrefs) print >>sys.stderr, estr | if type(obj) is types.InstanceType: link = doc.createElement('link') name = doc.createElement('name') target = doc.createElement('target') para.appendChild(link) link.appendChild(name) link.appendChild(target) name.appendChild(doc.createTextNode(str(obj.__class__.__name__))) target.appendChild(doc.createTextNode(str(obj.__class__))) else: code = doc.createElement('code') para.appendChild(code) code.appendChild(doc.createTextNode(type(obj).__name__)) return ParsedEpytextDocstring(doc) import plaintext | def __init__(self, docformatter, container): self._container = container self._docformatter = docformatter self._docmap = docformatter._docmap | 039fdb403bc107bd2f9b878978d00d80b0bdafca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/039fdb403bc107bd2f9b878978d00d80b0bdafca/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
997,
12354,
16,
1478,
4672,
365,
6315,
3782,
273,
1478,
365,
6315,
2434,
12354,
273,
997,
12354,
365,
6315,
2434,
1458,
273,
997,
12354,
6315,
2434,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
997,
12354,
16,
1478,
4672,
365,
6315,
3782,
273,
1478,
365,
6315,
2434,
12354,
273,
997,
12354,
365,
6315,
2434,
1458,
273,
997,
12354,
6315,
2434,
1458,
... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 604) else quickfix.StringField.__init__(self, 604, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1666,
3028,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
1666,
3028,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738... |
if float(data_dict[col_name][(len(data_dict[col_name])-1)]) < (float(stop_comp)*float(x_scale)): | if float(data_dict[col_name][end_index]) < (float(stop_comp)*float(x_scale)): | def find_start_stop_index(data_dict,col_name,start_data,stop_data,start_comp,stop_comp,x_scale): #This function is used to find index numbers for start and stop points in plotting and min-max values. print "X Scale Factor:", x_scale rowcounter1 = 0 for value1 in data_dict[col_name]: if value1 >= (float(start_data)*float(x_scale)): #print "Time Starts at row #:", str(rowcounter1) #print "With a value of:", str(value1) time_start_index = rowcounter1 break rowcounter1 += 1 rowcounter2 = 0 for value2 in data_dict[col_name]: if float(data_dict[col_name][(len(data_dict[col_name])-1)]) < (float(stop_data)*float(x_scale)): #print "Specified end of plot time is greater than end of time in the data set. \nUsing last value in the time column.\n" #print "Time used is: "+str(float(data_dict[col_name][(len(data_dict[col_name])-1)]))+"\n" time_end_index = (len(data_dict[col_name])-1) break else: row_number2 = (rowcounter2 - 1) #print "Time Ends at row #: "+str(row_number2) #print "With a value of: "+str(data_dict[col_name][row_number2]) time_end_index = row_number2 break if value2 < (float(stop_data)*float(x_scale)): rowcounter2 += 1 rowcounter3 = 0 for value3 in data_dict[col_name]: if value3 >= (float(start_comp)*float(x_scale)): #print "Comparison Time Starts at row #:", str(rowcounter3) #print "With a value of:", str(value3) minmax_start_index = rowcounter3 break rowcounter3 += 1 rowcounter4 = 0 for value4 in data_dict[col_name]: if float(data_dict[col_name][(len(data_dict[col_name])-1)]) < (float(stop_comp)*float(x_scale)): #print "Specified end of comparison time is greater than end of time in the data set. \nUsing last value in the time column." #print "Time used is: "+str(float(data_dict[col_name][(len(data_dict[col_name])-1)]))+"\n" minmax_end_index = (len(data_dict[col_name])-1) break if value4 < (float(stop_data)*float(x_scale)): rowcounter4 += 1 else: row_number4 = (rowcounter4 - 1) #print "Comparison Time Ends at row #: "+str(row_number4) #print "With a value of: "+str(data_dict[col_name][row_number4]) minmax_end_index = row_number4 break return (time_start_index, time_end_index, minmax_start_index, minmax_end_index) | 489e23f8fbeeba33c7e996728fece1e6b33b3091 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/489e23f8fbeeba33c7e996728fece1e6b33b3091/Validation_Data_Processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
1937,
67,
5681,
67,
1615,
12,
892,
67,
1576,
16,
1293,
67,
529,
16,
1937,
67,
892,
16,
5681,
67,
892,
16,
1937,
67,
2919,
16,
5681,
67,
2919,
16,
92,
67,
5864,
4672,
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,
1104,
67,
1937,
67,
5681,
67,
1615,
12,
892,
67,
1576,
16,
1293,
67,
529,
16,
1937,
67,
892,
16,
5681,
67,
892,
16,
1937,
67,
2919,
16,
5681,
67,
2919,
16,
92,
67,
5864,
4672,
468,... |
$$ (x,y) \mapsto (x',y') = (u^2*x+r , u^3*y + s*u^2*x' + t) $$ | $$ (x,y) \mapsto (x',y') = (u^2*x+r , u^3*y + s*u^2*x' + t) $$. | def change_weierstrass_model(self, *urst): r""" Return a new Weierstrass model of self under the transformation (on points) $$ (x,y) \mapsto (x',y') = (u^2*x+r , u^3*y + s*u^2*x' + t) $$ | 89c2370a6c124c1bf3f51b0d97beaaae4ef2736c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/89c2370a6c124c1bf3f51b0d97beaaae4ef2736c/ell_generic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
1814,
20778,
313,
428,
67,
2284,
12,
2890,
16,
380,
18593,
4672,
436,
8395,
2000,
279,
394,
1660,
20778,
313,
428,
938,
434,
365,
3613,
326,
8620,
261,
265,
3143,
13,
5366,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
1814,
20778,
313,
428,
67,
2284,
12,
2890,
16,
380,
18593,
4672,
436,
8395,
2000,
279,
394,
1660,
20778,
313,
428,
938,
434,
365,
3613,
326,
8620,
261,
265,
3143,
13,
5366,
2... |
self.serial.write(data) | if self.ser_newline and self.net_newline: data = ser_newline.join(data.split(net_newline)) self.serial.write(data) if self.spy: sys.stdout.write(codecs.escape_encode(data)[0]) sys.stdout.flush() | def writer(self): """loop forever and copy socket->serial""" while self.alive: try: data = self.socket.recv(1024) if not data: break self.serial.write(data) #get a bunch of bytes and send them except socket.error, msg: print msg #probably got disconnected break self.alive = False self.thread_read.join() | eb345d44f6beabbef6486a85e9864003536e9fc3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/eb345d44f6beabbef6486a85e9864003536e9fc3/tcp_serial_redirect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2633,
12,
2890,
4672,
3536,
6498,
21238,
471,
1610,
2987,
2122,
8818,
8395,
1323,
365,
18,
11462,
30,
775,
30,
501,
273,
365,
18,
7814,
18,
18334,
12,
2163,
3247,
13,
309,
486,
501,
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,
2633,
12,
2890,
4672,
3536,
6498,
21238,
471,
1610,
2987,
2122,
8818,
8395,
1323,
365,
18,
11462,
30,
775,
30,
501,
273,
365,
18,
7814,
18,
18334,
12,
2163,
3247,
13,
309,
486,
501,
30... |
self.usersmodel.set(i[2], 5, comments) | self.usersmodel.set(iter, 8, comments) | def SetComment(self, iter, store, comments=None): user = store.get_value(iter, 1) if comments is not None: for i in self.userlist: if i[0] == user: i[1] = comments self.usersmodel.set(i[2], 5, comments) break self.SaveUserList() | a2530f4f499f5036db35283ed1b9258038481c52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8738/a2530f4f499f5036db35283ed1b9258038481c52/userlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4469,
12,
2890,
16,
1400,
16,
1707,
16,
5678,
33,
7036,
4672,
729,
273,
1707,
18,
588,
67,
1132,
12,
2165,
16,
404,
13,
309,
5678,
353,
486,
599,
30,
364,
277,
316,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4469,
12,
2890,
16,
1400,
16,
1707,
16,
5678,
33,
7036,
4672,
729,
273,
1707,
18,
588,
67,
1132,
12,
2165,
16,
404,
13,
309,
5678,
353,
486,
599,
30,
364,
277,
316,
365,
18,
... |
elif self._list_counter == -2: | elif self.list_counter[-1] == -2: | def depart_list_item(self, node): if self._list_counter == -1: self.end_state(first='* ', end=None) elif self._list_counter == -2: pass else: self.end_state(first='%s. ' % self._list_counter, end=None) | e20b3a3adf8de70986f2805e2d77e2bc11ff74aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/e20b3a3adf8de70986f2805e2d77e2bc11ff74aa/text.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26000,
67,
1098,
67,
1726,
12,
2890,
16,
756,
4672,
309,
365,
6315,
1098,
67,
7476,
422,
300,
21,
30,
365,
18,
409,
67,
2019,
12,
3645,
2218,
14,
2265,
679,
33,
7036,
13,
1327,
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,
26000,
67,
1098,
67,
1726,
12,
2890,
16,
756,
4672,
309,
365,
6315,
1098,
67,
7476,
422,
300,
21,
30,
365,
18,
409,
67,
2019,
12,
3645,
2218,
14,
2265,
679,
33,
7036,
13,
1327,
365,
... |
self.w.outputtext.ted.WEInsert(stuff, None, None) self._buf = "" | try: self.w.outputtext.ted.WEInsert(stuff, None, None) finally: self._buf = "" | def flush(self): self.show() stuff = string.split(self._buf, '\n') stuff = string.join(stuff, '\r') end = self.w.outputtext.ted.WEGetTextLength() self.w.outputtext.setselection(end, end) self.w.outputtext.ted.WEFeatureFlag(WASTEconst.weFReadOnly, 0) self.w.outputtext.ted.WEInsert(stuff, None, None) self._buf = "" self.w.outputtext.updatescrollbars() self.w.outputtext.ted.WEFeatureFlag(WASTEconst.weFReadOnly, 1) if self.w.wid.GetWindowPort().QDIsPortBuffered(): self.w.wid.GetWindowPort().QDFlushPortBuffer(None) | 3277501b00a1e9b64206abc7bd521066ca55c86f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3277501b00a1e9b64206abc7bd521066ca55c86f/PyConsole.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
365,
18,
4500,
1435,
10769,
273,
533,
18,
4939,
12,
2890,
6315,
4385,
16,
2337,
82,
6134,
10769,
273,
533,
18,
5701,
12,
334,
3809,
16,
2337,
86,
6134,
679,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
365,
18,
4500,
1435,
10769,
273,
533,
18,
4939,
12,
2890,
6315,
4385,
16,
2337,
82,
6134,
10769,
273,
533,
18,
5701,
12,
334,
3809,
16,
2337,
86,
6134,
679,
273,
... |
'name':number } | }) | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ cash_pool = self.pool.get('account.cashbox.line') statement_pool = self.pool.get('account.bank.statement') | e5ee5ce9a46a79286c52c9126274b11697befbf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5ee5ce9a46a79286c52c9126274b11697befbf2/account_cash_statement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
3190,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
225,
3536,
17776,
3021,
919,
358,
20480,
18,
632,
2463,
30,
1053,
3536,
276,
961,
67,
6011,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3568,
67,
3190,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
33,
7036,
4672,
225,
3536,
17776,
3021,
919,
358,
20480,
18,
632,
2463,
30,
1053,
3536,
276,
961,
67,
6011,
273,
365,
... |
raise "\nERROR: Invalid Item" | raise Exception("\nERROR: Invalid Item") | def GetItemWindow(self, item): """Returns the window associated to the item (if any).""" | e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1180,
3829,
12,
2890,
16,
761,
4672,
3536,
1356,
326,
2742,
3627,
358,
326,
761,
261,
430,
1281,
13,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1180,
3829,
12,
2890,
16,
761,
4672,
3536,
1356,
326,
2742,
3627,
358,
326,
761,
261,
430,
1281,
13,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return 0 | return False | def check_room( item, pos ): # check valid item if not item.hastag( 'carpentry_type' ): return 0 name = item.gettag( 'carpentry_type' ) if not deeds.haskey( name ): return 0 dir = deeds[ name ][ 1 ] items = deeds[ name ][ 2: ] if not items: return 0 num_item = len( items ) if not num_item: return 0 # check the spots ret0 = 0 ret1 = 0 ret2 = 0 if num_item == 1: return check_spot( pos ) elif num_item == 2: ret0 = check_spot( pos ) if dir == 1: ret1 = check_spot( pos.x, pos.y + 1, pos.map ) else: ret1 = check_spot( pos.x + 1, pos.y, pos.map ) return ret0 & ret1 elif num_item == 3: ret0 = check_spot( pos ) if dir == 1: ret1 = check_spot( pos.x, pos.y + 1, pos.map ) ret2 = check_spot( pos.x, pos.y - 1, pos.map ) else: ret1 = check_spot( pos.x + 1, pos.y, pos.map ) ret2 = check_spot( pos.x -1, pos.y, pos.map ) return ret0 & ret1 & ret2 elif num_item == 4: ret0 = 1 for x in range( pos.x, pos.x + 2 ): for y in range( pos.y, pos.y + 2 ): ret0 = check_spot( x, y, pos.map ) if not ret0: return 0 return 1 # pentagram elif num_item == 9: ret0 = wolfpack.items( pos.x, pos.y, pos.map, 2 ) if not ret0: return 0 return 1 # no other case : error return 0 | f9665c46d91ee48a0931cc8fc760b9852ee4a43f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/f9665c46d91ee48a0931cc8fc760b9852ee4a43f/carpentry_deed.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
13924,
12,
761,
16,
949,
262,
30,
468,
866,
923,
761,
309,
486,
761,
18,
76,
689,
346,
12,
296,
9815,
1907,
698,
67,
723,
11,
262,
30,
327,
1083,
508,
273,
761,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13924,
12,
761,
16,
949,
262,
30,
468,
866,
923,
761,
309,
486,
761,
18,
76,
689,
346,
12,
296,
9815,
1907,
698,
67,
723,
11,
262,
30,
327,
1083,
508,
273,
761,
18,
588,
... |
print(package_name) | def test_suite(package=__package__, directory=os.path.dirname(__file__)): suite = unittest.TestSuite() for name in os.listdir(directory): if name.startswith('.'): continue path = os.path.join(directory, name) if os.path.isfile(path) and name.startswith('test_'): submodule_name = os.path.splitext(name)[0] module_name = "{0}.{1}".format(package, submodule_name) __import__(module_name, level=0) module_tests = unittest.findTestCases(sys.modules[module_name]) suite.addTest(module_tests) elif os.path.isdir(path): package_name = "{0}.{1}".format(package, name) print(package_name) __import__(package_name, level=0) package_tests = getattr(sys.modules[package_name], 'test_suite')() suite.addTest(package_tests) return suite | d994864d54ffd2f607af3a9eecfbadd75502efd3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/d994864d54ffd2f607af3a9eecfbadd75502efd3/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30676,
12,
5610,
33,
972,
5610,
972,
16,
1867,
33,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3719,
30,
11371,
273,
2836,
3813,
18,
4709,
13587,
1435,
364,
508,
316,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30676,
12,
5610,
33,
972,
5610,
972,
16,
1867,
33,
538,
18,
803,
18,
12287,
12,
972,
768,
972,
3719,
30,
11371,
273,
2836,
3813,
18,
4709,
13587,
1435,
364,
508,
316,
1140,
... | |
self.context.add_emailAddress(email, is_preferred=False) | self.context.add_emailAddress(email, is_preferred=True) | def add_new_email(self, email): log.info('GSVerifyWait: Adding <%s> to the user "%s"' % \ (email, self.context.getId())) self.context.add_emailAddress(email, is_preferred=False) siteObj = self.siteInfo.siteObj utils.send_verification_message(siteObj, self.context, email) assert email in self.context.get_emailAddresses() return email | d7792e4545db0d9461aae1812ea40d7d5747c130 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6273/d7792e4545db0d9461aae1812ea40d7d5747c130/verify_wait.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2704,
67,
3652,
12,
2890,
16,
2699,
4672,
613,
18,
1376,
2668,
16113,
8097,
5480,
30,
21240,
23930,
87,
34,
358,
326,
729,
2213,
87,
5187,
738,
521,
261,
3652,
16,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2704,
67,
3652,
12,
2890,
16,
2699,
4672,
613,
18,
1376,
2668,
16113,
8097,
5480,
30,
21240,
23930,
87,
34,
358,
326,
729,
2213,
87,
5187,
738,
521,
261,
3652,
16,
365,
18,
... |
displayName = data["SHARING_DESCRIPTION"] host = data['SHARING_SERVER'] port = data['SHARING_PORT'] path = data['SHARING_PATH'] username = data['SHARING_USERNAME'] password = data['SHARING_PASSWORD'] useSSL = data['SHARING_USE_SSL'] | displayName = data["DAV_DESCRIPTION"] host = data['DAV_SERVER'] port = data['DAV_PORT'] path = data['DAV_PATH'] username = data['DAV_USERNAME'] password = data['DAV_PASSWORD'] useSSL = data['DAV_USE_SSL'] | def OnTestSharingDAV(self): self.__StoreFormData(self.currentPanelType, self.currentPanel, self.data[self.currentIndex]['values']) | ea2de5b36cd62c8490ff2066a95a29fd86870c01 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/ea2de5b36cd62c8490ff2066a95a29fd86870c01/AccountPreferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
4709,
22897,
17735,
12,
2890,
4672,
365,
16186,
2257,
30079,
12,
2890,
18,
2972,
5537,
559,
16,
365,
18,
2972,
5537,
16,
365,
18,
892,
63,
2890,
18,
2972,
1016,
23962,
2372,
19486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2755,
4709,
22897,
17735,
12,
2890,
4672,
365,
16186,
2257,
30079,
12,
2890,
18,
2972,
5537,
559,
16,
365,
18,
2972,
5537,
16,
365,
18,
892,
63,
2890,
18,
2972,
1016,
23962,
2372,
19486,... |
def is_buffer_writeable_and_executable(self, address, size): | def is_buffer_executable_and_writeable(self, address, size): | def is_buffer_writeable_and_executable(self, address, size): """ Determines if the given memory area is writeable and executable. | 616de90b6134a228a95668f52d12ba0ace4c49af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/616de90b6134a228a95668f52d12ba0ace4c49af/system.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
4106,
67,
17751,
67,
464,
67,
2626,
429,
12,
2890,
16,
1758,
16,
963,
4672,
3536,
30778,
309,
326,
864,
3778,
5091,
353,
30223,
471,
9070,
18,
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,
353,
67,
4106,
67,
17751,
67,
464,
67,
2626,
429,
12,
2890,
16,
1758,
16,
963,
4672,
3536,
30778,
309,
326,
864,
3778,
5091,
353,
30223,
471,
9070,
18,
2,
-100,
-100,
-100,
-100,
-100,... |
else | else: | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 560) else quickfix.IntField.__init__(self, 560, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
4848,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
4848,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
27... |
'en' : [u'disambig', u'tLAdisambig', u'disambiguation',u'2LCdisambig'], | 'en' : [u'disambig', u'LND', u'2LA', u'TLAdisambig', u'disambiguation', u'2LCdisambig', u'4LA', u'acrocandis', u'hndis', u'numberdis', u'roadis'], | def __init__(self): | a6eef0ec593537e87f25625c8181546a184cda73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/a6eef0ec593537e87f25625c8181546a184cda73/family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
update_val = {} | update_val = {} | def action_consume(self, cr, uid, ids, quantity, location_id=False, context=None): ''' Consumed product with specific quatity from specific source location @ param cr: the database cursor @ param uid: the user id @ param ids: ids of stock move object to be consumed @ param quantity : specify consume quantity @ param location_id : specify source location @ param context: context arguments | 18be8e52469417aa8e0ec02e033c0942d0ad805f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/18be8e52469417aa8e0ec02e033c0942d0ad805f/stock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
21224,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
2117,
67,
350,
33,
8381,
16,
225,
819,
33,
7036,
4672,
9163,
22210,
329,
3017,
598,
2923,
25847,
560,
628,
2923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
21224,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10457,
16,
2117,
67,
350,
33,
8381,
16,
225,
819,
33,
7036,
4672,
9163,
22210,
329,
3017,
598,
2923,
25847,
560,
628,
2923,... |
self.recs = map((lambda x:x[0]),bibrecord.create_records(xmltext)) | self.recs = map((lambda x: x[0]), bibrecord.create_records(xmltext)) | def setUp(self): f=open(tmpdir + '/demobibdata.xml','r') xmltext = f.read() f.close() self.recs = map((lambda x:x[0]),bibrecord.create_records(xmltext)) | 2f66588a97ca15909477d0a2e7e1dae76f187c9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2f66588a97ca15909477d0a2e7e1dae76f187c9d/bibrecord_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
284,
33,
3190,
12,
5645,
1214,
397,
1173,
19117,
947,
495,
892,
18,
2902,
17023,
86,
6134,
2025,
955,
273,
284,
18,
896,
1435,
284,
18,
4412,
1435,
365,
18,
266,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
284,
33,
3190,
12,
5645,
1214,
397,
1173,
19117,
947,
495,
892,
18,
2902,
17023,
86,
6134,
2025,
955,
273,
284,
18,
896,
1435,
284,
18,
4412,
1435,
365,
18,
266,... |
if gpodder.win32: self.item_email_subscriptions.set_sensitive(False) | def new(self): if gpodder.ui.diablo: import hildon self.app = hildon.Program() self.app.add_window(self.main_window) self.main_window.add_toolbar(self.toolbar) menu = gtk.Menu() for child in self.main_menu.get_children(): child.reparent(menu) self.main_window.set_menu(self.set_finger_friendly(menu)) self.bluetooth_available = False elif gpodder.ui.fremantle: import hildon self.app = hildon.Program() self.app.add_window(self.main_window) | 6b94facad66792b289b78a4e6fe2356055bd96cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/6b94facad66792b289b78a4e6fe2356055bd96cb/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
4672,
309,
4178,
369,
765,
18,
4881,
18,
3211,
378,
383,
30,
1930,
366,
545,
265,
365,
18,
2910,
273,
366,
545,
265,
18,
9459,
1435,
365,
18,
2910,
18,
1289,
67,
5668,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
4672,
309,
4178,
369,
765,
18,
4881,
18,
3211,
378,
383,
30,
1930,
366,
545,
265,
365,
18,
2910,
273,
366,
545,
265,
18,
9459,
1435,
365,
18,
2910,
18,
1289,
67,
5668,... | |
msg = self.log_format_string % ( self.encodePriority(self.facility, self.mapPriority(record.levelname)), msg) | prio = '<%d>' % self.encodePriority(self.facility, self.mapPriority(record.levelname)) prio = prio.encode('utf-8') | def emit(self, record): """ Emit a record. | 467d12fcb2987d6530e683709978d6aadd7ceb05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/467d12fcb2987d6530e683709978d6aadd7ceb05/handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3626,
12,
2890,
16,
1409,
4672,
3536,
16008,
279,
1409,
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,
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,
3626,
12,
2890,
16,
1409,
4672,
3536,
16008,
279,
1409,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
print "testing with \"%s\"..." % tloc, | print "testing with \"%s\"..." % enUS_locale, | def setUp(self): if sys.platform == 'darwin': raise TestSkipped( "Locale support on MacOSX is minimal and cannot be tested") self.oldlocale = locale.setlocale(self.locale_type) for tloc in self.tlocs: try: locale.setlocale(self.locale_type, tloc) except locale.Error: continue break else: raise TestSkipped( "Test locale not supported (tried %s)" % (', '.join(self.tlocs))) if verbose: print "testing with \"%s\"..." % tloc, | 524f4135dccc8cc916e0682728e5da0926e0fe36 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/524f4135dccc8cc916e0682728e5da0926e0fe36/test_locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
309,
2589,
18,
9898,
422,
296,
28076,
4278,
1002,
7766,
16425,
12,
315,
3916,
2865,
603,
13217,
4618,
60,
353,
16745,
471,
2780,
506,
18432,
7923,
365,
18,
1673,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
309,
2589,
18,
9898,
422,
296,
28076,
4278,
1002,
7766,
16425,
12,
315,
3916,
2865,
603,
13217,
4618,
60,
353,
16745,
471,
2780,
506,
18432,
7923,
365,
18,
1673,
6... |
class ROUNDRECT(EMR_UNKNOWN): | class _ROUNDRECT(_EMR_UNKNOWN): | def __init__(self,box=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.rclBox_left=box[0] self.rclBox_top=box[1] self.rclBox_right=box[2] self.rclBox_bottom=box[3] | 688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2147,
28657,
20,
16,
20,
16,
20,
16,
20,
3719,
30,
7141,
54,
67,
14737,
16186,
2738,
972,
12,
2890,
13,
365,
18,
86,
830,
3514,
67,
4482,
33,
2147,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2147,
28657,
20,
16,
20,
16,
20,
16,
20,
3719,
30,
7141,
54,
67,
14737,
16186,
2738,
972,
12,
2890,
13,
365,
18,
86,
830,
3514,
67,
4482,
33,
2147,
6... |
def _linux_get_pif_parm(device, param_name): | def _linux_get_pif_param(device, param_name): | def _linux_get_pif_parm(device, param_name): ip_get_dev_data = 'ip link show %s' % device rc, output = commands.getstatusoutput(ip_get_dev_data) if rc == 0: params = output.split(' ') for i in xrange(len(params)): if params[i] == param_name: return params[i+1] return '' | 143c60411a49de3de0260247369ba6e910bb1b38 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/143c60411a49de3de0260247369ba6e910bb1b38/XendPIF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
20132,
67,
588,
67,
84,
430,
67,
891,
12,
5964,
16,
579,
67,
529,
4672,
2359,
67,
588,
67,
5206,
67,
892,
273,
296,
625,
1692,
2405,
738,
87,
11,
738,
2346,
4519,
16,
876,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
20132,
67,
588,
67,
84,
430,
67,
891,
12,
5964,
16,
579,
67,
529,
4672,
2359,
67,
588,
67,
5206,
67,
892,
273,
296,
625,
1692,
2405,
738,
87,
11,
738,
2346,
4519,
16,
876,
273... |
'el_EL': u'Greek / Ελληνικά', | 'el_GR': u'Greek / Ελληνικά', | def get_languages(): languages={ 'ar_AR': u'Arabic / الْعَرَبيّة', 'bg_BG': u'Bulgarian / български', 'bs_BS': u'Bosnian / bosanski jezik', 'ca_ES': u'Catalan / Català', 'cs_CZ': u'Czech / Čeština', 'da_DK': u'Danish / Dansk', 'de_DE': u'German / Deutsch', 'el_EL': u'Greek / Ελληνικά', 'en_CA': u'English (CA)', 'en_EN': u'English (default)', 'en_GB': u'English (UK)', 'en_US': u'English (US)', 'es_AR': u'Spanish (AR) / Español (AR)', 'es_ES': u'Spanish / Español', 'et_EE': u'Estonian / Eesti keel', 'fr_BE': u'French (BE) / Français (BE)', 'fr_CH': u'French (CH) / Français (CH)', 'fr_FR': u'French / Français', 'hr_HR': u'Croatian / hrvatski jezik', 'hu_HU': u'Hungarian / Magyar', 'id_ID': u'Indonesian / Bahasa Indonesia', 'it_IT': u'Italian / Italiano', 'lt_LT': u'Lithuanian / Lietuvių kalba', 'nl_NL': u'Dutch / Nederlands', 'pl_PL': u'Polish / Język polski', 'pt_BR': u'Portugese (BR) / português (BR)', 'pt_PT': u'Portugese / português', 'ro_RO': u'Romanian / limba română', 'ru_RU': u'Russian / русский язык', 'sl_SL': u'Slovenian / slovenščina', 'sv_SE': u'Swedish / svenska', 'tr_TR': u'Turkish / Türkçe', 'uk_UK': u'Ukrainian / украї́нська мо́ва', 'zh_CN': u'Chinese (CN) / 简体中文' , 'zh_TW': u'Chinese (TW) / 正體字', } return languages | 5c6c0bf4f71f3b2580f5b9ad68510cd6e0a96e9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/5c6c0bf4f71f3b2580f5b9ad68510cd6e0a96e9b/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14045,
13332,
8191,
5899,
296,
297,
67,
985,
4278,
582,
11,
37,
20727,
335,
342,
225,
153,
105,
154,
231,
154,
245,
153,
122,
154,
241,
153,
114,
154,
241,
153,
106,
154,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
14045,
13332,
8191,
5899,
296,
297,
67,
985,
4278,
582,
11,
37,
20727,
335,
342,
225,
153,
105,
154,
231,
154,
245,
153,
122,
154,
241,
153,
114,
154,
241,
153,
106,
154,
23... |
sage: W = Words('123') sage: W('12312').is_cube_free() True sage: W('32221').is_cube_free() False sage: W().is_cube_free() True """ l = self.length() if l < 3: | sage: Word('12312').is_cube_free() True sage: Word('32221').is_cube_free() False sage: Word().is_cube_free() True TESTS: We make sure that sage: Word('111').is_cube_free() False sage: Word('2111').is_cube_free() False sage: Word('32111').is_cube_free() False """ L = self.length() if L < 3: | def is_cube_free(self): r""" Returns True if self does not contain cubes, and False otherwise. EXAMPLES:: sage: W = Words('123') sage: W('12312').is_cube_free() True sage: W('32221').is_cube_free() False sage: W().is_cube_free() True """ l = self.length() if l < 3: return True suff = self for i in xrange(0, l - 3): for ll in xrange(3, l-i+1, 3): if suff[:ll].is_cube(): return False suff = suff[1:] return True | 608ca0250585b254464e69042498a89fb0e15156 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/608ca0250585b254464e69042498a89fb0e15156/finite_word.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
21186,
67,
9156,
12,
2890,
4672,
436,
8395,
2860,
1053,
309,
365,
1552,
486,
912,
276,
23317,
16,
471,
1083,
3541,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
9926,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
21186,
67,
9156,
12,
2890,
4672,
436,
8395,
2860,
1053,
309,
365,
1552,
486,
912,
276,
23317,
16,
471,
1083,
3541,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
9926,
2... |
q = "select londiste.node_remove_seq(%s, %s)" | q = "select * from londiste.node_remove_seq(%s, %s)" | def cmd_remove_seq(self, args = []): q = "select londiste.node_remove_seq(%s, %s)" self.db_exec_many(q, [self.set_name], args) | 3e7839157f34bfc1472c4a4ab0ff625c2b8c35cf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14597/3e7839157f34bfc1472c4a4ab0ff625c2b8c35cf/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
4479,
67,
5436,
12,
2890,
16,
833,
273,
5378,
4672,
1043,
273,
315,
4025,
380,
628,
328,
1434,
376,
73,
18,
2159,
67,
4479,
67,
5436,
9275,
87,
16,
738,
87,
2225,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1797,
67,
4479,
67,
5436,
12,
2890,
16,
833,
273,
5378,
4672,
1043,
273,
315,
4025,
380,
628,
328,
1434,
376,
73,
18,
2159,
67,
4479,
67,
5436,
9275,
87,
16,
738,
87,
2225,
365,
18,
... |
Suds has sax parsed the received reply. Provides the plugin with the opportunity to inspect/modify the unmarshalled reply. | Suds has unmarshalled the received reply. Provides the plugin with the opportunity to inspect/modify the unmarshalled reply object before it is returned. | def unmarshalled(self, context): """ Suds has sax parsed the received reply. Provides the plugin with the opportunity to inspect/modify the unmarshalled reply. @param context: The reply context. The I{reply} is DOM tree. @type context: L{MessageContext} """ pass | 9b5f26a8f24f438a34ae64f6984c7f9635027e7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5377/9b5f26a8f24f438a34ae64f6984c7f9635027e7c/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11401,
1259,
12,
2890,
16,
819,
4672,
3536,
348,
1100,
87,
711,
11401,
1259,
326,
5079,
4332,
18,
28805,
326,
1909,
598,
326,
1061,
655,
13352,
358,
5334,
19,
17042,
326,
11401,
1259,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11401,
1259,
12,
2890,
16,
819,
4672,
3536,
348,
1100,
87,
711,
11401,
1259,
326,
5079,
4332,
18,
28805,
326,
1909,
598,
326,
1061,
655,
13352,
358,
5334,
19,
17042,
326,
11401,
1259,
43... |
self.do_chroot("chown %d /etc/resolv.conf" % os.getuid()) | cmd = '%s -rf %s' % (self.config['rm'], os.path.join(resolvpath, "resolv.conf")) (retval, output) = self.do(cmd) | def _prep_install(self): """prep chroot for installation""" fixown = [] # make chroot dir # make /dev, mount /proc # for item in [self.basedir, self.rootdir, self.statedir, self.resultdir, os.path.join(self.rootdir, 'var/lib/rpm'), os.path.join(self.rootdir, 'var/log'), os.path.join(self.rootdir, 'var/lock/rpm'), os.path.join(self.rootdir, 'dev'), os.path.join(self.rootdir, 'etc/rpm'), os.path.join(self.rootdir, 'tmp'), os.path.join(self.rootdir, 'var/tmp'), os.path.join(self.rootdir, 'etc/yum.repos.d')]: self._ensure_dir(item) self._mount() | 2000fb4c611290f6feffbb50116d090269bbe1a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/2000fb4c611290f6feffbb50116d090269bbe1a1/mock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
19109,
67,
5425,
12,
2890,
4672,
3536,
19109,
462,
3085,
364,
13193,
8395,
2917,
995,
273,
5378,
468,
1221,
462,
3085,
1577,
468,
1221,
342,
5206,
16,
5344,
342,
9381,
468,
364,
761... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19109,
67,
5425,
12,
2890,
4672,
3536,
19109,
462,
3085,
364,
13193,
8395,
2917,
995,
273,
5378,
468,
1221,
462,
3085,
1577,
468,
1221,
342,
5206,
16,
5344,
342,
9381,
468,
364,
761... |
yield self.decodeSingle(read or input, offset=(self.size * i + self.countFormat.size)) | game = self.decodeSingle(read or input, offset=(self.size * i + self.countFormat.size)) if game is None: return yield game | def decodeMultiple(self, input): with readable(input) as read: if read: (count,) = self.countFormat.unpack(read.read(self.countFormat.size)) else: (count,) = self.countFormat.unpack_from(input) | b5e6967f7367b1549d0a8053d7f788b6ef5c8fd7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13981/b5e6967f7367b1549d0a8053d7f788b6ef5c8fd7/protocol.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
8438,
12,
2890,
16,
810,
4672,
598,
7471,
12,
2630,
13,
487,
855,
30,
309,
855,
30,
261,
1883,
16,
13,
273,
365,
18,
1883,
1630,
18,
17309,
12,
896,
18,
896,
12,
2890,
18,
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,
2495,
8438,
12,
2890,
16,
810,
4672,
598,
7471,
12,
2630,
13,
487,
855,
30,
309,
855,
30,
261,
1883,
16,
13,
273,
365,
18,
1883,
1630,
18,
17309,
12,
896,
18,
896,
12,
2890,
18,
18... |
the_dict = { } Init().register(the_dict) Root().register(the_dict) UnitTest().register(the_dict) ListVCS().register(the_dict) Depend().register(the_dict) Query().register(the_dict) Build().register(the_dict) Rebuild().register(the_dict) Reinstall().register(the_dict) Clean().register(the_dict) DistClean().register(the_dict) Instruct().register(the_dict) BuildLabel().register(the_dict) Import().register(the_dict) Unimport().register(the_dict) Assert().register(the_dict) Retract().register(the_dict) PkgUpdate().register(the_dict) PkgCommit().register(the_dict) PkgPush().register(the_dict) Update().register(the_dict) Commit().register(the_dict) Push().register(the_dict) Pull().register(the_dict) Changed().register(the_dict) Deploy().register(the_dict) Redeploy().register(the_dict) Cleandeploy().register(the_dict) Removed().register(the_dict) Env().register(the_dict) UnCheckout().register(the_dict) Checkout().register(the_dict) CopyWithout().register(the_dict) Retry().register(the_dict) Subst().register(the_dict) Distrebuild().register(the_dict) RunIn().register(the_dict) return the_dict | _register_commands() return g_command_dict | def register_commands(): """ Returns a dictionary of command name to command object for all commands. """ the_dict = { } Init().register(the_dict) Root().register(the_dict) UnitTest().register(the_dict) ListVCS().register(the_dict) Depend().register(the_dict) Query().register(the_dict) Build().register(the_dict) Rebuild().register(the_dict) Reinstall().register(the_dict) Clean().register(the_dict) DistClean().register(the_dict) Instruct().register(the_dict) BuildLabel().register(the_dict) Import().register(the_dict) Unimport().register(the_dict) Assert().register(the_dict) Retract().register(the_dict) PkgUpdate().register(the_dict) PkgCommit().register(the_dict) PkgPush().register(the_dict) Update().register(the_dict) Commit().register(the_dict) Push().register(the_dict) Pull().register(the_dict) Changed().register(the_dict) Deploy().register(the_dict) Redeploy().register(the_dict) Cleandeploy().register(the_dict) Removed().register(the_dict) Env().register(the_dict) UnCheckout().register(the_dict) Checkout().register(the_dict) CopyWithout().register(the_dict) Retry().register(the_dict) Subst().register(the_dict) Distrebuild().register(the_dict) RunIn().register(the_dict) return the_dict | ebbee8135e2e12ed870a3abb5fc1daa6354b064f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4427/ebbee8135e2e12ed870a3abb5fc1daa6354b064f/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
67,
7847,
13332,
3536,
2860,
279,
3880,
434,
1296,
508,
358,
1296,
733,
364,
777,
4364,
18,
3536,
282,
389,
4861,
67,
7847,
1435,
225,
327,
314,
67,
3076,
67,
1576,
225,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1744,
67,
7847,
13332,
3536,
2860,
279,
3880,
434,
1296,
508,
358,
1296,
733,
364,
777,
4364,
18,
3536,
282,
389,
4861,
67,
7847,
1435,
225,
327,
314,
67,
3076,
67,
1576,
225,
2,
-100,... |
date=context['date'] | date = context['date'] | def _current_rate(self, cr, uid, ids, name, arg, context={}): res={} if 'date' in context: date=context['date'] else: date=time.strftime('%Y-%m-%d') date= date or time.strftime('%Y-%m-%d') for id in ids: cr.execute("SELECT currency_id, rate FROM res_currency_rate WHERE currency_id = %s AND name <= %s ORDER BY name desc LIMIT 1" ,(id, date)) if cr.rowcount: id, rate=cr.fetchall()[0] res[id]=rate else: res[id]=0 return res | 237c9091dc9f7becb567ed67ae88fac3e96f5a28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/237c9091dc9f7becb567ed67ae88fac3e96f5a28/res_currency.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2972,
67,
5141,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
400,
12938,
309,
296,
712,
11,
316,
819,
30,
1509,
273,
819,
3292,
712,
3546,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2972,
67,
5141,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
508,
16,
1501,
16,
819,
12938,
4672,
400,
12938,
309,
296,
712,
11,
316,
819,
30,
1509,
273,
819,
3292,
712,
3546,
46... |
if nickmask == cfg.dc_to_irc_prefix + '*': | LOG.info("TKL: Adding Qline: %s" % nickmask) nick_re = wild_to_regex(nickmask) if nick_re.match(cfg.dc_to_irc_prefix): LOG.error("DC nick prefix is Q-lined! Terminating.") self.transport.loseConnection() reactor.stop() | def handleCmd_TKL(self, prefix, args): | a810ecac836beaf01eb89be8f41e6bff1292ebbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11503/a810ecac836beaf01eb89be8f41e6bff1292ebbe/bridge_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
5931,
67,
56,
47,
48,
12,
2890,
16,
1633,
16,
833,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
5931,
67,
56,
47,
48,
12,
2890,
16,
1633,
16,
833,
4672,
2,
-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.