rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 01c9f8c35f583338e3638906ceeef9d2f29a0254 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/01c9f8c35f583338e3638906ceeef9d2f29a0254/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if inv.journal_id.type in ('sale','sale_refund', 'cash','bank'): | if inv.journal_id.type in ('sale','sale_refund', 'cash', 'bank'): | def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | 3db30f732752ade5c9c2e3f43b43414620071ca3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3db30f732752ade5c9c2e3f43b43414620071ca3/voucher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
9261,
67,
6408,
67,
3548,
12,
6408,
67,
350,
16,
3844,
4672,
2481,
67,
6011,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
9261,
18,
6408,
6134,
309,
2481,
67,
350,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
9261,
67,
6408,
67,
3548,
12,
6408,
67,
350,
16,
3844,
4672,
2481,
67,
6011,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
9261,
18,
6408,
6134,
309,
2481,
67,
350,
471,... |
else | else: | def __init__(data = None) if data == None: quickfix.UtcTimeStampField.__init__(self, 126) else quickfix.UtcTimeStampField.__init__(self, 126, 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,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
28245,
13,
469,
30,
9549,
904,
18,
57,
5111,
2153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
57,
5111,
21536,
974,
16186,
2738,
972,
12,
2890,
16,
28245,
13,
469,
30,
9549,
904,
18,
57,
5111,
2153... |
h, e = re.split(":[ ]*", stripped) all.append((h, e, stripped)) | h, e = re.split(":[ \t]*", stripped, 1) try: re.compile(e) all.append((h, e, stripped)) except re.error, cause: self.LogMsg("config", "%s - " "bad regexp %s [%s] " "in bounce_matching_header line %s" % (self.real_name, `e`, `cause`, `stripped`)) | def parse_matching_header_opt(self): | 8d003021f545a44cc2a7ba0f1a8fefcf83f2b0f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/8d003021f545a44cc2a7ba0f1a8fefcf83f2b0f9/MailList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
16271,
67,
3374,
67,
3838,
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,
... | [
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,
1109,
67,
16271,
67,
3374,
67,
3838,
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,
... |
thefile = File(target) fm = FM() load_settings(fm, ranger.arg.clean) fm.execute_file(thefile, mode=arg.mode, flags=arg.flags) | def print_function(string): print(string) runner = Runner(logfunc=print_function) load_apps(runner, ranger.arg.clean) runner(files=[File(target)], mode=arg.mode, flags=arg.flags) | def main(): """initialize objects and run the filemanager""" try: import curses except ImportError as errormessage: print(errormessage) print('ranger requires the python curses module. Aborting.') sys.exit(1) # Ensure that a utf8 locale is set. if getdefaultlocale()[1] not in ('utf8', 'UTF-8'): for locale in ('en_US.utf8', 'en_US.UTF-8'): try: setlocale(LC_ALL, locale) except: pass else: break else: setlocale(LC_ALL, '') else: setlocale(LC_ALL, '') arg = parse_arguments() ranger.arg = arg if not ranger.arg.debug: curses_interrupt_handler.install_interrupt_handler() SettingsAware._setup() if arg.targets: target = arg.targets[0] if not os.access(target, os.F_OK): print("File or directory doesn't exist: %s" % target) sys.exit(1) elif os.path.isfile(target): thefile = File(target) fm = FM() load_settings(fm, ranger.arg.clean) fm.execute_file(thefile, mode=arg.mode, flags=arg.flags) sys.exit(0) else: path = target else: path = '.' try: # Initialize objects EnvironmentAware._assign(Environment(path)) fm = FM() load_settings(fm, ranger.arg.clean) FileManagerAware._assign(fm) fm.ui = UI() # Run the file manager fm.initialize() fm.ui.initialize() fm.loop() finally: # Finish, clean up try: fm.ui.destroy() except (AttributeError, NameError): pass | 9b8942083ac4cd17cd4e75afa3a217ce7171cc14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/9b8942083ac4cd17cd4e75afa3a217ce7171cc14/__main__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
11160,
2184,
471,
1086,
326,
585,
4181,
8395,
775,
30,
1930,
30436,
1335,
11308,
487,
393,
535,
615,
30,
1172,
12,
370,
535,
615,
13,
1172,
2668,
86,
11455,
4991,
326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
11160,
2184,
471,
1086,
326,
585,
4181,
8395,
775,
30,
1930,
30436,
1335,
11308,
487,
393,
535,
615,
30,
1172,
12,
370,
535,
615,
13,
1172,
2668,
86,
11455,
4991,
326,... |
self._log.debug("File does not exist, using write mode.") | if _debug: self._log.debug("File does not exist, using write mode.") | def saveallresults(self, filename=None, filetype="hf5"): """Tries to save file as a pickled object in directory 'results'.""" now = self.lastparams["datetime"] if not filename: filename = RESULTS_PATH + "run" + now + "." + filetype self._log.info("Filename set to " + filename) if os.path.isdir(os.path.dirname(filename)): if os.path.isfile(filename): self._log.debug("File already exists! Using append data mode.") filemode = "a" else: self._log.debug("File does not exist, using write mode.") filemode = "w" #Writing to new file else: raise IOError("Directory 'results' does not exist") if filetype is "hf5": try: self.saveresultsinhdf5(filename, filemode) except IOError: raise else: raise NotImplementedError("Saving results in format %s is not implemented." % filetype) self.lastsavedfile = filename return filename | 7afed750e1593c971271a16f8f286cc65a13f5de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/7afed750e1593c971271a16f8f286cc65a13f5de/cosmomodels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
454,
4717,
12,
2890,
16,
1544,
33,
7036,
16,
18902,
1546,
76,
74,
25,
6,
4672,
3536,
13652,
358,
1923,
585,
487,
279,
6002,
1259,
733,
316,
1867,
296,
4717,
11,
12123,
225,
2037,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
454,
4717,
12,
2890,
16,
1544,
33,
7036,
16,
18902,
1546,
76,
74,
25,
6,
4672,
3536,
13652,
358,
1923,
585,
487,
279,
6002,
1259,
733,
316,
1867,
296,
4717,
11,
12123,
225,
2037,... |
return names def _filter_suite_name(self, name): tokens = name.split('.') | def _filter_suite_name(self, long, short): tokens = short.split('.') | def _filter_suite_names(self, names): names = [ self._filter_suite_name(name) for name in names ] if names.count(True) > 0: return [] return names | ab2c9fcecadba021b0b198124832914c03875027 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/ab2c9fcecadba021b0b198124832914c03875027/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2188,
67,
30676,
67,
1973,
12,
2890,
16,
1257,
4672,
1257,
273,
306,
365,
6315,
2188,
67,
30676,
67,
529,
12,
529,
13,
364,
508,
316,
1257,
308,
309,
1257,
18,
1883,
12,
5510,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
2188,
67,
30676,
67,
1973,
12,
2890,
16,
1257,
4672,
1257,
273,
306,
365,
6315,
2188,
67,
30676,
67,
529,
12,
529,
13,
364,
508,
316,
1257,
308,
309,
1257,
18,
1883,
12,
5510,
1... |
s = madstring("\x00" * 5) verify(str(s) == "\x00" * 5) | base = "\x00" * 5 s = madstring(base) verify(str(s) == base) | def rev(self): if self._rev is not None: return self._rev L = list(self) L.reverse() self._rev = self.__class__("".join(L)) return self._rev | a1092b1e868896f842cf63190156081acb43942b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a1092b1e868896f842cf63190156081acb43942b/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5588,
12,
2890,
4672,
309,
365,
6315,
9083,
353,
486,
599,
30,
327,
365,
6315,
9083,
511,
273,
666,
12,
2890,
13,
511,
18,
9845,
1435,
365,
6315,
9083,
273,
365,
16186,
1106,
972,
2932... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5588,
12,
2890,
4672,
309,
365,
6315,
9083,
353,
486,
599,
30,
327,
365,
6315,
9083,
511,
273,
666,
12,
2890,
13,
511,
18,
9845,
1435,
365,
6315,
9083,
273,
365,
16186,
1106,
972,
2932... |
digit = w_long1.digits[j] w_result.digits[i] = (accum | (digit << remshift)) accum = (digit & UPPER_MASK) >> rightshift | accum |= Twodigits(a.digits[j]) << remshift z.digits[i] = Digit(accum & MASK) accum >>= SHIFT | def lshift__Long_Long(space, w_long1, w_long2): if w_long2.sign < 0: raise OperationError(space.w_ValueError, space.wrap("negative shift count")) elif w_long2.sign == 0: return w_long1 try: b = int_w__Long(space, w_long2) except OverflowError: # b too big raise OperationError(space.w_OverflowError, space.wrap("shift count too large")) wordshift = b // LONG_BIT remshift = r_uint(b) % LONG_BIT oldsize = len(w_long1.digits) newsize = oldsize + wordshift if remshift != 0: newsize += 1 w_result = W_LongObject(space, [r_uint(0)] * newsize, w_long1.sign) rightshift = LONG_BIT - remshift LOWER_MASK = (r_uint(1) << r_uint(rightshift)) - 1 UPPER_MASK = ~LOWER_MASK accum = r_uint(0) i = wordshift j = 0 while j < oldsize: digit = w_long1.digits[j] w_result.digits[i] = (accum | (digit << remshift)) accum = (digit & UPPER_MASK) >> rightshift i += 1 j += 1 if remshift: w_result.digits[i] = accum else: assert not accum w_result._normalize() return w_result | ad929a678777d2ef2df66adef7cd3564d723bca6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ad929a678777d2ef2df66adef7cd3564d723bca6/longobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
4012,
972,
3708,
67,
3708,
12,
2981,
16,
341,
67,
5748,
21,
16,
341,
67,
5748,
22,
4672,
309,
341,
67,
5748,
22,
18,
2977,
411,
374,
30,
1002,
4189,
668,
12,
2981,
18,
91,
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,
328,
4012,
972,
3708,
67,
3708,
12,
2981,
16,
341,
67,
5748,
21,
16,
341,
67,
5748,
22,
4672,
309,
341,
67,
5748,
22,
18,
2977,
411,
374,
30,
1002,
4189,
668,
12,
2981,
18,
91,
67,... |
if p != new: | if smart_unicode(p) != smart_unicode(new): | def apply_changes(self, request, asset, changes={}, meta=(), fieldmap={}): """Apply a dictionary of changes to an asset. If anything in fact changed, this will create a record of those changes, save the asset(s), and present a message to the user. | 5db42d7e7f690fedf838ff8814774ffd3fc8f846 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9478/5db42d7e7f690fedf838ff8814774ffd3fc8f846/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
6329,
12,
2890,
16,
590,
16,
3310,
16,
3478,
28793,
2191,
33,
9334,
652,
1458,
12938,
4672,
3536,
7001,
279,
3880,
434,
3478,
358,
392,
3310,
18,
971,
6967,
316,
5410,
3550,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
6329,
12,
2890,
16,
590,
16,
3310,
16,
3478,
28793,
2191,
33,
9334,
652,
1458,
12938,
4672,
3536,
7001,
279,
3880,
434,
3478,
358,
392,
3310,
18,
971,
6967,
316,
5410,
3550,
... |
... return realfib.close, fibRes >>> closer, fibber = fib() >>> firstn(fibber, 17) | ... return fibRes >>> firstn(fib(), 17) | ... def _fib(): | 79d08acd5bd9202d73755c1c590660d0a80b44f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/79d08acd5bd9202d73755c1c590660d0a80b44f5/test_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
389,
74,
495,
13332,
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,
1372,
377,
1652,
389,
74,
495,
13332,
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,
-10... |
client = omero.client(["--Ice.Config=%s" % (self.cfg)]) client.setAgent("OMERO.processJob") | client = self.user_client("OMERO.processJob") | def processJob(self, session, params, job, current = None): """ """ self.logger.info("processJob: Session = %s, JobId = %s" % (session, job.id.val)) client = omero.client(["--Ice.Config=%s" % (self.cfg)]) client.setAgent("OMERO.processJob") try: client.joinSession(session).detachOnDestroy() prx, process = self.process(client, session, job, current, params, iskill = True) return prx finally: client.closeSession() del client | ed6233dd5f9ea69762a300178efc1ebd388bb753 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/ed6233dd5f9ea69762a300178efc1ebd388bb753/processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
2278,
12,
2890,
16,
1339,
16,
859,
16,
1719,
16,
783,
273,
599,
4672,
3536,
3536,
365,
18,
4901,
18,
1376,
2932,
2567,
2278,
30,
3877,
273,
738,
87,
16,
30455,
273,
738,
87,
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,
1207,
2278,
12,
2890,
16,
1339,
16,
859,
16,
1719,
16,
783,
273,
599,
4672,
3536,
3536,
365,
18,
4901,
18,
1376,
2932,
2567,
2278,
30,
3877,
273,
738,
87,
16,
30455,
273,
738,
87,
6,... |
print "S Error Pick 1 set at %.3f" % \ | msg = "S Error Pick 1 set at %.3f" % \ | def pick(self, event): #import ipdb; ipdb.set_trace() #We want to round from the picking location to #the time value of the nearest time sample: samp_rate = self.streams[self.stPt][0].stats.sampling_rate pickSample = event.xdata * samp_rate pickSample = round(pickSample) pickSample = pickSample / samp_rate # we need the position of the cursor location # in the seismogram array: xpos = pickSample * samp_rate # Set new P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['setPick']: self.delPLine() self.delPLabel() self.delPsynthLine() self.dicts[self.stPt]['P'] = pickSample self.drawPLine() self.drawPLabel() self.drawPsynthLine() self.drawPsynthLabel() #check if the new P pick lies outside of the Error Picks try: if self.dicts[self.stPt]['P']<self.dicts[self.stPt]['PErr1']: self.delPErr1Line() self.delPErr1() except: pass try: if self.dicts[self.stPt]['P']>self.dicts[self.stPt]['PErr2']: self.delPErr2Line() self.delPErr2() except: pass # Update all subplots self.redraw() # Console output print "P Pick set at %.3f" % self.dicts[self.stPt]['P'] # Set P Pick weight if self.dicts[self.stPt].has_key('P'): if self.flagPhase==0 and event.key==self.dictKeybindings['setPWeight0']: self.delPLabel() self.dicts[self.stPt]['PWeight']=0 self.drawPLabel() self.redraw() print "P Pick weight set to %i"%self.dicts[self.stPt]['PWeight'] if self.flagPhase==0 and event.key==self.dictKeybindings['setPWeight1']: self.delPLabel() self.dicts[self.stPt]['PWeight']=1 print "P Pick weight set to %i"%self.dicts[self.stPt]['PWeight'] self.drawPLabel() self.redraw() if self.flagPhase==0 and event.key==self.dictKeybindings['setPWeight2']: self.delPLabel() self.dicts[self.stPt]['PWeight']=2 print "P Pick weight set to %i"%self.dicts[self.stPt]['PWeight'] self.drawPLabel() self.redraw() if self.flagPhase==0 and event.key==self.dictKeybindings['setPWeight3']: self.delPLabel() self.dicts[self.stPt]['PWeight']=3 print "P Pick weight set to %i"%self.dicts[self.stPt]['PWeight'] self.drawPLabel() self.redraw() # Set P Pick polarity if self.dicts[self.stPt].has_key('P'): if self.flagPhase==0 and event.key==self.dictKeybindings['setPPolUp']: self.delPLabel() self.dicts[self.stPt]['PPol']='up' self.drawPLabel() self.redraw() print "P Pick polarity set to %s"%self.dicts[self.stPt]['PPol'] if self.flagPhase==0 and event.key==self.dictKeybindings['setPPolPoorUp']: self.delPLabel() self.dicts[self.stPt]['PPol']='poorup' self.drawPLabel() self.redraw() print "P Pick polarity set to %s"%self.dicts[self.stPt]['PPol'] if self.flagPhase==0 and event.key==self.dictKeybindings['setPPolDown']: self.delPLabel() self.dicts[self.stPt]['PPol']='down' self.drawPLabel() self.redraw() print "P Pick polarity set to %s"%self.dicts[self.stPt]['PPol'] if self.flagPhase==0 and event.key==self.dictKeybindings['setPPolPoorDown']: self.delPLabel() self.dicts[self.stPt]['PPol']='poordown' self.drawPLabel() self.redraw() print "P Pick polarity set to %s"%self.dicts[self.stPt]['PPol'] # Set P Pick onset if self.dicts[self.stPt].has_key('P'): if self.flagPhase == 0 and event.key == self.dictKeybindings['setPOnsetImpulsive']: self.delPLabel() self.dicts[self.stPt]['POnset'] = 'impulsive' self.drawPLabel() self.redraw() print "P pick onset set to %s" % self.dicts[self.stPt]['POnset'] elif self.flagPhase == 0 and event.key == self.dictKeybindings['setPOnsetEmergent']: self.delPLabel() self.dicts[self.stPt]['POnset'] = 'emergent' self.drawPLabel() self.redraw() print "P pick onset set to %s" % self.dicts[self.stPt]['POnset'] # Set new S Pick if self.flagPhase==1 and event.key==self.dictKeybindings['setPick']: self.delSLine() self.delSLabel() self.delSsynthLine() self.dicts[self.stPt]['S'] = pickSample self.dicts[self.stPt]['Saxind'] = self.axs.index(event.inaxes) self.drawSLine() self.drawSLabel() self.drawSsynthLine() self.drawSsynthLabel() #check if the new S pick lies outside of the Error Picks try: if self.dicts[self.stPt]['S']<self.dicts[self.stPt]['SErr1']: self.delSErr1Line() self.delSErr1() except: pass try: if self.dicts[self.stPt]['S']>self.dicts[self.stPt]['SErr2']: self.delSErr2Line() self.delSErr2() except: pass # Update all subplots self.redraw() # Console output print "S Pick set at %.3f" % self.dicts[self.stPt]['S'] # Set S Pick weight if self.dicts[self.stPt].has_key('S'): if self.flagPhase==1 and event.key==self.dictKeybindings['setSWeight0']: self.delSLabel() self.dicts[self.stPt]['SWeight']=0 self.drawSLabel() self.redraw() print "S Pick weight set to %i"%self.dicts[self.stPt]['SWeight'] if self.flagPhase==1 and event.key==self.dictKeybindings['setSWeight1']: self.delSLabel() self.dicts[self.stPt]['SWeight']=1 self.drawSLabel() self.redraw() print "S Pick weight set to %i"%self.dicts[self.stPt]['SWeight'] if self.flagPhase==1 and event.key==self.dictKeybindings['setSWeight2']: self.delSLabel() self.dicts[self.stPt]['SWeight']=2 self.drawSLabel() self.redraw() print "S Pick weight set to %i"%self.dicts[self.stPt]['SWeight'] if self.flagPhase==1 and event.key==self.dictKeybindings['setSWeight3']: self.delSLabel() self.dicts[self.stPt]['SWeight']=3 self.drawSLabel() self.redraw() print "S Pick weight set to %i"%self.dicts[self.stPt]['SWeight'] # Set S Pick polarity if self.dicts[self.stPt].has_key('S'): if self.flagPhase==1 and event.key==self.dictKeybindings['setSPolUp']: self.delSLabel() self.dicts[self.stPt]['SPol']='up' self.drawSLabel() self.redraw() print "S Pick polarity set to %s"%self.dicts[self.stPt]['SPol'] if self.flagPhase==1 and event.key==self.dictKeybindings['setSPolPoorUp']: self.delSLabel() self.dicts[self.stPt]['SPol']='poorup' self.drawSLabel() self.redraw() print "S Pick polarity set to %s"%self.dicts[self.stPt]['SPol'] if self.flagPhase==1 and event.key==self.dictKeybindings['setSPolDown']: self.delSLabel() self.dicts[self.stPt]['SPol']='down' self.drawSLabel() self.redraw() print "S Pick polarity set to %s"%self.dicts[self.stPt]['SPol'] if self.flagPhase==1 and event.key==self.dictKeybindings['setSPolPoorDown']: self.delSLabel() self.dicts[self.stPt]['SPol']='poordown' self.drawSLabel() self.redraw() print "S Pick polarity set to %s"%self.dicts[self.stPt]['SPol'] # Set S Pick onset if self.dicts[self.stPt].has_key('S'): if self.flagPhase == 1 and event.key == self.dictKeybindings['setSOnsetImpulsive']: self.delSLabel() self.dicts[self.stPt]['SOnset'] = 'impulsive' self.drawSLabel() self.redraw() print "S pick onset set to %s" % self.dicts[self.stPt]['SOnset'] elif self.flagPhase == 1 and event.key == self.dictKeybindings['setSOnsetEmergent']: self.delSLabel() self.dicts[self.stPt]['SOnset'] = 'emergent' self.drawSLabel() self.redraw() print "S pick onset set to %s" % self.dicts[self.stPt]['SOnset'] # Remove P Pick if self.flagPhase==0 and event.key==self.dictKeybindings['delPick']: # Try to remove all existing Pick lines and P Pick variable self.delPLine() self.delP() self.delPWeight() self.delPPol() self.delPOnset() self.delPLabel() # Try to remove existing Pick Error 1 lines and variable self.delPErr1Line() self.delPErr1() # Try to remove existing Pick Error 2 lines and variable self.delPErr2Line() self.delPErr2() # Update all subplots self.redraw() # Remove S Pick if self.flagPhase==1 and event.key==self.dictKeybindings['delPick']: # Try to remove all existing Pick lines and P Pick variable self.delSLine() self.delS() self.delSWeight() self.delSPol() self.delSOnset() self.delSLabel() # Try to remove existing Pick Error 1 lines and variable self.delSErr1Line() self.delSErr1() # Try to remove existing Pick Error 2 lines and variable self.delSErr2Line() self.delSErr2() # Update all subplots self.redraw() # Set new P Pick uncertainties if self.flagPhase==0 and event.key==self.dictKeybindings['setPickError']: # Set Flag to determine scenario try: # Set left Error Pick if pickSample < self.dicts[self.stPt]['P']: errFlag=1 # Set right Error Pick else: errFlag=2 # Set no Error Pick (no P Pick yet) except: return # Case 1 if errFlag==1: # Define global variables seen outside # Remove old lines from the plot before plotting the new ones self.delPErr1Line() # Save time value of sample nearest to error pick self.dicts[self.stPt]['PErr1'] = pickSample # Plot the lines for the P Error pick in all three traces self.drawPErr1Line() # Update all subplots self.redraw() # Console output print "P Error Pick 1 set at %.3f" % \ self.dicts[self.stPt]['PErr1'] # Case 2 if errFlag==2: # Define global variables seen outside # Remove old lines from the plot before plotting the new ones self.delPErr2Line() # Save time value of sample nearest to error pick self.dicts[self.stPt]['PErr2'] = pickSample # Plot the lines for the P Error pick in all three traces self.drawPErr2Line() # Update all subplots self.redraw() # Console output print "P Error Pick 2 set at %.3f" % \ self.dicts[self.stPt]['PErr2'] # Set new S Pick uncertainties if self.flagPhase==1 and event.key==self.dictKeybindings['setPickError']: # Set Flag to determine scenario try: # Set left Error Pick if pickSample < self.dicts[self.stPt]['S']: errFlag=1 # Set right Error Pick else: errFlag=2 # Set no Error Pick (no S Pick yet) except: return # Case 1 if errFlag==1: # Define global variables seen outside # Remove old lines from the plot before plotting the new ones self.delSErr1Line() # Save sample value of error pick (round to integer sample value) self.dicts[self.stPt]['SErr1'] = pickSample # Plot the lines for the S Error pick in all three traces self.drawSErr1Line() # Update all subplots self.redraw() # Console output print "S Error Pick 1 set at %.3f" % \ self.dicts[self.stPt]['SErr1'] # Case 2 if errFlag==2: # Define global variables seen outside # Remove old lines from the plot before plotting the new ones self.delSErr2Line() # Save sample value of error pick (round to integer sample value) self.dicts[self.stPt]['SErr2'] = pickSample # Plot the lines for the S Error pick in all three traces self.drawSErr2Line() # Update all subplots self.redraw() # Console output print "S Error Pick 2 set at %.3f" % \ self.dicts[self.stPt]['SErr2'] # Magnitude estimation picking: if self.flagPhase==2 and event.key==self.dictKeybindings['setMagMin'] and len(self.axs) > 2: if event.inaxes == self.axs[1]: self.delMagMinCross1() ydata=event.inaxes.lines[0].get_ydata() #get the first line hoping that it is the seismogram! cutoffSamples=xpos-self.magPickWindow #remember, how much samples there are before our small window! We have to add this number for our MagMinT estimation! self.dicts[self.stPt]['MagMin1']=np.min(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) # save time of magnitude minimum in seconds tmp_magtime = cutoffSamples + np.argmin(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) tmp_magtime = tmp_magtime / samp_rate self.dicts[self.stPt]['MagMin1T'] = tmp_magtime #delete old MagMax Pick, if new MagMin Pick is higher try: if self.dicts[self.stPt]['MagMin1'] > self.dicts[self.stPt]['MagMax1']: self.delMagMaxCross1() self.delMagMax1() except: pass self.drawMagMinCross1() self.redraw() print "Minimum for magnitude estimation set: %s at %.3f" % \ (self.dicts[self.stPt]['MagMin1'], self.dicts[self.stPt]['MagMin1T']) elif event.inaxes == self.axs[2]: self.delMagMinCross2() ydata=event.inaxes.lines[0].get_ydata() #get the first line hoping that it is the seismogram! cutoffSamples=xpos-self.magPickWindow #remember, how much samples there are before our small window! We have to add this number for our MagMinT estimation! self.dicts[self.stPt]['MagMin2']=np.min(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) # save time of magnitude minimum in seconds tmp_magtime = cutoffSamples + np.argmin(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) tmp_magtime = tmp_magtime / samp_rate self.dicts[self.stPt]['MagMin2T'] = tmp_magtime #delete old MagMax Pick, if new MagMin Pick is higher try: if self.dicts[self.stPt]['MagMin2'] > self.dicts[self.stPt]['MagMax2']: self.delMagMaxCross2() self.delMagMax2() except: pass self.drawMagMinCross2() self.redraw() print "Minimum for magnitude estimation set: %s at %.3f" % \ (self.dicts[self.stPt]['MagMin2'], self.dicts[self.stPt]['MagMin2T']) if self.flagPhase==2 and event.key==self.dictKeybindings['setMagMax'] and len(self.axs) > 2: if event.inaxes == self.axs[1]: self.delMagMaxCross1() ydata=event.inaxes.lines[0].get_ydata() #get the first line hoping that it is the seismogram! cutoffSamples=xpos-self.magPickWindow #remember, how much samples there are before our small window! We have to add this number for our MagMinT estimation! self.dicts[self.stPt]['MagMax1']=np.max(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) # save time of magnitude maximum in seconds tmp_magtime = cutoffSamples + np.argmax(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) tmp_magtime = tmp_magtime / samp_rate self.dicts[self.stPt]['MagMax1T'] = tmp_magtime #delete old MagMax Pick, if new MagMax Pick is higher try: if self.dicts[self.stPt]['MagMin1'] > self.dicts[self.stPt]['MagMax1']: self.delMagMinCross1() self.delMagMin1() except: pass self.drawMagMaxCross1() self.redraw() print "Maximum for magnitude estimation set: %s at %.3f" % \ (self.dicts[self.stPt]['MagMax1'], self.dicts[self.stPt]['MagMax1T']) elif event.inaxes == self.axs[2]: self.delMagMaxCross2() ydata=event.inaxes.lines[0].get_ydata() #get the first line hoping that it is the seismogram! cutoffSamples=xpos-self.magPickWindow #remember, how much samples there are before our small window! We have to add this number for our MagMinT estimation! self.dicts[self.stPt]['MagMax2']=np.max(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) # save time of magnitude maximum in seconds tmp_magtime = cutoffSamples + np.argmax(ydata[xpos-self.magPickWindow:xpos+self.magPickWindow]) tmp_magtime = tmp_magtime / samp_rate self.dicts[self.stPt]['MagMax2T'] = tmp_magtime #delete old MagMax Pick, if new MagMax Pick is higher try: if self.dicts[self.stPt]['MagMin2'] > self.dicts[self.stPt]['MagMax2']: self.delMagMinCross2() self.delMagMin2() except: pass self.drawMagMaxCross2() self.redraw() print "Maximum for magnitude estimation set: %s at %.3f" % \ (self.dicts[self.stPt]['MagMax2'],self.dicts[self.stPt]['MagMax2T']) if self.flagPhase == 2 and event.key == self.dictKeybindings['delMagMinMax']: if event.inaxes == self.axs[1]: self.delMagMaxCross1() self.delMagMinCross1() self.delMagMin1() self.delMagMax1() elif event.inaxes == self.axs[2]: self.delMagMaxCross2() self.delMagMinCross2() self.delMagMin2() self.delMagMax2() else: return self.redraw() | 4e8f536428831ce605c623aa5fc17a6b33b5b712 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/4e8f536428831ce605c623aa5fc17a6b33b5b712/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6002,
12,
2890,
16,
871,
4672,
468,
5666,
2359,
1966,
31,
2359,
1966,
18,
542,
67,
5129,
1435,
468,
3218,
2545,
358,
3643,
628,
326,
6002,
310,
2117,
358,
468,
5787,
813,
460,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6002,
12,
2890,
16,
871,
4672,
468,
5666,
2359,
1966,
31,
2359,
1966,
18,
542,
67,
5129,
1435,
468,
3218,
2545,
358,
3643,
628,
326,
6002,
310,
2117,
358,
468,
5787,
813,
460,
434,
326... |
endDate = endDate + relativedelta(days=+1) | endDate = endDate + relativedelta(days=-1) | def action_search(self, action, data): wrapper = getSAWrapper('gites_wallons') session = wrapper.session hebergementTable = wrapper.getMapper('hebergement') proprioTable = wrapper.getMapper('proprio') reservationsTable = wrapper.getMapper('reservation_proprio') provincesTable = wrapper.getMapper('province') episTable = wrapper.getMapper('link_hebergement_epis') hebergementType = data.get('hebergementType') provinces = data.get('provinces') classification = data.get('classification') capacityMin = data.get('capacityMin') roomAmount = data.get('roomAmount') checkAnimals = data.get('animals') checkSmokers = data.get('smokers') fromDate = data.get('fromDate') toDate = data.get('toDate') seeResults = self.request.form.has_key('form.seeResults') | 0af5f5005bd4a0cbc6b7569c373e2ea24a15273c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10188/0af5f5005bd4a0cbc6b7569c373e2ea24a15273c/SearchHebergement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
3072,
12,
2890,
16,
1301,
16,
501,
4672,
4053,
273,
1322,
37,
3611,
2668,
75,
2997,
67,
8019,
7008,
6134,
1339,
273,
4053,
18,
3184,
3904,
31317,
820,
1388,
273,
4053,
18,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3072,
12,
2890,
16,
1301,
16,
501,
4672,
4053,
273,
1322,
37,
3611,
2668,
75,
2997,
67,
8019,
7008,
6134,
1339,
273,
4053,
18,
3184,
3904,
31317,
820,
1388,
273,
4053,
18,
58... |
self.hash = {} | def __init__(self, htdigest, realm): self.active_nonces = [] self.hash = {} self.realm = realm self.load_htdigest(htdigest, realm) | 0c86e756a77bc08bebaf4e0d3297733829a86f16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/0c86e756a77bc08bebaf4e0d3297733829a86f16/auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
366,
4465,
360,
395,
16,
11319,
4672,
365,
18,
3535,
67,
5836,
764,
273,
5378,
365,
18,
24056,
273,
11319,
365,
18,
945,
67,
647,
10171,
12,
647,
10171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
366,
4465,
360,
395,
16,
11319,
4672,
365,
18,
3535,
67,
5836,
764,
273,
5378,
365,
18,
24056,
273,
11319,
365,
18,
945,
67,
647,
10171,
12,
647,
10171,
... | |
dagfile = open( self.__dag_file_path, 'w' ) | dagfile = open( self.__dax_file_path, 'w' ) | def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
17801,
67,
30204,
12,
2890,
4672,
3536,
2598,
777,
326,
2199,
316,
326,
6095,
358,
326,
463,
2501,
585,
18,
3536,
309,
486,
365,
16186,
72,
651,
67,
768,
67,
803,
30,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
17801,
67,
30204,
12,
2890,
4672,
3536,
2598,
777,
326,
2199,
316,
326,
6095,
358,
326,
463,
2501,
585,
18,
3536,
309,
486,
365,
16186,
72,
651,
67,
768,
67,
803,
30,
468,
... |
self.about.show() | about = gtk.glade.XML(GLADE, "about").get_widget("about") about.set_property("name", NAME) about.set_property("version", VERSION) about.show() | def on_about_activate(self, *args): self.about.show() | 1280ffa52afd10d12b040d4d9114bac4592e9aa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/1280ffa52afd10d12b040d4d9114bac4592e9aa9/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
21071,
67,
10014,
12,
2890,
16,
380,
1968,
4672,
365,
18,
21071,
18,
4500,
1435,
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,
... | [
1,
1,
1,
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,
603,
67,
21071,
67,
10014,
12,
2890,
16,
380,
1968,
4672,
365,
18,
21071,
18,
4500,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.add_ini_opts(config_parser, "ligolw_add") | self.add_ini_opts(cp, "ligolw_add") | def __init__(self,log_dir,cp,dax=False): """ cp = ConfigParser object from which options are read. """ self.__executable = cp.get('condor','ligolw_add') self.__universe = 'vanilla' CondorDAGJob.__init__(self,self.__universe,self.__executable) AnalysisJob.__init__(self,cp,dax) self.add_ini_opts(config_parser, "ligolw_add") | b91a41b6217c96f2b2b4ae9c84d8011916ee30ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/b91a41b6217c96f2b2b4ae9c84d8011916ee30ab/pipeline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1330,
67,
1214,
16,
4057,
16,
72,
651,
33,
8381,
4672,
3536,
3283,
273,
25076,
733,
628,
1492,
702,
854,
855,
18,
3536,
365,
16186,
17751,
273,
3283,
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,
1001,
2738,
972,
12,
2890,
16,
1330,
67,
1214,
16,
4057,
16,
72,
651,
33,
8381,
4672,
3536,
3283,
273,
25076,
733,
628,
1492,
702,
854,
855,
18,
3536,
365,
16186,
17751,
273,
3283,
18,... |
sage: latex(maxima(derivative(ceil(x*y*d), d,x,x,y))) d^3\,\left({{{\it \partial}^4}\over{{\it \partial}\,d^4}}\, {\it ceil}\left(d , x , y\right)\right)\,x^2\,y^3+5\,d^2\,\left({{ {\it \partial}^3}\over{{\it \partial}\,d^3}}\,{\it ceil}\left(d , x , y\right)\right)\,x\,y^2+4\,d\,\left({{{\it \partial}^2}\over{ {\it \partial}\,d^2}}\,{\it ceil}\left(d , x , y\right)\right)\,y | sage: f = function('f') sage: latex(maxima(derivative(f(x*y*d), d,x,x,y))) Traceback (most recent call last): ... NotImplementedError: arguments must be distinct variables sage: latex(maxima(derivative(f(x,y,d), d,x,x,y))) {{{\it \partial}^4}\over{{\it \partial}\,d\,{\it \partial}\,x^2\, {\it \partial}\,y}}\,f\left(x , y , d\right) | def _latex_(self): """ Return Latex representation of this Maxima object. This calls the tex command in Maxima, then does a little post-processing to fix bugs in the resulting Maxima output. EXAMPLES:: sage: maxima('sqrt(2) + 1/3 + asin(5)')._latex_() '\\sin^{-1}\\cdot5+\\sqrt{2}+{{1}\\over{3}}' | 2f49cff7c6ad43b8bcb505ffc9653116ebe34d5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2f49cff7c6ad43b8bcb505ffc9653116ebe34d5b/maxima.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
3536,
2000,
11134,
338,
4335,
434,
333,
4238,
13888,
733,
18,
225,
1220,
4097,
326,
16573,
1296,
316,
4238,
13888,
16,
1508,
1552,
279,
12720,
1603,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
3536,
2000,
11134,
338,
4335,
434,
333,
4238,
13888,
733,
18,
225,
1220,
4097,
326,
16573,
1296,
316,
4238,
13888,
16,
1508,
1552,
279,
12720,
1603,
17,
1... |
if prev_r == 0: | ring1 = get_ring(ring1_idx) ring2 = get_ring(ring2_idx) if r1 == 0: | def connect_ring(r, z, ring, prev_r, prev_z, prev_ring, marker): if _is_same_float(z, prev_z): assert not _is_same_float(r, prev_r) # we're moving purely outward--this doesn't need fans, only plane # surfaces. Special casing this leads to more freedom for TetGen # and hence better meshes. | 3ced297c55913885e4b6094b0c0e25c20e66ad10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11985/3ced297c55913885e4b6094b0c0e25c20e66ad10/tet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
67,
8022,
12,
86,
16,
998,
16,
9221,
16,
2807,
67,
86,
16,
2807,
67,
94,
16,
2807,
67,
8022,
16,
5373,
4672,
309,
389,
291,
67,
14307,
67,
5659,
12,
94,
16,
2807,
67,
94,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
67,
8022,
12,
86,
16,
998,
16,
9221,
16,
2807,
67,
86,
16,
2807,
67,
94,
16,
2807,
67,
8022,
16,
5373,
4672,
309,
389,
291,
67,
14307,
67,
5659,
12,
94,
16,
2807,
67,
94,
4... |
splitted = regsub.split(s, '[%s]*\"[%s]*' % (ws * 2)) | splitted = ts_regex.split(s, '[%s]*\"[%s]*' % (ws * 2)) | def quotes(s, ws = (string.whitespace,)): # split up quoted regions splitted = regsub.split(s, '[%s]*\"[%s]*' % (ws * 2)) split=string.split if (len(splitted) > 1): if ((len(splitted) % 2) == 0): raise QueryError, "Mismatched quotes" for i in range(1,len(splitted),2): # split the quoted region into words splitted[i] = filter(None, split(splitted[i])) # put the Proxmity operator in between quoted words for j in range(1, len(splitted[i])): splitted[i][j : j] = [ Near ] for i in range(len(splitted)-1,-1,-2): # split the non-quoted region into words splitted[i:i+1] = filter(None, split(splitted[i])) splitted = filter(None, splitted) else: # No quotes, so just split the string into words splitted = filter(None, split(s)) return splitted | cbe5af3e17af323aeccb0131d23a91ce5c8d60fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cbe5af3e17af323aeccb0131d23a91ce5c8d60fd/TextIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10681,
12,
87,
16,
4945,
273,
261,
1080,
18,
18777,
16,
3719,
30,
468,
1416,
731,
9298,
10085,
17687,
273,
3742,
67,
7584,
18,
4939,
12,
87,
16,
21848,
87,
5772,
2412,
14451,
87,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10681,
12,
87,
16,
4945,
273,
261,
1080,
18,
18777,
16,
3719,
30,
468,
1416,
731,
9298,
10085,
17687,
273,
3742,
67,
7584,
18,
4939,
12,
87,
16,
21848,
87,
5772,
2412,
14451,
87,
65,
... |
del DLFCN, sys | del sys | def __repr__(self): return '<gst.Fraction %d/%d>' % (self.num, self.denom) | 20469390bd0ce6fce22a8ad67296317121bc3dae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1020/20469390bd0ce6fce22a8ad67296317121bc3dae/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
75,
334,
18,
13724,
738,
72,
5258,
72,
1870,
738,
261,
2890,
18,
2107,
16,
365,
18,
13002,
362,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
12715,
972,
12,
2890,
4672,
327,
2368,
75,
334,
18,
13724,
738,
72,
5258,
72,
1870,
738,
261,
2890,
18,
2107,
16,
365,
18,
13002,
362,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
numstring = arange(0,2.2,.1) | numstring = arange(0,2.21,.1) | def check_arange(self): numstring = arange(0,2.2,.1) assert_equal(numstring,array([0.,0.1,0.2,0.3, 0.4,0.5,0.6,0.7, 0.8,0.9,1.,1.1, 1.2,1.3,1.4,1.5, 1.6,1.7,1.8,1.9, 2.,2.1])) numstringa = arange(3,4,.3) assert_array_equal(numstringa, array([3.,3.3,3.6,3.9])) numstringb = arange(3,27,3) assert_array_equal(numstringb,array([3.,6.,9.,12., 15.,18.,21.,24.,27.])) numstringc = arange(3.3,27,4) assert_array_equal(numstringc,array([3.3,7.3,11.3,15.3, 19.3,23.3])) | 1c136da30cb76cb9a2ee8c41c758d3b40c779b5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1c136da30cb76cb9a2ee8c41c758d3b40c779b5b/test_basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
297,
726,
12,
2890,
4672,
818,
1080,
273,
9660,
12,
20,
16,
22,
18,
5340,
29257,
21,
13,
1815,
67,
9729,
12,
2107,
1080,
16,
1126,
3816,
20,
12990,
20,
18,
21,
16,
20,
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,
866,
67,
297,
726,
12,
2890,
4672,
818,
1080,
273,
9660,
12,
20,
16,
22,
18,
5340,
29257,
21,
13,
1815,
67,
9729,
12,
2107,
1080,
16,
1126,
3816,
20,
12990,
20,
18,
21,
16,
20,
18,... |
result = result + self.doctree( entry, modname, cl, prefix + ' ') | result = result + self.formattree( entry, modname, c, prefix + ' ') | def doctree(self, tree, modname, parent=None, prefix=''): """Render in text a class tree as returned by inspect.getclasstree().""" result = '' for entry in tree: if type(entry) is type(()): cl, bases = entry result = result + prefix + classname(cl, modname) if bases and bases != (parent,): parents = map(lambda cl, m=modname: classname(cl, m), bases) result = result + '(%s)' % join(parents, ', ') result = result + '\n' elif type(entry) is type([]): result = result + self.doctree( entry, modname, cl, prefix + ' ') return result | a8b37d1a3238fb85be760a30db03672525e8f591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a8b37d1a3238fb85be760a30db03672525e8f591/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31263,
992,
12,
2890,
16,
2151,
16,
16037,
16,
982,
33,
7036,
16,
1633,
2218,
11,
4672,
3536,
3420,
316,
977,
279,
667,
2151,
487,
2106,
635,
5334,
18,
588,
830,
345,
334,
992,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31263,
992,
12,
2890,
16,
2151,
16,
16037,
16,
982,
33,
7036,
16,
1633,
2218,
11,
4672,
3536,
3420,
316,
977,
279,
667,
2151,
487,
2106,
635,
5334,
18,
588,
830,
345,
334,
992,
1435,
... |
task_dismiss.add_accelerator( | self.dismiss_mi.add_accelerator( | def _init_accelerators(self): | c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
8981,
22990,
3062,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
8981,
22990,
3062,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
m_cmd = 'mount -t iso9660 -v -o loop,ro %s %s' % (self.cdrom_iso, | m_cmd = 'mount -t iso9660 -v -o loop,ro %s %s' % (self.cdrom_cd1, | def setup_pxe_boot(self): """ Sets up a PXE boot environment using the built in qemu TFTP server. Copies the PXE Linux bootloader pxelinux.0 from the host (needs the pxelinux package or equivalent for your distro), and vmlinuz and initrd.img files from the CD to a directory that qemu will serve trough TFTP to the VM. """ print "Setting up PXE boot using TFTP root %s" % self.tftp_root | ceb8d13a359f769d2466312b3698d9f3d9438d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/ceb8d13a359f769d2466312b3698d9f3d9438d01/unattended.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
4430,
73,
67,
7137,
12,
2890,
4672,
3536,
11511,
731,
279,
453,
60,
41,
4835,
3330,
1450,
326,
6650,
316,
1043,
24995,
399,
17104,
1438,
18,
28506,
606,
326,
453,
60,
41,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
4430,
73,
67,
7137,
12,
2890,
4672,
3536,
11511,
731,
279,
453,
60,
41,
4835,
3330,
1450,
326,
6650,
316,
1043,
24995,
399,
17104,
1438,
18,
28506,
606,
326,
453,
60,
41,
133... |
self.popupMenu.setZ((self.selectedIndex + 1)*self.maxHeight - fb[3]) | self.popupMenu.setZ( self, self.minZ + (self.selectedIndex + 1)*self.maxHeight) | def showPopupMenu(self, event = None): """ Make popup visible and try to position it just to right of mouse click with currently selected item aligned with button. Adjust popup position if default position puts it outside of visible screen region """ b = self.getBounds() fb = self.popupMenu.getBounds() # Where did the user click his mouse? if (base.mouseWatcherNode.hasMouse()): xPos = base.mouseWatcherNode.getMouseX() self.popupMenu.setX(render2d, xPos) else: # If no mouse watcher, use midpoint of menu button xPos = (b[1] - b[0])/2.0 - fb[0] self.popupMenu.setX(xPos) # Try to set height to line up selected item with button self.popupMenu.setZ((self.selectedIndex + 1)*self.maxHeight - fb[3]) # Make sure the whole popup menu is visible pos = self.popupMenu.getPos(render2d) scale = self.popupMenu.getScale(render2d) # How are we doing relative to the right side of the screen maxX = pos[0] + fb[1] * scale[0] if maxX > 1.0: # Need to move menu to the left self.popupMenu.setX(render2d, pos[0] + (1.0 - maxX)) # How about up and down? minZ = pos[2] + fb[2] * scale[2] maxZ = pos[2] + fb[3] * scale[2] if minZ < -1.0: # Menu too low, move it up self.popupMenu.setZ(render2d, pos[2] + (-1.0 - minZ)) elif maxZ > 1.0: # Menu too high, move it down self.popupMenu.setZ(render2d, pos[2] + (1.0 - maxZ)) # Show the menu in its new position self.popupMenu.show() # Also display cancel frame to catch clicks outside of the popup self.cancelFrame.show() # Position and scale cancel frame to fill entire window self.cancelFrame.setPos(render2d,0,0,0) self.cancelFrame.setScale(render2d,1,1,1) | 2a2d4ccdc0a39d88ee948e91bda3be31cfed8549 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/2a2d4ccdc0a39d88ee948e91bda3be31cfed8549/DirectOptionMenu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
13770,
4599,
12,
2890,
16,
871,
273,
599,
4672,
3536,
4344,
10431,
6021,
471,
775,
358,
1754,
518,
2537,
358,
2145,
434,
7644,
4682,
598,
4551,
3170,
761,
13939,
598,
3568,
18,
177... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
13770,
4599,
12,
2890,
16,
871,
273,
599,
4672,
3536,
4344,
10431,
6021,
471,
775,
358,
1754,
518,
2537,
358,
2145,
434,
7644,
4682,
598,
4551,
3170,
761,
13939,
598,
3568,
18,
177... |
p = Parser(integer.Integer, R, LookupNameMaker({self.variable_name(): self.gen()}, R)) | p = Parser(Integer, R, LookupNameMaker({self.variable_name(): self.gen()}, R)) | def __call__(self, x=None, check=True, is_gen = False, construct=False, absprec = None): r""" Coerce \code{x} into this univariate polynomial ring, possibly non-canonically. | d309cca062e4df02a780dcc66a4a8c2cd6e84265 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d309cca062e4df02a780dcc66a4a8c2cd6e84265/polynomial_ring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
33,
7036,
16,
866,
33,
5510,
16,
353,
67,
4507,
273,
1083,
16,
4872,
33,
8381,
16,
2417,
4036,
273,
599,
4672,
436,
8395,
7695,
2765,
521,
710,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
33,
7036,
16,
866,
33,
5510,
16,
353,
67,
4507,
273,
1083,
16,
4872,
33,
8381,
16,
2417,
4036,
273,
599,
4672,
436,
8395,
7695,
2765,
521,
710,
95... |
self.useragent = "python-wikitools/1.0" | self.useragent = "python-wikitools/%s" % VERSION | def logout(self): params = { 'action': 'logout' } if self.maxlag < 120: params['maxlag'] = 120 cookiefile = self.cookiepath + str(hash(self.username+' - '+self.apibase))+'.cookies' try: os.remove(cookiefile) except: pass req = api.APIRequest(self, params, write=True) # action=logout returns absolutely nothing, which json.loads() treats as False # causing APIRequest.query() to get stuck in a loop req.opener.open(req.request) self.cookies = WikiCookieJar() self.username = '' self.maxlag = 5 self.useragent = "python-wikitools/1.0" self.limit = 500 return True | 34d5ff1580e3c19835c15c5e841f6e84edbee7e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8398/34d5ff1580e3c19835c15c5e841f6e84edbee7e3/wiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12735,
12,
2890,
4672,
859,
273,
288,
296,
1128,
4278,
296,
21229,
11,
289,
309,
365,
18,
1896,
22532,
411,
15743,
30,
859,
3292,
1896,
22532,
3546,
273,
15743,
3878,
768,
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,
12735,
12,
2890,
4672,
859,
273,
288,
296,
1128,
4278,
296,
21229,
11,
289,
309,
365,
18,
1896,
22532,
411,
15743,
30,
859,
3292,
1896,
22532,
3546,
273,
15743,
3878,
768,
273,
365,
18,
... |
return ( name == 'embedded_data' or name == 'embedded_data_byte' ) | return ( name == 'embedded_data' or name == 'embedded_data_byte' or name == 'VendorUnique') | def isEmbedded(self, name): return ( name == 'embedded_data' or name == 'embedded_data_byte' ) | b3372e0c1fb55e3ec089dd60e08bc29340afc811 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/675/b3372e0c1fb55e3ec089dd60e08bc29340afc811/pxldis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
14980,
12,
2890,
16,
508,
4672,
327,
261,
508,
422,
296,
20722,
67,
892,
11,
578,
508,
422,
296,
20722,
67,
892,
67,
7229,
11,
262,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
14980,
12,
2890,
16,
508,
4672,
327,
261,
508,
422,
296,
20722,
67,
892,
11,
578,
508,
422,
296,
20722,
67,
892,
67,
7229,
11,
262,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
global main_menu_selected | def eventhandler(event = None, menuw=None, arg=None): if event == rc.IDENTIFY_MEDIA: if menuw.menustack[1] == menuw.menustack[-1]: main_menu_selected = menuw.all_items.index(menuw.menustack[1].selected) menuw.menustack[1].choices = main_menu_generate() global main_menu_selected menuw.menustack[1].selected = menuw.menustack[1].choices[main_menu_selected] if menuw.menustack[1] == menuw.menustack[-1]: menuw.init_page() menuw.refresh() if event == rc.EJECT: rom = arg[0] if not rom: return # find the drive pos = 0 for (dir, device, name, tray, lastcode, info) in config.ROM_DRIVES: if rom == dir: tray_open = tray config.ROM_DRIVES[pos] = (dir, device, name, (tray + 1) % 2, lastcode, info) break pos += 1 if tray_open: if DEBUG: print 'Inserting %s' % rom osd.popup_box( 'mounting %s' % rom ) osd.update() # close the tray, identifymedia does the rest os.system('eject -t %s' % rom) else: if DEBUG: print 'Ejecting %s' % rom os.system('eject %s' % rom) | f1678c9e05df8181c5ad63bf77bf9d85a44328f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f1678c9e05df8181c5ad63bf77bf9d85a44328f7/movie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
4176,
12,
2575,
273,
599,
16,
3824,
91,
33,
7036,
16,
1501,
33,
7036,
4672,
225,
309,
871,
422,
4519,
18,
13355,
12096,
67,
26368,
30,
309,
3824,
91,
18,
27617,
641,
484,
63,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
4176,
12,
2575,
273,
599,
16,
3824,
91,
33,
7036,
16,
1501,
33,
7036,
4672,
225,
309,
871,
422,
4519,
18,
13355,
12096,
67,
26368,
30,
309,
3824,
91,
18,
27617,
641,
484,
63,
21... | |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 562) else quickfix.DoubleField.__init__(self, 562, 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,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
8898,
13,
469,
9549,
904,
18,
5265,
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,
0,
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,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
5265,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
8898,
13,
469,
9549,
904,
18,
5265,
974,
16186,
2738,
... |
self.text = self.text[:-1] | self.label.set_text(self.label.get_text()[:-1]) | def key_press(self, event): code_num = event.codeMaps[event.type].toNumber(event.code) if code_num in self.keymap: key_normal, key_shift, key_dead, key_deadshift = self.keymap[code_num] else: print 'No mapping for scan_code %d' % code_num return | 029c9f2b6570b89ebc7e2786f6f41cd5b806dacb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4183/029c9f2b6570b89ebc7e2786f6f41cd5b806dacb/listenkdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
1028,
12,
2890,
16,
871,
4672,
981,
67,
2107,
273,
871,
18,
710,
8903,
63,
2575,
18,
723,
8009,
869,
1854,
12,
2575,
18,
710,
13,
309,
981,
67,
2107,
316,
365,
18,
856,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
1028,
12,
2890,
16,
871,
4672,
981,
67,
2107,
273,
871,
18,
710,
8903,
63,
2575,
18,
723,
8009,
869,
1854,
12,
2575,
18,
710,
13,
309,
981,
67,
2107,
316,
365,
18,
856,
14... |
self.addchooser = gtk.FileChooserDialog("Add files...", | self.addchooser = gtk.FileChooserDialog(_("Add files..."), | def __init__(self, glade): self.widget = glade.get_widget("window") self.filelist = FileList(self, glade) self.filelist_selection = self.filelist.widget.get_selection() self.filelist_selection.connect("changed", self.selection_changed) self.existsdialog = glade.get_widget("existsdialog") self.existsdialog.message = glade.get_widget("exists_message") self.existslabel = glade.get_widget("existslabel") self.progressbar = glade.get_widget("progressbar") self.status = glade.get_widget("statustext") self.about = glade.get_widget("about") self.prefs = PreferencesDialog(glade) self.addchooser = gtk.FileChooserDialog("Add files...", self.widget, gtk.FILE_CHOOSER_ACTION_OPEN, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) self.addchooser.set_select_multiple(True) self.connect(glade, [self.prefs]) self.about.set_property("name", NAME) self.about.set_property("version", VERSION) | 3d05bb4765be57508ad4a5c21668c8f8d9795c8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/3d05bb4765be57508ad4a5c21668c8f8d9795c8f/soundconverter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
5118,
2486,
4672,
225,
365,
18,
6587,
273,
5118,
2486,
18,
588,
67,
6587,
2932,
5668,
7923,
365,
18,
7540,
5449,
273,
1387,
682,
12,
2890,
16,
5118,
2486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5118,
2486,
4672,
225,
365,
18,
6587,
273,
5118,
2486,
18,
588,
67,
6587,
2932,
5668,
7923,
365,
18,
7540,
5449,
273,
1387,
682,
12,
2890,
16,
5118,
2486... |
print a.getGeoIdFromGeoUrl( "Europe/Austria/Vienna/Vienna" ) | def testGetGeoIdFromGeoUrl(self): """ tests the resolution from geurls to geoid's """ for geoId in ( 2761367, # Vienna 4277145, # Perth 2063523, 2599670, # Bosten 6470560, # New York 2772400): # Linz | 27e1e886adf17f0dacdedca0a2fefb6dd91c2782 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6604/27e1e886adf17f0dacdedca0a2fefb6dd91c2782/georesolve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
967,
12447,
548,
1265,
12447,
1489,
12,
2890,
4672,
3536,
7434,
326,
7861,
628,
8244,
10518,
358,
8244,
839,
1807,
3536,
364,
7856,
548,
316,
261,
576,
6669,
3437,
9599,
16,
225,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
967,
12447,
548,
1265,
12447,
1489,
12,
2890,
4672,
3536,
7434,
326,
7861,
628,
8244,
10518,
358,
8244,
839,
1807,
3536,
364,
7856,
548,
316,
261,
576,
6669,
3437,
9599,
16,
225,
4... | |
num_versions = 0 for v, t, author, comment, ipnr in page.get_history(): num_versions += 1 if num_versions > 1: break data.update({'new_version': version, 'old_version': old_version, 'num_versions': num_versions}) | data.update({'new_version': version, 'old_version': old_version}) | def _render_confirm_delete(self, req, page): if page.readonly: req.perm(page.resource).require('WIKI_ADMIN') else: req.perm(page.resource).require('WIKI_DELETE') | 54289e2698b899383c87152843cf7bb96b433513 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/54289e2698b899383c87152843cf7bb96b433513/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
10927,
67,
3733,
12,
2890,
16,
1111,
16,
1363,
4672,
309,
1363,
18,
16365,
30,
1111,
18,
12160,
12,
2433,
18,
3146,
2934,
6528,
2668,
23109,
47,
45,
67,
15468,
6134,
469... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5902,
67,
10927,
67,
3733,
12,
2890,
16,
1111,
16,
1363,
4672,
309,
1363,
18,
16365,
30,
1111,
18,
12160,
12,
2433,
18,
3146,
2934,
6528,
2668,
23109,
47,
45,
67,
15468,
6134,
469... |
return None | tag_006_says_electric = True | def index_fields(data, want, check_author = True): if str(data)[6:8] != 'am': # only want books return None edition = {} # ['006', '010', '020', '035', '245'] author = { '100': 'person', '110': 'org', '111': 'even', } if check_author: want += author.keys() fields = get_tag_lines(data, ['006', '008', '260'] + want) read_tag = { '001': (read_control_number, 'control_number'), '010': (read_lccn, 'lccn'), '020': (read_isbn, 'isbn'), '035': (read_oclc, 'oclc'), '245': (read_short_title, 'title'), } seen_008 = False oclc_001 = False for tag, line in fields: if tag == '003': # control number identifier if line.lower().startswith('ocolc'): oclc_001 = True continue if tag == '006': if line[0] == 'm': # don't want electronic resources return None continue if tag == '008': if seen_008: # dup return None seen_008 = True continue if tag == '260': if line.find('\x1fh[sound') != -1: # sound recording return None continue if tag in author: if 'author' in edition: return None else: edition['author'] = author[tag] continue assert tag in read_tag proc, key = read_tag[tag] try: found = proc(line) except SoundRecording: return None if found: edition.setdefault(key, []).extend(found) if oclc_001: add_oclc(edition) if 'control_number' in edition: del edition['control_number'] if not seen_008: return None | 711128b756a8e17fe7fd5c4d09bb2b10b651b83d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/711128b756a8e17fe7fd5c4d09bb2b10b651b83d/fast_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
67,
2821,
12,
892,
16,
2545,
16,
866,
67,
4161,
273,
1053,
4672,
309,
609,
12,
892,
25146,
26,
30,
28,
65,
480,
296,
301,
4278,
468,
1338,
2545,
6978,
87,
1047,
67,
713,
26,
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,
770,
67,
2821,
12,
892,
16,
2545,
16,
866,
67,
4161,
273,
1053,
4672,
309,
609,
12,
892,
25146,
26,
30,
28,
65,
480,
296,
301,
4278,
468,
1338,
2545,
6978,
87,
1047,
67,
713,
26,
6... |
TRAITS = etsdep('Traits', '3.2.1') | TRAITS = etsdep('Traits', '3.3.0') | def etsdep(p, min, max=None, literal=False): require = '%s >=%s.dev' % (p, min) if max is not None: if literal is False: require = '%s, <%s.a' % (require, max) else: require = '%s, <%s' % (require, max) return require | bc1627524249d268d3af8c2523fcc688c60bbdd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13163/bc1627524249d268d3af8c2523fcc688c60bbdd0/setup_data.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
225,
2413,
15037,
12,
84,
16,
1131,
16,
943,
33,
7036,
16,
7158,
33,
8381,
4672,
2583,
273,
1995,
87,
1545,
9,
87,
18,
5206,
11,
738,
261,
84,
16,
1131,
13,
309,
943,
353,
486,
599... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
225,
2413,
15037,
12,
84,
16,
1131,
16,
943,
33,
7036,
16,
7158,
33,
8381,
4672,
2583,
273,
1995,
87,
1545,
9,
87,
18,
5206,
11,
738,
261,
84,
16,
1131,
13,
309,
943,
353,
486,
599... |
lpx_erase_prob = cfunc(_lpx+'erase_prob', None, ('lp', POINTER(LPX), 1), ) | glp_erase_prob = cfunc(_glp+'erase_prob', None, ('lp', POINTER(LPX), 1), ) | def LPXKKT_FIELDS(): return [ ('pe_ae_max', c_double), # largest absolute error ('pe_ae_row', c_int), # number of row with largest absolute error ('pe_re_max', c_double), # largest relative error ('pe_re_row', c_int), # number of row with largest relative error ('pe_quality', c_int), # quality of primal solution | 5347b773228683ad9c15ceb36328b77bc584a440 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1322/5347b773228683ad9c15ceb36328b77bc584a440/glpk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
52,
60,
47,
47,
56,
67,
12683,
13332,
327,
306,
7707,
347,
67,
8906,
67,
1896,
2187,
276,
67,
9056,
3631,
468,
12756,
4967,
555,
7707,
347,
67,
8906,
67,
492,
2187,
276,
67,
474... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
511,
52,
60,
47,
47,
56,
67,
12683,
13332,
327,
306,
7707,
347,
67,
8906,
67,
1896,
2187,
276,
67,
9056,
3631,
468,
12756,
4967,
555,
7707,
347,
67,
8906,
67,
492,
2187,
276,
67,
474... |
def list_fs_templates(self, metatype): | def list_fs_templates(self, portal): | def list_fs_templates(self, metatype): """ return the list of the filesystem templates """ portal_path = self.get_portal_path(metatype) skel_handler, error = skel_parser().parse(readFile(join(portal_path, 'skel', 'skel.xml'), 'r')) if skel_handler.root.forms is not None: return [f.id for f in skel_handler.root.forms.forms] | ba7db54416bb4a2a8ec35d231a25c000f8c28f7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/ba7db54416bb4a2a8ec35d231a25c000f8c28f7e/NaayaUpdater.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2556,
67,
8502,
12,
2890,
16,
11899,
4672,
3536,
327,
326,
666,
434,
326,
6496,
5539,
3536,
11899,
67,
803,
273,
365,
18,
588,
67,
24386,
67,
803,
12,
10578,
6361,
13,
4343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
2556,
67,
8502,
12,
2890,
16,
11899,
4672,
3536,
327,
326,
666,
434,
326,
6496,
5539,
3536,
11899,
67,
803,
273,
365,
18,
588,
67,
24386,
67,
803,
12,
10578,
6361,
13,
4343,
... |
cmd = 'if type gcc &>/dev/null; then CC=gcc; else CC=cc; fi;' \ | cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; else CC=cc; fi;' \ | def _findLib_gcc(name): expr = '[^\(\)\s]*lib%s\.[^\(\)\s]*' % name fdout, ccout = tempfile.mkstemp() os.close(fdout) cmd = 'if type gcc &>/dev/null; then CC=gcc; else CC=cc; fi;' \ '$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name try: fdout, outfile = tempfile.mkstemp() os.close(fdout) fd = os.popen(cmd) trace = fd.read() err = fd.close() finally: try: os.unlink(outfile) except OSError, e: if e.errno != errno.ENOENT: raise try: os.unlink(ccout) except OSError, e: if e.errno != errno.ENOENT: raise res = re.search(expr, trace) if not res: return None return res.group(0) | d059e7b42301856ea006ec4a11b0953a65c2b6c8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/d059e7b42301856ea006ec4a11b0953a65c2b6c8/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4720,
5664,
67,
75,
952,
12,
529,
4672,
3065,
273,
5271,
17134,
4713,
5153,
87,
5772,
2941,
9,
87,
5834,
15441,
4713,
5153,
87,
65,
4035,
738,
508,
5194,
659,
16,
4946,
659,
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,
4720,
5664,
67,
75,
952,
12,
529,
4672,
3065,
273,
5271,
17134,
4713,
5153,
87,
5772,
2941,
9,
87,
5834,
15441,
4713,
5153,
87,
65,
4035,
738,
508,
5194,
659,
16,
4946,
659,
273,
... |
new_ids.append(self.create(cursor, user, data, context=context)) | new_ids[data_id] = self.create(cursor, user, data, context=context) | def convert_data(fields, data): for field_name in fields: ftype = fields[field_name]['type'] | a8c552e074ae4084869c9aef866c140d255693ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/a8c552e074ae4084869c9aef866c140d255693ab/modelstorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
892,
12,
2821,
16,
501,
4672,
364,
652,
67,
529,
316,
1466,
30,
21219,
273,
1466,
63,
1518,
67,
529,
23962,
723,
3546,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
892,
12,
2821,
16,
501,
4672,
364,
652,
67,
529,
316,
1466,
30,
21219,
273,
1466,
63,
1518,
67,
529,
23962,
723,
3546,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
os.path.isdir(absolute_path[:-6]): | os.path.isdir(absolute_path[:-6]): | def blosxom_process_path_info(args): """ Process HTTP PATH_INFO for URI according to path specifications, fill in data dict accordingly. The paths specification looks like this: - C{/foo.html} and C{/cat/foo.html} - file foo.* in / and /cat - C{/cat} - category - C{/2002} - category - C{/2002} - year - C{/2002/Feb} (or 02) - Year and Month - C{/cat/2002/Feb/31} - year and month day in category. @param args: dict containing the incoming Request object @type args: object """ request = args['request'] config = request.getConfiguration() data = request.getData() pyhttp = request.getHttp() form = request.getForm() # figure out which flavour to use. the flavour is determined # by looking at the "flav" post-data variable, the "flav" # query string variable, the "default_flavour" setting in the # config.py file, or "html" flav = config.get("default_flavour", "html") if form.has_key("flav"): flav = form["flav"].value data['flavour'] = flav data['pi_yr'] = '' data['pi_mo'] = '' data['pi_da'] = '' path_info = pyhttp.get("PATH_INFO", "") data['root_datadir'] = config['datadir'] data["pi_bl"] = path_info # first we check to see if this is a request for an index and we can pluck # the extension (which is certainly a flavour) right off. newpath, ext = os.path.splitext(path_info) if newpath.endswith("/index") and ext: # there is a flavour-like thing, so that's our new flavour # and we adjust the path_info to the new filename data["flavour"] = ext[1:] path_info = newpath while path_info and path_info.startswith("/"): path_info = path_info[1:] absolute_path = os.path.join(config["datadir"], path_info) path_info = path_info.split("/") if os.path.isdir(absolute_path): # this is an absolute path data['root_datadir'] = absolute_path data['bl_type'] = 'dir' elif absolute_path.endswith("/index") and \ os.path.isdir(absolute_path[:-6]): # this is an absolute path with /index at the end of it data['root_datadir'] = absolute_path[:-6] data['bl_type'] = 'dir' else: # this is either a file or a date ext = tools.what_ext(data["extensions"].keys(), absolute_path) if not ext: # it's possible we didn't find the file because it's got a flavour # thing at the end--so try removing it and checking again. newpath, flav = os.path.splitext(absolute_path) if flav: ext = tools.what_ext(data["extensions"].keys(), newpath) if ext: # there is a flavour-like thing, so that's our new flavour # and we adjust the absolute_path and path_info to the new # filename data["flavour"] = flav[1:] absolute_path = newpath path_info, flav = os.path.splitext("/".join(path_info)) path_info = path_info.split("/") if ext: # this is a file data["bl_type"] = "file" data["root_datadir"] = absolute_path + "." + ext else: data["bl_type"] = "dir" # it's possible to have category/category/year/month/day # (or something like that) so we pluck off the categories # here. pi_bl = "" while len(path_info) > 0 and \ not (len(path_info[0]) == 4 and path_info[0].isdigit()): pi_bl = os.path.join(pi_bl, path_info.pop(0)) # handle the case where we do in fact have a category # preceeding the date. if pi_bl: pi_bl = pi_bl.replace("\\", "/") data["pi_bl"] = pi_bl data["root_datadir"] = os.path.join(config["datadir"], pi_bl) if len(path_info) > 0: item = path_info.pop(0) # handle a year token if len(item) == 4 and item.isdigit(): data['pi_yr'] = item item = "" if (len(path_info) > 0): item = path_info.pop(0) # handle a month token if item in tools.MONTHS: data['pi_mo'] = item item = "" if (len(path_info) > 0): item = path_info.pop(0) # handle a day token if len(item) == 2 and item.isdigit(): data["pi_da"] = item item = "" if len(path_info) > 0: item = path_info.pop(0) # if the last item we picked up was "index", then we # just ditch it because we don't need it. if item == "index": item = "" # if we picked off an item we don't recognize and/or # there is still stuff in path_info to pluck out, then # it's likely this wasn't a date. if item or len(path_info) > 0: data["bl_type"] = "dir" data["root_datadir"] = absolute_path # construct our final URL url = config['base_url'] if data['pi_bl'].startswith("/") and url.endswith("/"): url = url[:-1] + data['pi_bl'] elif data['pi_bl'].startswith("/") or url.endswith("/"): url = url + data["pi_bl"] else: url = url + "/" + data['pi_bl'] data['url'] = url # set path_info to our latest path_info data['path_info'] = path_info | 2d889182f07a1e20247eba2168cf4d18f81fcdab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11836/2d889182f07a1e20247eba2168cf4d18f81fcdab/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
383,
30319,
362,
67,
2567,
67,
803,
67,
1376,
12,
1968,
4672,
3536,
4389,
2239,
7767,
67,
5923,
364,
3699,
4888,
358,
589,
21950,
16,
3636,
316,
501,
2065,
15905,
18,
225,
1021,
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,
324,
383,
30319,
362,
67,
2567,
67,
803,
67,
1376,
12,
1968,
4672,
3536,
4389,
2239,
7767,
67,
5923,
364,
3699,
4888,
358,
589,
21950,
16,
3636,
316,
501,
2065,
15905,
18,
225,
1021,
2... |
for elt in self: if elt not in otherdata: data[elt] = value | for elt in ifilter(other._data.has_key, self, True): data[elt] = value | def __sub__(self, other): """Return the difference of two sets as a new Set. | 0a7146d20d48c52fa29ddcfa805f33fd4afbb5a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0a7146d20d48c52fa29ddcfa805f33fd4afbb5a0/sets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
225,
1001,
1717,
972,
12,
2890,
16,
1308,
4672,
3536,
990,
326,
7114,
434,
2795,
1678,
487,
279,
394,
1000,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
225,
1001,
1717,
972,
12,
2890,
16,
1308,
4672,
3536,
990,
326,
7114,
434,
2795,
1678,
487,
279,
394,
1000,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
msg = "Web server returned: %s" % page | msg = "url: '%s' \n returned: %s" % (url,page.strip()) | def _download_content(url, request, path_to_figures): """_download_images(url:string, request:string, path_to_figures:string) -> (Boolean, message) Downloads all images and pdf files listed in url and saves them to path_to_figures """ website = url url = request try: page = download_as_text(url) # we will look for images and other files embedded in the html re_imgs = re.compile('<img[^>]*/>') re_src = re.compile('(.*src=")([^"]*)"') re_a = re.compile('<a[^>]*>[^<]*</a>') re_href = re.compile('(.*href=")([^"]*)"') images = re_imgs.findall(page) files = re_a.findall(page) failed = False msg = '' if len(images) > 0 or len(files) > 0: for i in images: pngfile = re_src.match(i).groups()[1] if not check_url(pngfile): img = website + pngfile else: img = pngfile if not download(img, os.path.join(path_to_figures, os.path.basename(img))): msg += "Error when downloading image: %s. <return>" %img failed = True for f in files: otherfile = re_href.match(f).groups()[1] if not check_url(otherfile): filename = website + otherfile else: filename = otherfile if not download(filename, os.path.join(path_to_figures, os.path.basename(filename))): msg += "Error when downloading file: %s. <return>"%filename failed = True if not failed : return (True, "") else: return (False, msg) else: msg = "Web server returned: %s" % page return (False, msg) except Exception, e: return (False, str(e)) | 16f522c459c512f6eec949f3d5095195f2b262ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/16f522c459c512f6eec949f3d5095195f2b262ed/includevistrail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7813,
67,
1745,
12,
718,
16,
590,
16,
589,
67,
869,
67,
470,
1823,
4672,
3536,
67,
7813,
67,
7369,
12,
718,
30,
1080,
16,
590,
30,
1080,
16,
589,
67,
869,
67,
470,
1823,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7813,
67,
1745,
12,
718,
16,
590,
16,
589,
67,
869,
67,
470,
1823,
4672,
3536,
67,
7813,
67,
7369,
12,
718,
30,
1080,
16,
590,
30,
1080,
16,
589,
67,
869,
67,
470,
1823,
30,
... |
newparams = params.copy() if p != 0: newparams = ((1-exp(-params[k:k+p]))/(1+exp(-params[k:k+p]))).copy() tmp = ((1-exp(-params[k:k+p]))/(1+exp(-params[k:k+p]))).copy() for j in range(1,p): a = newparams[j] for kiter in range(j): tmp[kiter] -= a * newparams[j-kiter-1] newparams[:j] = tmp[:j] params[k:k+p] = newparams if q != 0: newparams = ((1-exp(-params[k+p:k+p+q]))/\ (1+exp(-params[k+p:k+p+q]))).copy() tmp = ((1-exp(-params[k+p:k+p+q]))/\ (1+exp(-params[k+p:k+p+q]))).copy() for j in range(1,q): b = newparams[j] for kiter in range(j): tmp[kiter] += b * newparams[j-kiter-1] newparams[:j] = tmp[:j] params[k+p:k+p+q] = newparams | newparams = self._transparams(start_params) | def loglike(self, params): | a2ebbffcc97400bdef8eb719a24a69494b0222ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12658/a2ebbffcc97400bdef8eb719a24a69494b0222ba/kalmanf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
5625,
12,
2890,
16,
859,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
613,
5625,
12,
2890,
16,
859,
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,... |
'external_referential_id':external_referential_id | 'external_referential_id':external_referential_id, 'module':'base_external_referentials' | def ext_import(self,cr, uid, data, external_referential_id, defaults={}, context={}): #Inward data has to be list of dictionary #This function will import a given set of data as list of dictionary into Open ERP if data: write_ids = [] #Will record ids of records modified, not sure if will be used create_ids = [] #Will record ids of newly created records, not sure if will be used mapping_id = self.pool.get('external.mapping').search(cr,uid,[('model','=',self._name),('referential_id','=',external_referential_id)]) if mapping_id: #If a mapping exists for current model, search for mapping lines mapping_line_ids = self.pool.get('external.mapping.line').search(cr,uid,[('mapping_id','=',mapping_id),('type','in',['in_out','in'])]) mapping_lines = self.pool.get('external.mapping.line').read(cr,uid,mapping_line_ids,['external_field','external_type','in_function']) if mapping_lines: #if mapping lines exist find the data conversion for each row in inward data for each_row in data: vals = {} #Dictionary for create record for each_mapping_line in mapping_lines: #Type cast if the expression exists if each_mapping_line['external_type']: type_casted_field = eval(each_mapping_line['external_type'])(each_row.get(each_mapping_line['external_field'],False)) else: type_casted_field = each_row.get(each_mapping_line['external_field'],False) #Build the space for expr space = { 'self':self, 'cr':cr, 'uid':uid, 'data':data, 'external_referential_id':external_referential_id, 'defaults':defaults, 'context':context, 'ifield':type_casted_field } #The expression should return value in list of tuple format #eg[('name','Sharoon'),('age',20)] -> vals = {'name':'Sharoon', 'age':20} exec each_mapping_line['in_function'] in space result = space.get('result',False) #If result exists and is of type list if result and type(result)==list: for each_tuple in result: if type(each_tuple)==tuple and len(each_tuple)==2: vals[each_tuple[0]] = each_tuple[1] #Every mapping line has now been translated into vals dictionary, now set defaults if any for each_default_entry in defaults.keys(): vals[each_default_entry] = defaults[each_default_entry] #Vals is complete now, perform a record check, for that we need foreign field for_key_field = self.pool.get('external.mapping').read(cr,uid,mapping_id[0],['external_key_name'])['external_key_name'] vals[for_key_field] = external_referential_id if vals and for_key_field in vals.keys(): #Check if record exists existing_rec_ids = self.search(cr,uid,[(for_key_field,'=',vals[for_key_field])]) if existing_rec_ids: if self.write(cr,uid,existing_rec_ids,vals,context): write_ids.append(existing_rec_ids) else: crid = self.create(cr,uid,vals,context) create_ids.append(crid) ir_model_data_vals = { 'name':unicode(vals[for_key_field]), 'model':self._name, 'res_id':crid, 'external_referential_id':external_referential_id } self.pool.get('ir.model.data').create(cr,uid,ir_model_data_vals) | 1b5f32250c42da725a066ecca3a742f7dec7e77e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/1b5f32250c42da725a066ecca3a742f7dec7e77e/external_osv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1110,
67,
5666,
12,
2890,
16,
3353,
16,
4555,
16,
501,
16,
3903,
67,
266,
586,
2001,
67,
350,
16,
3467,
28793,
819,
12938,
4672,
468,
382,
2913,
501,
711,
358,
506,
666,
434,
3880,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1110,
67,
5666,
12,
2890,
16,
3353,
16,
4555,
16,
501,
16,
3903,
67,
266,
586,
2001,
67,
350,
16,
3467,
28793,
819,
12938,
4672,
468,
382,
2913,
501,
711,
358,
506,
666,
434,
3880,
4... |
self.assertEqual(addr_to, data['email']) | self.assertEqual(addr_to, [data['email']]) | def test_invite(self): data = { 'name': 'The Invitee', 'email': 'invitee@thinkle.edu', 'organization': 'Thinkle University', 'notes': 'Knows his shit', 'message': 'Hi Invitee, please enlighten us.', 'inviter_userid': 'someguy', 'inviter_name': 'Some Guy', } self.consultation.invitations._create_invitation(**data) self.assertEqual(len(self.consultation.invitations._invites), 1) i = self.consultation.invitations._invites.values()[0] self.assertEqual(i.name, data['name']) self.assertEqual(i.email, data['email']) self.assertEqual(i.organization, data['organization']) self.assertEqual(i.notes, data['notes']) self.assertEqual(i.inviter_userid, 'someguy') | 8b0e9ae7170051641ffc2cffdbac130ebb9f8e4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/8b0e9ae7170051641ffc2cffdbac130ebb9f8e4c/testInvites.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
27154,
12,
2890,
4672,
501,
273,
288,
296,
529,
4278,
296,
1986,
30981,
73,
2187,
296,
3652,
4278,
296,
27154,
73,
36,
451,
754,
298,
18,
28049,
2187,
296,
15336,
4278,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
27154,
12,
2890,
4672,
501,
273,
288,
296,
529,
4278,
296,
1986,
30981,
73,
2187,
296,
3652,
4278,
296,
27154,
73,
36,
451,
754,
298,
18,
28049,
2187,
296,
15336,
4278,
296,
... |
if os.path.exists(self.script): scriptname = os.path.abspath(self.script) self.log.verbose('Found script name %s' %scriptname) | if os.path.exists( self.script ): scriptname = os.path.abspath( self.script ) self.log.verbose( 'Found script name %s' % scriptname ) | def _toJDL(self,xmlFile=''): #messy but need to account for xml file being in /tmp/guid dir """Creates a JDL representation of itself as a Job. """ #Check if we have to do old bootstrap... classadJob = ClassAd('[]') | 50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
869,
46,
8914,
12,
2890,
16,
2902,
812,
2218,
11,
4672,
468,
81,
403,
93,
1496,
1608,
358,
2236,
364,
2025,
585,
3832,
316,
342,
5645,
19,
14066,
1577,
3536,
2729,
279,
804,
8914,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
869,
46,
8914,
12,
2890,
16,
2902,
812,
2218,
11,
4672,
468,
81,
403,
93,
1496,
1608,
358,
2236,
364,
2025,
585,
3832,
316,
342,
5645,
19,
14066,
1577,
3536,
2729,
279,
804,
8914,... |
res = super(crm_send_new_email, self).default_get(cr, uid, fields, context=context) | res = super(crm_send_new_email2, self).default_get(cr, uid, fields, context=context) | def default_get(self, cr, uid, fields, context=None): """ This function gets default values """ if not context: context = {} | c7f7dbe404dc0523ad5b21a0fbc0d440f87ffbcf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c7f7dbe404dc0523ad5b21a0fbc0d440f87ffbcf/crm_send_email.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
3536,
1220,
445,
5571,
805,
924,
3536,
309,
486,
819,
30,
819,
273,
2618,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
805,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1466,
16,
819,
33,
7036,
4672,
3536,
1220,
445,
5571,
805,
924,
3536,
309,
486,
819,
30,
819,
273,
2618,
2,
-100,
-100,
-100,
-100,
-1... |
x = int(x.numerator())*\ arith.inverse_mod(int(x.denominator()), self.__p**pr) | modulus = self.__p**pr x = x.numerator() * \ arith.inverse_mod(x.denominator(), modulus) | def __init__(self, parent, x, big_oh=infinity, ordp=None, construct=False): r""" INPUT: parent -- a p-adic field. x -- anything that can be coerced to a p-adic number. big_oh -- is such that, e.g. 3^(-1) + 1 + 2 * 3 + (3^2) has big_oh equal to 2. """ field_element.FieldElement.__init__(self, parent) if construct: self.__parent = parent (self.__p, self.__unit, self.__ordp, self.__prec) = x return | 3a623ddc873ea13708b6df48681858519def11a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/3a623ddc873ea13708b6df48681858519def11a7/padic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
619,
16,
5446,
67,
16699,
33,
267,
7850,
16,
4642,
84,
33,
7036,
16,
4872,
33,
8381,
4672,
436,
8395,
12943,
30,
982,
1493,
279,
293,
17,
2033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
619,
16,
5446,
67,
16699,
33,
267,
7850,
16,
4642,
84,
33,
7036,
16,
4872,
33,
8381,
4672,
436,
8395,
12943,
30,
982,
1493,
279,
293,
17,
2033... |
Calls ``self.random_all_graph_colorings()``. In the future, if | Calls ``self.random_all_graph_colorings()``. In the future, if | def random(self,tests = 1000): r""" Calls ``self.random_all_graph_colorings()``. In the future, if other methods are added, it should call them, too. TESTS:: | a468d77074137cba0ddfb241121c56cde855518e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/a468d77074137cba0ddfb241121c56cde855518e/graph_coloring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
12,
2890,
16,
16341,
273,
4336,
4672,
436,
8395,
23665,
12176,
2890,
18,
9188,
67,
454,
67,
4660,
67,
3266,
899,
20338,
8338,
225,
657,
326,
3563,
16,
309,
1308,
2590,
854,
3096,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
12,
2890,
16,
16341,
273,
4336,
4672,
436,
8395,
23665,
12176,
2890,
18,
9188,
67,
454,
67,
4660,
67,
3266,
899,
20338,
8338,
225,
657,
326,
3563,
16,
309,
1308,
2590,
854,
3096,
... |
self.stream.writeln("OK") | self.stream.write("OK") | def run(self, test): "Run the given test case or test suite." result = self._makeResult() startTime = time.time() test(result) stopTime = time.time() timeTaken = stopTime - startTime result.printErrors() self.stream.writeln(result.separator2) run = result.testsRun self.stream.writeln("Ran %d test%s in %.3fs" % (run, run != 1 and "s" or "", timeTaken)) self.stream.writeln() results = map(len, (result.expectedFailures, result.unexpectedSuccesses, result.skipped)) expectedFails, unexpectedSuccesses, skipped = results infos = [] if not result.wasSuccessful(): self.stream.write("FAILED") failed, errored = map(len, (result.failures, result.errors)) if failed: infos.append("failures=%d" % failed) if errored: infos.append("errors=%d" % errored) else: self.stream.writeln("OK") if skipped: infos.append("skipped=%d" % skipped) if expectedFails: infos.append("expected failures=%d" % expectedFails) if unexpectedSuccesses: infos.append("unexpected successes=%d" % unexpectedSuccesses) if infos: self.stream.writeln(" (%s)" % (", ".join(infos),)) return result | a473f00cac751c8860ad481c6e2fa9636a06ef42 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/a473f00cac751c8860ad481c6e2fa9636a06ef42/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1842,
4672,
315,
1997,
326,
864,
1842,
648,
578,
1842,
11371,
1199,
563,
273,
365,
6315,
6540,
1253,
1435,
8657,
273,
813,
18,
957,
1435,
1842,
12,
2088,
13,
2132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
1842,
4672,
315,
1997,
326,
864,
1842,
648,
578,
1842,
11371,
1199,
563,
273,
365,
6315,
6540,
1253,
1435,
8657,
273,
813,
18,
957,
1435,
1842,
12,
2088,
13,
2132,
... |
statesToEnter.add(s) if (isParallelState(s)): for child in getChildStates(s): addStatesToEnter(child,s,statesToEnter,statesForDefaultEntry) elif isCompoundState(s): for tState in getTargetStates(s.initial): statesForDefaultEntry.add(tState) addStatesToEnter(tState, s, statesToEnter, statesForDefaultEntry) for anc in getProperAncestors(s,root): statesToEnter.add(anc) if (isParallelState(anc)): for pChild in getChildStates(anc): if not any(map(lambda s2: isDescendant(s2,pChild), statesToEnter)): addStatesToEnter(pChild,anc,statesToEnter,statesForDefaultEntry) | statesToEnter.add(s) if (isParallelState(s)): for child in getChildStates(s): addStatesToEnter(child,s,statesToEnter,statesForDefaultEntry) elif isCompoundState(s): for tState in getTargetStates(s.initial): statesForDefaultEntry.add(tState) addStatesToEnter(tState, s, statesToEnter, statesForDefaultEntry) for anc in getProperAncestors(s,root): statesToEnter.add(anc) if (isParallelState(anc)): for pChild in getChildStates(anc): if not any(map(lambda s2: isDescendant(s2,pChild), statesToEnter)): addStatesToEnter(pChild,anc,statesToEnter,statesForDefaultEntry) | def addStatesToEnter(s,root,statesToEnter,statesForDefaultEntry): if (isHistoryState(s)): # i think that LCA should be changed for s and have done so if (historyValue[s.id]): for s0 in historyValue[s.id]: addStatesToEnter(s0, s, statesToEnter, statesForDefaultEntry) else: for t in s.transition: for s0 in getTargetStates(t.target): addStatesToEnter(s0, s, statesToEnter, statesForDefaultEntry) else: statesToEnter.add(s) if (isParallelState(s)): for child in getChildStates(s): addStatesToEnter(child,s,statesToEnter,statesForDefaultEntry) elif isCompoundState(s): for tState in getTargetStates(s.initial): statesForDefaultEntry.add(tState) addStatesToEnter(tState, s, statesToEnter, statesForDefaultEntry) # switched out the lines under for those over. | 8ea8632a2654f1fb176aa3cbb4dc6c4ef895a3af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10998/8ea8632a2654f1fb176aa3cbb4dc6c4ef895a3af/interpreter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
7629,
774,
10237,
12,
87,
16,
3085,
16,
7992,
774,
10237,
16,
7992,
1290,
1868,
1622,
4672,
309,
261,
291,
5623,
1119,
12,
87,
3719,
30,
468,
277,
15507,
716,
511,
3587,
1410,
506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7629,
774,
10237,
12,
87,
16,
3085,
16,
7992,
774,
10237,
16,
7992,
1290,
1868,
1622,
4672,
309,
261,
291,
5623,
1119,
12,
87,
3719,
30,
468,
277,
15507,
716,
511,
3587,
1410,
506... |
raise error.InternalError("emit_http_headers called multiple times(%d)! Headers: %r" % (sent_headers, headers)) | raise HeadersAlreadySentException("emit_http_headers called multiple (%d) times! Headers: %r" % (sent_headers, headers)) | def emit_http_headers(self, more_headers=[]): """ emit http headers after some preprocessing / checking | c33c8c3990077203d62c6cdfb5b5c6c1c9932ea2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/c33c8c3990077203d62c6cdfb5b5c6c1c9932ea2/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3626,
67,
2505,
67,
2485,
12,
2890,
16,
1898,
67,
2485,
33,
8526,
4672,
3536,
3626,
1062,
1607,
1839,
2690,
675,
10632,
342,
6728,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3626,
67,
2505,
67,
2485,
12,
2890,
16,
1898,
67,
2485,
33,
8526,
4672,
3536,
3626,
1062,
1607,
1839,
2690,
675,
10632,
342,
6728,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
os.kill(process.pid, -9) | os.kill(process.pid, 9) | def kill_process(process): if sys.version_info[:2] < (2, 6): if os.name == 'nt': subprocess.Popen("taskkill /F /T /PID %s >nul 2>nul"% process.pid, shell=True) else: os.kill(process.pid, -9) else: process.kill() | 7971a5cff74e5a56639b4ced83b9883f5d38f68e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4762/7971a5cff74e5a56639b4ced83b9883f5d38f68e/spider.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
67,
2567,
12,
2567,
4672,
309,
2589,
18,
1589,
67,
1376,
10531,
22,
65,
411,
261,
22,
16,
1666,
4672,
309,
1140,
18,
529,
422,
296,
496,
4278,
6652,
18,
52,
3190,
2932,
4146,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
67,
2567,
12,
2567,
4672,
309,
2589,
18,
1589,
67,
1376,
10531,
22,
65,
411,
261,
22,
16,
1666,
4672,
309,
1140,
18,
529,
422,
296,
496,
4278,
6652,
18,
52,
3190,
2932,
4146,
1... |
check = Popen(cmd, stdout=PIPE, stderr=PIPE, close_fds=True, cwd=testdir, env=env, shell=True) | check = Popen(cmd, stdout=PIPE, close_fds=True, cwd=testdir, env=env) | def uploadresult(submission, judgement, compiler_output, submission_output=None, autojudge_comment=None, check_output=None): result = Result() result.submission = submission result.judgement = judgement result.judged_by = autojudge compiler_output_file = File(content=compiler_output) compiler_output_file.save() result.compiler_output_file = compiler_output_file if submission_output: submission_output_file = File() try: submission_output_file.content = submission_output.decode("utf-8") except UnicodeError: submission_output_file.content = submission_output.decode("iso8859-1") submission_output_file.save() result.submission_output_file = submission_output_file if autojudge_comment: autojudge_comment_file = File(content=autojudge_comment) autojudge_comment_file.save() result.autojudge_comment_file = autojudge_comment_file if check_output: check_output_file = File() try: check_output_file.content = check_output.decode("utf-8") except UnicodeError: check_output_file.content = check_output.decode("iso8859-1") check_output_file.save() result.check_output_file = check_output_file result.save() submission.status = "CHECKED" submission.save() try: score = Score.objects.get(team=submission.team, problem=submission.problem) except ObjectDoesNotExist: score = Score(team=submission.team, problem=submission.problem, submission_count=0, correct=False) score.submission_count += 1 if judgement == "ACCEPTED": score.correct = True contest = Contest.objects.get() timedelta = (submission.timestamp - contest.starttime) score.time = timedelta.days*24 + timedelta.seconds/60 score.save() team = submission.team team.new_results = True team.save() | 257d0440e98c44729d2aa046c440bfe02d230e8d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11354/257d0440e98c44729d2aa046c440bfe02d230e8d/autojudge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
2088,
12,
12684,
16,
525,
1100,
75,
820,
16,
5274,
67,
2844,
16,
8515,
67,
2844,
33,
7036,
16,
3656,
78,
27110,
67,
3469,
33,
7036,
16,
866,
67,
2844,
33,
7036,
4672,
563,
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,
3617,
2088,
12,
12684,
16,
525,
1100,
75,
820,
16,
5274,
67,
2844,
16,
8515,
67,
2844,
33,
7036,
16,
3656,
78,
27110,
67,
3469,
33,
7036,
16,
866,
67,
2844,
33,
7036,
4672,
563,
273,... |
if _debug: print "\t%s: Called Camera.getElevation()" % rendererName | debugMsg("Called Camera.getElevation()") | def getElevation(self): """ Gets the elevation angle (in degrees) of the Camera """ if _debug: print "\t%s: Called Camera.getElevation()" % rendererName return self.elevation | 96b00238a8d5cd11876b111a3518775124c30a4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/96b00238a8d5cd11876b111a3518775124c30a4c/camera.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4774,
298,
7112,
12,
2890,
4672,
3536,
11881,
326,
19051,
5291,
261,
267,
10904,
13,
434,
326,
30355,
3536,
1198,
3332,
2932,
8185,
30355,
18,
588,
17274,
7112,
1435,
7923,
225,
327,
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,
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,
4774,
298,
7112,
12,
2890,
4672,
3536,
11881,
326,
19051,
5291,
261,
267,
10904,
13,
434,
326,
30355,
3536,
1198,
3332,
2932,
8185,
30355,
18,
588,
17274,
7112,
1435,
7923,
225,
327,
365,
... |
key_bindings = {'default': "C-z", 'emacs': "C-/",} | key_bindings = {'default': "C-z", 'emacs': ["C-/", "C-S--",]} | def action(self, index=-1, multiplier=1): self.mode.stopInterpreter() | 2db14170688715e3f0121adac89c9e9e3d23827e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/2db14170688715e3f0121adac89c9e9e3d23827e/mainmenu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
770,
29711,
21,
16,
15027,
33,
21,
4672,
365,
18,
3188,
18,
5681,
30010,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
770,
29711,
21,
16,
15027,
33,
21,
4672,
365,
18,
3188,
18,
5681,
30010,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return path.count('*') > 0 or path.count('?') > 0 \ or (path.count('[') > 0 and path.count(']') > 0) | return '*' in path or '?' in path or ('[' in path and ']' in path) | def _is_pattern_path(self, path): return path.count('*') > 0 or path.count('?') > 0 \ or (path.count('[') > 0 and path.count(']') > 0) | a2152145a7e713b7a988a154a7b296b361d56338 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/a2152145a7e713b7a988a154a7b296b361d56338/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
291,
67,
4951,
67,
803,
12,
2890,
16,
589,
4672,
327,
589,
18,
1883,
2668,
4035,
13,
405,
374,
578,
589,
18,
1883,
2668,
4899,
13,
405,
374,
521,
578,
261,
803,
18,
1883,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
291,
67,
4951,
67,
803,
12,
2890,
16,
589,
4672,
327,
589,
18,
1883,
2668,
4035,
13,
405,
374,
578,
589,
18,
1883,
2668,
4899,
13,
405,
374,
521,
578,
261,
803,
18,
1883,
2668,
... |
'AND m.date <= \'' + \ str(context['date']) + '\' ' \ | 'AND m.date <= date(\'' + \ str(context['date']) + '\') ' \ | def query_get(self, cursor, user, obj='l', context=None): ''' Return SQL clause and fiscal years for account move line depending of the context. | 566999163dffc0ef54acc281bc37e0bcba04bccc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9290/566999163dffc0ef54acc281bc37e0bcba04bccc/move.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
67,
588,
12,
2890,
16,
3347,
16,
729,
16,
1081,
2218,
80,
2187,
819,
33,
7036,
4672,
9163,
2000,
3063,
6591,
471,
15324,
771,
11387,
364,
2236,
3635,
980,
8353,
434,
326,
819,
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,
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,
843,
67,
588,
12,
2890,
16,
3347,
16,
729,
16,
1081,
2218,
80,
2187,
819,
33,
7036,
4672,
9163,
2000,
3063,
6591,
471,
15324,
771,
11387,
364,
2236,
3635,
980,
8353,
434,
326,
819,
18,... |
if isinstance(s, "".__class__): | if isinstance(s, basestring): | def _tostr(s, method): if isinstance(s, "".__class__): return s import org raise TypeError, "%s() argument must be a string object, not %s" % ( method, org.python.core.Py.safeRepr(s)) | 55bdebc72f73bf745cd4cc08c2fde8e408106c88 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6753/55bdebc72f73bf745cd4cc08c2fde8e408106c88/javapath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
14627,
313,
12,
87,
16,
707,
4672,
309,
1549,
12,
87,
16,
10699,
4672,
327,
272,
1930,
2358,
1002,
3580,
16,
2213,
87,
1435,
1237,
1297,
506,
279,
533,
733,
16,
486,
738,
87,
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,
389,
14627,
313,
12,
87,
16,
707,
4672,
309,
1549,
12,
87,
16,
10699,
4672,
327,
272,
1930,
2358,
1002,
3580,
16,
2213,
87,
1435,
1237,
1297,
506,
279,
533,
733,
16,
486,
738,
87,
6,... |
self.list = AutoIndexList(iterable, index_attr) | self.list = list(iterable) | def __cmp__(self, other): return cmpfunc(self.item, other.item) | e78141f863dade5347ce6e29965b2eb3b169ca6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10170/e78141f863dade5347ce6e29965b2eb3b169ca6a/sortlist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
327,
9411,
644,
12,
2890,
18,
1726,
16,
1308,
18,
1726,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
327,
9411,
644,
12,
2890,
18,
1726,
16,
1308,
18,
1726,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
mime_header = regex.compile('\\([ \t(]\\)\\([-a-zA-Z0-9_+]*[\240-\377][-a-zA-Z0-9_+\240-\377]*\\)\\([ \t)]\\|$\\)') | mime_header = regex.compile('\\([ \t(]\\|^\\)\\([-a-zA-Z0-9_+]*[\240-\377][-a-zA-Z0-9_+\240-\377]*\\)\\([ \t)]\\|$\\)') | def mime_encode(line, header): '''Code a single line as quoted-printable. If header is set, quote some extra characters.''' if header: reg = mime_header_char else: reg = mime_char newline = '' if len(line) >= 5 and line[:5] == 'From ': # quote 'From ' at the start of a line for stupid mailers newline = string.upper('=%02x' % ord('F')) line = line[1:] while 1: i = reg.search(line) if i < 0: break newline = newline + line[:i] + \ string.upper('=%02x' % ord(line[i])) line = line[i+1:] line = newline + line newline = '' while len(line) >= 75: i = 73 while line[i] == '=' or line[i-1] == '=': i = i - 1 i = i + 1 newline = newline + line[:i] + '=\n' line = line[i:] return newline + line | b0aa07b643488574b46fd4e3a04cdc1409cd3f2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b0aa07b643488574b46fd4e3a04cdc1409cd3f2d/mimify.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4892,
67,
3015,
12,
1369,
16,
1446,
4672,
9163,
1085,
279,
2202,
980,
487,
9298,
17,
1188,
429,
18,
971,
1446,
353,
444,
16,
3862,
2690,
2870,
3949,
1093,
6309,
309,
1446,
30,
960,
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,
4892,
67,
3015,
12,
1369,
16,
1446,
4672,
9163,
1085,
279,
2202,
980,
487,
9298,
17,
1188,
429,
18,
971,
1446,
353,
444,
16,
3862,
2690,
2870,
3949,
1093,
6309,
309,
1446,
30,
960,
273... |
usingMiroURL = u'http://www.getmiro.com/screencasts/windows/win.feed.rss' | defaultFeedURLs.append((u'http://www.getmiro.com/screencasts/windows/win.feed.rss', True)) | def _installDefaultFeeds(self): initialFeeds = resources.path("initial-feeds.democracy") if os.path.exists(initialFeeds): type, urls = subscription.parseFile(initialFeeds) if urls is not None and type == 'rss': for url in urls: feed.Feed(url, initiallyAutoDownloadable=False) dialog = dialogs.MessageBoxDialog(_("Custom Channels"), Template(_("You are running a version of $longAppName with a custom set of channels.")).substitute(longAppName=config.get(prefs.LONG_APP_NAME))) dialog.run() app.controller.initial_feeds = True else: logging.info("Adding default feeds") if platform.system() == 'Darwin': usingMiroURL = u'http://www.getmiro.com/screencasts/mac/mac.feed.rss' else: usingMiroURL = u'http://www.getmiro.com/screencasts/windows/win.feed.rss' | 56d395ce22b61f3616779c5840904b7d450fc9e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/56d395ce22b61f3616779c5840904b7d450fc9e4/theme.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5425,
1868,
8141,
87,
12,
2890,
4672,
2172,
8141,
87,
273,
2703,
18,
803,
2932,
6769,
17,
7848,
87,
18,
19117,
504,
354,
2431,
7923,
309,
1140,
18,
803,
18,
1808,
12,
6769,
8141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5425,
1868,
8141,
87,
12,
2890,
4672,
2172,
8141,
87,
273,
2703,
18,
803,
2932,
6769,
17,
7848,
87,
18,
19117,
504,
354,
2431,
7923,
309,
1140,
18,
803,
18,
1808,
12,
6769,
8141,
... |
if t.rawtagname=='inputbox': | if t.tagname=='inputbox': | def parse_inputbox(tokens, xopts): get_recursive_tag_parser("inputbox")(tokens, xopts) for t in tokens: if t.rawtagname=='inputbox': t.inputbox = T.join_as_text(t.children) del t.children[:] | 094816184e1349c7873fa4d0853b9f142a6b43f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/094816184e1349c7873fa4d0853b9f142a6b43f9/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2630,
2147,
12,
7860,
16,
619,
4952,
4672,
336,
67,
10543,
67,
2692,
67,
4288,
2932,
2630,
2147,
7923,
12,
7860,
16,
619,
4952,
13,
225,
364,
268,
316,
2430,
30,
309,
268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
2630,
2147,
12,
7860,
16,
619,
4952,
4672,
336,
67,
10543,
67,
2692,
67,
4288,
2932,
2630,
2147,
7923,
12,
7860,
16,
619,
4952,
13,
225,
364,
268,
316,
2430,
30,
309,
268,
... |
self.file = entry button = create_button("Select...", self.select_file_cb) | def add_table_content(self, table): entry = gtk.Entry() entry.set_width_chars(12) entry.set_editable(False) self.file = entry button = create_button("Select...", self.select_file_cb) hbox = gtk.HBox() hbox.add(entry) hbox.pack_start(button, False, False) | 0e0984f57cbf375cc2813fe0509dc8425a475afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/0e0984f57cbf375cc2813fe0509dc8425a475afc/debugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2121,
67,
1745,
12,
2890,
16,
1014,
4672,
1241,
273,
22718,
18,
1622,
1435,
1241,
18,
542,
67,
2819,
67,
7549,
12,
2138,
13,
1241,
18,
542,
67,
19653,
12,
8381,
13,
366,
214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2121,
67,
1745,
12,
2890,
16,
1014,
4672,
1241,
273,
22718,
18,
1622,
1435,
1241,
18,
542,
67,
2819,
67,
7549,
12,
2138,
13,
1241,
18,
542,
67,
19653,
12,
8381,
13,
366,
214... | |
YYYY-MM-DD YYYY-MM-DD(z|Z) YYYY-MM-DD+06:00 YYYY-MM-DD-06:00 | - YYYY-MM-DD - YYYY-MM-DD(z|Z) - YYYY-MM-DD+06:00 - YYYY-MM-DD-06:00 | def __parse(self, s): """ Parse the string date. Supported formats: YYYY-MM-DD YYYY-MM-DD(z|Z) YYYY-MM-DD+06:00 YYYY-MM-DD-06:00 Although, the TZ is ignored because it's meaningless without the time, right? @param s: A date string. @type s: str @return: A date object. @rtype: L{dt.date} """ try: year, month, day = s[:10].split('-', 2) year = int(year) month = int(month) day = int(day) return dt.date(year, month, day) except: log.debug(s, exec_info=True) raise ValueError, 'Invalid format "%s"' % s | 06919c42a774895c20fc7420081acbad01990edf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5377/06919c42a774895c20fc7420081acbad01990edf/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
12,
2890,
16,
272,
4672,
3536,
2884,
326,
533,
1509,
18,
19503,
6449,
30,
300,
26699,
17,
8206,
17,
5698,
300,
26699,
17,
8206,
17,
5698,
12,
94,
96,
62,
13,
300,
26699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2670,
12,
2890,
16,
272,
4672,
3536,
2884,
326,
533,
1509,
18,
19503,
6449,
30,
300,
26699,
17,
8206,
17,
5698,
300,
26699,
17,
8206,
17,
5698,
12,
94,
96,
62,
13,
300,
26699,
... |
artist, tracks = self.album_return_artist_and_tracks() | artist, _tracks = self.album_return_artist_and_tracks() | def album_return_artist_name(self): # Determine if album_name is a various artists album. if self.album_current_artist[0] == self.songinfo: return artist, tracks = self.album_return_artist_and_tracks() if artist is not None: self.album_current_artist = [self.songinfo, artist] else: self.album_current_artist = [self.songinfo, ""] | a611157e0fc7d242d58df67886095dce4cc46388 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/a611157e0fc7d242d58df67886095dce4cc46388/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14844,
67,
2463,
67,
25737,
67,
529,
12,
2890,
4672,
468,
10229,
309,
14844,
67,
529,
353,
279,
11191,
3688,
1486,
14844,
18,
309,
365,
18,
25090,
67,
2972,
67,
25737,
63,
20,
65,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14844,
67,
2463,
67,
25737,
67,
529,
12,
2890,
4672,
468,
10229,
309,
14844,
67,
529,
353,
279,
11191,
3688,
1486,
14844,
18,
309,
365,
18,
25090,
67,
2972,
67,
25737,
63,
20,
65,
422,... |
dotcode = graph.generate_dot(name, parts, urls, env=self.builder.env) | dotcode = graph.generate_dot(name, urls, env=self.builder.env) | def html_visit_inheritance_diagram(self, node): """ Output the graph for HTML. This will insert a PNG with clickable image map. """ graph = node['graph'] parts = node['parts'] graph_hash = get_graph_hash(node) name = 'inheritance%s' % graph_hash # Create a mapping from fully-qualified class names to URLs. urls = {} for child in node: if child.get('refuri') is not None: urls[child['reftitle']] = child.get('refuri') elif child.get('refid') is not None: urls[child['reftitle']] = '#' + child.get('refid') dotcode = graph.generate_dot(name, parts, urls, env=self.builder.env) render_dot_html(self, node, dotcode, [], 'inheritance', 'inheritance', alt='Inheritance diagram of ' + node['content']) raise nodes.SkipNode | c27cf37aa3413c1706ea1f344972d60ea1f8fe98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/c27cf37aa3413c1706ea1f344972d60ea1f8fe98/inheritance_diagram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
11658,
67,
6018,
1359,
67,
12264,
1940,
12,
2890,
16,
756,
4672,
3536,
3633,
326,
2667,
364,
3982,
18,
225,
1220,
903,
2243,
279,
22476,
598,
4682,
429,
1316,
852,
18,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
11658,
67,
6018,
1359,
67,
12264,
1940,
12,
2890,
16,
756,
4672,
3536,
3633,
326,
2667,
364,
3982,
18,
225,
1220,
903,
2243,
279,
22476,
598,
4682,
429,
1316,
852,
18,
3536,
... |
print "add action", self.option_id, type, pathname | def handleCleanerOptionAction(self, action): type = action.getAttribute('type') pathname = getText(action.childNodes) print "add action", self.option_id, type, pathname if 'children' == type: children = boolstr_to_bool(action.getAttribute('directories')) self.action.add_list_children(pathname, children) if 'file' == type: self.action.add_list_file(pathname) if 'glob' == type: self.action.add_list_glob(pathname) | e1fc33677a1647dbce770100c3a593e4e505209f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/e1fc33677a1647dbce770100c3a593e4e505209f/CleanerML.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
7605,
264,
1895,
1803,
12,
2890,
16,
1301,
4672,
618,
273,
1301,
18,
588,
1499,
2668,
723,
6134,
9806,
273,
6701,
12,
1128,
18,
3624,
3205,
13,
309,
296,
5906,
11,
422,
618,
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,
1640,
7605,
264,
1895,
1803,
12,
2890,
16,
1301,
4672,
618,
273,
1301,
18,
588,
1499,
2668,
723,
6134,
9806,
273,
6701,
12,
1128,
18,
3624,
3205,
13,
309,
296,
5906,
11,
422,
618,
30,
... | |
if rule.operand.startswith('user.') and rule.operand.count('.') > 1: op = rule.operand[5:] rule.operand = rule.operand[:5+len(op[:op.find('.')])] +' and '+ rule.operand + ' or False' | def _domain_force_get(self, cr, uid, ids, field_name, arg, context={}): res = {} for rule in self.browse(cr, uid, ids, context): eval_user_data = {'user': self.pool.get('res.users').browse(cr, 1, uid), 'time':time} if rule.operand.startswith('user.') and rule.operand.count('.') > 1: #Need to check user.field.field1.field2(if field is False,it will break the chain) op = rule.operand[5:] rule.operand = rule.operand[:5+len(op[:op.find('.')])] +' and '+ rule.operand + ' or False' if rule.domain_force: res[rule.id] = eval(rule.domain_force, eval_user_data) else: if rule.operator in ('in', 'child_of'): dom = eval("[('%s', '%s', [%s])]" % (rule.field_id.name, rule.operator, eval(rule.operand,eval_user_data)), eval_user_data) else: dom = eval("[('%s', '%s', %s)]" % (rule.field_id.name, rule.operator, rule.operand), eval_user_data) res[rule.id] = dom return res | f2c19896da9cff4a039a15f9bd1c6c095c6f78b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/f2c19896da9cff4a039a15f9bd1c6c095c6f78b3/ir_rule.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4308,
67,
5734,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
364,
1720,
316,
365,
18,
25731,
12,
3353,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4308,
67,
5734,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
12938,
4672,
400,
273,
2618,
364,
1720,
316,
365,
18,
25731,
12,
3353,
16,
... | |
pass | pass | def handle_port_stats_in(self, event): """Handle receipt of port stats from a switch. @param event - port stats event to handle """ dpid = event.datapath_id if event.xid in self.pending_switch_queries: lg.debug( "responding to switch query for port stats" ) # Publish custom event reply = SwitchQueryReplyEvent( event.xid, event.datapath_id, \ SwitchQueryReplyEvent.QUERY_PORT_STATS,\ event ) self.post( pyevent( SwitchQueryReplyEvent.NAME, reply ) ) # Remove the xid from our todo list #self.pending_switch_queries.remove( event.xid ) | 7ac8a1fbddf31c441a2860afea03f1182e25f717 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11602/7ac8a1fbddf31c441a2860afea03f1182e25f717/monitoring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
655,
67,
5296,
67,
267,
12,
2890,
16,
871,
4672,
3536,
3259,
16030,
434,
1756,
3177,
628,
279,
1620,
18,
632,
891,
871,
300,
1756,
3177,
871,
358,
1640,
3536,
302,
6610,
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,
1640,
67,
655,
67,
5296,
67,
267,
12,
2890,
16,
871,
4672,
3536,
3259,
16030,
434,
1756,
3177,
628,
279,
1620,
18,
632,
891,
871,
300,
1756,
3177,
871,
358,
1640,
3536,
302,
6610,
273,... |
filtered = False hits = [] | show_search = False filtered = False hits = [] | def cookie_recips(status): flat = urllib.unquote(req.COOKIES.get("recip-%s" % status, "")) return map(str, re.split(r'\s+', flat)) if flat != "" else [] | 314aa17b58695a5c9eaf80d92f66be919ca5a46d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/314aa17b58695a5c9eaf80d92f66be919ca5a46d/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3878,
67,
266,
3449,
87,
12,
2327,
4672,
3569,
273,
11527,
18,
318,
6889,
12,
3658,
18,
3865,
3141,
8805,
18,
588,
2932,
266,
3449,
6456,
87,
6,
738,
1267,
16,
1408,
3719,
327,
852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3878,
67,
266,
3449,
87,
12,
2327,
4672,
3569,
273,
11527,
18,
318,
6889,
12,
3658,
18,
3865,
3141,
8805,
18,
588,
2932,
266,
3449,
6456,
87,
6,
738,
1267,
16,
1408,
3719,
327,
852,
... |
history_id = self.pool.get('dm.offer.history').search(cr, uid, [('campaign_id','=',campaign.id)]) | history_id = self.pool.get('dm.offer.history').search(cr, uid, [('campaign_id', '=', campaign.id)]) | def unlink(self, cr, uid, ids, context={}): for campaign in self.browse(cr, uid, ids, context): history_id = self.pool.get('dm.offer.history').search(cr, uid, [('campaign_id','=',campaign.id)]) self.pool.get('dm.offer.history').unlink(cr, uid, history_id, context) return super(dm_campaign, self).unlink(cr, uid, ids, context) | 7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
364,
8965,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
16,
819,
4672,
4927,
67,
350,
273,
365,
18,
6011,
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,
8255,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
364,
8965,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
16,
819,
4672,
4927,
67,
350,
273,
365,
18,
6011,
18... |
verbose = options.get('verbose',False) | self.verbose = verbose = options.get('verbose',False) | def __call__(self,*packages, **options): """Load one or more packages into scipy's top-level namespace. | 48d93641c456ee1642c589bf077db5079386b9fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/48d93641c456ee1642c589bf077db5079386b9fe/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
14,
10308,
16,
2826,
2116,
4672,
3536,
2563,
1245,
578,
1898,
5907,
1368,
10966,
1807,
1760,
17,
2815,
1981,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
14,
10308,
16,
2826,
2116,
4672,
3536,
2563,
1245,
578,
1898,
5907,
1368,
10966,
1807,
1760,
17,
2815,
1981,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.current_style.update(i.attrs) | self.current_style.update(i.attrs) | def populate(self, tb): self.create_line() open_containers = collections.deque() self.in_para = False for i in tb.content: if isinstance(i, basestring): self.process_text(i) elif i is None: if len(open_containers) > 0: for a, b in open_containers.pop(): if callable(a): a(*b) else: setattr(self, a, b) elif i.name == 'P': open_containers.append((('in_para', False),)) self.in_para = True elif i.name == 'CR': if self.in_para: self.end_line() self.create_line() else: self.end_line() delta = self.current_style.parskip if isinstance(self.lines[-1], ParSkip): delta += self.current_style.baselineskip self.lines.append(ParSkip(delta)) self.first_line = True elif i.name == 'Span': open_containers.append((('current_style', self.current_style.copy()),)) self.current_style.update(i.attrs) elif i.name == 'CharButton': open_containers.append(((self.end_link, []),)) self.create_link(i.attrs['refobj']) elif i.name == 'Italic': open_containers.append((('current_style', self.current_style.copy()),)) self.current_style.update(fontstyle=QFont.StyleItalic) elif i.name == 'Plot': plot = Plot(i, self.font_loader.dpi) if self.current_line is None: self.create_line() if not self.current_line.can_add_plot(plot): self.end_line() self.create_line() self.current_line.add_plot(plot) elif i.name in ['Sup', 'Sub']: if self.current_line is None: self.create_line() self.current_line.valign = i.name open_containers.append(((self.close_valign, []),)) elif i.name == 'Space': self.current_line.add_space(i.attrs['xsize']) elif i.name == 'EmpLine': if i.attrs: open_containers.append((('current_style', self.current_style.copy()),)) self.current_style.update(i.attrs) else: self.logger.warning('Unhandled TextTag %s'%(i.name,)) if not i.self_closing: open_containers.append([]) | 7d41e55dca63f9cf8c624b6a2e102e77d191e8fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/7d41e55dca63f9cf8c624b6a2e102e77d191e8fc/text.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
2890,
16,
8739,
4672,
365,
18,
2640,
67,
1369,
1435,
1696,
67,
20596,
273,
6980,
18,
323,
1857,
1435,
365,
18,
267,
67,
25072,
273,
1083,
364,
277,
316,
8739,
18,
1745,
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,
6490,
12,
2890,
16,
8739,
4672,
365,
18,
2640,
67,
1369,
1435,
1696,
67,
20596,
273,
6980,
18,
323,
1857,
1435,
365,
18,
267,
67,
25072,
273,
1083,
364,
277,
316,
8739,
18,
1745,
30,
... |
def __init__(self): self.packages = None self.warn = None | def __init__(self): self.packages = None self.warn = None | def __init__(self): self.packages = None self.warn = None | 1ec6a2e7b9110e36ba6866622bf265f1103a0b8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2074/1ec6a2e7b9110e36ba6866622bf265f1103a0b8a/sip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
10308,
273,
599,
365,
18,
8935,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
10308,
273,
599,
365,
18,
8935,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return 'pwpc' | return 'pwpc', 1 | def interact(scriptname): if PPC_ONLY: return 'pwpc' d = Dlg.GetNewDialog(DLG_ID, -1) if not d: print "Can't get DLOG resource with id =", DLG_ID return d.SetDialogDefaultItem(OK_BUTTON) d.SetDialogCancelItem(CANCEL_BUTTON) Dlg.ParamText(scriptname, "", "", "") radiogroup = radio(d, GENFAT_BUTTON, GENPPC_BUTTON, GEN68K_BUTTON) radiogroup.set(GENFAT_BUTTON) gentype = 'fat' while 1: n = Dlg.ModalDialog(None) if n == OK_BUTTON or n == CANCEL_BUTTON: break elif radiogroup.hasitem(n): radiogroup.set(n) genitem = radiogroup.get() del radiogroup del d if genitem == GENFAT_BUTTON: gentype = 'fat' elif genitem == GENPPC_BUTTON: gentype = 'pwpc' elif genitem == GEN68K_BUTTON: gentype = 'm68k' return gentype, n == OK_BUTTON | 0c15eb35e9d3cc8cdce3d3a8397c55b0414e1201 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0c15eb35e9d3cc8cdce3d3a8397c55b0414e1201/BuildApplication.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16592,
12,
4263,
529,
4672,
309,
453,
3513,
67,
10857,
30,
327,
296,
14921,
2436,
2187,
404,
302,
273,
463,
23623,
18,
967,
1908,
6353,
12,
8914,
43,
67,
734,
16,
300,
21,
13,
309,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16592,
12,
4263,
529,
4672,
309,
453,
3513,
67,
10857,
30,
327,
296,
14921,
2436,
2187,
404,
302,
273,
463,
23623,
18,
967,
1908,
6353,
12,
8914,
43,
67,
734,
16,
300,
21,
13,
309,
4... |
self.verbose_logger.log(logginglevels.DEBUG_25, 'TSINFO: Updating %s to resolve dep.', po) | self.verbose_logger.log(logginglevels.DEBUG_2, 'TSINFO: Updating %s to resolve dep.', po) | def _requiringFromInstalled(self, requiringPkg, requirement, errorlist): """processes the dependency resolution for a dep where the requiring package is installed""" # FIXME - should we think about dealing exclusively in package objects? (name, arch, epoch, ver, rel) = requiringPkg requiringPo = self.getInstalledPackageObject(requiringPkg) (needname, needflags, needversion) = requirement niceformatneed = rpmUtils.miscutils.formatRequire(needname, needversion, needflags) checkdeps = 0 missingdep = 0 # we must first find out why the requirement is no longer there # we must find out what provides/provided it from the rpmdb (if anything) # then check to see if that thing is being acted upon by the transaction set # if it is then we need to find out what is being done to it and act accordingly rpmdbNames = self.rpmdb.getNamePkgList() needmode = None # mode in the transaction of the needed pkg (if any) needpo = None providers = [] if self.cheaterlookup.has_key((needname, needflags, needversion)): self.verbose_logger.log(logginglevels.DEBUG_2, 'Needed Require has already been looked up, cheating') cheater_tup = self.cheaterlookup[(needname, needflags, needversion)] providers = [cheater_tup] elif needname in rpmdbNames: txmbrs = self.tsInfo.matchNaevr(name=needname) for txmbr in txmbrs: providers.append(txmbr.pkgtup) | 7e00791c786fbce1d3aa7d22cb14647e5220fa30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/7e00791c786fbce1d3aa7d22cb14647e5220fa30/depsolve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4523,
11256,
1265,
16747,
12,
2890,
16,
29468,
11264,
16,
12405,
16,
555,
1098,
4672,
3536,
18675,
326,
4904,
7861,
364,
279,
5993,
1625,
326,
29468,
2181,
353,
5876,
8395,
225,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4523,
11256,
1265,
16747,
12,
2890,
16,
29468,
11264,
16,
12405,
16,
555,
1098,
4672,
3536,
18675,
326,
4904,
7861,
364,
279,
5993,
1625,
326,
29468,
2181,
353,
5876,
8395,
225,
468,
... |
return wrap(ScintillaShellView(hwnd, self.path, lineno), useDispatcher=debug>0) | return wrap(ScintillaShellView(hwnd, self.path, lineno), iid, useDispatcher=debug>0) | def CreateViewObject(self, hwnd, iid): mod_objects = get_clbr_for_file(self.path) object = mod_objects[self.class_name] if self.method_name is None: lineno = object.lineno else: lineno = object.methods[self.method_name] return wrap(ScintillaShellView(hwnd, self.path, lineno), useDispatcher=debug>0) | 8216b30a77097d3b45747f427de06d488491eaca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/8216b30a77097d3b45747f427de06d488491eaca/shell_view.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1767,
921,
12,
2890,
16,
16139,
4880,
16,
22819,
4672,
681,
67,
6911,
273,
336,
67,
830,
2848,
67,
1884,
67,
768,
12,
2890,
18,
803,
13,
733,
273,
681,
67,
6911,
63,
2890,
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,
1788,
1767,
921,
12,
2890,
16,
16139,
4880,
16,
22819,
4672,
681,
67,
6911,
273,
336,
67,
830,
2848,
67,
1884,
67,
768,
12,
2890,
18,
803,
13,
733,
273,
681,
67,
6911,
63,
2890,
18,
... |
paramDecl.append(argDecl[i]) | paramDecl.insert(0,argDecl[i]) | def cleanDeclarations(routine,logFile=sys.stdout): """cleans up the declaration part of the given parsed routine removes unused variables""" global rVar commentToRemoveRe=re.compile(r" *! *(?:interface|arguments|parameters|locals?|\** *local +variables *\**|\** *local +parameters *\**) *$",re.IGNORECASE) nullifyRe=re.compile(r" *nullify *\(([^()]+)\) *\n?",re.IGNORECASE|re.MULTILINE) if not routine['kind']: return if (routine['core'] and re.match(" *type *[a-zA-Z_]+ *$",routine['core'][0],re.IGNORECASE)): logFile.write("*** routine %s contains local types, not fully cleaned ***\n"% (routine['name'])) if re.search("^#","".join(routine['declarations']),re.MULTILINE): logFile.write("*** routine %s declarations contain preprocessor directives ***\n*** declarations not cleaned ***\n"%( routine['name'])) return try: rest="".join(routine['strippedCore']).lower() nullifys=",".join(nullifyRe.findall(rest)) rest=nullifyRe.sub("",rest) paramDecl=[] decls=[] for d in routine['parsedDeclarations']: d['normalizedType']=d['type'] if d['parameters']: d['normalizedType']+=d['parameters'] if (d["attributes"]): d['attributes'].sort(lambda x,y:cmp(x.lower(),y.lower())) d['normalizedType']+=', ' d['normalizedType']+=', '.join(d['attributes']) if "parameter" in map(str.lower,d['attributes']): paramDecl.append(d) else: decls.append(d) sortDeclarations(paramDecl) sortDeclarations(decls) has_routinen=0 pos_routinep=-1 for d in paramDecl: for i in xrange(len(d['vars'])): v=d['vars'][i] m=varRe.match(v) lowerV=m.group("var").lower() if lowerV=="routinen": has_routinen=1 d['vars'][i]="routineN = '"+routine['name']+"'" elif lowerV=="routinep": pos_routinep=i d['vars'][i]="routineP = moduleN//':'//routineN" if not has_routinen and pos_routinep>=0: d['vars'].insert(pos_routinep,"routineN = '"+routine['name']+"'") if routine['arguments']: routine['lowercaseArguments']=map(lambda x:x.lower(),routine['arguments']) else: routine['lowercaseArguments']=[] if routine['result']: routine['lowercaseArguments'].append(routine['result'].lower()) argDeclDict={} localDecl=[] for d in decls: localD={} localD.update(d) localD['vars']=[] argD=None for v in d['vars']: m=varRe.match(v) lowerV=m.group("var").lower() if lowerV in routine['lowercaseArguments']: argD={} argD.update(d) argD['vars']=[v] if argDeclDict.has_key(lowerV): raise SyntaxError( "multiple declarations not supported. var="+v+ " declaration="+str(d)+"routine="+routine['name']) argDeclDict[lowerV]=argD else: pos=findWord(lowerV,rest) if (pos!=-1): localD['vars'].append(v) else: if findWord(lowerV,nullifys)!=-1: if not rmNullify(lowerV,routine['core']): raise SyntaxError( "could not remove nullify of "+lowerV+ " as expected, routine="+routine['name']) logFile.write("removed var %s in routine %s\n" % (lowerV,routine['name'])) rVar+=1 if (len(localD['vars'])): localDecl.append(localD) argDecl=[] for arg in routine['lowercaseArguments']: if argDeclDict.has_key(arg): argDecl.append(argDeclDict[arg]) else: print "warning, implicitly typed argument '",arg,"' in routine",routine['name'] if routine['kind'].lower()=='function': aDecl=argDecl[:-1] else: aDecl=argDecl isOptional=0 #for arg in aDecl: # attIsOptional= ("optional" in map(lambda x:x.lower(), # arg['attributes'])) # if isOptional and not attIsOptional: # logFile.write("*** warning non optional args %s after optional in routine %s\n" %( # repr(arg['vars']),routine['name'])) # if attIsOptional: # isOptional=1 argDecl.extend(paramDecl) paramDecl=[] enforceDeclDependecies(argDecl) for i in xrange(len(argDecl)-1,-1,-1): if 'parameter' in map(str.lower,argDecl[i]['attributes']): paramDecl.append(argDecl[i]) del argDecl[i] else: break newDecl=StringIO() for comment in routine['preDeclComments']: if not commentToRemoveRe.match(comment): newDecl.write(comment) newDecl.writelines(routine['use']) writeDeclarations(argDecl,newDecl) if argDecl and paramDecl: newDecl.write("\n") writeDeclarations(paramDecl,newDecl) if (argDecl or paramDecl) and localDecl: newDecl.write("\n") writeDeclarations(localDecl,newDecl) if argDecl or paramDecl or localDecl: newDecl.write("\n") wrote=0 for comment in routine['declComments']: if not commentToRemoveRe.match(comment): newDecl.write(comment) newDecl.write("\n") wrote=1 if wrote: newDecl.write("\n") routine['declarations']=[newDecl.getvalue()] except: if routine.has_key('name'): logFile.write("**** exception cleaning routine "+routine['name']+" ****") logFile.write("parsedDeclartions="+str(routine['parsedDeclarations'])) raise | 2bfe6c6ad42fb13244fb62c40970aa89d490d1e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2834/2bfe6c6ad42fb13244fb62c40970aa89d490d1e3/normalizeFortranFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
21408,
12,
22640,
16,
1330,
812,
33,
9499,
18,
10283,
4672,
3536,
2131,
634,
731,
326,
8266,
1087,
434,
326,
864,
2707,
12245,
7157,
10197,
3152,
8395,
2552,
436,
1537,
2879,
12765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
21408,
12,
22640,
16,
1330,
812,
33,
9499,
18,
10283,
4672,
3536,
2131,
634,
731,
326,
8266,
1087,
434,
326,
864,
2707,
12245,
7157,
10197,
3152,
8395,
2552,
436,
1537,
2879,
12765,
... |
if isinstance(a,list): | if isinstance(a,(list,tuple)): | def lcm(a, b=None, integer=False): """ The least common multiple of a and b, or if a is a list and b is omitted the least common multiple of all elements of v. NOTE: Use integer=True to make this vastly faster if you are working with lists of integers. INPUT: a -- number b -- number (optional) integer -- (default: False); if True, do an integer LCM or v -- vector integer -- (default: False); if True, do an integer LCM NOTE -- this is *vastly* faster than doing the generic LCM EXAMPLES: sage: LCM(97,100) 9700 sage: LCM(0,2) 0 sage: LCM(-3,-5) 15 sage: LCM([1,2,3,4,5/3]) 60 sage: v = LCM(range(1,10000),integer=True) # *very* fast! sage: len(str(v)) 4349 """ if integer: if isinstance(a,list): return sage.rings.integer.LCM_list(a) else: return integer_ring.ZZ(a).lcm(\ integer_ring.ZZ(b)) if isinstance(a, list): return __LCM_list(a) if not isinstance(a, RingElement): a = integer_ring.ZZ(a) return a.lcm(b) | b22c2d1463eeb4ecf2818d1b7944e1bc313abcb2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/b22c2d1463eeb4ecf2818d1b7944e1bc313abcb2/arith.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
7670,
12,
69,
16,
324,
33,
7036,
16,
3571,
33,
8381,
4672,
3536,
1021,
4520,
2975,
3229,
434,
279,
471,
324,
16,
578,
309,
279,
353,
279,
666,
471,
324,
353,
16195,
326,
4520,
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,
328,
7670,
12,
69,
16,
324,
33,
7036,
16,
3571,
33,
8381,
4672,
3536,
1021,
4520,
2975,
3229,
434,
279,
471,
324,
16,
578,
309,
279,
353,
279,
666,
471,
324,
353,
16195,
326,
4520,
2... |
pbar.set_activity_mode(1) | def progress(download_t, download_d, upload_t, upload_d): global round, pbar threads_enter() if download_t == 0: pbar.set_activity_mode(1) round = round + 0.1 if round >= 1.0: round = 0.0 else: pbar.set_activity_mode(0) round = float(download_d) / float(download_t) pbar.update(round) threads_leave() return 0 # Anything else indicates an error | 9021e4bce46858a98a6409835d4bf759d49d85f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12352/9021e4bce46858a98a6409835d4bf759d49d85f2/test_gtk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4007,
12,
7813,
67,
88,
16,
4224,
67,
72,
16,
3617,
67,
88,
16,
3617,
67,
72,
4672,
2552,
3643,
16,
27831,
7403,
67,
2328,
1435,
309,
4224,
67,
88,
422,
374,
30,
3643,
273,
3643,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4007,
12,
7813,
67,
88,
16,
4224,
67,
72,
16,
3617,
67,
88,
16,
3617,
67,
72,
4672,
2552,
3643,
16,
27831,
7403,
67,
2328,
1435,
309,
4224,
67,
88,
422,
374,
30,
3643,
273,
3643,
3... | |
1) If `mtime` is a floating point number, it is interpreted as seconds since epoch (Jan 1, 1970 0:00:00). This documentation is written about 1177654467 seconds since epoch. | 1) If `mtime` is a floating point number, it is interpreted as seconds since epoch (Jan 1, 1970 0:00:00). This documentation is written about 1177654467 seconds since epoch. | def set_modified_time(self, path, mtime): """Sets the file modification time. Changes the modification and access times of the given file to the value determined by `mtime`, which can be given in four different ways. 1) If `mtime` is a floating point number, it is interpreted as seconds since epoch (Jan 1, 1970 0:00:00). This documentation is written about 1177654467 seconds since epoch. 2) If `mtime` is a valid timestamp, that time will be used. Valid timestamp formats are 'YYYY-MM-DD hh:mm:ss' and 'YYYYMMDD hhmmss'. 3) If `mtime` is equal to 'NOW' (case-insensitive), the current time is used. | 6f8bd1e5c5b0db8d92d174d89dc27677542321fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/6f8bd1e5c5b0db8d92d174d89dc27677542321fb/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
7342,
67,
957,
12,
2890,
16,
589,
16,
13158,
4672,
3536,
2785,
326,
585,
11544,
813,
18,
225,
17776,
326,
11544,
471,
2006,
4124,
434,
326,
864,
585,
358,
326,
460,
11383,
635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
7342,
67,
957,
12,
2890,
16,
589,
16,
13158,
4672,
3536,
2785,
326,
585,
11544,
813,
18,
225,
17776,
326,
11544,
471,
2006,
4124,
434,
326,
864,
585,
358,
326,
460,
11383,
635... |
fileDetails = MultipleJoin('FileDetail', orderBy=['filename', DESC('timestamp')]) | fileDetails = MultipleJoin('FileDetail', orderBy=['filename', '-timestamp']) | def destroySelf(self): for v in self.versions: v.destroySelf() for c in self.categories: c.destroySelf() SQLObject.destroySelf(self) | 0c66c69b97c30393d224a2cb8439788bb2694c5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13031/0c66c69b97c30393d224a2cb8439788bb2694c5e/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
10084,
12,
2890,
4672,
364,
331,
316,
365,
18,
10169,
30,
331,
18,
11662,
10084,
1435,
364,
276,
316,
365,
18,
8995,
30,
276,
18,
11662,
10084,
1435,
3063,
921,
18,
11662,
10084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5546,
10084,
12,
2890,
4672,
364,
331,
316,
365,
18,
10169,
30,
331,
18,
11662,
10084,
1435,
364,
276,
316,
365,
18,
8995,
30,
276,
18,
11662,
10084,
1435,
3063,
921,
18,
11662,
10084,
... |
tries = 0 while self('serve --address %s --port %s %s'%(address, port, options)) != 2: port += 1 tries += 1 if tries > 100: raise RuntimeError, "no port found after trying 100 (maybe your network is down)" print_open_msg(address, port) | self('serve --address %s --port %s %s'%(address, port, options)) print_open_msg(address, port) | def serve(self, port=8200, address='localhost', open_viewer=True, options=''): """ Start a web server for this repository. | 71149183adab8d86e718f5f7b8fd6dfa41d36585 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/71149183adab8d86e718f5f7b8fd6dfa41d36585/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12175,
12,
2890,
16,
1756,
33,
28,
6976,
16,
1758,
2218,
13014,
2187,
1696,
67,
25256,
33,
5510,
16,
702,
2218,
11,
4672,
3536,
3603,
279,
3311,
1438,
364,
333,
3352,
18,
2,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12175,
12,
2890,
16,
1756,
33,
28,
6976,
16,
1758,
2218,
13014,
2187,
1696,
67,
25256,
33,
5510,
16,
702,
2218,
11,
4672,
3536,
3603,
279,
3311,
1438,
364,
333,
3352,
18,
2,
-100,
-100... |
def writestr(self, zinfo, bytes): | def writestr(self, zinfo_or_arcname, bytes): | def writestr(self, zinfo, bytes): """Write a file into the archive. The contents is the string 'bytes'.""" self._writecheck(zinfo) zinfo.file_size = len(bytes) # Uncompressed size zinfo.CRC = binascii.crc32(bytes) # CRC-32 checksum if zinfo.compress_type == ZIP_DEFLATED: co = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION, zlib.DEFLATED, -15) bytes = co.compress(bytes) + co.flush() zinfo.compress_size = len(bytes) # Compressed size else: zinfo.compress_size = zinfo.file_size zinfo.header_offset = self.fp.tell() # Start of header bytes self.fp.write(zinfo.FileHeader()) zinfo.file_offset = self.fp.tell() # Start of file bytes self.fp.write(bytes) if zinfo.flag_bits & 0x08: # Write CRC and file sizes after the file data self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size, zinfo.file_size)) self.filelist.append(zinfo) self.NameToInfo[zinfo.filename] = zinfo | d43d118f9d01d277e3f75e1f8196a3015e2578aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d43d118f9d01d277e3f75e1f8196a3015e2578aa/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7262,
313,
12,
2890,
16,
998,
1376,
67,
280,
67,
11828,
529,
16,
1731,
4672,
3536,
3067,
279,
585,
1368,
326,
5052,
18,
225,
1021,
2939,
353,
326,
533,
296,
3890,
11,
12123,
365,
6315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7262,
313,
12,
2890,
16,
998,
1376,
67,
280,
67,
11828,
529,
16,
1731,
4672,
3536,
3067,
279,
585,
1368,
326,
5052,
18,
225,
1021,
2939,
353,
326,
533,
296,
3890,
11,
12123,
365,
6315,... |
rc.class_name = "wombat" rc.cert_url = rpki.up_down.multi_uri("rsync://wombat.invalid/testroot.cer") | rc.class_name = root_name rc.cert_url = rpki.up_down.multi_uri(root_cert) | def compose_response(r_msg): rc = rpki.up_down.class_elt() rc.class_name = "wombat" rc.cert_url = rpki.up_down.multi_uri("rsync://wombat.invalid/testroot.cer") rc.resource_set_as, rc.resource_set_ipv4, rc.resource_set_ipv6 = rpki_issuer.get_3779resources() r_msg.payload.classes.append(rc) rpki_subject = get_subject_cert() if rpki_subject is not None: rc.certs.append(rpki.up_down.certificate_elt()) rc.certs[0].cert_url = rpki.up_down.multi_uri("rsync://wombat.invalid/" + rpki_subject.gSKI() + ".cer") rc.certs[0].cert = rpki_subject rc.issuer = rpki.issuer | 45beea44397ec2ce2ec483f40c6ebf023203f83b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/119/45beea44397ec2ce2ec483f40c6ebf023203f83b/testroot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11458,
67,
2740,
12,
86,
67,
3576,
4672,
4519,
273,
436,
5465,
77,
18,
416,
67,
2378,
18,
1106,
67,
20224,
1435,
4519,
18,
1106,
67,
529,
273,
1365,
67,
529,
4519,
18,
7593,
67,
718,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11458,
67,
2740,
12,
86,
67,
3576,
4672,
4519,
273,
436,
5465,
77,
18,
416,
67,
2378,
18,
1106,
67,
20224,
1435,
4519,
18,
1106,
67,
529,
273,
1365,
67,
529,
4519,
18,
7593,
67,
718,... |
id = attrs.get((None, 'id'), None) x1 = get_value_reportlab(attrs.get((None, 'x1'), None)) y1 = get_value_reportlab(attrs.get((None, 'y1'), None)) width = get_value_reportlab(attrs.get((None, 'width'), None)) height = get_value_reportlab(attrs.get((None, 'height'), None)) | id = attrs.get((None, 'id')) x1 = get_value_reportlab(attrs.get((None, 'x1')), None) y1 = get_value_reportlab(attrs.get((None, 'y1')), None) if is_str(x1) and x1.find('%') != -1: x1 = get_value_from_percentage(x1, document_attrs['pageSize'][0]) else: x1 = to_float(x1) if is_str(y1) and y1.find('%') != -1: y1 = get_value_from_percentage(y1, document_attrs['pageSize'][1]) else: y1 = to_float(y1) width = get_value_reportlab(attrs.get((None, 'width'))) if is_str(width) and width.find('%') != 1: width = get_value_from_percentage(width, document_attrs['pageSize'][0]) else: width = to_float(width) height = get_value_reportlab(attrs.get((None, 'height'))) if is_str(height) and height.find('%') != 1: height = get_value_from_percentage(height, document_attrs['pageSize'][1]) else: height = to_float(height) | def template_stream(stream, _tag_uri, _tag_name, _attributes, _ns_decls, document_attrs): """ """ stack = [] stack.append((_tag_name, _attributes, None)) page_templates = [] page_template_data = None show_boundary = False for key in document_attrs.keys(): if _attributes.has_key((None, key)): document_attrs[key] = _attributes[(None, key)] if len(document_attrs['pageSize']) == 2: f = get_value_reportlab(document_attrs['pageSize'][0]) s = get_value_reportlab(document_attrs['pageSize'][0]) document_attrs['pageSize'] = (f, s) else: document_attrs['pageSize'] = pagesizes.A4 document_attrs['rotation'] = \ to_int(document_attrs['rotation']) document_attrs['leftMargin'] = \ get_value_reportlab(document_attrs['leftMargin']) document_attrs['rightMargin'] = \ get_value_reportlab(document_attrs['rightMargin']) document_attrs['topMargin'] = \ get_value_reportlab(document_attrs['topMargin']) document_attrs['bottomMargin'] = \ get_value_reportlab(document_attrs['bottomMargin']) document_attrs['showBoundary'] = \ to_bool(document_attrs['showBoundary'], 0) document_attrs['allowSplitting'] = \ to_bool(document_attrs['allowSplitting']) show_boundary = document_attrs['showBoundary'] while True: try: event, value, line_number = stream.next() except StopIteration: return #### START ELEMENT #### if event == START_ELEMENT: tag_uri, tag_name, attributes, ns_decls = value if tag_name == 'pageTemplate': page_template_data = {'frame':[]} stack.append((tag_name, attributes, None)) elif event == END_ELEMENT: tag_uri, tag_name = value prev_elt = stack[-1] if prev_elt[0] == _tag_name: if tag_name == _tag_name: return page_templates elif prev_elt[0] == 'pageTemplate': if tag_name == 'pageTemplate': attrs = prev_elt[1] id = attrs.get((None, 'id'), None) if id is None: # tag not well formed pass else: page_template = PageTemplate(id=id, frames=page_template_data['frame']) page_templates.append(page_template) page_template_data = None elif prev_elt[0] == 'frame': if tag_name == 'frame' and page_template_data is not None: attrs = prev_elt[1] #Frame(x1, y1, width,height, leftPadding=6, bottomPadding=6, #rightPadding=6, topPadding=6, id=None, showBoundary=0) id = attrs.get((None, 'id'), None) x1 = get_value_reportlab(attrs.get((None, 'x1'), None)) y1 = get_value_reportlab(attrs.get((None, 'y1'), None)) width = get_value_reportlab(attrs.get((None, 'width'), None)) height = get_value_reportlab(attrs.get((None, 'height'), None)) not_ok = x1 is None or y1 is None or width is None \ or height is None or id is None if not_ok: # frame tag not well formed pass else: frame_attrs = {'id': id, 'showBoundary': show_boundary, 'leftPadding': 0, 'bottomPadding': 0, 'rightPadding': 0, 'topPadding': 0, 'id': id, 'showBoundary': show_boundary} frame = Frame(x1, y1, width, height, **frame_attrs) page_template_data['frame'].append(frame) stack.pop() | 51b02e012792ad1fcdef1300580c1d6a58548c1f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/51b02e012792ad1fcdef1300580c1d6a58548c1f/rml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1542,
67,
3256,
12,
3256,
16,
389,
2692,
67,
1650,
16,
389,
2692,
67,
529,
16,
389,
4350,
16,
389,
2387,
67,
323,
6429,
16,
1668,
67,
7039,
4672,
3536,
3536,
2110,
273,
5378,
2110,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1542,
67,
3256,
12,
3256,
16,
389,
2692,
67,
1650,
16,
389,
2692,
67,
529,
16,
389,
4350,
16,
389,
2387,
67,
323,
6429,
16,
1668,
67,
7039,
4672,
3536,
3536,
2110,
273,
5378,
2110,
1... |
unittest.TextTestRunner().run(makeSuite()) | unittest.TextTestRunner().run(makeSuite()) | def makeSuite(): return makeSuiteForClasses(SourceTester) | bd11f2f85d92379755c0eb0d90192f9152e9c1a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/bd11f2f85d92379755c0eb0d90192f9152e9c1a4/test_source_chars.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
13587,
13332,
327,
1221,
13587,
1290,
4818,
12,
1830,
56,
7654,
13,
282,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1221,
13587,
13332,
327,
1221,
13587,
1290,
4818,
12,
1830,
56,
7654,
13,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
('manual','Invoice Based on Sales Orders'), ('picking','Invoice Based on Deliveries'), | ('manual', 'Invoice Based on Sales Orders'), ('picking', 'Invoice Based on Deliveries'), | def unlink(self, cr, uid, ids, context={}): """Allows to delete sale order lines in draft,cancel states""" for rec in self.browse(cr, uid, ids, context=context): if rec.state not in ['draft','cancel']: raise osv.except_osv(_('Invalid action !'), _('Cannot delete a sale order line which is %s !')%(rec.state,)) return super(sale_order_line, self).unlink(cr, uid, ids, context=context) | fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3536,
19132,
358,
1430,
272,
5349,
1353,
2362,
316,
12246,
16,
10996,
5493,
8395,
364,
1950,
316,
365,
18,
25731,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8255,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3536,
19132,
358,
1430,
272,
5349,
1353,
2362,
316,
12246,
16,
10996,
5493,
8395,
364,
1950,
316,
365,
18,
25731,
12,
... |
cmd.zip_ok = None cmd.build_directory = None | def fetch_build_egg(self, req): """Fetch an egg needed for building""" try: cmd = self._egg_fetcher except AttributeError: from setuptools.command.easy_install import easy_install cmd = easy_install( self.__class__({'script_args':['easy_install']}), args="x", install_dir=os.curdir, exclude_scripts=True, always_copy=False, build_directory=None, editable=False, upgrade=False, multi_version=True ) cmd.ensure_finalized() cmd.zip_ok = None # override any setup.cfg setting for these cmd.build_directory = None self._egg_fetcher = cmd | 81ad30d96508ee69a3e7ec43ca8fa9856428e114 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/495/81ad30d96508ee69a3e7ec43ca8fa9856428e114/dist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
3510,
67,
23171,
12,
2890,
16,
1111,
4672,
3536,
5005,
392,
25144,
3577,
364,
10504,
8395,
775,
30,
1797,
273,
365,
6315,
23171,
67,
5754,
264,
1335,
6394,
30,
628,
444,
30693,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
3510,
67,
23171,
12,
2890,
16,
1111,
4672,
3536,
5005,
392,
25144,
3577,
364,
10504,
8395,
775,
30,
1797,
273,
365,
6315,
23171,
67,
5754,
264,
1335,
6394,
30,
628,
444,
30693,... | |
assert str(path) == 'a/b/d' | self.assertEqual(str(path), 'a/b/d') | def test_backnorm(self): """ Test the normalization 'a/../b' = 'b' """ path = uri.Path('a/b/c/../d') assert str(path) == 'a/b/d' | 10e3494b023699fdcb2cbe973f15ae8a062173c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/10e3494b023699fdcb2cbe973f15ae8a062173c1/test_uri.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
823,
7959,
12,
2890,
4672,
3536,
7766,
326,
13728,
296,
69,
19,
6216,
70,
11,
273,
296,
70,
11,
3536,
589,
273,
2003,
18,
743,
2668,
69,
19,
70,
19,
71,
19,
6216,
72,
613... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
823,
7959,
12,
2890,
4672,
3536,
7766,
326,
13728,
296,
69,
19,
6216,
70,
11,
273,
296,
70,
11,
3536,
589,
273,
2003,
18,
743,
2668,
69,
19,
70,
19,
71,
19,
6216,
72,
613... |
if data != u'': if self.site().mediawiki_message('pagemovedsub') in data: output(u'Page %s moved to %s' % (self.title(), newtitle)) return True elif self.site().mediawiki_message('articleexists') in data: | if data == u'': output(u'Page %s moved to %s' % (self.title(), newtitle)) return True else: if self.site().mediawiki_message('articleexists') in data: | def move(self, newtitle, reason=None, movetalkpage=True, sysop=False, throttle=True): """Move this page to new title given by newtitle.""" if throttle: put_throttle() if reason == None: reason = input(u'Please enter a reason for the move:') if self.isTalkPage(): movetalkpage = False host = self.site().hostname() address = self.site().move_address() self.site().forceLogin(sysop = sysop) token = self.site().getToken(self, sysop = sysop) predata = { 'wpOldTitle': self.title().encode(self.site().encoding()), 'wpNewTitle': newtitle.encode(self.site().encoding()), 'wpReason': reason.encode(self.site().encoding()), } if movetalkpage: predata['wpMovetalk'] = '1' else: predata['wpMovetalk'] = '0' if token: predata['wpEditToken'] = token if self.site().hostname() in config.authenticate.keys(): predata['Content-type'] = 'application/x-www-form-urlencoded' predata['User-agent'] = useragent data = self.site().urlEncode(predata) response = urllib2.urlopen(urllib2.Request(self.site().protocol() + '://' + self.site().hostname() + address, data)) data = '' else: response, data = self.site().postForm(address, predata, sysop = sysop) if data != u'': if self.site().mediawiki_message('pagemovedsub') in data: output(u'Page %s moved to %s' % (self.title(), newtitle)) return True elif self.site().mediawiki_message('articleexists') in data: output(u'Page moved failed: Target page [[%s]] already exists.' % newtitle) return False else: output(u'Page move failed for unknown reason.') try: ibegin = data.index('<!-- start content -->') + 22 iend = data.index('<!-- end content -->') except ValueError: # if begin/end markers weren't found, show entire HTML file output(data) else: # otherwise, remove the irrelevant sections data = data[ibegin:iend] output(data) return False | f1bd071b480e80c29b6d1fc73f5a9cb6331054dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/f1bd071b480e80c29b6d1fc73f5a9cb6331054dd/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
12,
2890,
16,
394,
2649,
16,
3971,
33,
7036,
16,
5730,
278,
2960,
2433,
33,
5510,
16,
2589,
556,
33,
8381,
16,
18304,
33,
5510,
4672,
3536,
7607,
333,
1363,
358,
394,
2077,
864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
12,
2890,
16,
394,
2649,
16,
3971,
33,
7036,
16,
5730,
278,
2960,
2433,
33,
5510,
16,
2589,
556,
33,
8381,
16,
18304,
33,
5510,
4672,
3536,
7607,
333,
1363,
358,
394,
2077,
864,
... |
for element in xml_element_iter(xmlnode.children): | for element in xml_element_iter(self.xmlnode.children): | def set_history(self, parameters): for element in xml_element_iter(xmlnode.children): if get_node_ns_uri(child) == MUC_NS and element.name == "history": element.unlinkNode() element.freeNode() break if parameters.maxchars and parameters.maxchars < 0: raise ValueError, "History parameter maxchars must be positive" if parameters.maxstanzas and parameters.maxstanzas < 0: raise ValueError, "History parameter maxstanzas must be positive" if parameters.maxseconds and parameters.maxseconds < 0: raise ValueError, "History parameter maxseconds must be positive" hnode=self.xmlnode.newChild(self.xmlnode.ns(), "history", None) if parameters.maxchars is not None: hnode.setProp("maxchars", str(parameters.maxchars)) if parameters.maxstanzas is not None: hnode.setProp("maxstanzas", str(parameters.maxstanzas)) if parameters.maxseconds is not None: hnode.setProp("maxseconds", str(parameters.maxseconds)) if parameters.since is not None: hnode.setProp("since", parameters.since.strftime("%Y-%m-%dT%H:%M:%SZ")) | 0eaf3a1df70c7d3c5d9c6930711250ab5f813160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/0eaf3a1df70c7d3c5d9c6930711250ab5f813160/muccore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
8189,
12,
2890,
16,
1472,
4672,
364,
930,
316,
2025,
67,
2956,
67,
2165,
12,
2890,
18,
2902,
2159,
18,
5906,
4672,
309,
336,
67,
2159,
67,
2387,
67,
1650,
12,
3624,
13,
422,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8189,
12,
2890,
16,
1472,
4672,
364,
930,
316,
2025,
67,
2956,
67,
2165,
12,
2890,
18,
2902,
2159,
18,
5906,
4672,
309,
336,
67,
2159,
67,
2387,
67,
1650,
12,
3624,
13,
422,... |
"""Verify suggest results in omnibox.""" | """Verify suggested results in omnibox.""" | def testSuggest(self): """Verify suggest results in omnibox.""" matches = self._GetOmniboxMatchesFor('apple') self.assertTrue(matches) self.assertTrue([x for x in matches if x['type'] == 'search-suggest']) | 0d3995a34bdc2c93f537155d491227d1b9b86aff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/0d3995a34bdc2c93f537155d491227d1b9b86aff/omnibox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
55,
8679,
12,
2890,
4672,
3536,
8097,
22168,
1686,
316,
8068,
82,
495,
2409,
12123,
1885,
273,
365,
6315,
967,
51,
13607,
495,
2409,
6869,
1290,
2668,
438,
1802,
6134,
365,
18,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
55,
8679,
12,
2890,
4672,
3536,
8097,
22168,
1686,
316,
8068,
82,
495,
2409,
12123,
1885,
273,
365,
6315,
967,
51,
13607,
495,
2409,
6869,
1290,
2668,
438,
1802,
6134,
365,
18,
112... |
print 'Notation declared:', args | print 'Notation declared:', args | def NotationDeclHandler(self, *args): name, base, sysid, pubid = args | b7b7c8b86da0abbf3e1f9479a65bd9b3904e1eaa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b7b7c8b86da0abbf3e1f9479a65bd9b3904e1eaa/test_pyexpat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2288,
367,
3456,
1503,
12,
2890,
16,
380,
1968,
4672,
508,
16,
1026,
16,
2589,
350,
16,
5634,
350,
273,
833,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2288,
367,
3456,
1503,
12,
2890,
16,
380,
1968,
4672,
508,
16,
1026,
16,
2589,
350,
16,
5634,
350,
273,
833,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
endmatch = pattern.search(string[matchend:]) | endmatch = end_pattern.search(string[matchend:]) | def inline_obj(self, match, lineno, pattern, nodeclass, restore_backslashes=0): string = match.string matchstart = match.start('start') matchend = match.end('start') if self.quoted_start(match): return (string[:matchend], [], string[matchend:], [], '') endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars text = unescape(endmatch.string[:endmatch.start(1)], restore_backslashes) rawsource = unescape(string[matchstart:matchend+endmatch.end(1)], 1) return (string[:matchstart], [nodeclass(rawsource, text)], string[matchend:][endmatch.end(1):], [], endmatch.group(1)) msg = self.reporter.warning( 'Inline %s start-string without end-string ' 'at line %s.' % (nodeclass.__name__, lineno)) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg], '' | 816927c350eab6c8d1baf3e3aa09f53b2caab704 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/816927c350eab6c8d1baf3e3aa09f53b2caab704/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6370,
67,
2603,
12,
2890,
16,
845,
16,
7586,
16,
1936,
16,
756,
1106,
16,
5217,
67,
823,
13675,
33,
20,
4672,
533,
273,
845,
18,
1080,
845,
1937,
273,
845,
18,
1937,
2668,
1937,
6134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6370,
67,
2603,
12,
2890,
16,
845,
16,
7586,
16,
1936,
16,
756,
1106,
16,
5217,
67,
823,
13675,
33,
20,
4672,
533,
273,
845,
18,
1080,
845,
1937,
273,
845,
18,
1937,
2668,
1937,
6134... |
status = (rc == 0) | return (rc == 0) | def InstallService(self, entry): ''' Install Service entry In supervised mode we also take care it's (not) running ''' self.logger.info('Installing Service %s' % entry.get('name')) if entry.get('status') == 'on': # make sure it's enabled cmd = '/sbin/rc-update add %s default' rc = self.cmd.run(cmd % entry.get('name'))[0] status = (rc == 0) | 5ee259750bbef505378a1fc342c518b9a08540d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/5ee259750bbef505378a1fc342c518b9a08540d5/RcUpdate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
1179,
12,
2890,
16,
1241,
4672,
9163,
10284,
1956,
1241,
657,
2240,
26779,
1965,
732,
2546,
4862,
7671,
518,
1807,
261,
902,
13,
3549,
9163,
365,
18,
4901,
18,
1376,
2668,
6410,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10284,
1179,
12,
2890,
16,
1241,
4672,
9163,
10284,
1956,
1241,
657,
2240,
26779,
1965,
732,
2546,
4862,
7671,
518,
1807,
261,
902,
13,
3549,
9163,
365,
18,
4901,
18,
1376,
2668,
6410,
3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.