rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
except StandardError, e: | except Exception, e: | def main(): parser = prepare_option_parser() (options, args) = parser.parse_args() if getattr(options, 'debug', None): getLogger().setLevel(DEBUG) debug('test') debug('options: %s, args: %s' % (options, args)) try: if not getattr(options, 'action', None) and \ not getattr(options, 'append_path', None) and \ not getattr(options, 'revise_path', None): if getattr(options, 'set_doctype', None) is not None or \ getattr(options, 'set_comment', None) is not None or \ getattr(options, 'set_description', None) is not None or \ getattr(options, 'set_restriction', None) is not None: cli_set_batch(options) elif getattr(options, 'new_docname', None): cli_rename(options) else: print >> sys.stderr, "ERROR: no action specified" sys.exit(1) elif getattr(options, 'append_path', None): options.empty_recs = 'yes' options.empty_docs = 'yes' cli_append(options, getattr(options, 'append_path', None)) elif getattr(options, 'revise_path', None): cli_revise(options, getattr(options, 'revise_path', None)) elif options.action == 'textify': cli_textify(options) elif getattr(options, 'action', None) == 'get-history': cli_get_history(options) elif getattr(options, 'action', None) == 'get-info': cli_get_info(options) elif getattr(options, 'action', None) == 'get-disk-usage': cli_get_disk_usage(options) elif getattr(options, 'action', None) == 'check-md5': cli_check_md5(options) elif getattr(options, 'action', None) == 'update-md5': cli_update_md5(options) elif getattr(options, 'action', None) == 'fix-all': cli_fix_all(options) elif getattr(options, 'action', None) == 'fix-marc': cli_fix_marc(options) elif getattr(options, 'action', None) == 'delete': cli_delete(options) elif getattr(options, 'action', None) == 'delete-file': cli_delete_file(options) elif getattr(options, 'action', None) == 'fix-duplicate-docnames': cli_fix_duplicate_docnames(options) elif getattr(options, 'action', None) == 'fix-format': cli_fix_format(options) elif getattr(options, 'action', None) == 'check-duplicate-docnames': cli_check_duplicate_docnames(options) elif getattr(options, 'action', None) == 'check-format': cli_check_format(options) elif getattr(options, 'action', None) == 'undelete': cli_undelete(options) elif getattr(options, 'action', None) == 'purge': cli_purge(options) elif getattr(options, 'action', None) == 'expunge': cli_expunge(options) elif getattr(options, 'action', None) == 'revert': cli_revert(options) elif getattr(options, 'action', None) == 'hide': cli_hide(options) elif getattr(options, 'action', None) == 'unhide': cli_unhide(options) else: print >> sys.stderr, "ERROR: Action %s is not valid" % getattr(options, 'action', None) sys.exit(1) except StandardError, e: register_exception() print >> sys.stderr, 'ERROR: %s' % e sys.exit(1) | ef477904e96d8ed0fe7a5c407dc84b4eb31e838f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/ef477904e96d8ed0fe7a5c407dc84b4eb31e838f/bibdocfilecli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
2911,
67,
3482,
67,
4288,
1435,
261,
2116,
16,
833,
13,
273,
2082,
18,
2670,
67,
1968,
1435,
309,
3869,
12,
2116,
16,
296,
4148,
2187,
599,
4672,
7156,
7675,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2082,
273,
2911,
67,
3482,
67,
4288,
1435,
261,
2116,
16,
833,
13,
273,
2082,
18,
2670,
67,
1968,
1435,
309,
3869,
12,
2116,
16,
296,
4148,
2187,
599,
4672,
7156,
7675,
54... |
print filename, relPath | def convertContents (c, dirlist, parent): list = ('contents',) + dirlist path = apply (os.path.join, list) filename = os.path.join (path, 'contents.html') if not os.path.exists (path): os.makedirs (path) page = Page (linkBoxItem='Contents') list = ['..'] * len (dirlist) if list: relPath = apply (os.path.join, list) rootUrl = os.path.join (relPath, 'contents.html') else: relPath = '.' rootUrl = 'contents.html' print filename, relPath list = [Href (rootUrl, 'AROS'), Text (' / ')] path = relPath for dir in dirlist: path = os.path.dirname (path) list.append (Href (os.path.join (path, 'contents.html'), dir)) list.append (Text (' / ')) page.meat = page.meat + [Heading (1, list2html (list))] if c.description: convertParagraph (page, c.description) elif parent: convertParagraph (page, parent.description) for item in c.items: convertItem (page, c, dirlist, item) page.write (filename) | 7b1ccd5616f9be3679d4fe7b1a963e76adb69604 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4747/7b1ccd5616f9be3679d4fe7b1a963e76adb69604/contents2html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
6323,
261,
71,
16,
1577,
1098,
16,
982,
4672,
666,
273,
7707,
3980,
2187,
13,
397,
1577,
1098,
589,
273,
2230,
261,
538,
18,
803,
18,
5701,
16,
666,
13,
1544,
273,
1140,
18,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
6323,
261,
71,
16,
1577,
1098,
16,
982,
4672,
666,
273,
7707,
3980,
2187,
13,
397,
1577,
1098,
589,
273,
2230,
261,
538,
18,
803,
18,
5701,
16,
666,
13,
1544,
273,
1140,
18,
80... | |
results = self.db.find_one(_id=id) | results = self.db.find_one(dict(_id=id)) | def GET(self, page, id): results = self.db.find_one(_id=id) if not results: raise cherrypy.HTTPError(404) return json.dumps(results) | d79f8a27c187536fc5e6f0ed7ed1e7280d09a0b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/39/d79f8a27c187536fc5e6f0ed7ed1e7280d09a0b0/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4978,
12,
2890,
16,
1363,
16,
612,
4672,
1686,
273,
365,
18,
1966,
18,
4720,
67,
476,
12,
1576,
24899,
350,
33,
350,
3719,
309,
486,
1686,
30,
1002,
462,
370,
28398,
18,
3693,
668,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4978,
12,
2890,
16,
1363,
16,
612,
4672,
1686,
273,
365,
18,
1966,
18,
4720,
67,
476,
12,
1576,
24899,
350,
33,
350,
3719,
309,
486,
1686,
30,
1002,
462,
370,
28398,
18,
3693,
668,
1... |
def fl_set_object_size(obj, w, h): """ fl_set_object_size(obj, w, h) """ _fl_set_object_size(obj, w, h) | def fl_set_object_size(pObject, w, h): """ fl_set_object_size(pObject, w, h) """ _fl_set_object_size(pObject, w, h) | def fl_set_object_size(obj, w, h): """ fl_set_object_size(obj, w, h) """ _fl_set_object_size(obj, w, h) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
1612,
67,
1467,
12,
84,
921,
16,
341,
16,
366,
4672,
3536,
1183,
67,
542,
67,
1612,
67,
1467,
12,
84,
921,
16,
341,
16,
366,
13,
3536,
225,
389,
2242,
67,
542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
1612,
67,
1467,
12,
84,
921,
16,
341,
16,
366,
4672,
3536,
1183,
67,
542,
67,
1612,
67,
1467,
12,
84,
921,
16,
341,
16,
366,
13,
3536,
225,
389,
2242,
67,
542,
... |
def calculatePageCount(self): | def calculateScale(self, dc): page_ppi_x, page_ppi_y = self.GetPPIPrinter() screen_ppi_x, screen_ppi_y = self.GetPPIScreen() screen_to_page = 1.0 * page_ppi_y / screen_ppi_y pw, ph = self.GetPageSizePixels() dw, dh = dc.GetSize() self.scale = screen_to_page * dh / ph dc.SetUserScale(self.scale, self.scale) self.mm_to_page = 1.0 * page_ppi_y / screen_to_page / 25.4 if self.debuglevel > 0: print "scale: %f" % self.scale print "device pixels: %dx%d" % (dw, dh) print "page pixels: %dx%d" % (pw, ph) print "mm_to_page: %f" % self.mm_to_page self.x1 = self.top_left_margin[0] * self.mm_to_page self.y1 = self.top_left_margin[1] * self.mm_to_page self.x2 = dc.DeviceToLogicalXRel(dw) - \ self.bottom_right_margin[0] * self.mm_to_page self.y2 = dc.DeviceToLogicalYRel(dh) - \ self.bottom_right_margin[1] * self.mm_to_page self.page_height = self.y2 - self.y1 - 2 * self.mm_to_page dc.SetFont(self.stc.GetFont()) self.line_height = dc.GetCharHeight() self.lines_pp = int(self.page_height / self.line_height) if self.debuglevel > 0: print "page size: %d,%d -> %d,%d" % (int(self.x1), int(self.y1), int(self.x2), int(self.y2)) print "line height: ", self.line_height print "page height: ", int(self.page_height) print "lines per page: ", self.lines_pp def calculatePageCount(self, attempt_wrap=False): | def calculatePageCount(self): page_offsets = [] page_line_start = 0 lines_on_page = 0 num_lines = self.stc.GetLineCount() line = 0 while line < num_lines: wrap_count = self.stc.WrapCount(line) if wrap_count > 1: print("found wrapped line %d: %d" % (line, wrap_count)) if lines_on_page + wrap_count > self.lines_pp: start_pos = self.stc.PositionFromLine(page_line_start) end_pos = self.stc.GetLineEndPosition(page_line_start + lines_on_page) page_offsets.append((start_pos, end_pos)) page_line_start = line lines_on_page = 0 lines_on_page += wrap_count line += 1 if lines_on_page > 0: start_pos = self.stc.PositionFromLine(page_line_start) end_pos = self.stc.GetLineEndPosition(page_line_start + lines_on_page) page_offsets.append((start_pos, end_pos)) self.page_count = len(page_offsets) self.page_offsets = page_offsets | 32a7a26e5c3d81294813c6ef0bc5be0aada1c3ab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/32a7a26e5c3d81294813c6ef0bc5be0aada1c3ab/stcprint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
5587,
12,
2890,
16,
6744,
4672,
1363,
67,
84,
7259,
67,
92,
16,
1363,
67,
84,
7259,
67,
93,
273,
365,
18,
967,
52,
1102,
12149,
1435,
5518,
67,
84,
7259,
67,
92,
16,
225,
551... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
5587,
12,
2890,
16,
6744,
4672,
1363,
67,
84,
7259,
67,
92,
16,
1363,
67,
84,
7259,
67,
93,
273,
365,
18,
967,
52,
1102,
12149,
1435,
5518,
67,
84,
7259,
67,
92,
16,
225,
551... |
this = apply(_quickfix.new_PosReqID, args) | this = _quickfix.new_PosReqID(*args) | def __init__(self, *args): this = apply(_quickfix.new_PosReqID, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
1616,
6113,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
1616,
6113,
734,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
3... |
gLogger.error("Failed to get proxy information",res['Message']) DIRAC.exit(2) | gLogger.error( "Failed to get proxy information", res['Message'] ) DIRAC.exit( 2 ) | def usage(): gLogger.info(' Type "%s --help" for the available options and syntax' % Script.scriptName) DIRAC.exit(-1) | 35c46f2bc9999cc2aa52995d95dfc732a2b11adf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/35c46f2bc9999cc2aa52995d95dfc732a2b11adf/dirac-rss-renew-token.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
314,
3328,
18,
1376,
2668,
1412,
2213,
87,
1493,
5201,
6,
364,
326,
2319,
702,
471,
6279,
11,
738,
7739,
18,
4263,
461,
13,
18544,
2226,
18,
8593,
19236,
21,
13,
225,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4084,
13332,
314,
3328,
18,
1376,
2668,
1412,
2213,
87,
1493,
5201,
6,
364,
326,
2319,
702,
471,
6279,
11,
738,
7739,
18,
4263,
461,
13,
18544,
2226,
18,
8593,
19236,
21,
13,
225,
2,
... |
return Dec_n1 | return _Dec_n1 | def compare_total(self, other): """Compares self to other using the abstract representations. | 335c6f295295ab5b62a80d25d26d89243eb80fb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/335c6f295295ab5b62a80d25d26d89243eb80fb0/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
4963,
12,
2890,
16,
1308,
4672,
3536,
19199,
365,
358,
1308,
1450,
326,
8770,
27851,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
67,
4963,
12,
2890,
16,
1308,
4672,
3536,
19199,
365,
358,
1308,
1450,
326,
8770,
27851,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
class CompressObjectTestCase(unittest.TestCase): | @precisionbigmemtest(size=_1G + 1024 * 1024, memuse=3) def test_big_compress_buffer(self, size): compress = lambda s: zlib.compress(s, 1) self.check_big_compress_buffer(size, compress) @precisionbigmemtest(size=_1G + 1024 * 1024, memuse=2) def test_big_decompress_buffer(self, size): self.check_big_decompress_buffer(size, zlib.decompress) class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase): | def test_speech128(self): # compress more data data = HAMLET_SCENE * 128 x = zlib.compress(data) self.assertEqual(zlib.decompress(x), data) | 785dc1160068b7e3489b040cbc207527bcbecc99 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/785dc1160068b7e3489b040cbc207527bcbecc99/test_zlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
87,
12510,
10392,
12,
2890,
4672,
468,
8099,
1898,
501,
501,
273,
670,
2192,
15146,
67,
2312,
1157,
41,
380,
8038,
619,
273,
24220,
18,
14706,
12,
892,
13,
365,
18,
11231,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
87,
12510,
10392,
12,
2890,
4672,
468,
8099,
1898,
501,
501,
273,
670,
2192,
15146,
67,
2312,
1157,
41,
380,
8038,
619,
273,
24220,
18,
14706,
12,
892,
13,
365,
18,
11231,
58... |
ki[0,0] = s0 ki[1,0] = s1 | ki[0, 0] = s0 ki[1, 0] = s1 | def key_schedule(self, kj, i): """ Return $k_i$ for a given $i$ and $k_j$ with $j = i-1$. TESTS: sage: sr = mq.SR(10,4,4,8, star=True, allow_zero_inversions=True) sage: ki = sr.state_array() sage: for i in range(10): ... ki = sr.key_schedule(ki,i+1) sage: print sr.hex_str_matrix(ki) B4 3E 23 6F EF 92 E9 8F 5B E2 51 18 CB 11 CF 8E """ if i < 0: raise TypeError, "i must be >= i" | cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
498,
67,
10676,
12,
2890,
16,
417,
78,
16,
277,
4672,
3536,
2000,
271,
79,
67,
77,
8,
364,
279,
864,
271,
77,
8,
471,
271,
79,
67,
78,
8,
598,
271,
78,
273,
277,
17,
21,
8,
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,
498,
67,
10676,
12,
2890,
16,
417,
78,
16,
277,
4672,
3536,
2000,
271,
79,
67,
77,
8,
364,
279,
864,
271,
77,
8,
471,
271,
79,
67,
78,
8,
598,
271,
78,
273,
277,
17,
21,
8,
18,... |
pfb = os.path.splitext(afm)[0] + '.pfb' | for e in ('.pfb', '.PFB'): pfb = os.path.splitext(afm)[0] + e if os.path.isfile(pfb): break | def getTypeFace(faceName): """Lazily construct known typefaces if not found""" try: return _typefaces[faceName] except KeyError: # not found, construct it if known if faceName in standardFonts: face = TypeFace(faceName) registerTypeFace(face) #print 'auto-constructing type face %s' % face.name return face else: #try a brute force search afm = bruteForceSearchForAFM(faceName) if afm: pfb = os.path.splitext(afm)[0] + '.pfb' assert os.path.isfile(pfb), 'file %s not found!' % pfb face = EmbeddedType1Face(afm, pfb) registerTypeFace(face) return face else: raise | a49bc7d0c3410d4fa3628b3b6a7d025f24bd507a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a49bc7d0c3410d4fa3628b3b6a7d025f24bd507a/pdfmetrics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3130,
11824,
12,
865,
461,
4672,
3536,
48,
20811,
4872,
4846,
618,
4601,
309,
486,
1392,
8395,
775,
30,
327,
389,
723,
4601,
63,
865,
461,
65,
1335,
4999,
30,
468,
486,
1392,
16,
4872,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3130,
11824,
12,
865,
461,
4672,
3536,
48,
20811,
4872,
4846,
618,
4601,
309,
486,
1392,
8395,
775,
30,
327,
389,
723,
4601,
63,
865,
461,
65,
1335,
4999,
30,
468,
486,
1392,
16,
4872,... |
c.appendExten("_X.", "Goto(%s,s,1)" % self.ivr) | def createIncomingContext(self): c = AstConf("extensions.conf") contextin = "in-%s" % self.name c.setSection(contextin) c.appendExten("_X.","Set(CDR(intrunk)=%s)" % self.name) c.appendExten("s","Set(CDR(intrunk)=%s)" % self.name) if self.clid: needModule("app_setcidname") c.appendExten("_X.","SetCIDName(%s)" % self.clid) c.appendExten("s","SetCIDName(%s)" % self.clid) if self.contextin == 'phone' and self.phone: global configlet_tree obj = configlet_tree.getConfigletByName(self.phone) try: pbx = obj.pbx except AttributeError: pass c.appendExten("_X.", "Goto(%s,%s,1)" % (pbx,self.phone)) c.appendExten("s", "Goto(%s,%s,1)" % (pbx,self.phone)) if self.contextin == 'ivr' and self.ivr: c.appendExten("_X.", "Goto(%s,s,1)" % self.ivr) c.appendExten("s", "Goto(%s,s,1)" % self.ivr) | b38a1715731c6e481dc90ef5704aefead478dc72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2627/b38a1715731c6e481dc90ef5704aefead478dc72/configlets.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
20370,
1042,
12,
2890,
4672,
276,
273,
16614,
3976,
2932,
9489,
18,
3923,
7923,
819,
267,
273,
315,
267,
6456,
87,
6,
738,
365,
18,
529,
276,
18,
542,
5285,
12,
2472,
267,
13,
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,
752,
20370,
1042,
12,
2890,
4672,
276,
273,
16614,
3976,
2932,
9489,
18,
3923,
7923,
819,
267,
273,
315,
267,
6456,
87,
6,
738,
365,
18,
529,
276,
18,
542,
5285,
12,
2472,
267,
13,
2... | |
def __call__(self, x): | def __call__(self, x, maximum_bits=20000): | def __call__(self, x): try: return x.ceil() except AttributeError: if isinstance(x, (float, int, long, complex)): return int(math.ceil(x)) return SymbolicComposition(self, SR(x)) | fbceb542382f2c51819c9834088de6946307a35a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/fbceb542382f2c51819c9834088de6946307a35a/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
4207,
67,
6789,
33,
22,
2787,
4672,
775,
30,
327,
619,
18,
311,
330,
1435,
1335,
6394,
30,
309,
1549,
12,
92,
16,
261,
5659,
16,
509,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
4207,
67,
6789,
33,
22,
2787,
4672,
775,
30,
327,
619,
18,
311,
330,
1435,
1335,
6394,
30,
309,
1549,
12,
92,
16,
261,
5659,
16,
509,
16,
15... |
data = rescale_image(item.data, MAX_THUMB_SIZE, MAX_THUMB_DIMEN) | try: data = rescale_image(item.data, MAX_THUMB_SIZE, MAX_THUMB_DIMEN) except IOError: self._oeb.logger.warn('Bad image file %r' % item.href) return None | def _add_thumbnail(self, item): data = rescale_image(item.data, MAX_THUMB_SIZE, MAX_THUMB_DIMEN) manifest = self._oeb.manifest id, href = manifest.generate('thumbnail', 'thumbnail.jpeg') manifest.add(id, href, 'image/jpeg', data=data) index = len(self._images) + 1 self._images[href] = index self._records.append(data) return index | 49a55d1da631efc23e3f08d982fbfa6f72a22593 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/49a55d1da631efc23e3f08d982fbfa6f72a22593/writer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
14904,
12,
2890,
16,
761,
4672,
775,
30,
501,
273,
30323,
67,
2730,
12,
1726,
18,
892,
16,
4552,
67,
2455,
2799,
38,
67,
4574,
16,
4552,
67,
2455,
2799,
38,
67,
2565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
14904,
12,
2890,
16,
761,
4672,
775,
30,
501,
273,
30323,
67,
2730,
12,
1726,
18,
892,
16,
4552,
67,
2455,
2799,
38,
67,
4574,
16,
4552,
67,
2455,
2799,
38,
67,
2565,
... |
self.easy_test(s, t, {"*n" : 103}) | self.easy(s, t, {"*n" : 103}) | def test_overwrite_variable_2(self): s = "METHOD %*n DONT REMOVE" t = "METHOD 103 DONT REMOVE" self.easy_test(s, t, {"*n" : 103}) | 9d3d7971926c3b25de17eabd592eb5eb2d280f47 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/9d3d7971926c3b25de17eabd592eb5eb2d280f47/test_nastran_replacer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
19274,
67,
6105,
67,
22,
12,
2890,
4672,
272,
273,
315,
5327,
738,
14,
82,
463,
10079,
26056,
6,
268,
273,
315,
5327,
1728,
23,
463,
10079,
26056,
6,
365,
18,
73,
15762,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
19274,
67,
6105,
67,
22,
12,
2890,
4672,
272,
273,
315,
5327,
738,
14,
82,
463,
10079,
26056,
6,
268,
273,
315,
5327,
1728,
23,
463,
10079,
26056,
6,
365,
18,
73,
15762,
67... |
new_ia=normalizeIAccessible(res).QueryInterface(IAccessible) | new_ia=normalizeIAccessible(res) | def accChild(ia,child): try: res=ia.accChild(child) if isinstance(res,comtypes.client.dynamic._Dispatch) or isinstance(res,IUnknown): new_ia=normalizeIAccessible(res).QueryInterface(IAccessible) new_child=0 elif isinstance(res,int): new_ia=ia new_child=res return (new_ia,new_child) except: return None | 5a7d0ef6cdff11c17c76b9f32a0be428280e20d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/5a7d0ef6cdff11c17c76b9f32a0be428280e20d1/IAccessibleHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4078,
1763,
12,
1155,
16,
3624,
4672,
775,
30,
400,
33,
1155,
18,
8981,
1763,
12,
3624,
13,
309,
1549,
12,
455,
16,
832,
2352,
18,
2625,
18,
14507,
6315,
5325,
13,
578,
1549,
12,
455... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4078,
1763,
12,
1155,
16,
3624,
4672,
775,
30,
400,
33,
1155,
18,
8981,
1763,
12,
3624,
13,
309,
1549,
12,
455,
16,
832,
2352,
18,
2625,
18,
14507,
6315,
5325,
13,
578,
1549,
12,
455... |
${BEGIN}\t-@${create_directory_command}\n${END}\ ${BEGIN}\t-@${copy_autogen_h}\n${END} | dirs: ${BEGIN}\t-@${create_directory_command}\n${END} strdefs: \t-@$(CP) $(DEBUG_DIR)${separator}AutoGen.h $(DEBUG_DIR)${separator}$(MODULE_NAME)StrDefs.h | def GetRemoveDirectoryCommand(self, DirList): return [self._RD_TEMPLATE_[self._FileType] % {'dir':Dir} for Dir in DirList] | c8cd1f15c424e7cb1dd077c48daa85d40c163c2c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/c8cd1f15c424e7cb1dd077c48daa85d40c163c2c/GenMake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3288,
2853,
2189,
12,
2890,
16,
8446,
682,
4672,
327,
306,
2890,
6315,
20403,
67,
12205,
67,
63,
2890,
6315,
28941,
65,
738,
13666,
1214,
4278,
1621,
97,
364,
8446,
316,
8446,
682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3288,
2853,
2189,
12,
2890,
16,
8446,
682,
4672,
327,
306,
2890,
6315,
20403,
67,
12205,
67,
63,
2890,
6315,
28941,
65,
738,
13666,
1214,
4278,
1621,
97,
364,
8446,
316,
8446,
682,
... |
def __init__(self, directory, rcsSubDir, rcsBaseUrl, rcs, dependencies= []): | def __init__(self, directory, rcsSubDir, rcsBaseUrl, rcs): | def __init__(self, directory, rcsSubDir, rcsBaseUrl, rcs, dependencies= []): super(Binary, self).__init__(directory = directory, rcsSubDir = rcsSubDir, rcsBaseUrl = rcsBaseUrl, rcs = rcs, dependencies = dependencies, executable = 'bin') | 86d1cb8f56b7616de04a48f2f3921ba30e9ded39 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8259/86d1cb8f56b7616de04a48f2f3921ba30e9ded39/Project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1867,
16,
436,
2143,
1676,
1621,
16,
436,
2143,
14074,
16,
436,
2143,
4672,
2240,
12,
5905,
16,
365,
2934,
972,
2738,
972,
12,
5149,
273,
1867,
16,
436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1867,
16,
436,
2143,
1676,
1621,
16,
436,
2143,
14074,
16,
436,
2143,
4672,
2240,
12,
5905,
16,
365,
2934,
972,
2738,
972,
12,
5149,
273,
1867,
16,
436,
... |
self.nickname = args[0] super(AskNicknameDialog, self).__init__(None, "Nickname (%s) is in use. Please select a different one:" % args[0]) | def __init__(self, *args, **kwargs): self.in_use = kwargs.get("in_use") self.times = 2 try: if not self.in_use: raise IndexError args[0] except IndexError: return super(AskNicknameDialog, self).__init__(None, "Please select a nickname:") self.nickname = args[0] super(AskNicknameDialog, self).__init__(None, "Nickname (%s) is in use. Please select a different one:" % args[0]) | 26b6a41a54b1e35c3053d57be97e0033551b9f67 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2718/26b6a41a54b1e35c3053d57be97e0033551b9f67/dialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
267,
67,
1202,
273,
1205,
18,
588,
2932,
267,
67,
1202,
7923,
365,
18,
8293,
273,
576,
775,
30,
309,
486,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
365,
18,
267,
67,
1202,
273,
1205,
18,
588,
2932,
267,
67,
1202,
7923,
365,
18,
8293,
273,
576,
775,
30,
309,
486,
365... | |
if axis == (): | if len(axis) == 0: | def _c_all(self, node, name, inames, onames, sub): | bf093ee22ac577c03553f4260f5df5b4242921cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/bf093ee22ac577c03553f4260f5df5b4242921cf/elemwise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
71,
67,
454,
12,
2890,
16,
756,
16,
508,
16,
316,
753,
16,
603,
753,
16,
720,
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,
... | [
1,
1,
1,
1,
1,
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,
389,
71,
67,
454,
12,
2890,
16,
756,
16,
508,
16,
316,
753,
16,
603,
753,
16,
720,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.html[1] = self.req.load(url_captcha_html, cookies=True) | def download_html2(self): url_captcha_html = "http://netload.in/" + re.search('(index.php\?id=10&.*&captcha=1)', self.html[0]).group(1).replace("amp;", "") self.html[1] = self.req.load(url_captcha_html, cookies=True) | 24fd08a6773a4cddfb3dc7d81e85d9bec7d18205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/24fd08a6773a4cddfb3dc7d81e85d9bec7d18205/NetloadIn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
2620,
22,
12,
2890,
4672,
880,
67,
27267,
67,
2620,
273,
315,
2505,
2207,
2758,
945,
18,
267,
4898,
397,
283,
18,
3072,
2668,
12,
1615,
18,
2684,
64,
35,
350,
33,
2163,
10,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
2620,
22,
12,
2890,
4672,
880,
67,
27267,
67,
2620,
273,
315,
2505,
2207,
2758,
945,
18,
267,
4898,
397,
283,
18,
3072,
2668,
12,
1615,
18,
2684,
64,
35,
350,
33,
2163,
10,... | |
''' Brings a deleted Instrument back from the graveyard. ''' | """ Brings a deleted Instrument back from the graveyard. Parameters: id -- unique ID of the instument to restore. """ | def ResurrectInstrument(self, id): ''' Brings a deleted Instrument back from the graveyard. ''' instr = [x for x in self.graveyard if x.id == id][0] instr.AddAndLinkPlaybackbin() self.instruments.append(instr) if instr.isSolo: self.soloInstrCount += 1 self.OnAllInstrumentsMute() instr.isVisible = True self.graveyard.remove(instr) self.temp = id | e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1124,
295,
2607,
19228,
12,
2890,
16,
612,
4672,
3536,
605,
86,
899,
279,
4282,
25565,
1473,
628,
326,
3087,
9062,
1060,
18,
225,
7012,
30,
612,
1493,
3089,
1599,
434,
326,
1804,
650,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1124,
295,
2607,
19228,
12,
2890,
16,
612,
4672,
3536,
605,
86,
899,
279,
4282,
25565,
1473,
628,
326,
3087,
9062,
1060,
18,
225,
7012,
30,
612,
1493,
3089,
1599,
434,
326,
1804,
650,
... |
git_id = check_call_out((git_path, 'log', '-1', '--pretty=%H')) | git_id = check_call_out((git_path, 'log', '-1', '--pretty=format:%H')) | def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/which', 'git')) # determine current time and treat it as the build time build_date = time.strftime('%Y-%m-%d %H:%M:%S +0000', time.gmtime()) # determine builder git_builder_name = check_call_out((git_path, 'config', 'user.name')) git_builder_email = check_call_out((git_path, 'config', 'user.email')) git_builder = "%s <%s>" % (git_builder_name, git_builder_email) # determine git id git_id = check_call_out((git_path, 'log', '-1', '--pretty=%H')) # determine commit date, iso utc git_udate = float(check_call_out((git_path, 'log', '-1', '--pretty=%ct'))) git_date = time.strftime('%Y-%m-%d %H:%M:%S +0000', time.gmtime(git_udate)) # determine branch branch_match = check_call_out((git_path, 'rev-parse', '--symbolic-full-name', 'HEAD')) if branch_match == "HEAD": git_branch = None else: git_branch = os.path.basename(branch_match) # determine tag status, git_tag = call_out((git_path, 'describe', '--exact-match', '--tags', git_id)) if status != 0: git_tag = None # determine author and committer git_author_name = check_call_out((git_path, 'log', '-1', '--pretty=%an')) git_author_email = check_call_out((git_path, 'log', '-1', '--pretty=%ae')) git_author = '%s <%s>' % (git_author_name, git_author_email) git_committer_name = check_call_out((git_path, 'log', '-1', '--pretty=%cn')) git_committer_email = check_call_out((git_path, 'log', '-1', '--pretty=%ce')) git_committer = '%s <%s>' % (git_committer_name, git_committer_email) # refresh index check_call_out((git_path, 'update-index', '-q', '--refresh')) # check working copy for changes status_output = subprocess.call((git_path, 'diff-files', '--quiet')) if status_output != 0: git_status = 'UNCLEAN: Modified working tree' else: # check index for changes status_output = subprocess.call((git_path, 'diff-index', '--cached', '--quiet', 'HEAD')) if status_output != 0: git_status = 'UNCLEAN: Modified index' else: git_status = 'CLEAN: All modifications committed' # print details in a directly importable form print >>fileobj, 'id = "%s"' % git_id print >>fileobj, 'date = "%s"' % git_date print >>fileobj, 'branch = "%s"' % git_branch if git_tag is None: print >>fileobj, 'tag = None' else: print >>fileobj, 'tag = "%s"' % git_tag print >>fileobj, 'author = "%s"' % git_author print >>fileobj, 'author_name = "%s"' % git_author_name print >>fileobj, 'author_email = "%s"' % git_author_email print >>fileobj, 'builder = "%s"' % git_builder print >>fileobj, 'builder_name = "%s"' % git_builder_name print >>fileobj, 'builder_email = "%s"' % git_builder_email print >>fileobj, 'committer = "%s"' % git_committer print >>fileobj, 'committer_name = "%s"' % git_committer_name print >>fileobj, 'committer_email = "%s"' % git_committer_email print >>fileobj, 'status = "%s"' % git_status print >>fileobj, 'version = id' # add a verbose report for convenience print >>fileobj, 'verbose_msg = """%s"""' % \ """Branch: %s | 60b8cbbb05cab29e42eab07fcc04ec2faf96eca7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/60b8cbbb05cab29e42eab07fcc04ec2faf96eca7/determine_git_version.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
6845,
67,
1589,
12,
768,
2603,
4672,
3536,
2770,
5071,
358,
4199,
783,
3352,
1267,
471,
1045,
279,
6600,
1605,
598,
333,
1779,
18,
225,
1312,
30,
4080,
1045,
67,
6845,
67,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6845,
67,
1589,
12,
768,
2603,
4672,
3536,
2770,
5071,
358,
4199,
783,
3352,
1267,
471,
1045,
279,
6600,
1605,
598,
333,
1779,
18,
225,
1312,
30,
4080,
1045,
67,
6845,
67,
15... |
if len(self.buildid) == 12: | if len(self.buildid) == 14: buildIdTime = time.strptime(self.buildid, "%Y%m%d%H%M%S") elif len(self.buildid) == 12: | def _getTimeFromBuildId(self): if len(self.buildid) == 12: buildIdTime = time.strptime(self.buildid, "%Y%m%d%H%M") else: buildIdTime = time.strptime(self.buildid, "%Y%m%d%H") return time.strftime("%a, %d %b %Y %H:%M:%S GMT", buildIdTime) | a24934d3ab53b9c5200427be137e0a3012612eba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12156/a24934d3ab53b9c5200427be137e0a3012612eba/PerfConfigurator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
950,
1265,
3116,
548,
12,
2890,
4672,
309,
562,
12,
2890,
18,
3510,
350,
13,
422,
5045,
30,
1361,
548,
950,
273,
813,
18,
701,
10650,
12,
2890,
18,
3510,
350,
16,
2213,
61,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
950,
1265,
3116,
548,
12,
2890,
4672,
309,
562,
12,
2890,
18,
3510,
350,
13,
422,
5045,
30,
1361,
548,
950,
273,
813,
18,
701,
10650,
12,
2890,
18,
3510,
350,
16,
2213,
61,... |
""" | """ | def readConfigItem(self, configItem, section): """ Created: Unknown, KP Description: Tries to read a configuration option, returns none if it is not available """ try: configItemvalue = self.parser.get(section, configItem) self.configItems[configItem] = configItemvalue except (ConfigParser.NoSectionError, ConfigParser.NoOptionError): return None return configItemvalue | 51eb7efbd47abaa0e8a0282a154f6aa787052985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/51eb7efbd47abaa0e8a0282a154f6aa787052985/Configuration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
809,
1180,
12,
2890,
16,
642,
1180,
16,
2442,
4672,
3536,
12953,
30,
9077,
16,
1475,
52,
6507,
30,
10000,
281,
358,
855,
279,
1664,
1456,
16,
1135,
6555,
309,
518,
353,
486,
2319,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
809,
1180,
12,
2890,
16,
642,
1180,
16,
2442,
4672,
3536,
12953,
30,
9077,
16,
1475,
52,
6507,
30,
10000,
281,
358,
855,
279,
1664,
1456,
16,
1135,
6555,
309,
518,
353,
486,
2319,... |
if isinstance(tab, MucTab) and tab.get_name() == jid_from.bare: | if tab.get_name() == jid_from.full: | def on_message(self, message): """ When receiving private message from a muc OR a normal message (from one of our contacts) """ if message['type'] == 'groupchat': return # Differentiate both type of messages, and call the appropriate handler. jid_from = message['from'] for tab in self.tabs: if isinstance(tab, MucTab) and tab.get_name() == jid_from.bare: # check all the MUC we are in if message['type'] == 'error': return self.room_error(message, tab.get_room().name) else: return self.on_groupchat_private_message(message) return self.on_normal_message(message) | e1ed45ae5f4583c98fa32ac80349eaa59933f756 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/e1ed45ae5f4583c98fa32ac80349eaa59933f756/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
2150,
12,
2890,
16,
883,
4672,
3536,
5203,
15847,
3238,
883,
628,
279,
4129,
71,
4869,
279,
2212,
883,
261,
2080,
1245,
434,
3134,
14841,
13,
3536,
309,
883,
3292,
723,
3546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
2150,
12,
2890,
16,
883,
4672,
3536,
5203,
15847,
3238,
883,
628,
279,
4129,
71,
4869,
279,
2212,
883,
261,
2080,
1245,
434,
3134,
14841,
13,
3536,
309,
883,
3292,
723,
3546,
... |
clause = "name like 'hwaddr_%' and value='%s'" % machine | clause = "name like 'hwaddr_%'" + " and value='%s'" % machine | def approve_machine_ids(self): machine = self.current.machine table = 'current_environment' clause = "name like 'hwaddr_%' and value='%s'" % machine fields = ["'machines' as section", 'name as option', 'value'] rows = self.cursor.select(fields=fields, table=table, clause=clause) for row in rows: self.cursor.insert(table='default_environment', data=row) | 503e7a2d9374b6020800e0aac7ac4ba8b59fad3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2558/503e7a2d9374b6020800e0aac7ac4ba8b59fad3d/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6617,
537,
67,
9149,
67,
2232,
12,
2890,
4672,
5228,
273,
365,
18,
2972,
18,
9149,
1014,
273,
296,
2972,
67,
10274,
11,
6591,
273,
315,
529,
3007,
296,
20701,
4793,
10185,
4970,
397,
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,
6617,
537,
67,
9149,
67,
2232,
12,
2890,
4672,
5228,
273,
365,
18,
2972,
18,
9149,
1014,
273,
296,
2972,
67,
10274,
11,
6591,
273,
315,
529,
3007,
296,
20701,
4793,
10185,
4970,
397,
3... |
gLogger.info("listResult:",listResult) | def submit(self): gLogger.info("SUBMIT BEGIN") pagestart = time() result = self.__parseRequest() gLogger.info("parseRequest:",result) self.__drawFilters() result = RPC.getJobPageSummary(result,globalSort,pageNumber,numberOfJobs) gLogger.info("getJobPageSummary:",result) if result["OK"]: result = result["Value"] gLogger.info("result['Value']:",result) if result.has_key("SummaryDict") and len(result["SummaryDict"]) > 0: jobSummary = result["SummaryDict"] listResult = self.__getJobSummary(jobSummary) gLogger.info("listResult:",listResult) listResult.append([result["SummaryStatus"]]) listResult.append([result["TotalJobs"]]) listResult.append([pageNumber + 1]) print "\033[0;31mSUBMIT PAGE PROCESSING:\033[0m",time() - pagestart gLogger.info("Complited listResult:",listResult) return listResult else: return "There is no summary for the job(s)" else: return result["Message"] | fbaa2914725f02e53a67e2973cb3c2b561ff705e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12767/fbaa2914725f02e53a67e2973cb3c2b561ff705e/JobMonitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
12,
2890,
4672,
314,
3328,
18,
1376,
2932,
8362,
6068,
19270,
7923,
4262,
27893,
273,
813,
1435,
563,
273,
365,
16186,
2670,
691,
1435,
314,
3328,
18,
1376,
2932,
2670,
691,
2773,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4879,
12,
2890,
4672,
314,
3328,
18,
1376,
2932,
8362,
6068,
19270,
7923,
4262,
27893,
273,
813,
1435,
563,
273,
365,
16186,
2670,
691,
1435,
314,
3328,
18,
1376,
2932,
2670,
691,
2773,
... | |
fd = self.fd | sock = self.fd | def connect(self, address): if isinstance(address, tuple) and len(address)==2: address = gethostbyname(address[0]), address[1] if self.timeout == 0.0: return self.fd.connect(address) fd = self.fd if self.timeout is None: while not socket_connect(fd, address): wait_write(fd.fileno()) else: end = time.time() + self.timeout while True: if socket_connect(fd, address): return if time.time() >= end: raise timeout wait_write(fd.fileno(), timeout=end-time.time()) | d33d6fba8a837c865fee87e4078f1ec0c404c998 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/d33d6fba8a837c865fee87e4078f1ec0c404c998/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
1758,
4672,
309,
1549,
12,
2867,
16,
3193,
13,
471,
562,
12,
2867,
13,
631,
22,
30,
1758,
273,
336,
2564,
1637,
529,
12,
2867,
63,
20,
65,
3631,
1758,
63,
21,
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,
3077,
12,
2890,
16,
1758,
4672,
309,
1549,
12,
2867,
16,
3193,
13,
471,
562,
12,
2867,
13,
631,
22,
30,
1758,
273,
336,
2564,
1637,
529,
12,
2867,
63,
20,
65,
3631,
1758,
63,
21,
6... |
write_message('...updating %d words into %s ended' % \ (nb_words_total, self.tablename), verbose=9) | write_message('...updating %d words into %s ended' % \ (nb_words_total, self.tablename)) | def put_into_db(self, mode="normal"): """Updates the current words table in the corresponding DB idxFOO table. Mode 'normal' means normal execution, mode 'emergency' means words index reverting to old state. """ write_message("%s %s wordtable flush started" % (self.tablename, mode), verbose=2) write_message('...updating %d words into %s started' % \ (len(self.value), self.tablename), verbose=2) task_update_progress("%s flushed %d/%d words" % (self.tablename, 0, len(self.value))) | 8b53ea007afcfb98705ef3bb341dacc6f8f81b2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/8b53ea007afcfb98705ef3bb341dacc6f8f81b2a/bibindex_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
67,
18591,
67,
1966,
12,
2890,
16,
1965,
1546,
6130,
6,
4672,
3536,
5121,
326,
783,
4511,
1014,
316,
326,
4656,
2383,
2067,
3313,
51,
1014,
18,
225,
8126,
296,
6130,
11,
4696,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
67,
18591,
67,
1966,
12,
2890,
16,
1965,
1546,
6130,
6,
4672,
3536,
5121,
326,
783,
4511,
1014,
316,
326,
4656,
2383,
2067,
3313,
51,
1014,
18,
225,
8126,
296,
6130,
11,
4696,
22... |
raise AttributeError( "No attribute '%s' was found on the object or its '%s' widget member" % (attr, superCls) ) | raise AttributeError( "No attribute '%s' was found on the object or its '%s' widget member" % (attr, baseCls) ) | def _get( self, attr ): if attr in self.__dict__: return self.__dict__[ attr ] | 34bdcb3a64dc57f0604860119d44b1e3b8274df4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1810/34bdcb3a64dc57f0604860119d44b1e3b8274df4/baseMelUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
12,
365,
16,
1604,
262,
30,
309,
1604,
316,
365,
16186,
1576,
972,
30,
327,
365,
16186,
1576,
972,
63,
1604,
308,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
12,
365,
16,
1604,
262,
30,
309,
1604,
316,
365,
16186,
1576,
972,
30,
327,
365,
16186,
1576,
972,
63,
1604,
308,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
output = self.proc.read(timeout) output = output.replace(chr(0), '') if output == '': return if not update_buffer: return output logging.debug('read *********************************************************************') debug_profile_start = time.time() chunks = CONQUE_SEQ_REGEX.split(output) logging.debug('ouput chunking took ' + str((time.time() - debug_profile_start) * 1000) + ' ms') logging.debug(str(chunks)) debug_profile_start = time.time() if len(chunks) == 1: logging.debug('short circuit') self.plain_text(chunks[0]) else: for s in chunks: if s == '': continue logging.debug('chgs ' + str(self.color_changes)) logging.debug('at line ' + str(self.l) + ' column ' + str(self.c)) if CONQUE_SEQ_REGEX_CTL.match(s[0]): logging.debug('control match') nr = ord(s[0]) if nr in CONQUE_CTL: getattr(self, 'ctl_' + CONQUE_CTL[nr])() | output = '' try: output = self.proc.read(timeout) output = output.replace(chr(0), '') if output == '': return if not update_buffer: return output logging.debug('read *********************************************************************') debug_profile_start = time.time() chunks = CONQUE_SEQ_REGEX.split(output) logging.debug('ouput chunking took ' + str((time.time() - debug_profile_start) * 1000) + ' ms') logging.debug(str(chunks)) debug_profile_start = time.time() if len(chunks) == 1: logging.debug('short circuit') self.plain_text(chunks[0]) else: for s in chunks: if s == '': continue logging.debug('chgs ' + str(self.color_changes)) logging.debug('at line ' + str(self.l) + ' column ' + str(self.c)) if CONQUE_SEQ_REGEX_CTL.match(s[0]): logging.debug('control match') nr = ord(s[0]) if nr in CONQUE_CTL: getattr(self, 'ctl_' + CONQUE_CTL[nr])() else: logging.info('escape not found for ' + str(s)) pass elif CONQUE_SEQ_REGEX_CSI.match(s): logging.debug('csi match') if s[-1] in CONQUE_ESCAPE: csi = self.parse_csi(s[2:]) logging.debug(str(csi)) getattr(self, 'csi_' + CONQUE_ESCAPE[s[-1]])(csi) else: logging.info('escape not found for ' + str(s)) pass elif CONQUE_SEQ_REGEX_TITLE.match(s): logging.debug('title match') self.change_title(s[2], s[4:-1]) elif CONQUE_SEQ_REGEX_HASH.match(s): logging.debug('hash match') if s[-1] in CONQUE_ESCAPE_HASH: getattr(self, 'hash_' + CONQUE_ESCAPE_HASH[s[-1]])() else: logging.info('escape not found for ' + str(s)) pass elif CONQUE_SEQ_REGEX_CHAR.match(s): logging.debug('char match') if s[-1] in CONQUE_ESCAPE_CHARSET: getattr(self, 'charset_' + CONQUE_ESCAPE_CHARSET[s[-1]])() else: logging.info('escape not found for ' + str(s)) pass elif CONQUE_SEQ_REGEX_ESC.match(s): logging.debug('escape match') if s[-1] in CONQUE_ESCAPE_PLAIN: getattr(self, 'esc_' + CONQUE_ESCAPE_PLAIN[s[-1]])() else: logging.info('escape not found for ' + str(s)) pass | def read(self, timeout=1, set_cursor=True, return_output=False, update_buffer=True): # {{{ # read from subprocess output = self.proc.read(timeout) # and strip null chars output = output.replace(chr(0), '') | 23906f3fb5977452fbab921201a46630daf0782b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6680/23906f3fb5977452fbab921201a46630daf0782b/conque.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
2021,
33,
21,
16,
444,
67,
9216,
33,
5510,
16,
327,
67,
2844,
33,
8381,
16,
1089,
67,
4106,
33,
5510,
4672,
468,
10179,
95,
468,
855,
628,
6652,
876,
273,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
2021,
33,
21,
16,
444,
67,
9216,
33,
5510,
16,
327,
67,
2844,
33,
8381,
16,
1089,
67,
4106,
33,
5510,
4672,
468,
10179,
95,
468,
855,
628,
6652,
876,
273,
365,
1... |
self.vprint("%s (%s): callback didn't return" % (devname, phase)) | vprint('%s (%s): callback didnt return' % (devname, phase)) def deviceFilter(self, devicefilter): filter = [] for phase in self.phases: list = self.dmesg[phase]['list'] for name in devicefilter: dev = name while(dev in list): if(dev not in filter): filter.append(dev) dev = list[dev]['par'] children = self.deviceDescendants(name, phase) for dev in children: if(dev not in filter): filter.append(dev) for phase in self.phases: list = self.dmesg[phase]['list'] rmlist = [] for name in list: pid = list[name]['pid'] if(name not in filter and pid >= 0): rmlist.append(name) for name in rmlist: del list[name] | def fixupInitcalls(self, phase, end): # if any calls never returned, clip them at system resume end phaselist = self.dmesg[phase]['list'] for devname in phaselist: dev = phaselist[devname] if(dev['end'] < 0): dev['end'] = end self.vprint("%s (%s): callback didn't return" % (devname, phase)) | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
2570,
12550,
12,
2890,
16,
6855,
16,
679,
4672,
468,
309,
1281,
4097,
5903,
2106,
16,
6807,
2182,
622,
2619,
10774,
679,
1844,
345,
5449,
273,
365,
18,
10956,
281,
75,
63,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
2570,
12550,
12,
2890,
16,
6855,
16,
679,
4672,
468,
309,
1281,
4097,
5903,
2106,
16,
6807,
2182,
622,
2619,
10774,
679,
1844,
345,
5449,
273,
365,
18,
10956,
281,
75,
63,
1... |
cnx = PgSQL.connect('', user, password, host, path, port) | cnx = PgSQL.connect('', user, password, host, path, port, client_encoding='utf-8', unicode_results=True) | def __init__(self, path, user=None, password=None, host=None, port=None, params={}): if path.startswith('/'): path = path[1:] # We support both psycopg and PgSQL but prefer psycopg global psycopg global PgSQL global have_psycopg2 if not psycopg and not PgSQL: try: try: import psycopg2 as psycopg import psycopg2.extensions psycopg2.extensions.register_type(psycopg2.extensions.UNICODE) have_psycopg2 = True except ImportError: have_psycopg2 = False import psycopg except ImportError: from pyPgSQL import PgSQL if psycopg: dsn = [] if path: dsn.append('dbname=' + path) if user: dsn.append('user=' + user) if password: dsn.append('password=' + password) if host: dsn.append('host=' + host) if port: dsn.append('port=' + str(port)) cnx = psycopg.connect(' '.join(dsn)) if have_psycopg2: cnx.set_client_encoding('UNICODE') else: cnx = PgSQL.connect('', user, password, host, path, port) ConnectionWrapper.__init__(self, cnx) | 9b1738d89ad90db294bd00d9e28d41841827e158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/9b1738d89ad90db294bd00d9e28d41841827e158/postgres_backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
16,
729,
33,
7036,
16,
2201,
33,
7036,
16,
1479,
33,
7036,
16,
1756,
33,
7036,
16,
859,
12938,
4672,
309,
589,
18,
17514,
1918,
2668,
2473,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
16,
729,
33,
7036,
16,
2201,
33,
7036,
16,
1479,
33,
7036,
16,
1756,
33,
7036,
16,
859,
12938,
4672,
309,
589,
18,
17514,
1918,
2668,
2473,
4672,
... |
print "offset", offset | def ExecuteStream(self, code, start): """Start executing code at instruction number start, and return the stop instruction number""" | 4f7cf094f743cc1258da61338293d78c609f2898 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9699/4f7cf094f743cc1258da61338293d78c609f2898/ispugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
1228,
12,
2890,
16,
981,
16,
787,
4672,
3536,
1685,
11274,
981,
622,
7592,
1300,
787,
16,
471,
327,
326,
2132,
7592,
1300,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
1228,
12,
2890,
16,
981,
16,
787,
4672,
3536,
1685,
11274,
981,
622,
7592,
1300,
787,
16,
471,
327,
326,
2132,
7592,
1300,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if tracker_type == 'bugzilla': trackers = mysite.customs.models.BugzillaTracker.all_trackers.all() else: trackers = [] data['tracker_type'] = tracker_type data['trackers'] = trackers | else: tracker_type = 'bugzilla' else: tracker_type = 'bugzilla' if tracker_type == 'bugzilla': trackers = mysite.customs.models.BugzillaTracker.all_trackers.all() else: trackers = [] data['tracker_type'] = tracker_type data['trackers'] = trackers | def list_trackers(request, tracker_types_form=None): data = {} if request.POST: tracker_types_form = mysite.customs.forms.TrackerTypesForm( request.POST, prefix='list_trackers') if tracker_types_form.is_valid(): tracker_type = tracker_types_form.cleaned_data['tracker_type'] if tracker_type == 'bugzilla': trackers = mysite.customs.models.BugzillaTracker.all_trackers.all() else: trackers = [] data['tracker_type'] = tracker_type data['trackers'] = trackers notification_id = request.GET.get('notification_id', None) if notification_id == 'add-success': data['customs_notification'] = 'Bugtracker successfully added! Bugs from this tracker should start appearing within 24 hours.' elif notification_id == 'edit-success': data['customs_notification'] = 'Bugtracker successfully edited! New settings should take effect within 24 hours.' elif notification_id == 'delete-success': data['customs_notification'] = 'Bugtracker successfully deleted!' elif notification_id == 'tracker-existence-fail': data['customs_notification'] = 'Hmm, could not find the requested tracker.' elif notification_id == 'tracker-url-existence-fail': data['customs_notification'] = 'Hmm, could not find the requested tracker URL.' if tracker_types_form is None: tracker_types_form = mysite.customs.forms.TrackerTypesForm() data['tracker_types_form'] = tracker_types_form return (request, 'customs/list_trackers.html', data) | 0b654fcf204cf662579613f753fbfac41f8252dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/0b654fcf204cf662579613f753fbfac41f8252dc/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
67,
4101,
414,
12,
2293,
16,
9745,
67,
2352,
67,
687,
33,
7036,
4672,
501,
273,
2618,
309,
590,
18,
3798,
30,
9745,
67,
2352,
67,
687,
273,
312,
1900,
1137,
18,
3662,
87,
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,
666,
67,
4101,
414,
12,
2293,
16,
9745,
67,
2352,
67,
687,
33,
7036,
4672,
501,
273,
2618,
309,
590,
18,
3798,
30,
9745,
67,
2352,
67,
687,
273,
312,
1900,
1137,
18,
3662,
87,
18,
... |
def __setstate__(self, v): """Add a callback to track product registrations""" ArchetypeTool.inheritedAttribute('__setstate__')(self, v) global _types global _types_callback if hasattr(self, '_types'): if not hasattr(self, 'last_types_update') or \ self.last_types_update.lessThan(last_load): for k, t in _types.items(): if self._types.has_key(k): update = (t['signature'] != self._types[k]['signature']) else: update = 1 self._types[k] = {'signature':t['signature'], 'update':update} cb = lambda klass, package:self.registerType(klass, package) _types_callback.append(cb) self.last_types_update = DateTime() security.declareProtected(CMFCorePermissions.ManagePortal, 'registerType') def registerType(self, klass, package): """This gets called every time registerType is called as soon as the hook is installed by setstate""" update = 0 sig = klass.schema.signature() key = "%s.%s" % (package, klass.meta_type) old_data = self._types.get(key, None) if old_data: update = old_data.get('update', 0) old_sig = old_data.get('signature', None) if sig != old_sig: update = 1 self._types[key] = {'signature':sig, 'update':update} self._p_changed = 1 | def __setstate__(self, v): """Add a callback to track product registrations""" ArchetypeTool.inheritedAttribute('__setstate__')(self, v) global _types global _types_callback if hasattr(self, '_types'): if not hasattr(self, 'last_types_update') or \ self.last_types_update.lessThan(last_load): for k, t in _types.items(): if self._types.has_key(k): update = (t['signature'] != self._types[k]['signature']) else: update = 1 self._types[k] = {'signature':t['signature'], 'update':update} cb = lambda klass, package:self.registerType(klass, package) _types_callback.append(cb) self.last_types_update = DateTime() | b9ae4b1f416be2a606a7ac40b22a9cbe66f10590 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/b9ae4b1f416be2a606a7ac40b22a9cbe66f10590/ArchetypeTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2019,
972,
12,
2890,
16,
331,
4672,
3536,
986,
279,
1348,
358,
3298,
3017,
28620,
8395,
16959,
5872,
6364,
18,
6018,
329,
1499,
2668,
972,
542,
2019,
972,
6134,
12,
2890,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
2019,
972,
12,
2890,
16,
331,
4672,
3536,
986,
279,
1348,
358,
3298,
3017,
28620,
8395,
16959,
5872,
6364,
18,
6018,
329,
1499,
2668,
972,
542,
2019,
972,
6134,
12,
2890,
16,
... | |
c.ConnectNode(node) | self._ConnectNode(c, node) | def call_bridges_exist(self, node, bridges_list): """Checks if a node has all the bridges given. | 253482126e14ec90848550d2d2005740e45f62a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/253482126e14ec90848550d2d2005740e45f62a8/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
67,
14400,
2852,
67,
7398,
12,
2890,
16,
756,
16,
324,
1691,
2852,
67,
1098,
4672,
3536,
4081,
309,
279,
756,
711,
777,
326,
324,
1691,
2852,
864,
18,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
745,
67,
14400,
2852,
67,
7398,
12,
2890,
16,
756,
16,
324,
1691,
2852,
67,
1098,
4672,
3536,
4081,
309,
279,
756,
711,
777,
326,
324,
1691,
2852,
864,
18,
2,
-100,
-100,
-100,
-100,
... |
hunks.append(Hunk(fromStart, fromLen, toStart, toLen, lines)) | hunks.append(Hunk(fromStart, fromLen, toStart, toLen, lines, contextCount)) | def patch(oldLines, unifiedDiff): i = 0 last = len(unifiedDiff) hunks = [] while i < last: (magic1, fromRange, toRange, magic2) = unifiedDiff[i].split() if magic1 != "@@" or magic2 != "@@" or fromRange[0] != "-" or \ toRange[0] != "+": raise BadHunkHeader() (fromStart, fromLen) = fromRange.split(",") fromStart = int(fromStart[1:]) - 1 fromLen = int(fromLen) (toStart, toLen) = toRange.split(",") toStart = int(toStart[1:]) - 1 toLen = int(toLen) fromCount = 0 toCount = 0 lines = [] i += 1 while i < last and unifiedDiff[i][0] != '@': lines.append(unifiedDiff[i]) ch = unifiedDiff[i][0] if ch == " ": fromCount += 1 toCount += 1 elif ch == "-": fromCount += 1 elif ch == "+": toCount += 1 else: raise BadHunk() i += 1 if toCount != toLen or fromCount != fromLen: print toCount, toLen raise BadHunk() hunks.append(Hunk(fromStart, fromLen, toStart, toLen, lines)) i = 0 last = len(unifiedDiff) result = [] fromLine = 0 offset = 0 for hunk in hunks: start = hunk.fromStart + offset conflicts = hunk.countConflicts(oldLines, start) i = 0 while conflicts: i = i + 1 tried = 0 if (start - abs(i) >= 0): tried = 1 conflicts = hunk.countConflicts(oldLines, start - i) if not conflicts: i = -i break if (start + i < (len(oldLines) - hunk.fromLen)): tried = 1 conflicts = hunk.countConflicts(oldLines, start + i) if not conflicts: break if not tried: break if conflicts: raise Conflict() offset = i start += i while (fromLine < start): result.append(oldLines[fromLine]) fromLine = fromLine + 1 result += hunk.apply(oldLines, start) fromLine += hunk.fromLen while (fromLine < len(oldLines)): result.append(oldLines[fromLine]) fromLine = fromLine + 1 return result | 54494d6346f8bb3842a41fcad78dda81868cf267 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/54494d6346f8bb3842a41fcad78dda81868cf267/patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
12,
1673,
5763,
16,
27136,
5938,
4672,
277,
273,
374,
1142,
273,
562,
12,
318,
939,
5938,
13,
366,
1683,
87,
273,
5378,
1323,
277,
411,
1142,
30,
261,
11179,
21,
16,
628,
2655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
12,
1673,
5763,
16,
27136,
5938,
4672,
277,
273,
374,
1142,
273,
562,
12,
318,
939,
5938,
13,
366,
1683,
87,
273,
5378,
1323,
277,
411,
1142,
30,
261,
11179,
21,
16,
628,
2655,
... |
sys.stderr.write("Could not dispatch: %r\nwhich was parsed as reply=%r\n" % (replyStr, reply)) | sys.stderr.write("Could not dispatch replyStr=%r\n which was parsed as reply=%r\n" % \ (replyStr, reply)) | def dispatchReplyStr(self, replyStr): """Read, parse and dispatch a message from the hub. """ | 0bf1972ecff43f5038342922e39a02c6bb08528d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/425/0bf1972ecff43f5038342922e39a02c6bb08528d/cmdkeydispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3435,
7817,
1585,
12,
2890,
16,
4332,
1585,
4672,
3536,
1994,
16,
1109,
471,
3435,
279,
883,
628,
326,
11891,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3435,
7817,
1585,
12,
2890,
16,
4332,
1585,
4672,
3536,
1994,
16,
1109,
471,
3435,
279,
883,
628,
326,
11891,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def get_elwise_module(arguments, operation, name="kernel", keep=False, options=[], | def get_elwise_module(arguments, operation, name="kernel", keep=False, options=[], | def get_elwise_module(arguments, operation, name="kernel", keep=False, options=[], preamble="", loop_prep=""): from pycuda.compiler import SourceModule return SourceModule(""" %(preamble)s __global__ void %(name)s(%(arguments)s) { unsigned tid = threadIdx.x; unsigned total_threads = gridDim.x*blockDim.x; unsigned cta_start = blockDim.x*blockIdx.x; unsigned i; %(loop_prep)s; for (i = cta_start + tid; i < n; i += total_threads) { %(operation)s; } } """ % { "arguments": ", ".join(arg.declarator() for arg in arguments), "operation": operation, "name": name, "preamble": preamble, "loop_prep": loop_prep}, options=options, keep=keep) | 2034b081c720026cdb97d74afd308e6c459a1bcf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12870/2034b081c720026cdb97d74afd308e6c459a1bcf/elementwise.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
292,
2460,
67,
2978,
12,
7099,
16,
1674,
16,
508,
1546,
8111,
3113,
3455,
33,
8381,
16,
702,
22850,
6487,
27841,
1546,
3113,
2798,
67,
19109,
1546,
6,
4672,
628,
2395,
71,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
292,
2460,
67,
2978,
12,
7099,
16,
1674,
16,
508,
1546,
8111,
3113,
3455,
33,
8381,
16,
702,
22850,
6487,
27841,
1546,
3113,
2798,
67,
19109,
1546,
6,
4672,
628,
2395,
71,
131... |
body = "%s\n%s" % (body,possibleNewSite) | body = "%s\n%s" % (body,possibleNewSite) | def _lookForCE(self): | 99e12326aacb2cd726a0042e98a3e57f85c85c04 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99e12326aacb2cd726a0042e98a3e57f85c85c04/CE2CSAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7330,
1290,
1441,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
389,
7330,
1290,
1441,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
u'Kişi adları (anlam ayrımı)'], | u'Kişi adları (anlam ayrımı)', u'Yerleşim yerleri (anlam ayrımı)'], | def __init__(self): family.Family.__init__(self) self.name = 'wikipedia' | 746f79f62b025950b7ae6b13682c2b012ae8d22b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/746f79f62b025950b7ae6b13682c2b012ae8d22b/wikipedia_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
11999,
13744,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
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,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
11999,
13744,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if root_module_name == 'autotest_lib': sys.path.insert(0, os.path.join(base_path, "site-packages")) | def _autotest_logging_handle_error(self, record): """Method to monkey patch into logging.Handler to replace handleError.""" # The same as the default logging.Handler.handleError but also prints # out the original record causing the error so there is -some- idea # about which call caused the logging error. import logging if logging.raiseExceptions: # Avoid recursion as the below output can end up back in here when # something has *seriously* gone wrong in autotest. logging.raiseExceptions = 0 sys.stderr.write('Exception occurred formatting message: ' '%r using args %r\n' % (record.msg, record.args)) traceback.print_stack() sys.stderr.write('Future logging formatting exceptions disabled.\n') if root_module_name == 'autotest_lib': # Allow locally installed third party packages to be found # before any that are installed on the system itself when not. # running as a client. # This is primarily for the benefit of frontend and tko so that they # may use libraries other than those available as system packages. sys.path.insert(0, os.path.join(base_path, "site-packages")) | 8f5ce629837bc82793e21e319d34cc99d57c3ea2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/8f5ce629837bc82793e21e319d34cc99d57c3ea2/setup_modules.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5854,
352,
395,
67,
11167,
67,
4110,
67,
1636,
12,
2890,
16,
1409,
4672,
3536,
1305,
358,
6921,
856,
4729,
1368,
2907,
18,
1503,
358,
1453,
15676,
12123,
468,
1021,
1967,
487,
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,
389,
5854,
352,
395,
67,
11167,
67,
4110,
67,
1636,
12,
2890,
16,
1409,
4672,
3536,
1305,
358,
6921,
856,
4729,
1368,
2907,
18,
1503,
358,
1453,
15676,
12123,
468,
1021,
1967,
487,
326,
... | |
data = DoxyfileParse(node.sources[0].get_contents(), str(node.sources[0].dir)) if data.get("GENERATE_HTML",'YES') != 'YES' : return None return os.path.normpath(os.path.join( str(node.sources[0].dir), | data = DoxyfileParse(node.sources[0].abspath) if data.get("GENERATE_HTML",'YES').upper() != 'YES' : return None return os.path.normpath(os.path.join( node.sources[0].abspath, | def doxyNodeHtmlDir(node): if not node.sources : return None data = DoxyfileParse(node.sources[0].get_contents(), str(node.sources[0].dir)) if data.get("GENERATE_HTML",'YES') != 'YES' : return None return os.path.normpath(os.path.join( str(node.sources[0].dir), data.get("OUTPUT_DIRECTORY","."), data.get("HTML_OUTPUT","html") )) | 1be18a2af8b3880d492f80349c68c4d9cf1ae16a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2548/1be18a2af8b3880d492f80349c68c4d9cf1ae16a/Doxygen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
1698,
907,
4353,
1621,
12,
2159,
4672,
309,
486,
756,
18,
10141,
294,
327,
599,
501,
273,
2256,
1698,
768,
3201,
12,
2159,
18,
10141,
63,
20,
8009,
5113,
803,
13,
309,
501,
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,
741,
1698,
907,
4353,
1621,
12,
2159,
4672,
309,
486,
756,
18,
10141,
294,
327,
599,
501,
273,
2256,
1698,
768,
3201,
12,
2159,
18,
10141,
63,
20,
8009,
5113,
803,
13,
309,
501,
18,
... |
image = dlg.show(self, image_menu.shell.locals, name="Choose image") | image = dlg.show(self, image_menu.shell.locals) | def _OnChooseImage(self, event): dlg = Args([Class("Image for context display", ImageBase)]) image = dlg.show(self, image_menu.shell.locals, name="Choose image") if image != None: self.id.set_image(image) | 3f526c820243f92a2971383a388c18e249e97243 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/3f526c820243f92a2971383a388c18e249e97243/classifier_display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1398,
24529,
2040,
12,
2890,
16,
871,
4672,
25840,
273,
6634,
3816,
797,
2932,
2040,
364,
819,
2562,
3113,
3421,
2171,
13,
5717,
1316,
273,
25840,
18,
4500,
12,
2890,
16,
1316,
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,
389,
1398,
24529,
2040,
12,
2890,
16,
871,
4672,
25840,
273,
6634,
3816,
797,
2932,
2040,
364,
819,
2562,
3113,
3421,
2171,
13,
5717,
1316,
273,
25840,
18,
4500,
12,
2890,
16,
1316,
67,
... |
gopts, argsleft = getopt.getopt(args, 'phqVvg:s:x:u:', ['help', 'exclude', | gopts, argsleft = getopt.getopt(args, 'phqVvg:s:x:u:', ['help', 'exclude=', | def parseArgs(args): """ Parse the command line args return a commands dict and directory. Sanity check all the things being passed in. """ cmds = {} cmds['quiet'] = 0 cmds['verbose'] = 0 cmds['excludes'] = [] cmds['baseurl'] = None cmds['groupfile'] = None cmds['sumtype'] = 'sha' cmds['pretty'] = 0 try: gopts, argsleft = getopt.getopt(args, 'phqVvg:s:x:u:', ['help', 'exclude', 'quiet', 'verbose', 'baseurl=', 'groupfile=', 'checksum=', 'version', 'pretty']) except getopt.error, e: errorprint(_('Options Error: %s.') % e) usage() try: for arg,a in gopts: if arg in ['-h','--help']: usage(retval=0) elif arg in ['-V', '--version']: print '%s' % __version__ sys.exit(0) except ValueError, e: errorprint(_('Options Error: %s') % e) usage() # make sure our dir makes sense before we continue if len(argsleft) > 1: errorprint(_('Error: Only one directory allowed per run.')) usage() elif len(argsleft) == 0: errorprint(_('Error: Must specify a directory to index.')) usage() else: directory = argsleft[0] try: for arg,a in gopts: if arg == '-v': cmds['verbose'] = 1 elif arg == "-q": cmds['quiet'] = 1 elif arg in ['-u', '--baseurl']: if cmds['baseurl'] is not None: errorprint(_('Error: Only one baseurl allowed.')) usage() else: cmds['baseurl'] = a elif arg in ['-g', '--groupfile']: if cmds['groupfile'] is not None: errorprint(_('Error: Only one groupfile allowed.')) usage() else: if os.path.exists(directory + '/' + a): cmds['groupfile'] = a else: errorprint(_('Error: groupfile %s cannot be found.' % a)) usage() elif arg in ['-x', '--exclude']: cmds['excludes'].append(a) elif arg in ['-p', '--pretty']: cmds['pretty'] = 1 elif arg in ['-s', '--checksum']: if a not in ['md5', 'sha']: errorprint(_('Error: checksums are: md5 or sha.')) usage() else: cmds['sumtype'] = a except ValueError, e: errorprint(_('Options Error: %s') % e) usage() return cmds, directory | e8bf50d32d3910c21bf86d4935fde9b5cd3aa8cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9557/e8bf50d32d3910c21bf86d4935fde9b5cd3aa8cb/genpkgmetadata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
2615,
12,
1968,
4672,
3536,
2884,
326,
1296,
980,
833,
327,
279,
4364,
2065,
471,
1867,
18,
23123,
866,
777,
326,
9198,
3832,
2275,
316,
18,
3536,
13446,
273,
2618,
13446,
3292,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2615,
12,
1968,
4672,
3536,
2884,
326,
1296,
980,
833,
327,
279,
4364,
2065,
471,
1867,
18,
23123,
866,
777,
326,
9198,
3832,
2275,
316,
18,
3536,
13446,
273,
2618,
13446,
3292,
20... |
print "sending" print msg | def segmentQueryWithMetadata(self, queryList): """ Query LSCsegFindServer to find the segment(s) with the appropriate metadata values. | 08b524debbe46f3bff75b57567d0862c91d6a73f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/08b524debbe46f3bff75b57567d0862c91d6a73f/LSCsegFindClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3267,
1138,
1190,
2277,
12,
2890,
16,
843,
682,
4672,
3536,
2770,
511,
2312,
5680,
3125,
2081,
358,
1104,
326,
3267,
12,
87,
13,
598,
326,
5505,
1982,
924,
18,
2,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3267,
1138,
1190,
2277,
12,
2890,
16,
843,
682,
4672,
3536,
2770,
511,
2312,
5680,
3125,
2081,
358,
1104,
326,
3267,
12,
87,
13,
598,
326,
5505,
1982,
924,
18,
2,
-100,
-100,
-100,
-10... | |
filelist += ifile + ' ' | filelist += ifile[5:] + ' ' | def collectionApiJdl( self, task, requirements='' ): """ build a collection jdl easy to be handled by the wmproxy API interface and gives back the list of input files for a better handling """ | 9209fe85823760049c2946c7a90712328a8cd50e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/9209fe85823760049c2946c7a90712328a8cd50e/SchedulerGLiteAPI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1849,
3064,
46,
5761,
12,
365,
16,
1562,
16,
8433,
2218,
11,
262,
30,
3536,
1361,
279,
1849,
525,
5761,
12779,
358,
506,
7681,
635,
326,
18200,
5656,
1491,
1560,
471,
14758,
1473,
326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1849,
3064,
46,
5761,
12,
365,
16,
1562,
16,
8433,
2218,
11,
262,
30,
3536,
1361,
279,
1849,
525,
5761,
12779,
358,
506,
7681,
635,
326,
18200,
5656,
1491,
1560,
471,
14758,
1473,
326,
... |
via dispdef from the calling molecule -- this is probably a bug | via dispdef from the calling molecule -- this might cause bugs if some callers change display mode but don't set havelist = 0, but maybe they do). | via dispdef from the calling molecule -- this is probably a bug ###e). | 4214e9cdbf6435d34f9ae8617c72ab637025dcc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/4214e9cdbf6435d34f9ae8617c72ab637025dcc7/chem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3970,
16232,
536,
628,
326,
4440,
13661,
1493,
333,
4825,
4620,
22398,
309,
2690,
19932,
2549,
2562,
1965,
1496,
2727,
1404,
444,
366,
842,
5449,
273,
374,
16,
1496,
6944,
2898,
741,
2934,
11849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3970,
16232,
536,
628,
326,
4440,
13661,
1493,
333,
4825,
4620,
22398,
309,
2690,
19932,
2549,
2562,
1965,
1496,
2727,
1404,
444,
366,
842,
5449,
273,
374,
16,
1496,
6944,
2898,
741,
2934,
11849... |
This family file was auto-generated by $Id: 2ba75817ad5d4b706f4e217e57141af0ff9fa053 $ | This family file was auto-generated by $Id: 456918eb559d2b4c2f7077e3f76a817fd3f10b68 $ | def writefile(self): fn = "families/%s_family.py" % self.name print "Writing %s... " % fn try: open(fn) if raw_input("%s already exists. Overwrite? (y/n)" % fn).lower() == 'n': print "Terminating." sys.exit(1) except IOError: # file not found pass f = codecs.open(fn, 'w', 'utf-8') f.write(""" | 52b06a0e0b8d81eece7200f0ef32c455bccd1be0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/52b06a0e0b8d81eece7200f0ef32c455bccd1be0/generate_family_file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
768,
12,
2890,
4672,
2295,
273,
315,
74,
14319,
5258,
87,
67,
9309,
18,
2074,
6,
738,
365,
18,
529,
1172,
315,
18835,
738,
87,
2777,
315,
738,
2295,
775,
30,
1696,
12,
4293,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
768,
12,
2890,
4672,
2295,
273,
315,
74,
14319,
5258,
87,
67,
9309,
18,
2074,
6,
738,
365,
18,
529,
1172,
315,
18835,
738,
87,
2777,
315,
738,
2295,
775,
30,
1696,
12,
4293,
13... |
The Kloosterman sum associated to $\chi$ and the integers a,b is $$ K(a,b,\chi) = \sum_{r \in (\Z/m\Z)^\times} \chi(r)\,\zeta^{ar+br^{-1}}, $$ where $m$ is the modulus of $\chi$ and $\zeta$ is a primitive $m$th root of unity, i.e., $\zeta$ is \code{self.parent().zeta()}. This reduces to to the Gauss sum if b=0. CACHING: Computed Kloosterman sums are \emph{not} cached with this | The Kloosterman sum associated to `\chi` and the integers a,b is .. math:: K(a,b,\chi) = \sum_{r \in (\ZZ/m\ZZ)^\times} \chi(r)\,\zeta^{ar+br^{-1}}, where `m` is the modulus of `\chi` and `\zeta` is a primitive `m`th root of unity. This reduces to to the Gauss sum if `b=0`. CACHING: Computed Kloosterman sums are *not* cached with this | def kloosterman_sum(self, a=1,b=0): r""" Return the "twisted" Kloosterman sum associated to this Dirichlet character. This includes Gauss sums, classical Kloosterman sums, Salie sums, etc. | 9c9051916e82d8e6549f10cbafc69b92d5f2a89f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/9c9051916e82d8e6549f10cbafc69b92d5f2a89f/dirichlet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
417,
383,
669,
29650,
67,
1364,
12,
2890,
16,
279,
33,
21,
16,
70,
33,
20,
4672,
436,
8395,
2000,
326,
315,
11246,
25444,
6,
1475,
383,
669,
29650,
2142,
3627,
358,
333,
8446,
1354,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
417,
383,
669,
29650,
67,
1364,
12,
2890,
16,
279,
33,
21,
16,
70,
33,
20,
4672,
436,
8395,
2000,
326,
315,
11246,
25444,
6,
1475,
383,
669,
29650,
2142,
3627,
358,
333,
8446,
1354,
... |
path = File.getPath(self) try: entries = os.listdir(path) except: print 'Unable to read ',path return | path = File.getPath(self) try: entries = os.listdir(path) except: print 'Unable to read ',path return | def recurse(self): ''' FSTree.Directory.recurse | 7ad254f4a2b352ba964ee4b64fdeb85c43da3e5c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/7ad254f4a2b352ba964ee4b64fdeb85c43da3e5c/FSTree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11502,
12,
2890,
4672,
9163,
478,
882,
992,
18,
2853,
18,
29362,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11502,
12,
2890,
4672,
9163,
478,
882,
992,
18,
2853,
18,
29362,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
try: filename = unicode(filename, 'utf-8') except UnicodeError: filename = unicode(filename, 'iso-8859-1') | def __iter__(self): for path in self.indexed: # test path not in self.skipped (dummy config files) if path not in self.skipped: for dirpath, dirnames, filenames in os.walk(path): # print "looking in", dirpath self._removeSkippedDirnames(dirpath, dirnames) try: dirpath = unicode(dirpath, 'utf-8') except UnicodeError: dirpath = unicode(dirpath, 'iso-8859-1') for filename in filenames: if os.access(os.path.join(dirpath, filename), os.R_OK): # Can we open it ? try: filename = unicode(filename, 'utf-8') except UnicodeError: filename = unicode(filename, 'iso-8859-1') yield os.path.join(dirpath, filename) | d2ffd4618402f7d61f2b67bf60479f5a2177762e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/d2ffd4618402f7d61f2b67bf60479f5a2177762e/indexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2165,
972,
12,
2890,
4672,
364,
589,
316,
365,
18,
19626,
30,
468,
1842,
589,
486,
316,
365,
18,
25346,
261,
21050,
642,
1390,
13,
309,
589,
486,
316,
365,
18,
25346,
30,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2165,
972,
12,
2890,
4672,
364,
589,
316,
365,
18,
19626,
30,
468,
1842,
589,
486,
316,
365,
18,
25346,
261,
21050,
642,
1390,
13,
309,
589,
486,
316,
365,
18,
25346,
30,
364,
... | |
def record_xml_output(rec, tags=[]): | def record_xml_output(rec, tags=None): | def record_xml_output(rec, tags=[]): """generates the XML for record 'rec' and returns it as a string @rec: record @tags: list of tags to be printed """ xmltext = "<record>\n" if tags and "001" not in tags: tags.append("001") if rec: # add the tag 'tag' to each field in rec[tag] fields = [] for tag in rec.keys(): if not tags or tag in tags: for field in rec[tag]: fields.append((tag, field)) record_order_fields(fields) for field in fields: xmltext += str(field_xml_output(field[1], field[0])) xmltext += "</record>" return xmltext | 05b30ce61d9f8e1f9d366b2d7c6d6e7f42e96b59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/05b30ce61d9f8e1f9d366b2d7c6d6e7f42e96b59/bibrecord.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1409,
67,
2902,
67,
2844,
12,
3927,
16,
2342,
33,
7036,
4672,
3536,
3441,
815,
326,
3167,
364,
1409,
296,
3927,
11,
471,
1135,
518,
487,
279,
533,
632,
3927,
30,
1409,
632,
4156,
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,
1409,
67,
2902,
67,
2844,
12,
3927,
16,
2342,
33,
7036,
4672,
3536,
3441,
815,
326,
3167,
364,
1409,
296,
3927,
11,
471,
1135,
518,
487,
279,
533,
632,
3927,
30,
1409,
632,
4156,
30,
... |
"--timeout=120000", | "--timeout=180000", | def TestUI(self): return self.SimpleTest("chrome", "ui_tests", valgrind_test_args=[ "--timeout=120000", "--trace_children", "--indirect"], cmd_args=[ "--ui-test-timeout=120000", "--ui-test-action-timeout=80000", "--ui-test-action-max-timeout=180000", "--ui-test-terminate-timeout=60000"]) | e14a345f15b4474f95c58904e17e5bda36d7313c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e14a345f15b4474f95c58904e17e5bda36d7313c/chrome_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
5370,
12,
2890,
4672,
327,
365,
18,
5784,
4709,
2932,
343,
10896,
3113,
315,
4881,
67,
16341,
3113,
1244,
3197,
728,
67,
3813,
67,
1968,
22850,
5238,
4538,
33,
2643,
2787,
3113,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
5370,
12,
2890,
4672,
327,
365,
18,
5784,
4709,
2932,
343,
10896,
3113,
315,
4881,
67,
16341,
3113,
1244,
3197,
728,
67,
3813,
67,
1968,
22850,
5238,
4538,
33,
2643,
2787,
3113,
52... |
query += ' WHERE module IN ( SELECT name FROM ir_module_module WHERE state = \'installed\') ' query_models += " AND imd.module in ( SELECT name FROM ir_module_module WHERE state = 'installed') " query_param = None if 'all' not in modules: query += ' WHERE module IN %s' query_models += ' AND imd.module in %s' | query_patch = ' module IN ( SELECT name FROM ir_module_module WHERE state = \'installed\') ' elif 'all' not in modules: query_patch = ' module IN %s' | def trans_generate(lang, modules, dbname=None): logger = logging.getLogger('i18n') if not dbname: dbname=tools.config['db_name'] if not modules: modules = ['all'] pool = pooler.get_pool(dbname) trans_obj = pool.get('ir.translation') model_data_obj = pool.get('ir.model.data') cr = pooler.get_db(dbname).cursor() uid = 1 l = pool.obj_pool.items() l.sort() query = 'SELECT name, model, res_id, module' \ ' FROM ir_model_data' query_models = """SELECT m.id, m.model, imd.module FROM ir_model AS m, ir_model_data AS imd WHERE m.id = imd.res_id AND imd.model = 'ir.model' """ if 'all_installed' in modules: query += ' WHERE module IN ( SELECT name FROM ir_module_module WHERE state = \'installed\') ' query_models += " AND imd.module in ( SELECT name FROM ir_module_module WHERE state = 'installed') " query_param = None if 'all' not in modules: query += ' WHERE module IN %s' query_models += ' AND imd.module in %s' query_param = (tuple(modules),) query += ' ORDER BY module, model, name' query_models += ' ORDER BY module, model' cr.execute(query, query_param) _to_translate = [] def push_translation(module, type, name, id, source): tuple = (module, source, name, id, type) if source and tuple not in _to_translate: _to_translate.append(tuple) def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s for (xml_name,model,res_id,module) in cr.fetchall(): module = encode(module) model = encode(model) xml_name = "%s.%s" % (module, encode(xml_name)) if not pool.get(model): logger.error("Unable to find object %r", model) continue exists = pool.get(model).exists(cr, uid, res_id) if not exists: logger.warning("Unable to find object %r with id %d", model, res_id) continue obj = pool.get(model).browse(cr, uid, res_id) if model=='ir.ui.view': d = etree.XML(encode(obj.arch)) for t in trans_parse_view(d): push_translation(module, 'view', encode(obj.model), 0, t) elif model=='ir.actions.wizard': service_name = 'wizard.'+encode(obj.wiz_name) if netsvc.Service._services.get(service_name): obj2 = netsvc.Service._services[service_name] for state_name, state_def in obj2.states.iteritems(): if 'result' in state_def: result = state_def['result'] if result['type'] != 'form': continue name = "%s,%s" % (encode(obj.wiz_name), state_name) def_params = { 'string': ('wizard_field', lambda s: [encode(s)]), 'selection': ('selection', lambda s: [encode(e[1]) for e in ((not callable(s)) and s or [])]), 'help': ('help', lambda s: [encode(s)]), } # export fields if not result.has_key('fields'): logger.warning("res has no fields: %r", result) continue for field_name, field_def in result['fields'].iteritems(): res_name = name + ',' + field_name for fn in def_params: if fn in field_def: transtype, modifier = def_params[fn] for val in modifier(field_def[fn]): push_translation(module, transtype, res_name, 0, val) # export arch arch = result['arch'] if arch and not isinstance(arch, UpdateableStr): d = etree.XML(arch) for t in trans_parse_view(d): push_translation(module, 'wizard_view', name, 0, t) # export button labels for but_args in result['state']: button_name = but_args[0] button_label = but_args[1] res_name = name + ',' + button_name push_translation(module, 'wizard_button', res_name, 0, button_label) elif model=='ir.model.fields': try: field_name = encode(obj.name) except AttributeError, exc: logger.error("name error in %s: %s", xml_name, str(exc)) continue objmodel = pool.get(obj.model) if not objmodel or not field_name in objmodel._columns: continue field_def = objmodel._columns[field_name] name = "%s,%s" % (encode(obj.model), field_name) push_translation(module, 'field', name, 0, encode(field_def.string)) if field_def.help: push_translation(module, 'help', name, 0, encode(field_def.help)) if field_def.translate: ids = objmodel.search(cr, uid, []) obj_values = objmodel.read(cr, uid, ids, [field_name]) for obj_value in obj_values: res_id = obj_value['id'] if obj.name in ('ir.model', 'ir.ui.menu'): res_id = 0 model_data_ids = model_data_obj.search(cr, uid, [ ('model', '=', model), ('res_id', '=', res_id), ]) if not model_data_ids: push_translation(module, 'model', name, 0, encode(obj_value[field_name])) if hasattr(field_def, 'selection') and isinstance(field_def.selection, (list, tuple)): for dummy, val in field_def.selection: push_translation(module, 'selection', name, 0, encode(val)) elif model=='ir.actions.report.xml': name = encode(obj.report_name) fname = "" if obj.report_rml: fname = obj.report_rml parse_func = trans_parse_rml report_type = "report" elif obj.report_xsl: fname = obj.report_xsl parse_func = trans_parse_xsl report_type = "xsl" if fname and obj.report_type in ('pdf', 'xsl'): try: d = etree.parse(tools.file_open(fname)) for t in parse_func(d.iter()): push_translation(module, report_type, name, 0, t) except (IOError, etree.XMLSyntaxError): logger.exception("couldn't export translation for report %s %s %s", name, report_type, fname) for field_name,field_def in obj._table._columns.items(): if field_def.translate: name = model + "," + field_name try: trad = getattr(obj, field_name) or '' except: trad = '' push_translation(module, 'model', name, xml_name, encode(trad)) # End of data for ir.model.data query results cr.execute(query_models, query_param) def push_constraint_msg(module, term_type, model, msg): # Check presence of __call__ directly instead of using # callable() because it will be deprecated as of Python 3.0 if not hasattr(msg, '__call__'): push_translation(module, term_type, model, 0, encode(msg)) for (model_id, model, module) in cr.fetchall(): module = encode(module) model = encode(model) model_obj = pool.get(model) if not model_obj: logger.error("Unable to find object %r", model) continue if model_obj._debug: logger.debug("Scanning model %s for translations", model) for constraint in getattr(model_obj, '_constraints', []): push_constraint_msg(module, 'constraint', model, constraint[1]) for constraint in getattr(model_obj, '_sql_constraints', []): push_constraint_msg(module, 'sql_constraint', model, constraint[2]) # parse source code for _() calls def get_module_from_path(path, mod_paths=None): if not mod_paths: # First, construct a list of possible paths def_path = os.path.abspath(os.path.join(tools.config['root_path'], 'addons')) # default addons path (base) ad_paths= map(lambda m: os.path.abspath(m.strip()),tools.config['addons_path'].split(',')) mod_paths=[def_path] for adp in ad_paths: mod_paths.append(adp) if not os.path.isabs(adp): mod_paths.append(adp) elif adp.startswith(def_path): mod_paths.append(adp[len(def_path)+1:]) for mp in mod_paths: if path.startswith(mp) and (os.path.dirname(path) != mp): path = path[len(mp)+1:] return path.split(os.path.sep)[0] return 'base' # files that are not in a module are considered as being in 'base' module modobj = pool.get('ir.module.module') installed_modids = modobj.search(cr, uid, [('state', '=', 'installed')]) installed_modules = map(lambda m: m['name'], modobj.read(cr, uid, installed_modids, ['name'])) root_path = os.path.join(tools.config['root_path'], 'addons') apaths = map(os.path.abspath, map(str.strip, tools.config['addons_path'].split(','))) if root_path in apaths: path_list = apaths else : path_list = [root_path,] + apaths logger.debug("Scanning modules at paths: %s",' '.join(path_list)) mod_paths = [] join_dquotes = re.compile(r'([^\\])"[\s\\]*"', re.DOTALL) join_quotes = re.compile(r'([^\\])\'[\s\\]*\'', re.DOTALL) re_dquotes = re.compile(r'[^a-zA-Z0-9_]_\([\s]*"(.+?)"[\s]*?\)', re.DOTALL) re_quotes = re.compile(r'[^a-zA-Z0-9_]_\([\s]*\'(.+?)\'[\s]*?\)', re.DOTALL) def export_code_terms_from_file(fname, path, root, terms_type): fabsolutepath = join(root, fname) frelativepath = fabsolutepath[len(path):] module = get_module_from_path(fabsolutepath, mod_paths=mod_paths) is_mod_installed = module in installed_modules if (('all' in modules) or (module in modules)) and is_mod_installed: logger.debug("Scanning code of %s at module: %s", frelativepath, module) code_string = tools.file_open(fabsolutepath, subdir='').read() if module in installed_modules: frelativepath = str("addons" + frelativepath) ite = re_dquotes.finditer(code_string) for i in ite: src = i.group(1) if src.startswith('""'): assert src.endswith('""'), "Incorrect usage of _(..) function (should contain only literal strings!) in file %s near: %s" % (frelativepath, src[:30]) src = src[2:-2] else: src = join_dquotes.sub(r'\1', src) # now, since we did a binary read of a python source file, we # have to expand pythonic escapes like the interpreter does. src = src.decode('string_escape') push_translation(module, terms_type, frelativepath, 0, encode(src)) ite = re_quotes.finditer(code_string) for i in ite: src = i.group(1) if src.startswith("''"): assert src.endswith("''"), "Incorrect usage of _(..) function (should contain only literal strings!) in file %s near: %s" % (frelativepath, src[:30]) src = src[2:-2] else: src = join_quotes.sub(r'\1', src) src = src.decode('string_escape') push_translation(module, terms_type, frelativepath, 0, encode(src)) for path in path_list: logger.debug("Scanning files of modules at %s", path) for root, dummy, files in tools.osutil.walksymlinks(path): for fname in itertools.chain(fnmatch.filter(files, '*.py')): export_code_terms_from_file(fname, path, root, 'code') for fname in itertools.chain(fnmatch.filter(files, '*.mako')): export_code_terms_from_file(fname, path, root, 'report') out = [["module","type","name","res_id","src","value"]] # header _to_translate.sort() # translate strings marked as to be translated for module, source, name, id, type in _to_translate: trans = trans_obj._get_source(cr, uid, name, type, lang, source) out.append([module, type, name, id, source, encode(trans) or '']) cr.close() return out | 596e694080c12324ca62467c5926f5a1bbc0a27b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/596e694080c12324ca62467c5926f5a1bbc0a27b/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
906,
67,
7163,
12,
4936,
16,
4381,
16,
18448,
33,
7036,
4672,
1194,
273,
2907,
18,
588,
3328,
2668,
77,
2643,
82,
6134,
309,
486,
18448,
30,
18448,
33,
6642,
18,
1425,
3292,
1966,
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,
906,
67,
7163,
12,
4936,
16,
4381,
16,
18448,
33,
7036,
4672,
1194,
273,
2907,
18,
588,
3328,
2668,
77,
2643,
82,
6134,
309,
486,
18448,
30,
18448,
33,
6642,
18,
1425,
3292,
1966,
67,
... |
args=(key, self.update, self.done)).start() | args=(self.update, key, self.done)).start() | def search(self, event=None): key = self.search_ent.get() self.stop_btn.pack(side='right') self.stop_btn.config(state='normal') self.search_lbl.config(text='Searching for "%s"...' % key) self.search_ent.forget() self.search_lbl.pack(side='left') self.result_lst.delete(0, 'end') self.goto_btn.config(state='disabled') self.expand() | 7e1c215fe7b26e1bb1b71b77fbabd3a1504266ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7e1c215fe7b26e1bb1b71b77fbabd3a1504266ff/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
871,
33,
7036,
4672,
498,
273,
365,
18,
3072,
67,
319,
18,
588,
1435,
365,
18,
5681,
67,
11898,
18,
2920,
12,
5564,
2218,
4083,
6134,
365,
18,
5681,
67,
11898,
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,
1623,
12,
2890,
16,
871,
33,
7036,
4672,
498,
273,
365,
18,
3072,
67,
319,
18,
588,
1435,
365,
18,
5681,
67,
11898,
18,
2920,
12,
5564,
2218,
4083,
6134,
365,
18,
5681,
67,
11898,
18... |
def getTasksForSubmission(self,transName,numTasks=1,site='',statusList=['Created'],older=None,newer=None,connection=False): | def getTasksForSubmission( self, transName, numTasks = 1, site = '', statusList = ['Created'], older = None, newer = None, connection = False ): | def getTasksForSubmission(self,transName,numTasks=1,site='',statusList=['Created'],older=None,newer=None,connection=False): """ Select tasks with the given status (and site) for submission """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] condDict = {"TransformationID":transID} if statusList: condDict["ExternalStatus"] = statusList if site: numTasks=0 res = self.getTransformationTasks(condDict=condDict,older=older, newer=newer, timeStamp='CreationTime', orderAttribute=None, limit=numTasks,inputVector=True,connection=connection) if not res['OK']: return res tasks = res['Value'] # Prepare Site->SE resolution mapping selSEs = [] if site: res = getSEsForSite(site) if not res['OK']: return res selSEs = res['Value'] # Now prepare the tasks resultDict = {} for taskDict in tasks: if len(resultDict) >= numTasks: break taskDict['Status'] = taskDict.pop('ExternalStatus') taskDict['InputData'] = taskDict.pop('InputVector') taskDict.pop('LastUpdateTime') taskDict.pop('CreationTime') taskDict.pop('ExternalID') taskID = taskDict['TaskID'] se = taskDict['TargetSE'] resultDict[taskID] = taskDict if not site: if taskDict['InputData']: res = getSitesForSE(se,'LCG') if not res['OK']: continue usedSite = res['Value'] if len(usedSite) == 1: usedSite = usedSite[0] else: usedSite = 'ANY' resultDict[taskID]['Site'] = usedSite elif site and (se in selSEs): resultDict[taskID]['Site'] = usedSite else: resultDict.pop(taskID) gLogger.warn("Can not find corresponding site for se",se) return S_OK(resultDict) | 9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
6685,
1290,
17865,
12,
365,
16,
906,
461,
16,
818,
6685,
273,
404,
16,
2834,
273,
10226,
1267,
682,
273,
10228,
6119,
17337,
12156,
273,
599,
16,
16069,
273,
599,
16,
1459,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
6685,
1290,
17865,
12,
365,
16,
906,
461,
16,
818,
6685,
273,
404,
16,
2834,
273,
10226,
1267,
682,
273,
10228,
6119,
17337,
12156,
273,
599,
16,
16069,
273,
599,
16,
1459,
273,
1... |
self.__remove_range (end_index + 1, last_index - 1) | self.__remove_range (end_index + 1, last_index) | def super_model_changed_range (self): | ae0b1e0a5ae62c25b294429a240ca4df1422cd59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12310/ae0b1e0a5ae62c25b294429a240ca4df1422cd59/GUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2240,
67,
2284,
67,
6703,
67,
3676,
261,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
2240,
67,
2284,
67,
6703,
67,
3676,
261,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
output_list = [ [os.path.join(wc_backup, mu_path), | output_list = [ [mu_path, | def update_props(): "receive properties via update" # Bootstrap sbox = sandbox(update_props) wc_dir = os.path.join (svntest.main.general_wc_dir, sbox) if svntest.actions.make_repo_and_wc(sbox): return 1 # Make a backup copy of the working copy wc_backup = wc_dir + 'backup' svntest.actions.duplicate_dir(wc_dir, wc_backup) # Add a property to a file and a directory mu_path = os.path.join(wc_dir, 'A', 'mu') H_path = os.path.join(wc_dir, 'A', 'D', 'H') svntest.main.run_svn('propset', 'blue', 'azul', mu_path) svntest.main.run_svn('propset', 'red', 'rojo', H_path) # Create expected output tree. output_list = [ [mu_path, None, {}, {'verb' : 'Changing'}], [ H_path, None, {}, {'verb' : 'Changing'}] ] expected_output_tree = svntest.tree.build_generic_tree(output_list) # Created expected status tree. status_list = svntest.actions.get_virginal_status_list(wc_dir, '1') for item in status_list: item[3]['repos_rev'] = '2' # post-commit status if (item[0] == mu_path) or (item[0] == H_path): item[3]['wc_rev'] = '2' item[3]['status'] = '__' expected_status_tree = svntest.tree.build_generic_tree(status_list) # Commit the one file. if svntest.actions.run_and_verify_commit (wc_dir, expected_output_tree, expected_status_tree, None, None, None, None, None, wc_dir): return 1 # Create expected output tree for an update of the wc_backup. output_list = [ [os.path.join(wc_backup, mu_path), None, {}, {'status' : '_U'}], [os.path.join(wc_backup, H_path), None, {}, {'status' : '_U'}] ] expected_output_tree = svntest.tree.build_generic_tree(output_list) # Create expected disk tree for the update. my_greek_tree = svntest.main.copy_greek_tree() my_greek_tree[2][2]['blue'] = 'azul' # A/mu my_greek_tree[16][2]['red'] = 'rojo' # A/D/H expected_disk_tree = svntest.tree.build_generic_tree(my_greek_tree) # Create expected status tree for the update. status_list = svntest.actions.get_virginal_status_list(wc_backup, '2') for item in status_list: if (item[0] == mu_path) or (item[0] == H_path): item[3]['status'] = '__' expected_status_tree = svntest.tree.build_generic_tree(status_list) # Do the update and check the results in three ways... INCLUDING PROPS return svntest.actions.run_and_verify_update(wc_backup, expected_output_tree, expected_disk_tree, expected_status_tree, None, None, None, None, 1) | 75724d356d00b24134b0a93f754ce95943cfe5cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6036/75724d356d00b24134b0a93f754ce95943cfe5cc/prop_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9693,
13332,
315,
18149,
1790,
3970,
1089,
6,
225,
468,
11830,
272,
2147,
273,
15202,
12,
2725,
67,
9693,
13,
14310,
67,
1214,
273,
1140,
18,
803,
18,
5701,
261,
5751,
496,
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,
1089,
67,
9693,
13332,
315,
18149,
1790,
3970,
1089,
6,
225,
468,
11830,
272,
2147,
273,
15202,
12,
2725,
67,
9693,
13,
14310,
67,
1214,
273,
1140,
18,
803,
18,
5701,
261,
5751,
496,
3... |
traceback.print_exc() | traceback.print_exc(file=sys.stdout) | def runtest(hier, code): root = tempfile.mktemp() mkhier(root, hier) savepath = sys.path[:] codefile = tempfile.mktemp() f = open(codefile, "w") f.write(code) f.close() try: sys.path.insert(0, root) if verbose: print "sys.path =", sys.path try: execfile(codefile, globals(), {}) except: traceback.print_exc() finally: sys.path[:] = savepath try: cleanout(root) except (os.error, IOError): pass os.remove(codefile) | 9658d483049c4fccf6f4cbfe50faf28371639abb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9658d483049c4fccf6f4cbfe50faf28371639abb/test_pkg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
3813,
12,
76,
2453,
16,
981,
4672,
1365,
273,
13275,
18,
24816,
5814,
1435,
5028,
76,
2453,
12,
3085,
16,
366,
2453,
13,
1923,
803,
273,
2589,
18,
803,
10531,
65,
981,
768,
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,
1086,
3813,
12,
76,
2453,
16,
981,
4672,
1365,
273,
13275,
18,
24816,
5814,
1435,
5028,
76,
2453,
12,
3085,
16,
366,
2453,
13,
1923,
803,
273,
2589,
18,
803,
10531,
65,
981,
768,
273,
... |
if remaining <= 0: | if remaining < 0.0: | def get(self, block=True, timeout=None): """Remove and return an item from the queue. | 5af0e414822e0e5da17566e1156005df520d1ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af0e414822e0e5da17566e1156005df520d1ae0/Queue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
1203,
33,
5510,
16,
2021,
33,
7036,
4672,
3536,
3288,
471,
327,
392,
761,
628,
326,
2389,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12,
2890,
16,
1203,
33,
5510,
16,
2021,
33,
7036,
4672,
3536,
3288,
471,
327,
392,
761,
628,
326,
2389,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
str += ' <dt><b>%s Method:' % name | str = ' <dt><b>%s Method:' % name | def _property_details_entry(self, property, container): """ @return: The HTML code for an entry in the property details section. Each entry gives a complete description of a documented property. @param property: The property that should be described by this entry. @type property: L{Link} """ puid = property.target() pname = property.name() # Note: by the time we get here, we know that docmap contains puid. pdoc = self._docmap[puid] | 8a8c074de55fd3b9684eff7686b746f4817cad2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/8a8c074de55fd3b9684eff7686b746f4817cad2b/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4468,
67,
6395,
67,
4099,
12,
2890,
16,
1272,
16,
1478,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
392,
1241,
316,
326,
1272,
3189,
2442,
18,
225,
8315,
1241,
14758,
279,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4468,
67,
6395,
67,
4099,
12,
2890,
16,
1272,
16,
1478,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
392,
1241,
316,
326,
1272,
3189,
2442,
18,
225,
8315,
1241,
14758,
279,
39... |
self.jewelmenu = QMenu('Jewel Slots', self) | self.swapjewelmenu = QMenu('Jewel Slots', self) | def initMenu(self): self.rf_menu = QMenu('&Recent Files') self.connect(self.rf_menu, SIGNAL("triggered(QAction*)"), self.loadRecentFile) self.filemenu = QMenu('&File', self) self.filemenu.addAction('&New', self.newFile, QKeySequence(Qt.CTRL+Qt.Key_N)) self.filemenu.addAction('&Open...', self.openFile, QKeySequence(Qt.CTRL+Qt.Key_O)) self.filemenu.addAction('&Save', self.saveFile, QKeySequence(Qt.CTRL+Qt.Key_S)) self.filemenu.addAction('Save &As...', self.saveAsFile) self.filemenu.addSeparator() self.filemenu.addAction('&Load Item...', self.loadItem, QKeySequence(Qt.CTRL+Qt.SHIFT+Qt.Key_L)) self.filemenu.addAction('&Save Item...', self.saveItem, QKeySequence(Qt.CTRL+Qt.SHIFT+Qt.Key_S)) self.filemenu.addSeparator() self.filemenu.addAction('Export &Quickbars...', self.openCraftBars) self.filemenu.addAction('Export &UI XML (Beta)...', self.generateUIXML) self.filemenu.addSeparator() self.filemenu.addMenu(self.rf_menu) self.filemenu.addSeparator() self.filemenu.addAction('E&xit', self.close, QKeySequence(Qt.CTRL+Qt.Key_X)) self.menuBar().addMenu(self.filemenu) | 4871e7b90ac3ae938def5bc89e9ea84b3a33c81a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/4871e7b90ac3ae938def5bc89e9ea84b3a33c81a/ScWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
4599,
12,
2890,
4672,
365,
18,
5809,
67,
5414,
273,
2238,
4599,
2668,
10,
17076,
6471,
6134,
365,
18,
3612,
12,
2890,
18,
5809,
67,
5414,
16,
12057,
1013,
2932,
10668,
329,
12,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
4599,
12,
2890,
4672,
365,
18,
5809,
67,
5414,
273,
2238,
4599,
2668,
10,
17076,
6471,
6134,
365,
18,
3612,
12,
2890,
18,
5809,
67,
5414,
16,
12057,
1013,
2932,
10668,
329,
12,
5... |
while self.parser.openElements[-1].name in ("tr", "html"): | while self.parser.openElements[-1].name not in ("tr", "html"): | def clearStackToTableRowContext(self): while self.parser.openElements[-1].name in ("tr", "html"): self.parser.openElements.pop() self.parser.parseError() | 497a9b85cde828088f24b55963baf081500454f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/497a9b85cde828088f24b55963baf081500454f7/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2424,
2624,
774,
30650,
1042,
12,
2890,
4672,
1323,
365,
18,
4288,
18,
3190,
3471,
18919,
21,
8009,
529,
486,
316,
7566,
313,
3113,
315,
2620,
6,
4672,
365,
18,
4288,
18,
3190,
3471,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2424,
2624,
774,
30650,
1042,
12,
2890,
4672,
1323,
365,
18,
4288,
18,
3190,
3471,
18919,
21,
8009,
529,
486,
316,
7566,
313,
3113,
315,
2620,
6,
4672,
365,
18,
4288,
18,
3190,
3471,
1... |
self.setStatus( False, False ) | self.setStatus( False ) | def start( self ): if self.connected: self.modificator.loadFromRemote() retVal = self.modificator.getCredentials() if not retVal[ 'OK' ]: print "There was an error gathering your credentials" print retVal[ 'Message' ] self.setStatus( False, False ) try: self.cmdloop() except KeyboardInterrupt, v: gLogger.warn( "Received a keyboard interrupt." ) self.do_quit( "" ) | a71cfe415cc9bb7d450ccd8c4a90779851e045fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/a71cfe415cc9bb7d450ccd8c4a90779851e045fd/CSCLI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
365,
262,
30,
309,
365,
18,
8537,
30,
365,
18,
1711,
1507,
639,
18,
945,
1265,
5169,
1435,
12197,
273,
365,
18,
1711,
1507,
639,
18,
588,
6163,
1435,
309,
486,
12197,
63,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
365,
262,
30,
309,
365,
18,
8537,
30,
365,
18,
1711,
1507,
639,
18,
945,
1265,
5169,
1435,
12197,
273,
365,
18,
1711,
1507,
639,
18,
588,
6163,
1435,
309,
486,
12197,
63,
29... |
document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' | document.body[i + 2] = document.body[i + 2][:q - 1] document.body[i + 2] = document.body[i + 2] + '>' | def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_token(document.body, "</cell>", i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular cell.") i = j continue # don't set a box for longtables, only delete tabularvalignment # the alignment is 2 lines below \\begin_inset Tabular p = document.body[i+2].find("islongtable") if p > -1: q = document.body[i+2].find("tabularvalignment") if q > -1: document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' i = i + 1 # when no longtable if p == -1: tabularvalignment = 'c' # which valignment is specified? m = document.body[i+2].find('tabularvalignment="top"') if m > -1: tabularvalignment = 't' m = document.body[i+2].find('tabularvalignment="bottom"') if m > -1: tabularvalignment = 'b' # delete tabularvalignment q = document.body[i+2].find("tabularvalignment") if q > -1: document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' # don't add a box when centered if tabularvalignment == 'c': i = j continue subst = ['\\end_layout', '\\end_inset'] document.body[j:j] = subst # just inserts those lines subst = ['\\begin_inset Box Frameless', 'position "' + tabularvalignment +'"', 'hor_pos "c"', 'has_inner_box 1', 'inner_pos "c"', 'use_parbox 0', # we don't know the width, assume 50% 'width "50col%"', 'special "none"', 'height "1in"', 'height_special "totalheight"', 'status open', '', '\\begin_layout Plain Layout'] document.body[i:i] = subst # this just inserts the array at i i += len(subst) + 2 # adjust i to save a few cycles | bcd8b9a1f1241c461beb5db1d5a69424a9a25950 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/bcd8b9a1f1241c461beb5db1d5a69424a9a25950/lyx_2_0.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15226,
67,
7032,
2490,
1125,
724,
12,
5457,
4672,
315,
868,
1097,
326,
28342,
1244,
724,
1456,
315,
277,
273,
374,
1323,
1053,
30,
277,
273,
1104,
67,
2316,
12,
5457,
18,
3432,
16,
842... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15226,
67,
7032,
2490,
1125,
724,
12,
5457,
4672,
315,
868,
1097,
326,
28342,
1244,
724,
1456,
315,
277,
273,
374,
1323,
1053,
30,
277,
273,
1104,
67,
2316,
12,
5457,
18,
3432,
16,
842... |
genpluginproject("ppc", "_Icn", libraries=["IconServicesLib"], outputdir="::Lib:Carbon") | genpluginproject("ppc", "_Icn", libraries=["IconServicesLib"], libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon") | def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files. Not as nice as # a single multitarget project, but easier to implement for now. genpluginproject("ppc", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname) genpluginproject("carbon", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname) return templatename = "template-%s" % architecture targetname = "%s.%s" % (module, architecture) dllname = "%s.%s.slb" % (module, architecture) if not project: if architecture != "ppc": project = "%s.%s.mcp"%(module, architecture) else: project = "%s.mcp"%module if not projectdir: projectdir = PROJECTDIR if not sources: sources = [module + 'module.c'] if not sourcedirs: for moduledir in MODULEDIRS: if '%' in moduledir: # For historical reasons an initial _ in the modulename # is not reflected in the folder name if module[0] == '_': modulewithout_ = module[1:] else: modulewithout_ = module moduledir = moduledir % modulewithout_ fn = os.path.join(projectdir, os.path.join(moduledir, sources[0])) if os.path.exists(fn): moduledir, sourcefile = os.path.split(fn) sourcedirs = [relpath(projectdir, moduledir)] sources[0] = sourcefile break else: print "Warning: %s: sourcefile not found: %s"%(module, sources[0]) sourcedirs = [] if prefixname: pass elif architecture == "carbon": prefixname = "mwerks_carbonplugin_config.h" else: prefixname = "mwerks_plugin_config.h" dict = { "sysprefix" : relpath(projectdir, sys.prefix), "sources" : sources, "extrasearchdirs" : sourcedirs + extradirs, "libraries": libraries, "mac_outputdir" : outputdir, "extraexportsymbols" : extraexportsymbols, "mac_targetname" : targetname, "mac_dllname" : dllname, "prefixname" : prefixname, } if libraryflags: dict['libraryflags'] = libraryflags if stdlibraryflags: dict['stdlibraryflags'] = stdlibraryflags mkcwproject.mkproject(os.path.join(projectdir, project), module, dict, force=FORCEREBUILD, templatename=templatename) | e0182be92e2501bdfe9c3c2051f923006719ce21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e0182be92e2501bdfe9c3c2051f923006719ce21/genpluginprojects.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
4094,
4406,
12,
991,
18123,
16,
1605,
16,
1984,
33,
7036,
16,
1984,
1214,
33,
7036,
16,
5550,
22850,
6487,
1084,
8291,
22850,
6487,
14732,
22850,
6487,
7582,
361,
10539,
22850,
6487,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
4094,
4406,
12,
991,
18123,
16,
1605,
16,
1984,
33,
7036,
16,
1984,
1214,
33,
7036,
16,
5550,
22850,
6487,
1084,
8291,
22850,
6487,
14732,
22850,
6487,
7582,
361,
10539,
22850,
6487,... |
if print_error: | if not print_error: | def CaptureSVN(args, in_directory=None, print_error=True): """Runs svn, capturing output sent to stdout as a string. Args: args: A sequence of command line parameters to be passed to svn. in_directory: The directory where svn is to be run. Returns: The output sent to stdout as a string. """ c = [SVN_COMMAND] c.extend(args) # *Sigh*: Windows needs shell=True, or else it won't search %PATH% for # the svn.exe executable, but shell=True makes subprocess on Linux fail # when it's called with a list because it only tries to execute the # first string ("svn"). stderr = None if print_error: stderr = subprocess.PIPE return subprocess.Popen(c, cwd=in_directory, shell=(sys.platform == 'win32'), stdout=subprocess.PIPE, stderr=stderr).communicate()[0] | f4168ddece3ce0f4cc6a7c4ed68bcb87166a3c0c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6076/f4168ddece3ce0f4cc6a7c4ed68bcb87166a3c0c/gclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18477,
23927,
50,
12,
1968,
16,
316,
67,
5149,
33,
7036,
16,
1172,
67,
1636,
33,
5510,
4672,
3536,
9361,
5893,
82,
16,
28789,
876,
3271,
358,
3909,
487,
279,
533,
18,
225,
6634,
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,
18477,
23927,
50,
12,
1968,
16,
316,
67,
5149,
33,
7036,
16,
1172,
67,
1636,
33,
5510,
4672,
3536,
9361,
5893,
82,
16,
28789,
876,
3271,
358,
3909,
487,
279,
533,
18,
225,
6634,
30,
... |
self.body.append('</p>') | def html_visit_displaymath(self, node): if node['nowrap']: latex = node['latex'] else: latex = wrap_displaymath(node['latex'], None) try: fname, depth = render_math(self, latex) except MathExtError, exc: sm = nodes.system_message(str(exc), type='WARNING', level=2, backrefs=[], source=node['latex']) sm.walkabout(self) self.builder.warn('inline latex %r: ' % node['latex'] + str(exc)) raise nodes.SkipNode self.body.append(self.starttag(node, 'div', CLASS='math')) self.body.append('<p>') if node['number']: self.body.append('<span class="eqno">(%s)</span>' % node['number']) if fname is None: # something failed -- use text-only as a bad substitute self.body.append('<span class="math">%s</span>' % self.encode(node['latex']).strip()) else: self.body.append('<img src="%s" alt="%s" />\n</div>' % (fname, self.encode(node['latex']).strip())) self.body.append('</p>') raise nodes.SkipNode | 84cba1683fc18e70c591d601d098c83057ae223e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/84cba1683fc18e70c591d601d098c83057ae223e/pngmath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
11658,
67,
5417,
15949,
12,
2890,
16,
756,
4672,
309,
756,
3292,
3338,
1266,
3546,
30,
25079,
273,
756,
3292,
26264,
3546,
469,
30,
25079,
273,
2193,
67,
5417,
15949,
12,
2159,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5417,
15949,
12,
2890,
16,
756,
4672,
309,
756,
3292,
3338,
1266,
3546,
30,
25079,
273,
756,
3292,
26264,
3546,
469,
30,
25079,
273,
2193,
67,
5417,
15949,
12,
2159,... | |
def queueStringCommand(self, command): | def queueStringCommand(self, command, public=1): | def queueStringCommand(self, command): """Queues a string to be issued as an FTP command Returns a Deferred that will be called when the response to the command has been received.""" ftpCommand = FTPCommand(command) self.queueCommand(ftpCommand) return ftpCommand.deferred | 10f1a9e0ff16a1ec1371e9a9174eb2e0fcc81c0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/10f1a9e0ff16a1ec1371e9a9174eb2e0fcc81c0b/ftp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2389,
780,
2189,
12,
2890,
16,
1296,
16,
1071,
33,
21,
4672,
3536,
17428,
279,
533,
358,
506,
16865,
487,
392,
19324,
1296,
225,
2860,
279,
12816,
716,
903,
506,
2566,
1347,
326,
766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2389,
780,
2189,
12,
2890,
16,
1296,
16,
1071,
33,
21,
4672,
3536,
17428,
279,
533,
358,
506,
16865,
487,
392,
19324,
1296,
225,
2860,
279,
12816,
716,
903,
506,
2566,
1347,
326,
766,
... |
if arg == "okx": | if arg == "ok": | def job_status_to_str(value, arg, autoescape=None): if autoescape: esc = conditional_escape else: esc = lambda x: x if value == 0: result = _("Waiting rendering") elif value == 1: result = _("Rendering in progress") elif value == 2: if arg == "okx": result = _("Rendering successful") else: result = _("Rendering failed, please contact " \ "<a href=\"mailto:contact@maposmatic.org\">" \ "contact@maposmatic.org</a>") else: result = "" return mark_safe(result) | b25eac0fab4ab695999c791056fe213377bb0377 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14904/b25eac0fab4ab695999c791056fe213377bb0377/extratags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1719,
67,
2327,
67,
869,
67,
701,
12,
1132,
16,
1501,
16,
3656,
6939,
33,
7036,
4672,
225,
309,
3656,
6939,
30,
2904,
273,
11139,
67,
6939,
469,
30,
2904,
273,
3195,
619,
30,
619,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1719,
67,
2327,
67,
869,
67,
701,
12,
1132,
16,
1501,
16,
3656,
6939,
33,
7036,
4672,
225,
309,
3656,
6939,
30,
2904,
273,
11139,
67,
6939,
469,
30,
2904,
273,
3195,
619,
30,
619,
22... |
This version does removes the handler from an internal list of handlers which is closed when shutdown() is called. Subclasses | This version removes the handler from an internal map of handlers, _handlers, which is used for handler lookup by name. Subclasses | def close(self): """ Tidy up any resources used by the handler. | 578b37d7e01b9e9daa78130b4a2907f8051270db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/578b37d7e01b9e9daa78130b4a2907f8051270db/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
399,
29609,
731,
1281,
2703,
1399,
635,
326,
1838,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
3536,
399,
29609,
731,
1281,
2703,
1399,
635,
326,
1838,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "%s" % (object) | def addObject(self, object): self.objects.append(object) | 9a5df1850c6a8faeea71257b8f5b251aa6321160 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11575/9a5df1850c6a8faeea71257b8f5b251aa6321160/guimain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31311,
12,
2890,
16,
733,
4672,
365,
18,
6911,
18,
6923,
12,
1612,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31311,
12,
2890,
16,
733,
4672,
365,
18,
6911,
18,
6923,
12,
1612,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
cleaned_data["administrative_city"] = None | cleaned_data["administrative_city"] = '' | def clean(self): cleaned_data = self.cleaned_data | 90b63d4beaee644a946df212b75039d9d48748ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14904/90b63d4beaee644a946df212b75039d9d48748ba/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
12,
2890,
4672,
9426,
67,
892,
273,
365,
18,
6200,
329,
67,
892,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
12,
2890,
4672,
9426,
67,
892,
273,
365,
18,
6200,
329,
67,
892,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
ROBERT : I haven't tested this... if if doesn't work, then it is probably the param_tuple thing... send me an email if it's not working | def delete_rows(self, query): """ DOCSTRING COMMENTS: - Query must have no join statements (you can only delete from one table at a time) (This might be an interesting TODO later, ie: another function that creates multiple delete statements from a query with joins... I don't think it's really necessary at this time though. - Use a query instance to modify your database. - Note that you cannot use a GenericSQLQuery. (NO RESPONSIBILITY) - If you would like to remove all data that satisfies a query, enter that query as a parameter in the delete_rows function. - Recommended use: have some kind of primary key column that you use as a parameter in the query - Be careful, test your query first. - (Examples of this) - Also note that this database must be the database that the query is associated with (test that?) ROBERT : I haven't tested this... if if doesn't work, then it is probably the param_tuple thing... send me an email if it's not working EXAMPLES: sage: DB = SQLDatabase() sage: DB.create_table('simon',{'a1':{'sql':'bool','primary_key':False}, 'b2':{'sql':'int', 'primary_key':False}}) sage: DB.add_data('simon',[(0,0),(1,1),(1,2)]) sage: p = SQLQuery(DB, {'table_name':'simon', 'display_cols':'b2', 'dillhole':['b2','=', 0]}) sage: DB.delete_rows(p) sage: cur = DB.get_cursor() sage: (cur.execute('select * from simon')).fetchall() [(1, 1), (1, 2)] syntax: delete from table_name where blah=val """ # Check query is associated with this database # TODO : Robert, does this work? And do you suggest any other checking? if not isinstance(query, SQLQuery): raise TypeError('%s is not a valid SQLQuery'%query) if query.__database__ is not self: raise ValueError('%s is not associated to this database.'%query) if (query.__query_string__).__contains__(' JOIN '): raise ValueError('%s is not a valid query. Can only delete from one table at a time.'%query) delete_statement = re.sub('SELECT .* FROM', 'DELETE FROM', query.__query_string__) try: tup = str(query.__param_tuple__).rstrip(')') + ',)' cur = self.__connection__.cursor() if query.__param_tuple__ is not None: tup = [] for i in range(len(query.__param_tuple__)): tup.append(str(query.__param_tuple__[i])) cur.execute(delete_statement, tuple(tup)) else: cur.execute(delete_statement) except: raise RuntimeError('Failure to complete delete. Check your data.') | ccd462ba82c8e638768d9aaffb11ed63f3c9a76d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ccd462ba82c8e638768d9aaffb11ed63f3c9a76d/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
3870,
12,
2890,
16,
843,
4672,
3536,
5467,
39,
5804,
19400,
55,
30,
300,
2770,
1297,
1240,
1158,
1233,
6317,
261,
19940,
848,
1338,
1430,
628,
1245,
1014,
622,
279,
813,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
3870,
12,
2890,
16,
843,
4672,
3536,
5467,
39,
5804,
19400,
55,
30,
300,
2770,
1297,
1240,
1158,
1233,
6317,
261,
19940,
848,
1338,
1430,
628,
1245,
1014,
622,
279,
813,
13,
... | |
self._buf = "" | self._buf = b"" | def read(self, size=None): L = [self._buf] avail = len(self._buf) while size is None or avail < size: s = self._read() if s == "": break L.append(s) avail += len(s) all = "".join(L) if size is None: self._buf = "" return all else: self._buf = all[size:] return all[:size] | 910e3e908837b13bd6a1f027c67fbdbdd3646dc3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/910e3e908837b13bd6a1f027c67fbdbdd3646dc3/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
33,
7036,
4672,
511,
273,
306,
2890,
6315,
4385,
65,
15783,
273,
562,
12,
2890,
6315,
4385,
13,
1323,
963,
353,
599,
578,
15783,
411,
963,
30,
272,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
963,
33,
7036,
4672,
511,
273,
306,
2890,
6315,
4385,
65,
15783,
273,
562,
12,
2890,
6315,
4385,
13,
1323,
963,
353,
599,
578,
15783,
411,
963,
30,
272,
273,
365,
... |
self.Expand(id) | if self.IsVisible (id): self.Expand(id) | def ExpandContainer (self, openedContainers, id): try: expand = openedContainers [self.GetItemData(id).GetData()] except KeyError: pass else: self.LoadChildren(id) | 8d7bb70ea3b5584a3cab95577531458725b0423a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8d7bb70ea3b5584a3cab95577531458725b0423a/ControlBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16429,
2170,
261,
2890,
16,
10191,
11177,
16,
612,
4672,
775,
30,
4542,
273,
10191,
11177,
306,
2890,
18,
967,
1180,
751,
12,
350,
2934,
967,
751,
1435,
65,
1335,
4999,
30,
1342,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16429,
2170,
261,
2890,
16,
10191,
11177,
16,
612,
4672,
775,
30,
4542,
273,
10191,
11177,
306,
2890,
18,
967,
1180,
751,
12,
350,
2934,
967,
751,
1435,
65,
1335,
4999,
30,
1342,
469,
... |
x = (c_char * 16).from_buffer_copy("a" * 16) self.assertEqual(x[:], "a" * 16) | x = (c_char * 16).from_buffer_copy(b"a" * 16) self.assertEqual(x[:], b"a" * 16) | def BROKEN_test_from_buffer_copy(self): a = array.array("i", range(16)) x = (c_int * 16).from_buffer_copy(a) | 566445bf9930e7a2b1069272e18010b1d00add4d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/566445bf9930e7a2b1069272e18010b1d00add4d/test_frombuffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
605,
1457,
47,
1157,
67,
3813,
67,
2080,
67,
4106,
67,
3530,
12,
2890,
4672,
279,
273,
526,
18,
1126,
2932,
77,
3113,
1048,
12,
2313,
3719,
619,
273,
261,
71,
67,
474,
380,
2872,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
605,
1457,
47,
1157,
67,
3813,
67,
2080,
67,
4106,
67,
3530,
12,
2890,
4672,
279,
273,
526,
18,
1126,
2932,
77,
3113,
1048,
12,
2313,
3719,
619,
273,
261,
71,
67,
474,
380,
2872,
293... |
pkg) self.__writeDB4(self.sigmd5_db, "install_md5", pkgid, pkg) | pkg, False) self.__writeDB4(self.sigmd5_db, "install_md5", pkgid, pkg, False) | def addPkg(self, pkg, nowrite=None): self._addPkg(pkg) | 8e61d9060fd6e10058bdc560e372ffe4b179fc6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/8e61d9060fd6e10058bdc560e372ffe4b179fc6f/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
11264,
12,
2890,
16,
3475,
16,
2037,
796,
33,
7036,
4672,
365,
6315,
1289,
11264,
12,
10657,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
11264,
12,
2890,
16,
3475,
16,
2037,
796,
33,
7036,
4672,
365,
6315,
1289,
11264,
12,
10657,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
(triggerIntegratedPower-meanPixelPower)/ | (cmPixel[4]-meanPixelPower)/ | def createGlitchDatabase(self,verbose=bool(False)): """ Commands to build either a structure which can be graphed selectively or to create a database for use with auto-glitch classification pipeline. There is a companion summary for this method. If one wants to hand cut the summary you can excise the triggers from the output summary from original entire database for graphing the triggers. Symmetry weights -- Z scores replace this field! """ weight=1 glitchDatabase=[] spinner=progressSpinner(verbose,2) spinner.setTag('GlitchDB ') for trigger in self.curves: spinner.updateSpinner() triggerStartString=trigger.startGPS().__diskPrint__() triggerStartFloat=trigger.startGPS().getAsFloat() triggerStopFloat=trigger.stopGPS().getAsFloat() triggerBandwidth,triggerLowF,triggerHighF=trigger.getCandidateBandwidth(bool(True)) triggerID,triggerLength,triggerIntegratedPower=trigger.getKurveHeader() brightPixel=trigger.getBrightPixel() cmPixel=trigger.getBrightPixel() meanPixelPower,varPixelPower=trigger.__getKurveMeanVar__() triggerCentralFreq=triggerLowF+(triggerHighF-triggerLowF)/2 triggerDuration=triggerStopFloat-triggerStartFloat triggerCentralTime=(triggerStopFloat+triggerStartFloat)/2 # relativeTimeBP=brightPixel[2].getAsFloat()-triggerCentralTime relativeFreqBP=brightPixel[3]-triggerCentralFreq ###symmetryBP=trigger.getSymmetryFactor(brightPixel,weight) zScoreBP=( (triggerIntegratedPower-meanPixelPower)/ math.sqrt(varPixelPower) ) relativeTimeCM=cmPixel[2].getAsFloat()-triggerCentralTime relativeFreqCM=cmPixel[3]-triggerCentralFreq ###symmetryCM=trigger.getSymmetryFactor(brightPixel,weight) zScoreCM=( (triggerIntegratedPower-meanPixelPower)/ math.sqrt(varPixelPower) ) #(+) if T_bp > T_cm if (triggerDuration > 0): spanTnorm=( (brightPixel[2].getAsFloat()-cmPixel[2].getAsFloat())/ triggerDuration ) else: spanTnorm=0 #(+) if F_bp>F_cm if (triggerBandwidth > 0): spanFnorm=(brightPixel[3]-cmPixel[3])/triggerBandwidth else: spanFnorm=0 #Create glitch database entry glitchDatabaseEntry=[triggerStartString,triggerStartFloat, triggerLowF,triggerDuration, triggerBandwidth,int(triggerLength), triggerIntegratedPower,meanPixelPower, varPixelPower,relativeTimeBP, relativeFreqBP,0, zScoreBP,relativeTimeCM, relativeTimeCM,0, zScoreCM,spanTnorm,spanFnorm] glitchDatabase.append(glitchDatabaseEntry) spinner.closeSpinner() return glitchDatabase #End createGraphingSummary | f8356864ebd3e4f4c62944a76ace8501c23ac979 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/f8356864ebd3e4f4c62944a76ace8501c23ac979/tracksearchutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
21308,
1437,
4254,
12,
2890,
16,
11369,
33,
6430,
12,
8381,
3719,
30,
3536,
18034,
358,
1361,
3344,
279,
3695,
1492,
848,
506,
2667,
329,
2027,
4492,
578,
358,
752,
279,
2063,
364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
21308,
1437,
4254,
12,
2890,
16,
11369,
33,
6430,
12,
8381,
3719,
30,
3536,
18034,
358,
1361,
3344,
279,
3695,
1492,
848,
506,
2667,
329,
2027,
4492,
578,
358,
752,
279,
2063,
364,
... |
for item in self.mucous.config["interests.like"]: | likes = self.mucous.config["interests.like"].keys() likes.sort(key=str.lower) for item in likes: | def DrawLiked(self): try: mode = "likes" self.windows["text"][mode].erase() w = self.dimensions[mode] self.logs[mode] = [] sup = self.scrolling[ mode ] | 2bda2871105159a339bd47c97b8082680c0db9b7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8737/2bda2871105159a339bd47c97b8082680c0db9b7/MucousRecommendations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
30248,
329,
12,
2890,
4672,
775,
30,
1965,
273,
315,
10473,
281,
6,
365,
18,
13226,
9614,
955,
6,
6362,
3188,
8009,
264,
448,
1435,
341,
273,
365,
18,
14797,
63,
3188,
65,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
30248,
329,
12,
2890,
4672,
775,
30,
1965,
273,
315,
10473,
281,
6,
365,
18,
13226,
9614,
955,
6,
6362,
3188,
8009,
264,
448,
1435,
341,
273,
365,
18,
14797,
63,
3188,
65,
365,
... |
self._matrixIsTransposed = False | def generate(self, grid): self.tempVertexes = [] self._matrixIsTransposed = False self.generateVertexes(grid) self.generateSurface(self.tempVertexes) | 225697350492711b09cc292c7229559fdda28fd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7999/225697350492711b09cc292c7229559fdda28fd4/preview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
3068,
4672,
365,
18,
5814,
6475,
281,
273,
5378,
365,
18,
7163,
6475,
281,
12,
5222,
13,
365,
18,
7163,
11508,
12,
2890,
18,
5814,
6475,
281,
13,
225,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
2890,
16,
3068,
4672,
365,
18,
5814,
6475,
281,
273,
5378,
365,
18,
7163,
6475,
281,
12,
5222,
13,
365,
18,
7163,
11508,
12,
2890,
18,
5814,
6475,
281,
13,
225,
2,
-100,
-1... | |
retval = False | def parse_SBANKEquals(self, context, operands): retval = False pa = None expr = Expression(context, operands) if expr.complete: pa = expr.value if context.memmap.isFixed(pa): context.currentRecord.target = pa context.currentRecord.complete = True context.sbank = pa retval = True else: context.error("operand must be in fixed memory") return retval | 0c60b51cc3a2e291ba9533bb9ab17f2ef2a0018f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/0c60b51cc3a2e291ba9533bb9ab17f2ef2a0018f/directive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
14541,
1258,
6859,
6360,
12,
2890,
16,
819,
16,
14883,
4672,
6790,
273,
599,
3065,
273,
5371,
12,
2472,
16,
14883,
13,
309,
3065,
18,
6226,
30,
6790,
273,
3065,
18,
1132,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
14541,
1258,
6859,
6360,
12,
2890,
16,
819,
16,
14883,
4672,
6790,
273,
599,
3065,
273,
5371,
12,
2472,
16,
14883,
13,
309,
3065,
18,
6226,
30,
6790,
273,
3065,
18,
1132,
309... | |
if(abs(np.sqrt(np.vdot(dr, dr).sum())) > self.maxstep): dr = du * self.maxstep | steplengths = (dr**2).sum(1)**0.5 maxsteplength = np.max(steplengths) if maxsteplength >= self.maxstep: dr *= self.maxstep / maxsteplength | def determine_step(self, r, f, du): # use the Hessian Matrix to predict the min dr = self.d if(abs(np.sqrt(np.vdot(dr, dr).sum())) > self.maxstep): dr = du * self.maxstep return dr | bc3efb9267548f28c85bf11e1c0f7d7bcda39eea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1380/bc3efb9267548f28c85bf11e1c0f7d7bcda39eea/lbfgs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
4119,
12,
2890,
16,
436,
16,
284,
16,
9978,
4672,
468,
999,
326,
670,
20529,
7298,
358,
7810,
326,
1131,
5081,
273,
365,
18,
72,
18654,
412,
1288,
87,
273,
261,
3069,
636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4199,
67,
4119,
12,
2890,
16,
436,
16,
284,
16,
9978,
4672,
468,
999,
326,
670,
20529,
7298,
358,
7810,
326,
1131,
5081,
273,
365,
18,
72,
18654,
412,
1288,
87,
273,
261,
3069,
636,
... |
self.list_win.resize( opth, optw+3 ) | self.list_win.resize( opth, shared.optw+3 ) | def calc_lsize(r): """Calculate the size required on screen to display the list.""" | 85ca815627fbe3f835b3d6043f4be51d15504981 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6932/85ca815627fbe3f835b3d6043f4be51d15504981/bpython.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
67,
80,
1467,
12,
86,
4672,
3536,
8695,
326,
963,
1931,
603,
5518,
358,
2562,
326,
666,
12123,
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,
7029,
67,
80,
1467,
12,
86,
4672,
3536,
8695,
326,
963,
1931,
603,
5518,
358,
2562,
326,
666,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
"""Remove the file from SVN repository and delete it from disk. | """Remove the file from repository and delete it from disk. | def _DeleteBaseline(self, filename): """Remove the file from SVN repository and delete it from disk. | 006400b65b62706eb1a8c27d3fdfcf31ec960b68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/006400b65b62706eb1a8c27d3fdfcf31ec960b68/rebaseline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2613,
16635,
12,
2890,
16,
1544,
4672,
3536,
3288,
326,
585,
628,
29537,
50,
3352,
471,
1430,
518,
628,
4234,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2613,
16635,
12,
2890,
16,
1544,
4672,
3536,
3288,
326,
585,
628,
29537,
50,
3352,
471,
1430,
518,
628,
4234,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
"""Determine whether the user has permission to edit this item. Base behaviour is to check the user can edit this class. If we're editing the "user" class, users are allowed to edit their own details. Unless it's the "roles" property, which requires the special Permission "Web Roles". """ if self.classname == 'user': if props.has_key('roles') and not self.hasPermission('Web Roles'): raise exceptions.Unauthorised, self._( "You do not have permission to edit user roles") if self.isEditingSelf(): return 1 | """Determine whether the user has permission to edit this item.""" | def editItemPermission(self, props, classname=_cn_marker, itemid=None): """Determine whether the user has permission to edit this item. | e4bbfc8364f8d98d89e32237d78d5c001690c749 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1906/e4bbfc8364f8d98d89e32237d78d5c001690c749/actions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
1180,
5041,
12,
2890,
16,
3458,
16,
7479,
33,
67,
10305,
67,
11145,
16,
16862,
33,
7036,
4672,
3536,
8519,
2856,
326,
729,
711,
4132,
358,
3874,
333,
761,
18,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
1180,
5041,
12,
2890,
16,
3458,
16,
7479,
33,
67,
10305,
67,
11145,
16,
16862,
33,
7036,
4672,
3536,
8519,
2856,
326,
729,
711,
4132,
358,
3874,
333,
761,
18,
2,
-100,
-100,
-100... |
doLast.extend((str(part), _formatHeaders(msg.getHeaders(True)))) | response.extend((str(part), _formatHeaders(msg.getHeaders(True)))) | def _sendMessageFetchResponse(self, msgId, msg, query, uid): seenUID = False response = [] doLast = [] for part in query: if part.type == 'envelope': response.extend(('ENVELOPE', getEnvelope(msg))) elif part.type == 'flags': response.extend(('FLAGS', msg.getFlags())) elif part.type == 'internaldate': response.extend(('INTERNALDATE', msg.getInternalDate())) elif part.type == 'rfc822header': hdrs = _formatHeaders(msg.getHeaders(True)) doLast.extend(('RFC822.HEADER', hdrs)) elif part.type == 'rfc822text': doLast.extend(('RFC822.TEXT', msg.getBodyFile())) elif part.type == 'rfc822size': response.extend(('RFC822.SIZE', str(msg.getSize()))) elif part.type == 'rfc822': hdrs = _formatHeaders(msg.getHeaders(True)) body = msg.getBodyFile().read() doLast.extend(('RFC822', hdrs + '\r\n' + body)) elif part.type == 'uid': seenUID = True response.extend(('UID', str(msg.getUID()))) elif part.type == 'bodystructure': response.extend(('BODYSTRUCTURE', getBodyStructure(msg, True))) elif part.type == 'body': subMsg = msg for p in part.part or (): subMsg = subMsg.getSubPart(p) if part.header: if not part.header.fields: doLast.extend((str(part), _formatHeaders(msg.getHeaders(True)))) else: hdrs = subMsg.getHeaders(part.header.negate, *part.header.fields) doLast.extend((str(part), _formatHeaders(hdrs, part.header.fields))) elif part.text: doLast.extend((str(part), subMsg.getBodyFile())) elif part.mime: doLast.extend((str(part), _formatHeaders(msg.getHeaders(True)))) elif part.empty: doLast.extend((str(part), _formatHeaders(msg.getHeaders(True)) + '\r\n' + subMsg.getBodyFile().read())) else: # Simplified bodystructure request response.extend(('BODY', getBodyStructure(msg, False))) | 91f4292b4c9a7bb539c860f586f691c41e2a3363 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/91f4292b4c9a7bb539c860f586f691c41e2a3363/imap4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4661,
1079,
5005,
1064,
12,
2890,
16,
1234,
548,
16,
1234,
16,
843,
16,
4555,
4672,
5881,
3060,
273,
1083,
766,
273,
5378,
741,
3024,
273,
5378,
364,
1087,
316,
843,
30,
309,
1087... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4661,
1079,
5005,
1064,
12,
2890,
16,
1234,
548,
16,
1234,
16,
843,
16,
4555,
4672,
5881,
3060,
273,
1083,
766,
273,
5378,
741,
3024,
273,
5378,
364,
1087,
316,
843,
30,
309,
1087... |
_fl_add_box = cfuncproto(so_libforms, "fl_add_box", | _fl_add_box = cfuncproto(so_libforms, "fl_add_box", | def fl_create_box(type, x, y, w, h, label): """ fl_create_box(type, x, y, w, h, label) -> object """ retval = _fl_create_box(type, x, y, w, h, label) return retval | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
2640,
67,
2147,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
2147,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
2640,
67,
2147,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
4672,
3536,
1183,
67,
2640,
67,
2147,
12,
723,
16,
619,
16,
677,
16,
341,
16,
366,
16,
1433,
13,
... |
resp.content_type = 'image/png' | eq_(resp.content_type, 'image/png') | def test_get_map_png(self): resp = self.app.get(self.common_map_req) resp.content_type = 'image/png' data = StringIO(resp.body) assert is_png(data) assert Image.open(data).mode == 'RGB' | 3be7b2c342952952c389ace60c678d42073b4715 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11249/3be7b2c342952952c389ace60c678d42073b4715/test_wms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
1458,
67,
6446,
12,
2890,
4672,
1718,
273,
365,
18,
2910,
18,
588,
12,
2890,
18,
6054,
67,
1458,
67,
3658,
13,
7555,
67,
12,
12243,
18,
1745,
67,
723,
16,
296,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
1458,
67,
6446,
12,
2890,
4672,
1718,
273,
365,
18,
2910,
18,
588,
12,
2890,
18,
6054,
67,
1458,
67,
3658,
13,
7555,
67,
12,
12243,
18,
1745,
67,
723,
16,
296,
2... |
1 + (a + 1)*x/2 - ((a^2 + 2*a + 1)*x^2/8) + (3*a^3 + 9*a^2 + 9*a - 1)*x^3/48 | 1 + (a + 1)*x/2 - (a^2 + 2*a + 1)*x^2/8 + (3*a^3 + 9*a^2 + 9*a - 1)*x^3/48 | def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$. | b3ba17c1357de84983fbf0c3d95f1ba232a95810 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b3ba17c1357de84983fbf0c3d95f1ba232a95810/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
2890,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
331,
6740,
326,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
2890,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
331,
6740,
326,
16... |
for eachfile in os.listdir( install_file_path ): filename = eachfile eachfile = os.path.abspath(os.path.join(install_file_path, eachfile) ) found = False for item in SrcPkgDict.keys(): if filename in SrcPkgDict[item]: found = True break if found is True: shutil.copy2(eachfile, Str_InstallSrcPath) log.msg("Installed src package file %s to %s.\n" % (filename, Str_InstallSrcPath) ) continue magic_check_and_uncompress( eachfile, filename ) | DirInstallPackages(install_file_path) | def magic_check_and_uncompress( archive_file=None, filename=None): retval = False if AptOfflineMagicLib.file( archive_file ) == "application/x-bzip2" or \ AptOfflineMagicLib.file( archive_file ) == "application/x-gzip": temp_filename = os.path.join(apt_update_target_path, filename + app_name) filename = os.path.join(apt_update_target_path, filename) if AptOfflineMagicLib.file( archive_file ) == "application/x-bzip2": retval = archive.decompress_the_file( archive_file, temp_filename, "bzip2" ) elif AptOfflineMagicLib.file( archive_file ) == "application/x-gzip": retval = archive.decompress_the_file( archive_file, temp_filename, "gzip" ) else: retval = False if retval is True: os.rename(temp_filename, filename) else: os.unlink(temp_filename) elif AptOfflineMagicLib.file( archive_file ) == "application/zip": retval = archive.decompress_the_file( os.path.join( install_file_path, eachfile ), apt_update_target_path, eachfile, "zip" ) elif AptOfflineMagicLib.file( archive_file ) == "PGP armored data": filename = os.path.join(apt_update_target_path, filename) shutil.copy2(archive_file, filename) # PGP armored data should be bypassed log.verbose("File is %s, hence 'True'.\n" % (filename) ) retval = True elif AptOfflineMagicLib.file( archive_file ) == "application/x-dpkg": filename = os.path.join(apt_package_target_path, filename) if os.access( apt_package_target_path, os.W_OK ): shutil.copy2( archive_file, filename ) log.msg("%s file synced.\n" % (filename) ) retval = True else: log.err( "Cannot write to target path %s\n" % ( apt_package_target_path ) ) sys.exit( 1 ) elif filename.endswith( apt_bug_file_format ): pass elif AptOfflineMagicLib.file( archive_file ) == "ASCII text": filename = os.path.join(apt_update_target_path, filename) if os.access( apt_update_target_path, os.W_OK ): shutil.copy( archive_file, filename ) retval = True else: log.err( "Cannot write to target path %s\n" % ( apt_update_target_path ) ) sys.exit( 1 ) else: log.err( "I couldn't understand file type %s.\n" % ( filename ) ) if retval: log.verbose( "%s file synced to %s.\n" % ( filename, apt_update_target_path ) ) | 0179ba71754027977fc94f1b2ef9528620fbc757 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12499/0179ba71754027977fc94f1b2ef9528620fbc757/AptOfflineCoreLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8146,
67,
1893,
67,
464,
67,
551,
362,
1028,
12,
5052,
67,
768,
33,
7036,
16,
1544,
33,
7036,
4672,
5221,
273,
1083,
309,
432,
337,
23106,
19289,
5664,
18,
768,
12,
5052,
67,
768,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8146,
67,
1893,
67,
464,
67,
551,
362,
1028,
12,
5052,
67,
768,
33,
7036,
16,
1544,
33,
7036,
4672,
5221,
273,
1083,
309,
432,
337,
23106,
19289,
5664,
18,
768,
12,
5052,
67,
768,
26... |
line[i], [], operator='=') | line[i], [], operator='=', context=context) | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(config.get('csv_internal_sep')): if '.' in word: module, xml_id = word.rsplit('.', 1) else: module, xml_id = current_module, word id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2 = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id = [(6, 0, res_id)] else: if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field) == len(prefix)+1) and \ len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field) == len(prefix)+1) and \ (prefix == field[0:len(prefix)]): if field[len(prefix)] == "id": # XML ID db_id = False is_xml_id = data_id = line[i] d = data_id.split('.') module = len(d)>1 and d[0] or '' name = len(d)>1 and d[1] or d[0] data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('name','=',name)]) if len(data_ids): d = ir_model_data_obj.read(cr, uid, data_ids, ['res_id'])[0] db_id = d['res_id'] if is_db_id and not db_id: data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('res_id','=',is_db_id)]) if not len(data_ids): ir_model_data_obj.create(cr, uid, {'module':module, 'model':model_name, 'name':name, 'res_id':is_db_id}) db_id = is_db_id if is_db_id and int(db_id) != int(is_db_id): warning += ("Id is not the same than existing one: " + str(is_db_id) + " !\n") logger.notifyChannel("import", netsvc.LOG_ERROR, "Id is not the same than existing one: " + str(is_db_id) + ' !\n') continue | c309ce273fbb7eb47884ecfe66b5bbadbf6d9cc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/c309ce273fbb7eb47884ecfe66b5bbadbf6d9cc9/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
783,
67,
2978,
16,
938,
67,
529,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
420... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
80,
6336,
12,
2890,
16,
5386,
16,
1633,
16,
783,
67,
2978,
16,
938,
67,
529,
16,
1466,
67,
536,
16,
1754,
33,
20,
4672,
980,
273,
5386,
63,
3276,
65,
1027,
273,
2618,
420... |
md['synopsis'] = utils.matchRegexp(line, '<br> (?P<synopsis>.*?)<br/>')['synopsis'] | md['synopsis'] = utils.matchRegexp(line, '<br> (?P<synopsis>.*?)</td>')['synopsis'] | def getAllEpisodes(self, serieName, serieUrl = None): if not serieUrl: serieUrl = self.getSerieUrl(serieName) epsUrl = serieUrl + 'episodes' epsHtml = urlopen(epsUrl).read() #epsHtml = open('/tmp/episodes.html').read() | 6b6cbc3f93f05994e6d82c6c011ca4c7b368a13b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11141/6b6cbc3f93f05994e6d82c6c011ca4c7b368a13b/IMDBSerieMetadataFinder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
18918,
27134,
12,
2890,
16,
24295,
461,
16,
24295,
1489,
273,
599,
4672,
309,
486,
24295,
1489,
30,
24295,
1489,
273,
365,
18,
588,
827,
1385,
1489,
12,
550,
1385,
461,
13,
7785,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5514,
18918,
27134,
12,
2890,
16,
24295,
461,
16,
24295,
1489,
273,
599,
4672,
309,
486,
24295,
1489,
30,
24295,
1489,
273,
365,
18,
588,
827,
1385,
1489,
12,
550,
1385,
461,
13,
7785,
... |
global after_insert_called after_insert_called += 1 | record_event('after_insert_called') | def post_insert(self): global after_insert_called after_insert_called += 1 | a86386040cf0d103d8140304c5281f7ee220a218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11921/a86386040cf0d103d8140304c5281f7ee220a218/test_events.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1603,
67,
6387,
12,
2890,
4672,
2552,
1839,
67,
6387,
67,
11777,
1839,
67,
6387,
67,
11777,
1011,
404,
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,
1603,
67,
6387,
12,
2890,
4672,
2552,
1839,
67,
6387,
67,
11777,
1839,
67,
6387,
67,
11777,
1011,
404,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.undo() | QtGui.QTextEdit.undo(self) | def undo(self): self.undo() #qt | b6e02e061642680ffbebea0eb6f0129fceea862e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3177/b6e02e061642680ffbebea0eb6f0129fceea862e/guibuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15436,
12,
2890,
4672,
23425,
18,
53,
1528,
4666,
18,
31226,
12,
2890,
13,
29159,
468,
23311,
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,
... | [
1,
1,
1,
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,
15436,
12,
2890,
4672,
23425,
18,
53,
1528,
4666,
18,
31226,
12,
2890,
13,
29159,
468,
23311,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise TraversalError("++%s++%s" % (ns, name)) | raise TraversalError(object, "++%s++%s" % (ns, name)) | ... def traverse(self, name, remaining): | 5439095d8bf6e7ecbce09e7932b2b262ea372312 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9824/5439095d8bf6e7ecbce09e7932b2b262ea372312/namespace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
10080,
12,
2890,
16,
508,
16,
4463,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
10080,
12,
2890,
16,
508,
16,
4463,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.ui.warn("update failed to remove %s: %s!\n" % (f, inst)) | if inst.errno != errno.ENOENT: self.ui.warn("update failed to remove %s: %s!\n" % (f, inst.strerror)) | def update(self, node, allow=False, force=False, choose=None, moddirstate=True): pl = self.dirstate.parents() if not force and pl[1] != nullid: self.ui.warn("aborting: outstanding uncommitted merges\n") return 1 | 2b505330c34f851209c9436c24d097e5f670bf44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/2b505330c34f851209c9436c24d097e5f670bf44/localrepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
756,
16,
1699,
33,
8381,
16,
2944,
33,
8381,
16,
9876,
33,
7036,
16,
681,
72,
920,
340,
33,
5510,
4672,
886,
273,
365,
18,
72,
920,
340,
18,
12606,
1435,
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,
1089,
12,
2890,
16,
756,
16,
1699,
33,
8381,
16,
2944,
33,
8381,
16,
9876,
33,
7036,
16,
681,
72,
920,
340,
33,
5510,
4672,
886,
273,
365,
18,
72,
920,
340,
18,
12606,
1435,
309,
4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.