rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
src = _get_source_filename() if not os.path.exists(src): if test_support.verbose: print ('test_build_ext: Cannot find source code (test' ' must run in python build dir)') return unittest.TestSuite() else: return unittest.makeSuite(BuildExtTestCase) | return unittest.makeSuite(BuildExtTestCase) | def test_suite(): src = _get_source_filename() if not os.path.exists(src): if test_support.verbose: print ('test_build_ext: Cannot find source code (test' ' must run in python build dir)') return unittest.TestSuite() else: return unittest.makeSuite(BuildExtTestCase) | 5501e6a7da371a851478a939d974ecebbc84e2dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/5501e6a7da371a851478a939d974ecebbc84e2dd/test_build_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
30676,
13332,
327,
2836,
3813,
18,
6540,
13587,
12,
3116,
2482,
4709,
2449,
13,
225,
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,
1842,
67,
30676,
13332,
327,
2836,
3813,
18,
6540,
13587,
12,
3116,
2482,
4709,
2449,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
(self.second - int (self.second)) * 1000000.) | int ((self.second - int (self.second)) * 1000000.)) | def pretty(self, format='%d %B %Y'): ''' print up the date date using a pretty format... | 64b7c463f502e4f4b9bdf089bff81154182c60b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/64b7c463f502e4f4b9bdf089bff81154182c60b2/date.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7517,
12,
2890,
16,
740,
28713,
72,
738,
38,
738,
61,
11,
4672,
9163,
1172,
731,
326,
1509,
1509,
1450,
279,
7517,
740,
2777,
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,
7517,
12,
2890,
16,
740,
28713,
72,
738,
38,
738,
61,
11,
4672,
9163,
1172,
731,
326,
1509,
1509,
1450,
279,
7517,
740,
2777,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.pdbg("parse_ver new buffer = %s" % self.buffer) | if Opt.ParseDBG: self.pdbg("parse_ver new buffer = %s" % self.buffer) | def parse_ver(self): self.parse_dbg_indent += " " match = re_ver_fun.match(self.buffer) if match: p = match.span(0)[1] self.buffer = self.buffer[p:] self.pdbg("parse_ver new buffer = %s" % self.buffer) op = match.group(1) if op not in version_operators: self.parse_error(_["Invalid [VER] operator"]) return(None, None) orig_ver = match.group(2) ver = format_version(orig_ver) plugin_name = match.group(3) expanded = self.expand_filename(plugin_name) expr = "[VER %s %s %s]" % (op, orig_ver, plugin_name) self.pdbg("parse_ver, expr=%s ver=%s" % (expr, ver)) if len(expanded) == 1: expr = "[VER %s %s %s]" % (op, orig_ver, expanded[0]) elif expanded == []: self.pdbg("parse_ver [VER] \"%s\" not active" % plugin_name) self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(False, expr) # file does not exist if self.datadir == None: # this case is reached when doing fromfile checks # and we do not have the actual plugin to check, so # we assume that the plugin matches the given version if op == '=': self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(True, expr) else: self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(False, expr) for xp in expanded: plugin = C.cname(xp) plugin_t = C.truename(plugin) desc = plugin_description(self.datadir.find_path(plugin)) match = re_header_version.search(desc) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) self.pdbg("parse_ver (header) version(%s) = %s (%s)" % (plugin_t, p_ver_orig, p_ver)) else: match = re_filename_version.search(plugin) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) self.pdbg("parse_ver (filename) version(%s) = %s (%s)" % (plugin_t, p_ver_orig, p_ver)) else: self.pdbg("parse_ver no version for %s" % plugin_t) return(False, expr) self.pdbg("parse_ver compare p_ver=%s %s ver=%s" % (p_ver, op, ver)) result = True if op == '=': result = (p_ver == ver) elif op == '<': result = (p_ver < ver) elif op == '>': result = (p_ver > ver) if result: self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(True, "[VER %s %s %s]" % (op, orig_ver, plugin)) self.parse_dbg_indent = self.parse_dbg_indent[:-2] return(False, expr) self.parse_dbg_indent = self.parse_dbg_indent[:-2] self.parse_error(_["Invalid [VER] function"]) return(None, None) | 0c9007da0c07e550781c18146d5a05ade578dced /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2827/0c9007da0c07e550781c18146d5a05ade578dced/mlox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
502,
12,
2890,
4672,
365,
18,
2670,
67,
1966,
75,
67,
9355,
1011,
315,
225,
315,
845,
273,
283,
67,
502,
67,
12125,
18,
1916,
12,
2890,
18,
4106,
13,
309,
845,
30,
293,
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,
1109,
67,
502,
12,
2890,
4672,
365,
18,
2670,
67,
1966,
75,
67,
9355,
1011,
315,
225,
315,
845,
273,
283,
67,
502,
67,
12125,
18,
1916,
12,
2890,
18,
4106,
13,
309,
845,
30,
293,
2... |
ans2 = ans2._fix(context=context) | ans2 = ans2._fix(context) | def _divide(self, other, divmod = 0, context=None): """Return a / b, to context.prec precision. | dab988dd23e6328dadfe8408cd96abf4b017380d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dab988dd23e6328dadfe8408cd96abf4b017380d/decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2892,
831,
12,
2890,
16,
1308,
16,
26105,
273,
374,
16,
819,
33,
7036,
4672,
3536,
990,
279,
342,
324,
16,
358,
819,
18,
4036,
6039,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2892,
831,
12,
2890,
16,
1308,
16,
26105,
273,
374,
16,
819,
33,
7036,
4672,
3536,
990,
279,
342,
324,
16,
358,
819,
18,
4036,
6039,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
decoded = Header.make_header(Header.decode_header(header)) unicodeStr = decoded.__unicode__() return constants.EMPTY.join(unicodeStr.splitlines()) | h = Header.decode_header(header) buf = [b[0].decode(b[1] or 'ascii') for b in h] return u''.join(buf) | def decodeHeader(header, charset=constants.DEFAULT_CHARSET): try: decoded = Header.make_header(Header.decode_header(header)) unicodeStr = decoded.__unicode__() return constants.EMPTY.join(unicodeStr.splitlines()) except(UnicodeError, UnicodeDecodeError, LookupError): return unicode("".join(header.splitlines()), charset, 'ignore') | d1308d63c0ec86bebd6cae4a870956b932fbf6e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d1308d63c0ec86bebd6cae4a870956b932fbf6e4/message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
1864,
12,
3374,
16,
4856,
33,
13358,
18,
5280,
67,
26977,
4672,
775,
30,
366,
273,
4304,
18,
3922,
67,
3374,
12,
3374,
13,
1681,
273,
306,
70,
63,
20,
8009,
3922,
12,
70,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
1864,
12,
3374,
16,
4856,
33,
13358,
18,
5280,
67,
26977,
4672,
775,
30,
366,
273,
4304,
18,
3922,
67,
3374,
12,
3374,
13,
1681,
273,
306,
70,
63,
20,
8009,
3922,
12,
70,
63,
... |
return UnauthorizedLogin() | return failure.Failure(UnauthorizedLogin()) | def _ebRequestAvatarId(self, f): if not f.check(UnauthorizedLogin, error.ValidPublicKey): log.msg(f) return UnauthorizedLogin() return f | 8a8c46ed016a99ea8ab07e27588355cb81a117eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/8a8c46ed016a99ea8ab07e27588355cb81a117eb/checkers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
24008,
691,
23999,
548,
12,
2890,
16,
284,
4672,
309,
486,
284,
18,
1893,
12,
13981,
5358,
16,
555,
18,
1556,
9632,
4672,
613,
18,
3576,
12,
74,
13,
327,
5166,
18,
5247,
12,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
24008,
691,
23999,
548,
12,
2890,
16,
284,
4672,
309,
486,
284,
18,
1893,
12,
13981,
5358,
16,
555,
18,
1556,
9632,
4672,
613,
18,
3576,
12,
74,
13,
327,
5166,
18,
5247,
12,
139... |
if encoding: import codecs textFile = codecs.open(filename, 'r') else: textFile = open(filename, 'r') | textFile = open(filename, 'r', encoding=encoding) | def view_file(parent, title, filename, encoding=None): try: if encoding: import codecs textFile = codecs.open(filename, 'r') else: textFile = open(filename, 'r') except IOError: import tkinter.messagebox as tkMessageBox tkMessageBox.showerror(title='File Load Error', message='Unable to load file %r .' % filename, parent=parent) else: return view_text(parent, title, textFile.read()) | 1ac036d7dda9d3f7a7272a0c28dde58fc31a20df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/1ac036d7dda9d3f7a7272a0c28dde58fc31a20df/textView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
67,
768,
12,
2938,
16,
2077,
16,
1544,
16,
2688,
33,
7036,
4672,
775,
30,
977,
812,
273,
1696,
12,
3459,
16,
296,
86,
2187,
2688,
33,
5999,
13,
1335,
8340,
30,
1930,
13030,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1476,
67,
768,
12,
2938,
16,
2077,
16,
1544,
16,
2688,
33,
7036,
4672,
775,
30,
977,
812,
273,
1696,
12,
3459,
16,
296,
86,
2187,
2688,
33,
5999,
13,
1335,
8340,
30,
1930,
13030,
276... |
def __init__(self, *args): apply(URLopener.__init__, (self,) + args) | def __init__(self, *args, **kwargs): apply(URLopener.__init__, (self,) + args, kwargs) | def __init__(self, *args): apply(URLopener.__init__, (self,) + args) self.auth_cache = {} self.tries = 0 self.maxtries = 10 | a4dffd73780fd854f242bb6678fc8fc6ddd29dc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a4dffd73780fd854f242bb6678fc8fc6ddd29dc8/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2230,
12,
1785,
25098,
16186,
2738,
972,
16,
261,
2890,
16,
13,
397,
833,
16,
1205,
13,
365,
18,
1944,
67,
2493,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
2230,
12,
1785,
25098,
16186,
2738,
972,
16,
261,
2890,
16,
13,
397,
833,
16,
1205,
13,
365,
18,
1944,
67,
2493,
273,
... |
to_delete = filter(lambda x: x[0] == 'N', __tree_status(tree_id = tree_id)) | to_delete = filter(lambda x: x[0] in ['N', 'A'], __tree_status(tree_id = tree_id)) | def switch(tree_id): """Switch the tree to the given id """ to_delete = filter(lambda x: x[0] == 'N', __tree_status(tree_id = tree_id)) if __run('git-read-tree -m', [tree_id]) != 0: raise GitException, 'Failed git-read-tree -m %s' % tree_id checkout(force = True) __set_head(tree_id) # checkout doesn't remove files for fs in to_delete: os.remove(fs[1]) | c4a1503ac1528832b286cf9c1a2a97409b07eb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/c4a1503ac1528832b286cf9c1a2a97409b07eb54/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1620,
12,
3413,
67,
350,
4672,
3536,
10200,
326,
2151,
358,
326,
864,
612,
3536,
358,
67,
3733,
273,
1034,
12,
14661,
619,
30,
619,
63,
20,
65,
316,
10228,
50,
2187,
296,
37,
17337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1620,
12,
3413,
67,
350,
4672,
3536,
10200,
326,
2151,
358,
326,
864,
612,
3536,
358,
67,
3733,
273,
1034,
12,
14661,
619,
30,
619,
63,
20,
65,
316,
10228,
50,
2187,
296,
37,
17337,
... |
if not self._ready: raise Errors.MMListNotReadyError | if not self._ready: raise Errors.MMListNotReadyError | def IsListInitialized(self): | d4117e2559487604b13fa55121d903681fad00c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d4117e2559487604b13fa55121d903681fad00c3/MailList.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2585,
682,
11459,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2585,
682,
11459,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.x = q.get() if self.x is None: | x = q.get() if x is None: | def worker(self, q): while True: self.x = q.get() if self.x is None: q.task_done() return self.cumlock.acquire() try: self.cum += self.x finally: self.cumlock.release() q.task_done() | c77753a29baaead5e4eb52798792f640cb85dee3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/c77753a29baaead5e4eb52798792f640cb85dee3/test_queue.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4322,
12,
2890,
16,
1043,
4672,
1323,
1053,
30,
619,
273,
1043,
18,
588,
1435,
309,
619,
353,
599,
30,
1043,
18,
4146,
67,
8734,
1435,
327,
365,
18,
28538,
739,
18,
1077,
1039,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4322,
12,
2890,
16,
1043,
4672,
1323,
1053,
30,
619,
273,
1043,
18,
588,
1435,
309,
619,
353,
599,
30,
1043,
18,
4146,
67,
8734,
1435,
327,
365,
18,
28538,
739,
18,
1077,
1039,
1435,
... |
log.error('Failed to get ' + str(fileId) + ' owner : ' + str(e)) raise monitors.OmeroFSError('Failed to get ' + str(fileId) + ' owner : ' + str(e)) | log.error('Failed to get ' + str(fileId) + ' owner : ' + str(e)) raise monitors.OmeroFSError('Failed to get ' + str(fileId) + ' owner : ' + str(e)) | def getOwner(self, fileId, current=None): """ Return the owner of the file. :Parameters: fileId : string A string uniquely identifying a file on this Monitor. current An ICE context, this parameter is required to be present in an ICE interface method. :return: owner :rtype: string """ try: pathString = self._getPathString(fileId) except Exception, e: log.error('File ID ' + str(fileId) + ' not on this FSServer') raise monitors.OmeroFSError('File ID ' + str(fileId) + ' not on this FSServer') | c12bc7fb04f687c05f37bb5a6eba2577b9556cda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/c12bc7fb04f687c05f37bb5a6eba2577b9556cda/MonitorServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13782,
12,
2890,
16,
21223,
16,
783,
33,
7036,
4672,
3536,
2000,
326,
3410,
434,
326,
585,
18,
225,
294,
2402,
30,
21223,
294,
533,
432,
533,
30059,
29134,
279,
585,
603,
333,
14086,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13782,
12,
2890,
16,
21223,
16,
783,
33,
7036,
4672,
3536,
2000,
326,
3410,
434,
326,
585,
18,
225,
294,
2402,
30,
21223,
294,
533,
432,
533,
30059,
29134,
279,
585,
603,
333,
14086,
1... |
el = etree.SubElement(self.current_element, tag) | el = SubElement(self.current_element, tag) | def append_child(self, tag, attrib=None): if attrib is None: el = etree.SubElement(self.current_element, tag) else: el = etree.SubElement(self.current_element, tag, attrib) return el | 277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
3624,
12,
2890,
16,
1047,
16,
5885,
33,
7036,
4672,
309,
5885,
353,
599,
30,
415,
273,
5479,
12,
2890,
18,
2972,
67,
2956,
16,
1047,
13,
469,
30,
415,
273,
12031,
18,
1676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
714,
67,
3624,
12,
2890,
16,
1047,
16,
5885,
33,
7036,
4672,
309,
5885,
353,
599,
30,
415,
273,
5479,
12,
2890,
18,
2972,
67,
2956,
16,
1047,
13,
469,
30,
415,
273,
12031,
18,
1676,
... |
rpm_args.extend(['--define', | rpm_cmd.extend(['--define', | def run (self): | aaa422b673da8feedf207e7bdf51e8f27a26e54a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/aaa422b673da8feedf207e7bdf51e8f27a26e54a/bdist_rpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return -1 | try: other = self.codomain().ambient_space()(other) except TypeError: return -1 | def __cmp__(self, other): if not isinstance(other, SchemeMorphism_coordinates): return -1 return cmp(self._coords, other._coords) | a715ff4bf50330603cf4c819395b36b69b89efa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/a715ff4bf50330603cf4c819395b36b69b89efa6/morphism.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
309,
486,
1549,
12,
3011,
16,
10714,
30135,
6228,
67,
16941,
4672,
775,
30,
1308,
273,
365,
18,
1559,
1530,
7675,
2536,
1979,
67,
2981,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
1308,
4672,
309,
486,
1549,
12,
3011,
16,
10714,
30135,
6228,
67,
16941,
4672,
775,
30,
1308,
273,
365,
18,
1559,
1530,
7675,
2536,
1979,
67,
2981,
1435,
... |
self.assert_(l.__add__.__self__ is l) self.assert_(l.__add__.__objclass__ is list) | if hasattr(l.__add__, '__self__'): self.assert_(l.__add__.__self__ is l) self.assert_(l.__add__.__objclass__ is list) else: self.assert_(l.__add__.im_self is l) self.assert_(l.__add__.im_class is list) | def test_method_wrapper(self): # Testing method-wrapper objects... # <type 'method-wrapper'> did not support any reflection before 2.5 | 36f4733acef5aa12ca3417779ae3f11e59199f70 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/36f4733acef5aa12ca3417779ae3f11e59199f70/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2039,
67,
8376,
12,
2890,
4672,
468,
7766,
310,
707,
17,
8376,
2184,
2777,
468,
411,
723,
296,
2039,
17,
8376,
29256,
5061,
486,
2865,
1281,
5463,
1865,
576,
18,
25,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2039,
67,
8376,
12,
2890,
4672,
468,
7766,
310,
707,
17,
8376,
2184,
2777,
468,
411,
723,
296,
2039,
17,
8376,
29256,
5061,
486,
2865,
1281,
5463,
1865,
576,
18,
25,
2,
-100,... |
""" Based on NVDAObject but on foreground events, the dialog contents gets read. | """Overrides the description property to obtain dialog text. | def _get_description(self): next=self.next if next and next.name==self.name and next.role==controlTypes.ROLE_GRAPHIC: next=next.next if next and next.role==controlTypes.ROLE_STATICTEXT: nextNext=next.next if nextNext and nextNext.name!=next.name: return next.name return super(Groupbox,self)._get_description() | fd96b3824b38fed3a89dacb52ceeec463648ac99 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/fd96b3824b38fed3a89dacb52ceeec463648ac99/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
3384,
12,
2890,
4672,
1024,
33,
2890,
18,
4285,
309,
1024,
471,
1024,
18,
529,
631,
2890,
18,
529,
471,
1024,
18,
4615,
631,
7098,
2016,
18,
16256,
67,
24372,
2871,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
3384,
12,
2890,
4672,
1024,
33,
2890,
18,
4285,
309,
1024,
471,
1024,
18,
529,
631,
2890,
18,
529,
471,
1024,
18,
4615,
631,
7098,
2016,
18,
16256,
67,
24372,
2871,
30,
... |
else: | changed=1 elif options[i].has_key('help'): | def manage_edit(self, actions=[], helps=[], REQUEST=None): "Change view actions" options=self.data() changed=0 if len(actions)!=len(options): raise 'Bad Request', 'wrong number of actions' | 8cc5fa69428d4423d1da1eccfb017541541e161e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/8cc5fa69428d4423d1da1eccfb017541541e161e/Basic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
4619,
12,
2890,
16,
4209,
22850,
6487,
21814,
22850,
6487,
12492,
33,
7036,
4672,
315,
3043,
1476,
4209,
6,
702,
33,
2890,
18,
892,
1435,
3550,
33,
20,
309,
562,
12,
4905,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
4619,
12,
2890,
16,
4209,
22850,
6487,
21814,
22850,
6487,
12492,
33,
7036,
4672,
315,
3043,
1476,
4209,
6,
702,
33,
2890,
18,
892,
1435,
3550,
33,
20,
309,
562,
12,
4905,
1... |
if hasattr(node, 'documentElement'): self.__node = node.documentElement | if hasattr(self.__node, 'documentElement'): self.__node = self.__node.documentElement | def loadFromURL(self, url): self.__node = DOM.loadFromURL(url) if hasattr(node, 'documentElement'): self.__node = node.documentElement | 8564c5f8d6920fdaaa551fa78649d3219f5865c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/8564c5f8d6920fdaaa551fa78649d3219f5865c3/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24935,
1785,
12,
2890,
16,
880,
4672,
365,
16186,
2159,
273,
4703,
18,
945,
1265,
1785,
12,
718,
13,
309,
3859,
12,
2159,
16,
296,
5457,
1046,
11,
4672,
365,
16186,
2159,
273,
756,
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,
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,
24935,
1785,
12,
2890,
16,
880,
4672,
365,
16186,
2159,
273,
4703,
18,
945,
1265,
1785,
12,
718,
13,
309,
3859,
12,
2159,
16,
296,
5457,
1046,
11,
4672,
365,
16186,
2159,
273,
756,
18,... |
class Game: rename saveHand to nextHand, | def testScoring(): """some simple tests""" testScore = Score(points=3) testScore.unit = 1 assert testScore.doubles == 3 assert testScore.value == 3 | 11f0f5fd4e40f216e597b762b093496788475794 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/11f0f5fd4e40f216e597b762b093496788475794/scoringengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1541,
6053,
13332,
3536,
19068,
4143,
7434,
8395,
1842,
7295,
273,
20671,
12,
4139,
33,
23,
13,
1842,
7295,
18,
4873,
273,
404,
1815,
1842,
7295,
18,
2896,
19314,
422,
890,
1815,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
1541,
6053,
13332,
3536,
19068,
4143,
7434,
8395,
1842,
7295,
273,
20671,
12,
4139,
33,
23,
13,
1842,
7295,
18,
4873,
273,
404,
1815,
1842,
7295,
18,
2896,
19314,
422,
890,
1815,
1... | |
if k.name != s3path: | if not _eq_utf8(k.name,s3path): | def removedir(self,path,recursive=False,force=False): """Remove the directory at the given path.""" s3path = self._s3path(path) if s3path != self._prefix: s3path = s3path + self._separator if force: # If we will be forcibly removing any directory contents, we # might as well get the un-delimited list straight away. ks = self._s3bukt.list(prefix=s3path) else: ks = self._s3bukt.list(prefix=s3path,delimiter=self._separator) # Fail if the directory is not empty, or remove them if forced found = False for k in ks: found = True if k.name != s3path: if not force: raise DirectoryNotEmptyError(path) self._s3bukt.delete_key(k.name) if not found: if self.isfile(path): raise ResourceInvalidError(path,msg="removedir() called on a regular file: %(path)s") if path not in ("","/"): raise ResourceNotFoundError(path) self._s3bukt.delete_key(s3path) if recursive and path not in ("","/"): pdir = dirname(path) try: self.removedir(pdir,recursive=True,force=False) except DirectoryNotEmptyError: pass | bd920d62379684e707fa3fd2963bb6123de89e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5578/bd920d62379684e707fa3fd2963bb6123de89e32/s3fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3723,
481,
12,
2890,
16,
803,
16,
10543,
33,
8381,
16,
5734,
33,
8381,
4672,
3536,
3288,
326,
1867,
622,
326,
864,
589,
12123,
272,
23,
803,
273,
365,
6315,
87,
23,
803,
12,
803,
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,
3723,
481,
12,
2890,
16,
803,
16,
10543,
33,
8381,
16,
5734,
33,
8381,
4672,
3536,
3288,
326,
1867,
622,
326,
864,
589,
12123,
272,
23,
803,
273,
365,
6315,
87,
23,
803,
12,
803,
13,... |
def get_value(obj,index=0,descr=None,axis="y",pap=0): | def get_value(obj, index=0, descr=None, axis="y", pap=0): | def get_value(obj,index=0,descr=None,axis="y",pap=0): """ This function takes an arbitrary object and returns the value for the given index. If the object is not a collection the index is ignored. Parameters: ---------- -> obj is a SOM, SO or tuple -> index is a possible index for use in a SOM -> descr (OPTIONAL) is the object descriptor, default is None -> axis (OPTIONAL) is the axis to grab the value from -> pap (OPTIONAL) is the primary axis position. This is used to pull the value from the correct primary axis position. Returns: ------- <- The appropriate object containing the value Exceptions: ---------- <- TypeError is raised if obj is not a recognized type """ if descr == None: obj_type = get_type(obj) else: obj_type = descr if (obj_type == SOM_type): return get_value(obj[index],index,"SO",axis,pap) elif (obj_type == SO_type): if axis.lower() == "y": return obj.y elif axis.lower() == "x": return obj.axis[pap].val elif axis.lower() == "all": return obj elif (obj_type == list_type): return get_value(obj[index],index,"number",axis,pap) elif (obj_type == num_type): if axis.lower() == "all": return obj else: return obj[0] else: raise TypeError, "Object type not recognized by get_value function." | 1a7152ef8214e57cb269e9232349874b9d88a4cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/1a7152ef8214e57cb269e9232349874b9d88a4cc/hlr_data_helper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1132,
12,
2603,
16,
770,
33,
20,
16,
18426,
33,
7036,
16,
2654,
1546,
93,
3113,
293,
438,
33,
20,
4672,
3536,
1220,
445,
5530,
392,
11078,
733,
471,
1135,
326,
460,
364,
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,
336,
67,
1132,
12,
2603,
16,
770,
33,
20,
16,
18426,
33,
7036,
16,
2654,
1546,
93,
3113,
293,
438,
33,
20,
4672,
3536,
1220,
445,
5530,
392,
11078,
733,
471,
1135,
326,
460,
364,
326... |
req.add_header(self.auth_header, auth_val) | req.add_unredirected_header(self.auth_header, auth_val) | def retry_http_digest_auth(self, req, auth): token, challenge = auth.split(' ', 1) chal = parse_keqv_list(parse_http_list(challenge)) auth = self.get_authorization(req, chal) if auth: auth_val = 'Digest %s' % auth if req.headers.get(self.auth_header, None) == auth_val: return None req.add_header(self.auth_header, auth_val) resp = self.parent.open(req) return resp | 80ae095c93b2d2b561f2f98412772c3210ff94c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/80ae095c93b2d2b561f2f98412772c3210ff94c9/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3300,
67,
2505,
67,
10171,
67,
1944,
12,
2890,
16,
1111,
16,
1357,
4672,
1147,
16,
12948,
273,
1357,
18,
4939,
2668,
2265,
404,
13,
462,
287,
273,
1109,
67,
4491,
85,
90,
67,
1098,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3300,
67,
2505,
67,
10171,
67,
1944,
12,
2890,
16,
1111,
16,
1357,
4672,
1147,
16,
12948,
273,
1357,
18,
4939,
2668,
2265,
404,
13,
462,
287,
273,
1109,
67,
4491,
85,
90,
67,
1098,
1... |
return self.__pari_polynomial | if (self.__pari_polynomial_var == name): return self.__pari_polynomial else: self.__pari_polynomial = self.__pari_polynomial(name) self.__pari_polynomial_var = name return self.__pari_polynomial | def pari_polynomial(self): """ PARI polynomial corresponding to polynomial that defines this field. This is always a polynomial in the variable "x". | 9442d57acf07f733ebfd00664d0018d15a157474 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9442d57acf07f733ebfd00664d0018d15a157474/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
779,
77,
67,
3915,
13602,
12,
2890,
4672,
3536,
3939,
45,
16991,
4656,
358,
16991,
716,
11164,
333,
652,
18,
282,
1220,
353,
3712,
279,
16991,
316,
326,
2190,
315,
92,
9654,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
779,
77,
67,
3915,
13602,
12,
2890,
4672,
3536,
3939,
45,
16991,
4656,
358,
16991,
716,
11164,
333,
652,
18,
282,
1220,
353,
3712,
279,
16991,
316,
326,
2190,
315,
92,
9654,
2,
-100,
-... |
" %s %s = GetImmediateDataAs<%s>(c);\n" % (self.type, self.name, self.type)) | " %s %s = GetImmediateDataAs<%s>(\n" % (self.type, self.name, self.type)) file.Write(" c, data_size, immediate_data_size);\n") | def WriteGetCode(self, file): """Overridden from Argument.""" file.Write( " %s %s = GetImmediateDataAs<%s>(c);\n" % (self.type, self.name, self.type)) | f542468aabd3f9a507d2438f7a635134fd3dca43 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/f542468aabd3f9a507d2438f7a635134fd3dca43/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
967,
1085,
12,
2890,
16,
585,
4672,
3536,
22042,
2794,
628,
5067,
12123,
585,
18,
3067,
12,
315,
225,
738,
87,
738,
87,
273,
968,
22651,
751,
1463,
32,
9,
87,
34,
12,
71,
20472... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
967,
1085,
12,
2890,
16,
585,
4672,
3536,
22042,
2794,
628,
5067,
12123,
585,
18,
3067,
12,
315,
225,
738,
87,
738,
87,
273,
968,
22651,
751,
1463,
32,
9,
87,
34,
12,
71,
20472... |
self.scale=scale | self.scale=scale | def __init__(self, scale=1.0): self.scale=scale ## | 00aa60938617c1688f2e30fb16e7d4291654061b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6028/00aa60938617c1688f2e30fb16e7d4291654061b/C2Functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3159,
33,
21,
18,
20,
4672,
365,
18,
5864,
33,
5864,
225,
7541,
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,
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,
1001,
2738,
972,
12,
2890,
16,
3159,
33,
21,
18,
20,
4672,
365,
18,
5864,
33,
5864,
225,
7541,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
subpattern[index] = (MIN_REPEAT, (min, max, item)) | subpattern[-1] = (MIN_REPEAT, (min, max, item)) | def _parse(source, pattern, flags=()): # parse regular expression pattern into an operator list. subpattern = SubPattern(pattern) this = None while 1: if str(source.next) in ("|", ")"): break # end of subpattern this = source.get() if this is None: break # end of pattern if this and this[0] not in SPECIAL_CHARS: subpattern.append((LITERAL, this)) elif this == "[": # character set set = [] | d46b2a42eda94cbac3b610e36d5f97230d629068 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d46b2a42eda94cbac3b610e36d5f97230d629068/sre_parse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
12,
3168,
16,
1936,
16,
2943,
33,
1435,
4672,
225,
468,
1109,
6736,
2652,
1936,
1368,
392,
3726,
666,
18,
225,
720,
4951,
273,
2592,
3234,
12,
4951,
13,
225,
333,
273,
599,
... |
if not self.inline: | if self.inline: | def categories_add(self, cats): if not cats: return | 9464262825bf17d61de96507aa8ef00b00740617 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/9464262825bf17d61de96507aa8ef00b00740617/ShowGraph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6477,
67,
1289,
12,
2890,
16,
27525,
4672,
309,
486,
27525,
30,
327,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6477,
67,
1289,
12,
2890,
16,
27525,
4672,
309,
486,
27525,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for tax in tax_obj.compute(cursor, user, line.taxes, line.unit_price, line.quantity, context=ctx): | for tax in tax_obj.compute( cursor, user, [t.id for t in line.taxes], line.unit_price, line.quantity, context=ctx): | def get_tax_amount(self, cursor, user, ids, name, arg, context=None): currency_obj = self.pool.get('currency.currency') tax_obj = self.pool.get('account.tax') res = {} for purchase in self.browse(cursor, user, ids, context=context): ctx = context.copy() ctx.update(self.get_tax_context(cursor, user, purchase, context=context)) res.setdefault(purchase.id, Decimal('0.0')) for line in purchase.lines: for tax in tax_obj.compute(cursor, user, line.taxes, line.unit_price, line.quantity, context=ctx): res[purchase.id] += tax['amount'] res[purchase.id] = currency_obj.round(cursor, user, purchase.currency, res[purchase.id]) res[purchase.id] = currency_obj.round(cursor, user, purchase.currency, res[purchase.id]) return res | 538ff99e922239f83abb14b8117bf2fb611a1f10 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9276/538ff99e922239f83abb14b8117bf2fb611a1f10/purchase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8066,
67,
8949,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
5462,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
7095,
18,
7095,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8066,
67,
8949,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
5462,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
7095,
18,
7095,
6134,
... |
if not MULTIPANE_GUI: from HistoryWidget import HistoryWidget histfile = make_history_filename() self.history_object = HistoryWidget(vsplitter, filename = histfile, mkdirs = 1) self.history_widget = self.history_object.widget env.history = self.history_object | if not MULTIPANE_GUI: from HistoryWidget import HistoryWidget histfile = make_history_filename() self.history_object = HistoryWidget(vsplitter, filename = histfile, mkdirs = 1) self.history_widget = self.history_object.widget env.history = self.history_object | def __init__(self, parent = None, name = None): | c25263540add024396d4bcf7631292f1fd2d50bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/c25263540add024396d4bcf7631292f1fd2d50bb/MWsemantics.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
273,
599,
16,
508,
273,
599,
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,
... | [
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,
1001,
2738,
972,
12,
2890,
16,
982,
273,
599,
16,
508,
273,
599,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if len(argv) < 4: usage() elif argv[1] == 'createuser': | if argv[1] == 'createuser': | def create_link(name, email): """Create remote auth link""" return sign_link(name, email, int(time())) | c8b4d30ce455b8c65ba690a6f4f4e9f9caea5f31 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13522/c8b4d30ce455b8c65ba690a6f4f4e9f9caea5f31/zendesk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1232,
12,
529,
16,
2699,
4672,
3536,
1684,
2632,
1357,
1692,
8395,
327,
1573,
67,
1232,
12,
529,
16,
2699,
16,
509,
12,
957,
1435,
3719,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
1232,
12,
529,
16,
2699,
4672,
3536,
1684,
2632,
1357,
1692,
8395,
327,
1573,
67,
1232,
12,
529,
16,
2699,
16,
509,
12,
957,
1435,
3719,
282,
2,
-100,
-100,
-100,
-100,
-100,
... |
test_expectations.SKIP) for test in skipped: result_summary.Add(test, [], test_expectations.SKIP) | test_expectations.SKIP) | def PrepareListsAndPrintOutput(self): """Create appropriate subsets of test lists and returns a ResultSummary object. Also prints expected test counts.""" | 93ef176c40555a6f3a3895f745a977efe1b5037b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/93ef176c40555a6f3a3895f745a977efe1b5037b/run_webkit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7730,
7432,
1876,
5108,
1447,
12,
2890,
4672,
3536,
1684,
5505,
30760,
434,
1842,
6035,
471,
1135,
279,
3438,
4733,
733,
18,
8080,
14971,
2665,
1842,
6880,
12123,
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,
0,
0,
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,
7730,
7432,
1876,
5108,
1447,
12,
2890,
4672,
3536,
1684,
5505,
30760,
434,
1842,
6035,
471,
1135,
279,
3438,
4733,
733,
18,
8080,
14971,
2665,
1842,
6880,
12123,
2,
-100,
-100,
-100,
-100... |
d = dias.id_dias(dias) | d = dias.id_dias(dia) | def fetch_horarios(idhor, nome): c = env.db.cursor() idlinha = get_linha_hor(idhor, nome) c.execute('delete from hs, h \ using horsets hs, horarios h \ where hs.idlinha=%s and h.idset=hs.id', [idlinha]) html = horarios.get_horarios_html(idhor) for pto,dias,apartir,horas in horarios.parse_hor_html(html): print 'ponto: %s, dias: %s' % (pto, dias) idponto = get_ponto_hor(pto) d = dias.id_dias(dias) c.insert_one('horsets', idlinha=idlinha, idponto=idponto, dia=d, apartir=apartir) idset = c.lastrowid for sp,h in horas: c.insert_one('horarios', idset=idset, hora=h, special=sp) c.close() | 8f02e80df367ccd3870110c069898969f20924da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14322/8f02e80df367ccd3870110c069898969f20924da/fetch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
76,
280,
297,
7441,
12,
350,
76,
280,
16,
290,
1742,
4672,
276,
273,
1550,
18,
1966,
18,
9216,
1435,
225,
612,
7511,
3395,
273,
336,
67,
7511,
3395,
67,
76,
280,
12,
350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
76,
280,
297,
7441,
12,
350,
76,
280,
16,
290,
1742,
4672,
276,
273,
1550,
18,
1966,
18,
9216,
1435,
225,
612,
7511,
3395,
273,
336,
67,
7511,
3395,
67,
76,
280,
12,
350,
... |
list.append(getConfigListEntry(_("Port B"), config.Nims[nim.slotid].diseqcB)) | list.append(getConfigListEntry(_("Port B"), self.nimConfig.diseqcB)) | def createSimpleSetup(self, nim, list, mode): if mode == 0: #single Sat list.append(getConfigListEntry(_("Satellite"), config.Nims[nim.slotid].diseqcA)) else: # > 1 Sats list.append(getConfigListEntry(_("Port A"), config.Nims[nim.slotid].diseqcA)) | 02c49e642a6bcc65d1cdc443510d9cfefdcfbe93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/02c49e642a6bcc65d1cdc443510d9cfefdcfbe93/Satconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
5784,
7365,
12,
2890,
16,
290,
381,
16,
666,
16,
1965,
4672,
309,
1965,
422,
374,
30,
1082,
202,
7,
7526,
25793,
666,
18,
6923,
12,
588,
809,
27899,
24899,
2932,
15163,
19345,
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,
752,
5784,
7365,
12,
2890,
16,
290,
381,
16,
666,
16,
1965,
4672,
309,
1965,
422,
374,
30,
1082,
202,
7,
7526,
25793,
666,
18,
6923,
12,
588,
809,
27899,
24899,
2932,
15163,
19345,
6,
... |
del self.historyDict[url] | try: del self.historyDict[url] except KeyError: pass | def setLinkAlive(self, url): """ If the link was previously found dead, removes it from the .dat file and returns True, else returns False. """ if self.historyDict.has_key(url): self.semaphore.acquire() del self.historyDict[url] self.semaphore.release() return True else: return False | 090814beb9cb0a615a9ca6c485bc96f1b2b4a1f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/090814beb9cb0a615a9ca6c485bc96f1b2b4a1f8/weblinkchecker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2098,
10608,
12,
2890,
16,
880,
4672,
3536,
971,
326,
1692,
1703,
7243,
1392,
8363,
16,
7157,
518,
628,
326,
263,
3404,
585,
471,
1135,
1053,
16,
469,
1135,
1083,
18,
3536,
309,
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,
444,
2098,
10608,
12,
2890,
16,
880,
4672,
3536,
971,
326,
1692,
1703,
7243,
1392,
8363,
16,
7157,
518,
628,
326,
263,
3404,
585,
471,
1135,
1053,
16,
469,
1135,
1083,
18,
3536,
309,
3... |
logging.debug("%s failed:\n%s" % (path_utils.RelativeTestFilename(filename), error_str)) | logging.debug("%s %s failed:\n%s" % (self.getName(), path_utils.RelativeTestFilename(filename), error_str)) | def _Run(self, test_runner, result_summary): """Main work entry point of the thread. Basically we pull urls from the filename queue and run the tests until we run out of urls. | 40c96f0c5a2f83beb57d9a3497683fb5e2112dfa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/40c96f0c5a2f83beb57d9a3497683fb5e2112dfa/test_shell_thread.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1997,
12,
2890,
16,
1842,
67,
18156,
16,
563,
67,
7687,
4672,
3536,
6376,
1440,
1241,
1634,
434,
326,
2650,
18,
7651,
1230,
732,
6892,
6903,
628,
326,
1544,
2389,
471,
1086,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1997,
12,
2890,
16,
1842,
67,
18156,
16,
563,
67,
7687,
4672,
3536,
6376,
1440,
1241,
1634,
434,
326,
2650,
18,
7651,
1230,
732,
6892,
6903,
628,
326,
1544,
2389,
471,
1086,
326,
... |
%{namespace_decls} | def _finalizeModuleContents_vx (self, template_map): slocs = [] for sc in self.schemaGroup(): slocs.append('# %s' % (sc.schemaLocation(),)) template_map['schema_locs'] = "\n".join(slocs) self.bindingIO().prolog().append(self.bindingIO().expand('''# %{filePath} | 9f5af2d1d44c2b5959dfd93a88068cafbaa04be3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/9f5af2d1d44c2b5959dfd93a88068cafbaa04be3/generate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
30343,
3120,
6323,
67,
26982,
261,
2890,
16,
1542,
67,
1458,
4672,
272,
24323,
273,
5378,
364,
888,
316,
365,
18,
4821,
1114,
13332,
272,
24323,
18,
6923,
2668,
7,
225,
738,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30343,
3120,
6323,
67,
26982,
261,
2890,
16,
1542,
67,
1458,
4672,
272,
24323,
273,
5378,
364,
888,
316,
365,
18,
4821,
1114,
13332,
272,
24323,
18,
6923,
2668,
7,
225,
738,
87,
1... | |
Return values of `L(s, \chi_d)` for each quadratic character `\chi_d` for `d_{\min} \leq d \leq d_{\max}`. | Return values of `L(s, \chi_k)` for each quadratic character `\chi_k` whose discriminant `d` satisfies `d_{\min} \leq d \leq d_{\max}`. | def twist_values(self, s, dmin, dmax, L=''): r""" Return values of `L(s, \chi_d)` for each quadratic character `\chi_d` for `d_{\min} \leq d \leq d_{\max}`. INPUT: - ``s`` - complex numbers - ``dmin`` - integer - ``dmax`` - integer - ``L`` - defines `L`-function (default: Riemann zeta function) OUTPUT: - ``list`` - list of pairs (d, L(s,chi_d)) EXAMPLES:: sage: lcalc.twist_values(0.5, -10, 10) [(-8, 1.10042141), (-7, 1.14658567), (-4, 0.667691457), (-3, 0.480867558), (5, 0.231750947), (8, 0.373691713)] """ L = self._compute_L(L) CC = sage.rings.all.ComplexField(prec) Z = sage.rings.all.Integer s = CC(s) typ = '--twist-quadratic' dmin = int(dmin) dmax = int(dmax) v = self('-v -x %s -y %s %s --start %s --finish %s %s'%( (s.real(), s.imag(), typ, dmin, dmax, L))) w = [] if len(v) == 0: return w if len(v) == 0: return w for a in v.split('\n'): d,x,y = a.split() w.append((Z(d), CC(x,y))) return w | ec495a205ca232d81527044825ec337cd833d57b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ec495a205ca232d81527044825ec337cd833d57b/lcalc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2339,
376,
67,
2372,
12,
2890,
16,
272,
16,
302,
1154,
16,
302,
1896,
16,
511,
2218,
11,
4672,
436,
8395,
2000,
924,
434,
1375,
48,
12,
87,
16,
521,
24010,
67,
79,
22025,
364,
1517,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2339,
376,
67,
2372,
12,
2890,
16,
272,
16,
302,
1154,
16,
302,
1896,
16,
511,
2218,
11,
4672,
436,
8395,
2000,
924,
434,
1375,
48,
12,
87,
16,
521,
24010,
67,
79,
22025,
364,
1517,
... |
print settingsStr | print settingsStr | def execute(fileDb, moduleDb, options, pkgid=""): additionalOutput = [] ###################################################################### # SORT OF INCLUDE LIST ###################################################################### print print " SORT OF INCLUDE LIST:" print "----------------------------------------------------------------------------" if options.verbose: print " * Include: %s" % options.include print " * Exclude: %s" % options.exclude print " * Sorting files..." sortedIncludeList = loader.getSortedList(options, fileDb, moduleDb) if options.printList: print print " PRINT OF INCLUDE ORDER:" print "----------------------------------------------------------------------------" print " * The files will be included in this order:" for key in sortedIncludeList: print " - %s" % key ###################################################################### # STRING COMPRESSION (ALPHA!) ###################################################################### if options.compressStrings: print print " STRING COMPRESSION (ALPHA!):" print "----------------------------------------------------------------------------" print " * Searching for string instances..." compressedStrings = {} for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId for token in fileDb[fileId]["tokens"]: if token["type"] != "string": continue if token["detail"] == "doublequotes": compressSource = "\"%s\"" % token["source"] else: compressSource = "'%s'" % token["source"] if not compressedStrings.has_key(compressSource): compressedStrings[compressSource] = 1 else: compressedStrings[compressSource] += 1 if options.verbose: print " * Sorting strings..." compressedList = [] for compressSource in compressedStrings: compressedList.append({ "source" : compressSource, "usages" : compressedStrings[compressSource] }) pos = 0 while pos < len(compressedList): item = compressedList[pos] if item["usages"] <= 1: compressedList.remove(item) else: pos += 1 compressedList.sort(lambda x, y: y["usages"]-x["usages"]) print " * Found %s string instances" % len(compressedList) if options.verbose: print " * Building replacement map..." compressMap = {} compressCounter = 0 compressJavaScript = "QXS%s=[" % pkgid for item in compressedList: if compressCounter != 0: compressJavaScript += "," compressMap[item["source"]] = compressCounter compressCounter += 1 compressJavaScript += item["source"] compressJavaScript += "];" additionalOutput.append(compressJavaScript) print " * Updating tokens..." for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId for token in fileDb[fileId]["tokens"]: if token["type"] != "string": continue if token["detail"] == "doublequotes": compressSource = "\"%s\"" % token["source"] else: compressSource = "'%s'" % token["source"] if compressSource in compressMap: token["source"] = "QXS%s[%s]" % (pkgid, compressMap[compressSource]) token["detail"] = "compressed" ###################################################################### # TOKEN STORAGE ###################################################################### if options.storeTokens: print print " TOKEN STORAGE:" print "----------------------------------------------------------------------------" if options.tokenOutputDirectory == None: print " * You must define the token directory!" sys.exit(1) else: options.tokenOutputDirectory = os.path.normpath(options.tokenOutputDirectory) # Normalizing directory if not os.path.exists(options.tokenOutputDirectory): os.makedirs(options.tokenOutputDirectory) print " * Storing tokens..." for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId tokenString = tokenizer.convertTokensToString(fileDb[fileId]["tokens"]) tokenSize = len(tokenString) / 1000.0 if options.verbose: print " * writing tokens to file (%s KB)..." % tokenSize tokenFileName = os.path.join(options.tokenOutputDirectory, fileId + config.TOKENEXT) tokenFile = file(tokenFileName, "w") tokenFile.write(tokenString) tokenFile.flush() tokenFile.close() ###################################################################### # GENERATION OF API ###################################################################### if options.generateApiDocumentation: print print " GENERATION OF API:" print "----------------------------------------------------------------------------" if options.apiOutputDirectory == None: print " * You must define the API output directory!" sys.exit(1) else: options.apiOutputDirectory = os.path.normpath(options.apiOutputDirectory) # Normalizing directory if not os.path.exists(options.apiOutputDirectory): os.makedirs(options.apiOutputDirectory) docTree = None print " * Generating API tree..." for fileId in fileDb: if options.verbose: print " - %s" % fieId docTree = docgenerator.createDoc(fileDb[fileId]["tree"], docTree) if docTree: print " * Finalising tree..." docgenerator.postWorkPackage(docTree, docTree) if options.xmlApiOutputFilename: print " * Writing XML API file..." xmlContent = "<?xml version=\"1.0\" encoding=\"" + options.encoding + "\"?>\n\n" xmlContent += tree.nodeToXmlString(docTree) filetool(options.apiOutputDirectory, options.xmlApiOutputFilename, xmlContent, options.encoding) if options.jsonApiOutputFilename: print " * Writing JSON API file..." jsonContent = tree.nodeToJsonString(docTree) filetool(options.apiOutputDirectory, options.jsonApiOutputFilename, jsonContent, options.encoding) ###################################################################### # CREATE COPY OF RESOURCES ###################################################################### if options.copyResources: print print " CREATE COPY OF RESOURCES:" print "----------------------------------------------------------------------------" print " * Preparing target configuration..." overrideList = [] for overrideEntry in options.overrideResourceOutput: # Parse # fileId.resourceId:destinationDirectory targetSplit = overrideEntry.split(":") targetStart = targetSplit.pop(0) targetStartSplit = targetStart.split(".") # Store overrideData = {} overrideData["destinationDirectory"] = ":".join(targetSplit) overrideData["resourceId"] = targetStartSplit.pop() overrideData["fileId"] = ".".join(targetStartSplit) # Append overrideList.append(overrideData) print " * Syncing..." for fileId in sortedIncludeList: filePath = fileDb[fileId]["path"] fileResources = fileDb[fileId]["resources"] if len(fileResources) > 0: print " - Found %i resources in %s" % (len(fileResources), fileId) for fileResource in fileResources: fileResourceSplit = fileResource.split(":") resourceId = fileResourceSplit.pop(0) relativeDirectory = ":".join(fileResourceSplit) sourceDirectory = os.path.join(fileDb[fileId]["resourceInput"], relativeDirectory) destinationDirectory = os.path.join(fileDb[fileId]["resourceOutput"], relativeDirectory) # Searching for overrides for overrideData in overrideList: if overrideData["fileId"] == fileId and overrideData["resourceId"] == resourceId: destinationDirectory = overrideData["destinationDirectory"] print " - Copy %s => %s" % (sourceDirectory, destinationDirectory) try: os.listdir(sourceDirectory) except OSError: print " - Source directory isn't readable! Ignore resource!" continue for root, dirs, files in os.walk(sourceDirectory): # Filter ignored directories for ignoredDir in config.DIRIGNORE: if ignoredDir in dirs: dirs.remove(ignoredDir) # Searching for items (resource files) for itemName in files: # Generate absolute source file path itemSourcePath = os.path.join(root, itemName) # Extract relative path and directory itemRelPath = itemSourcePath.replace(sourceDirectory + os.sep, "") itemRelDir = os.path.dirname(itemRelPath) # Generate destination directory and file path itemDestDir = os.path.join(destinationDirectory, itemRelDir) itemDestPath = os.path.join(itemDestDir, itemName) # Check/Create destination directory if not os.path.exists(itemDestDir): os.makedirs(itemDestDir) # Copy file if options.verbose: print " - Copying: %s => %s" % (itemSourcePath, itemDestPath) shutil.copyfile(itemSourcePath, itemDestPath) ###################################################################### # GENERATION OF SETTINGS ###################################################################### if options.generateSourceScript or options.generateCompiledScript: print print " GENERATION OF SETTINGS:" print "----------------------------------------------------------------------------" print " * Processing input data..." TypeFloat = re.compile("^([0-9\-]+\.[0-9]+)$") TypeNumber = re.compile("^([0-9\-])$") settingsStr = "" # If you change this, change this in qx.Settings and qx.OO, too. settingsStr += 'if(typeof qx==="undefined"){var qx={_UNDEFINED:"undefined",_LOADSTART:(new Date).valueOf()};}' if options.addNewLines: settingsStr += "\n" # If you change this, change this in qx.Settings, too. settingsStr += 'if(typeof qx.Settings===qx._UNDEFINED){qx.Settings={_userSettings:{},_defaultSettings:{}};}' if options.addNewLines: settingsStr += "\n" for setting in options.setting: settingSplit = setting.split(":") settingKey = settingSplit.pop(0) settingValue = ":".join(settingSplit) settingKeySplit = settingKey.split(".") settingKeyName = settingKeySplit.pop() settingKeySpace = ".".join(settingKeySplit) checkStr = 'if(typeof qx.Settings._userSettings["%s"]===qx._UNDEFINED){qx.Settings._userSettings["%s"]={};}' % (settingKeySpace, settingKeySpace) if not checkStr in settingsStr: settingsStr += checkStr if options.addNewLines: settingsStr += "\n" settingsStr += 'qx.Settings._userSettings["%s"]["%s"]=' % (settingKeySpace, settingKeyName) if settingValue == "false" or settingValue == "true" or TypeFloat.match(settingValue) or TypeNumber.match(settingValue): settingsStr += '%s' % settingValue else: settingsStr += '"%s"' % settingValue.replace("\"", "\\\"") settingsStr += ";" if options.addNewLines: settingsStr += "\n" print settingsStr ###################################################################### # GENERATION OF SOURCE VERSION ###################################################################### if options.generateSourceScript: print print " GENERATION OF SOURCE SCRIPT:" print "----------------------------------------------------------------------------" if options.sourceOutputDirectory == None: print " * You must define the source output directory!" sys.exit(1) else: options.sourceOutputDirectory = os.path.normpath(options.sourceOutputDirectory) print " * Generating includer..." sourceOutput = settingsStr if sourceOutput != "" and options.addNewLines: settingsStr += "\n" if options.addNewLines: for fileId in sortedIncludeList: sourceOutput += 'document.write(\'<script type="text/javascript" src="%s%s"></script>\');\n' % (os.path.join(fileDb[fileId]["webSourcePath"], fileId.replace(".", os.sep)), config.JSEXT) else: includeCode = "" for fileId in sortedIncludeList: includeCode += '<script type="text/javascript" src="%s%s"></script>' % (os.path.join(fileDb[fileId]["webSourcePath"], fileId.replace(".", os.sep)), config.JSEXT) sourceOutput += "document.write('%s');" % includeCode print " * Saving includer output as %s..." % options.sourceOutputFilename filetool(options.sourceOutputDirectory, options.sourceOutputFilename, sourceOutput, options.encoding) ###################################################################### # GENERATION OF COMPILED VERSION ###################################################################### if options.generateCompiledScript: print print " GENERATION OF COMPILED SCRIPT:" print "----------------------------------------------------------------------------" compiledOutput = settingsStr + "".join(additionalOutput) print " * Compiling tokens..." if options.compiledScriptFile == None: print " * You must define the compiled script file!" sys.exit(1) else: options.compiledScriptFile = os.path.normpath(options.compiledScriptFile) for fileId in sortedIncludeList: if options.verbose: print " - %s" % fileId compiledFileContent = compile.compile(fileDb[fileId]["tokens"], options.addNewLines) if options.addFileIds: compiledOutput += "/* ID: " + fileId + " */\n" + compiledFileContent + "\n" else: compiledOutput += compiledFileContent print " * Saving compiled output as %s..." % options.compiledScriptFile filetool(options.compiledScriptFile, compiledOutput, options.encoding) | 150f973109e190eb54dbb8edfdc7cb752068ceeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5718/150f973109e190eb54dbb8edfdc7cb752068ceeb/generate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
768,
4331,
16,
1605,
4331,
16,
702,
16,
3475,
350,
1546,
6,
4672,
225,
3312,
1447,
273,
5378,
282,
28256,
1970,
7,
468,
225,
11530,
15932,
28062,
15130,
28256,
1970,
7,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
768,
4331,
16,
1605,
4331,
16,
702,
16,
3475,
350,
1546,
6,
4672,
225,
3312,
1447,
273,
5378,
282,
28256,
1970,
7,
468,
225,
11530,
15932,
28062,
15130,
28256,
1970,
7,
225,
... |
raise ValueError, "No documentation exists for the unit %s."%unit | raise ValueError, "No documentation exists for the unit %s."%unit | def unitdocs(unit): """ Returns docstring for the given unit. INPUT: - ``unit`` OUTPUT: - ``string`` EXAMPLES:: sage: sage.symbolic.units.unitdocs('meter') 'SI base unit of length.\nDefined to be the distance light travels in vacuum in 1/299792458 of a second.' sage: sage.symbolic.units.unitdocs('amu') 'Abbreviation for atomic mass unit.\nApproximately equal to 1.660538782*10^-27 kilograms.' Units not in the list unit_docs will raise a ValueError:: sage: sage.symbolic.units.unitdocs('earth') Traceback (most recent call last): ... ValueError: No documentation exists for the unit earth. """ if is_unit(unit): return unit_docs[unit_to_type[str(unit)]+"_docs"][str(unit)] else: raise ValueError, "No documentation exists for the unit %s."%unit | d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2836,
8532,
12,
4873,
4672,
3536,
2860,
14525,
364,
326,
864,
2836,
18,
225,
12943,
30,
225,
300,
12176,
4873,
10335,
225,
11550,
30,
225,
300,
12176,
1080,
10335,
225,
5675,
8900,
11386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2836,
8532,
12,
4873,
4672,
3536,
2860,
14525,
364,
326,
864,
2836,
18,
225,
12943,
30,
225,
300,
12176,
4873,
10335,
225,
11550,
30,
225,
300,
12176,
1080,
10335,
225,
5675,
8900,
11386,
... |
if (err[0] == socket.SSL_ERROR_ZERO_RETURN or err[0] == socket.SSL_ERROR_EOF): | if (err_type == socket.SSL_ERROR_ZERO_RETURN or err_type == socket.SSL_ERROR_EOF): | def _read(self): buf = '' # put in a loop so that we retry on transient errors while True: try: buf = self._ssl.read(self._bufsize) except socket.sslerror as err: if (err[0] == socket.SSL_ERROR_WANT_READ or err[0] == socket.SSL_ERROR_WANT_WRITE): continue if (err[0] == socket.SSL_ERROR_ZERO_RETURN or err[0] == socket.SSL_ERROR_EOF): break raise except socket.error as err: if err[0] == errno.EINTR: continue if err[0] == errno.EBADF: # XXX socket was closed? break raise else: break return buf | 6f8fe151da16f43fc5d0c5167fc3d9432f993f70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/6f8fe151da16f43fc5d0c5167fc3d9432f993f70/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
896,
12,
2890,
4672,
1681,
273,
875,
468,
1378,
316,
279,
2798,
1427,
716,
732,
3300,
603,
12315,
1334,
1323,
1053,
30,
775,
30,
1681,
273,
365,
6315,
8157,
18,
896,
12,
2890,
631... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
896,
12,
2890,
4672,
1681,
273,
875,
468,
1378,
316,
279,
2798,
1427,
716,
732,
3300,
603,
12315,
1334,
1323,
1053,
30,
775,
30,
1681,
273,
365,
6315,
8157,
18,
896,
12,
2890,
631... |
text = "%s..." % text[0:cols] text = text.strip().replace("\n", LINE_BREAK_CHAR) | text = u"%s..." % text[0:cols] | def format_long_text(text, cols=None): """ Nicely formats text containing linebreaks to display in a single line by replacing newlines with U+23CE. If the param "cols" is given, the text beyond cols is replaced by "...". """ if cols and len(text) > cols: text = "%s..." % text[0:cols] text = text.strip().replace("\n", LINE_BREAK_CHAR) return text | 3152df39ad371e74c7567ce0a359c1cde8e58f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/3152df39ad371e74c7567ce0a359c1cde8e58f7b/helper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
5748,
67,
955,
12,
955,
16,
5347,
33,
7036,
4672,
3536,
423,
335,
2357,
6449,
977,
4191,
980,
29292,
358,
2562,
316,
279,
2202,
980,
635,
13993,
19181,
598,
587,
15,
4366,
144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
5748,
67,
955,
12,
955,
16,
5347,
33,
7036,
4672,
3536,
423,
335,
2357,
6449,
977,
4191,
980,
29292,
358,
2562,
316,
279,
2202,
980,
635,
13993,
19181,
598,
587,
15,
4366,
144... |
set_exec(wp, flag) | set_exec(self.wjoin(f), flag) | def update(self, node, allow=False, force=False): pl = self.dirstate.parents() if not force and pl[1] != nullid: self.ui.warn("aborting: outstanding uncommitted merges\n") return | a768c3cd6d3f946af723002abfd934300b997b25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/a768c3cd6d3f946af723002abfd934300b997b25/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
756,
16,
1699,
33,
8381,
16,
2944,
33,
8381,
4672,
886,
273,
365,
18,
72,
920,
340,
18,
12606,
1435,
309,
486,
2944,
471,
886,
63,
21,
65,
480,
446,
350,
30,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
16,
756,
16,
1699,
33,
8381,
16,
2944,
33,
8381,
4672,
886,
273,
365,
18,
72,
920,
340,
18,
12606,
1435,
309,
486,
2944,
471,
886,
63,
21,
65,
480,
446,
350,
30,
36... |
return cs, extraTroveList, extraFileList | return (cs, _cvtTroveList(extraTroveList), _cvtFileList(extraFileList)) | def _getCsFromRepos(target, cs, server, job, recurse, withFiles, withFileContents, excludeAutoSource, filesNeeded, chgSetList): abortCheck = None if callback: callback.requestingChangeSet() abortCheck = callback.checkAbort server.setAbortCheck(abortCheck) (url, sizes, extraTroveList, extraFileList) = \ server.getChangeSet(job, recurse, withFiles, withFileContents, excludeAutoSource) server.setAbortCheck(None) | 2922c89e8d68836dc7a52e97de99d5b9456bef2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/2922c89e8d68836dc7a52e97de99d5b9456bef2e/netclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
14272,
1265,
28453,
12,
3299,
16,
2873,
16,
1438,
16,
1719,
16,
11502,
16,
598,
2697,
16,
598,
812,
6323,
16,
4433,
4965,
1830,
16,
1390,
11449,
16,
462,
75,
694,
682,
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,
389,
588,
14272,
1265,
28453,
12,
3299,
16,
2873,
16,
1438,
16,
1719,
16,
11502,
16,
598,
2697,
16,
598,
812,
6323,
16,
4433,
4965,
1830,
16,
1390,
11449,
16,
462,
75,
694,
682,
4672,
... |
self.dropdownlistbox.SetSelection(best) | self.dropdownlistbox.SetSelection(-1) | def processText(self, text=None): if text is None: text = self.GetValue() if self._entryCallback: self._entryCallback() self.dropdownlistbox.clearBold() #print("processText: %s" % text) if not text: # control is empty; hide dropdown if shown: if self.dropdown.IsShown(): self._showDropDown(False) return best = None found = False nchar = len(text) choices = self._choices for numCh, choice in enumerate(choices): if self._matchFunction: index, count = self._matchFunction(text, choice) if count > 0: found = True self.dropdownlistbox.setBold(numCh, index, count) else: if self._onlyAtStart: if choice.lower().startswith(text.lower()): found = True self.dropdownlistbox.setBold(numCh, 0, nchar) else: index = choice.lower().find(text.lower()) if index >= 0: found = True self.dropdownlistbox.setBold(numCh, index, nchar) if found: if best is None: best = numCh #print("best = %s" % best) if best is not None: self._showDropDown(True) # added call to calcWidths to allow popup to set the horizontal # offset if it turns out that the interesting parts of the # completion text would be off the screen to the right self.dropdownlistbox.calcWidths() self.dropdownlistbox.SetSelection(best) #self.SetFocus() else: self.dropdownlistbox.SetSelection(-1) if self._hideOnNoMatch: self._showDropDown(False) self._listItemVisible() | 5eae82ee985c1796ea58161da81f4803ea6ad4d3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/5eae82ee985c1796ea58161da81f4803ea6ad4d3/textctrl_autocomplete.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
1528,
12,
2890,
16,
977,
33,
7036,
4672,
309,
977,
353,
599,
30,
977,
273,
365,
18,
967,
620,
1435,
309,
365,
6315,
4099,
2428,
30,
365,
6315,
4099,
2428,
1435,
365,
18,
18787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1528,
12,
2890,
16,
977,
33,
7036,
4672,
309,
977,
353,
599,
30,
977,
273,
365,
18,
967,
620,
1435,
309,
365,
6315,
4099,
2428,
30,
365,
6315,
4099,
2428,
1435,
365,
18,
18787,
... |
f = sys.stdin g = GzipFile(filename="", mode="wb", fileobj=sys.stdout) | f = sys.stdin.buffer g = GzipFile(filename="", mode="wb", fileobj=sys.stdout.buffer) | def _test(): # Act like gzip; with -d, act like gunzip. # The input file is not deleted, however, nor are any other gzip # options or features supported. args = sys.argv[1:] decompress = args and args[0] == "-d" if decompress: args = args[1:] if not args: args = ["-"] for arg in args: if decompress: if arg == "-": f = GzipFile(filename="", mode="rb", fileobj=sys.stdin) g = sys.stdout else: if arg[-3:] != ".gz": print("filename doesn't end in .gz:", repr(arg)) continue f = open(arg, "rb") g = builtins.open(arg[:-3], "wb") else: if arg == "-": f = sys.stdin g = GzipFile(filename="", mode="wb", fileobj=sys.stdout) else: f = builtins.open(arg, "rb") g = open(arg + ".gz", "wb") while True: chunk = f.read(1024) if not chunk: break g.write(chunk) if g is not sys.stdout: g.close() if f is not sys.stdin: f.close() | 6fca8fba98c7570f0a170ee5a4c4d464584bcf27 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/6fca8fba98c7570f0a170ee5a4c4d464584bcf27/gzip.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
468,
4603,
3007,
10331,
31,
598,
300,
72,
16,
1328,
3007,
31475,
4450,
18,
468,
1021,
810,
585,
353,
486,
4282,
16,
14025,
16,
12517,
854,
1281,
1308,
10331,
468,
702,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
13332,
468,
4603,
3007,
10331,
31,
598,
300,
72,
16,
1328,
3007,
31475,
4450,
18,
468,
1021,
810,
585,
353,
486,
4282,
16,
14025,
16,
12517,
854,
1281,
1308,
10331,
468,
702,
... |
(88,57,99,214)) | (88,57,99,214), (240,240,250,20), (0,55,100,50)) | def examples(): """ Examples of how to use ezscroll. One is a scrollpane, the other is a scrollbar. The scrollpane handles some things like offsets, puts the scrollbars in a sprite group, and blits the world. If you just want one scrollbar, still may be easier to use ScrollPane and pass [S] or [E], etc. Closing window of proceeds through examples. """ pygame.init() screen = pygame.display.set_mode(ScrSize) world = pygame.Surface((ScrSize[0]*2, ScrSize[1]*2)) world.fill(Gray) for x in xrange(100, world.get_size()[0], 200): for y in xrange(100, world.get_size()[1], 200): pygame.draw.circle(world, (225,34,43), (x,y), 100, 10) bg = pygame.Surface(ScrSize).convert() ### EXAMPLE 1 bg.fill(BGCOLOR) pygame.display.set_caption("Example 1: ScrollPane") initRect = pygame.Rect(screen.get_rect()) sp = ScrollPane( world.get_size(), initRect, world, bg, [S, W, N], 3, True, 20) sp.draw(bg) screen.blit(bg,Origin) pygame.display.flip() while True: event = pygame.event.wait() if event.type is pygame.QUIT: break sp.clear() sp.update(event) changes = sp.draw(bg) screen.blit(bg,Origin) pygame.display.update(changes) ### EXAMPLE 2 pygame.display.set_caption("Example 2: ScrollBar") thick = 20 scrollRect = pygame.Rect(0, 0, ScrSize[0], thick) excludes = ((0, thick), ScrSize) # rect where sb update is a pass group = pygame.sprite.RenderPlain() sb = ScrollBar( group, world.get_width(), scrollRect, bg, 0, excludes, 4, True, thick, (170,220,180), (200,210,225), (240,240,250), (0,55,100)) sb.draw(bg) bg.blit(world, (0,thick), (sb.get_scrolled(),(ScrSize[0],ScrSize[1]-thick))) screen.blit(bg, Origin) pygame.display.flip() while True: event = pygame.event.wait() if event.type is pygame.QUIT: break sb.update(event) changes = sb.draw(bg) if len(changes) > 0: changes.append(bg.blit(world, (0,thick), (sb.get_scrolled(),(ScrSize[0],ScrSize[1]-thick)))) screen.blit(bg,Origin) pygame.display.update(changes) | bf1a2c2f5afc708ea98d55dd1b53d251233ae120 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3807/bf1a2c2f5afc708ea98d55dd1b53d251233ae120/examples.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10991,
13332,
3536,
19830,
434,
3661,
358,
999,
8012,
12033,
18,
6942,
353,
279,
5532,
29009,
16,
326,
1308,
353,
279,
27123,
18,
1021,
5532,
29009,
7372,
2690,
9198,
3007,
8738,
16,
8200,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10991,
13332,
3536,
19830,
434,
3661,
358,
999,
8012,
12033,
18,
6942,
353,
279,
5532,
29009,
16,
326,
1308,
353,
279,
27123,
18,
1021,
5532,
29009,
7372,
2690,
9198,
3007,
8738,
16,
8200,... |
logging.debug("clean_up: %s kicked up while removing %s", e, path) eventloop.add_timeout(1.0, clean_up, "conversion clean_up attempt", (clean_up, temp_file, file_and_directory, attempts+1)) | logging.debug("clean_up: %s kicked up while removing %s", e, path) timeout = 1.0 * attempts eventloop.add_timeout( timeout, clean_up, "conversion clean_up attempt", (temp_file, file_and_directory, attempts+1)) | def clean_up(temp_file, file_and_directory=False, attempts=0): if attempts > 5: return if os.path.exists(temp_file): try: os.remove(temp_file) except (OSError, IOError, WindowsError): logging.debug("clean_up: %s kicked up while removing %s", e, temp_file) eventloop.add_timeout(1.0, clean_up, "conversion clean_up attempt", (clean_up, temp_file, file_and_directory, attempts+1)) if file_and_directory: path = os.path.dirname(temp_file) if os.path.exists(path): try: os.rmdir(path) except (OSError, IOError, WindowsError), e: logging.debug("clean_up: %s kicked up while removing %s", e, path) eventloop.add_timeout(1.0, clean_up, "conversion clean_up attempt", (clean_up, temp_file, file_and_directory, attempts+1)) | 87c690352f9dad9df087e4c9e69b99c153a5352c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/87c690352f9dad9df087e4c9e69b99c153a5352c/videoconversion.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2721,
67,
416,
12,
5814,
67,
768,
16,
585,
67,
464,
67,
5149,
33,
8381,
16,
7531,
33,
20,
4672,
309,
7531,
405,
1381,
30,
327,
309,
1140,
18,
803,
18,
1808,
12,
5814,
67,
768,
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,
2721,
67,
416,
12,
5814,
67,
768,
16,
585,
67,
464,
67,
5149,
33,
8381,
16,
7531,
33,
20,
4672,
309,
7531,
405,
1381,
30,
327,
309,
1140,
18,
803,
18,
1808,
12,
5814,
67,
768,
4672... |
not filename in res['filelist.filenames'].split('/'): | not filename in res['filenames'].split('/'): | def searchPrco(self, name, prcotype): """return list of packages having prcotype name (any evr and flag)""" results = [] for (rep,cache) in self.primarydb.items(): cur = cache.cursor() cur.execute("select * from %s where name = %s" , (prcotype, name)) prcos = cur.fetchall() for res in prcos: cur.execute("select * from packages where pkgKey = %s" , (res['pkgKey'])) for x in cur.fetchall(): pkg = self.db2class(x) if (self.excludes[rep].has_key(pkg.pkgId)): continue # Add this provides to prco otherwise yum doesn't understand # that it matches pkg.prco = {prcotype: [ { 'name': res.name, 'flags': res.flags, 'rel': res.release, 'ver': res.version, 'epoch': res.epoch } ] } results.append(self.pc(pkg,rep)) | 557b2254849543ae41b7593fc640688ccc96826c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/557b2254849543ae41b7593fc640688ccc96826c/sqlitesack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
28763,
83,
12,
2890,
16,
508,
16,
846,
71,
10570,
4672,
3536,
2463,
666,
434,
5907,
7999,
846,
71,
10570,
508,
261,
2273,
2113,
86,
471,
2982,
15574,
1686,
273,
5378,
364,
261,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28763,
83,
12,
2890,
16,
508,
16,
846,
71,
10570,
4672,
3536,
2463,
666,
434,
5907,
7999,
846,
71,
10570,
508,
261,
2273,
2113,
86,
471,
2982,
15574,
1686,
273,
5378,
364,
261,
1... |
if self._peek('ASSIGN_OPERATOR', 'COMMA_DELIMITER', 'CLOSE_BRACE') == 'ASSIGN_OPERATOR': | if self._peek('ASSIGN_OPERATOR', 'COMMA_DELIMITER', 'PLACEHOLDER_CLOSE_BRACE') == 'ASSIGN_OPERATOR': | def placeholder_parameter(self): identifier = self.identifier() _node = ParameterNode(identifier.name) if self._peek('ASSIGN_OPERATOR', 'COMMA_DELIMITER', 'CLOSE_BRACE') == 'ASSIGN_OPERATOR': ASSIGN_OPERATOR = self._scan('ASSIGN_OPERATOR') literal_or_identifier = self.literal_or_identifier() _node.default = literal_or_identifier return _node | e8f7feb442c80298d78241db158193ff8c364929 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4381/e8f7feb442c80298d78241db158193ff8c364929/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6695,
67,
6775,
12,
2890,
4672,
2756,
273,
365,
18,
5644,
1435,
389,
2159,
273,
5498,
907,
12,
5644,
18,
529,
13,
309,
365,
6315,
347,
3839,
2668,
23289,
67,
26110,
2187,
296,
4208,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6695,
67,
6775,
12,
2890,
4672,
2756,
273,
365,
18,
5644,
1435,
389,
2159,
273,
5498,
907,
12,
5644,
18,
529,
13,
309,
365,
6315,
347,
3839,
2668,
23289,
67,
26110,
2187,
296,
4208,
55... |
self.assertEqual(self.pd_url, '/shop/download/send/%s/' % self.key) | check_url = "%s/download/send/%s/" % (prefix, self.key) self.assertEqual(self.pd_url, check_url) | def test_download_urls(self): """ Test that download urls remain unchanged after changeset hg:4d23ed40f534/git:d06b4ec """ self.assertEqual(self.pd_url, '/shop/download/send/%s/' % self.key) | 859810188118d44e805ec8a5228e6348c60e6bf1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/171/859810188118d44e805ec8a5228e6348c60e6bf1/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7813,
67,
10518,
12,
2890,
4672,
3536,
7766,
716,
4224,
6903,
7232,
14827,
1839,
22463,
22576,
30,
24,
72,
4366,
329,
7132,
74,
25,
5026,
19,
6845,
30,
72,
7677,
70,
24,
557,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7813,
67,
10518,
12,
2890,
4672,
3536,
7766,
716,
4224,
6903,
7232,
14827,
1839,
22463,
22576,
30,
24,
72,
4366,
329,
7132,
74,
25,
5026,
19,
6845,
30,
72,
7677,
70,
24,
557,... |
def close(self, event=None): self.top.destroy() | def GetText(self): return self.text | def close(self, event=None): self.top.destroy() | 0aecd0b52ee73b8cb3da571cbdb9aaa603603cfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0aecd0b52ee73b8cb3da571cbdb9aaa603603cfd/StackViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
16,
871,
33,
7036,
4672,
365,
18,
3669,
18,
11662,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1746,
12,
2890,
16,
871,
33,
7036,
4672,
365,
18,
3669,
18,
11662,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def fl_get_scrollbar_bounds(ob, b1, b2): """ fl_get_scrollbar_bounds(ob, b1, b2) """ _fl_get_scrollbar_bounds(ob, b1, b2) | def fl_get_scrollbar_bounds(pObject, b1, b2): """ fl_get_scrollbar_bounds(pObject, b1, b2) """ _fl_get_scrollbar_bounds(pObject, b1, b2) | def fl_get_scrollbar_bounds(ob, b1, b2): """ fl_get_scrollbar_bounds(ob, b1, b2) """ _fl_get_scrollbar_bounds(ob, b1, b2) | 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,
588,
67,
12033,
3215,
67,
10576,
12,
84,
921,
16,
324,
21,
16,
324,
22,
4672,
3536,
1183,
67,
588,
67,
12033,
3215,
67,
10576,
12,
84,
921,
16,
324,
21,
16,
324,
22,
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,
588,
67,
12033,
3215,
67,
10576,
12,
84,
921,
16,
324,
21,
16,
324,
22,
4672,
3536,
1183,
67,
588,
67,
12033,
3215,
67,
10576,
12,
84,
921,
16,
324,
21,
16,
324,
22,
13,
... |
print "path =", `path` if "/arse" in path: import pdb; pdb.set_trace() | def write_results_file(self, path, lines, lnotab, lines_hit): """Return a coverage results file in path.""" | 80bd5ca722875a685c7595358ec4d9173d777ece /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80bd5ca722875a685c7595358ec4d9173d777ece/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
4717,
67,
768,
12,
2890,
16,
589,
16,
2362,
16,
328,
902,
378,
16,
2362,
67,
15989,
4672,
3536,
990,
279,
11196,
1686,
585,
316,
589,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
4717,
67,
768,
12,
2890,
16,
589,
16,
2362,
16,
328,
902,
378,
16,
2362,
67,
15989,
4672,
3536,
990,
279,
11196,
1686,
585,
316,
589,
12123,
2,
-100,
-100,
-100,
-100,
-100,
... | |
possible = Set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"] + | possible = set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"] + | def ParseEDSFile(filepath): eds_dict = {} # Read file text eds_file = open(filepath,'r').read() sections = ExtractSections(eds_file) # Parse assignments for each section for section_name, assignments in sections: # Reset values of entry values = {} # Search if the section name match an index or subindex expression index_result = index_model.match(section_name.upper()) subindex_result = subindex_model.match(section_name.upper()) index_objectlinks_result = index_objectlinks_model.match(section_name.upper()) # Compilation of the EDS information dictionary is_entry = False # First case, section name is in SECTION_KEYNAMES if section_name.upper() in SECTION_KEYNAMES: # Verify that entry is not already defined if section_name.upper() not in eds_dict: eds_dict[section_name.upper()] = values else: raise SyntaxError, "\"[%s]\" section is defined two times"%section_name # Second case, section name is an index name elif index_result: # Extract index number index = int(index_result.groups()[0], 16) # If index hasn't been referenced before, we add an entry into the dictionary if index not in eds_dict: eds_dict[index] = values eds_dict[index]["subindexes"] = {} elif eds_dict[index].keys() == ["subindexes"]: values["subindexes"] = eds_dict[index]["subindexes"] eds_dict[index] = values else: raise SyntaxError, "\"[%s]\" section is defined two times"%section_name is_entry = True # Third case, section name is a subindex name elif subindex_result: # Extract index and subindex number index, subindex = [int(value, 16) for value in subindex_result.groups()] # If index hasn't been referenced before, we add an entry into the dictionary # that will be updated later if index not in eds_dict: eds_dict[index] = {"subindexes" : {}} if subindex not in eds_dict[index]["subindexes"]: eds_dict[index]["subindexes"][subindex] = values else: raise SyntaxError, "\"[%s]\" section is defined two times"%section_name is_entry = True # Third case, section name is a subindex name elif index_objectlinks_result: pass # In any other case, there is a syntax problem into EDS file else: raise SyntaxError, "Section \"[%s]\" is unrecognized"%section_name for assignment in assignments: # Escape any comment if assignment.startswith(";"): pass # Verify that line is a valid assignment elif assignment.find('=') > 0: # Split assignment into the two values keyname and value keyname, value = assignment.split("=", 1) # keyname must be immediately followed by the "=" sign, so we # verify that there is no whitespace into keyname if keyname.isalnum(): # value can be preceded and followed by whitespaces, so we escape them value = value.strip() # First case, value starts with "$NODEID", then it's a formula if value.upper().startswith("$NODEID"): try: test = int(value.upper().replace("$NODEID+", ""), 16) computed_value = "\"%s\""%value except: raise SyntaxError, "\"%s\" is not a valid formula for attribute \"%s\" of section \"[%s]\""%(value, keyname, section_name) # Second case, value starts with "0x", then it's an hexadecimal value elif value.startswith("0x") or value.startswith("-0x"): try: computed_value = int(value, 16) except: raise SyntaxError, "\"%s\" is not a valid value for attribute \"%s\" of section \"[%s]\""%(value, keyname, section_name) elif value.isdigit() or value.startswith("-") and value[1:].isdigit(): # Third case, value is a number and starts with "0", then it's an octal value if value.startswith("0") or value.startswith("-0"): computed_value = int(value, 8) # Forth case, value is a number and don't start with "0", then it's a decimal value else: computed_value = int(value) # In any other case, we keep string value else: computed_value = value # Add value to values dictionary if computed_value != "": # If entry is an index or a subindex if is_entry: # Verify that keyname is a possible attribute if keyname.upper() not in ENTRY_ATTRIBUTES: raise SyntaxError, "Keyname \"%s\" not recognised for section \"[%s]\""%(keyname, section_name) # Verify that value is valid elif not ENTRY_ATTRIBUTES[keyname.upper()](computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) else: values[keyname.upper()] = computed_value else: values[keyname.upper()] = computed_value # All lines that are not empty and are neither a comment neither not a valid assignment elif assignment.strip() != "": raise SyntaxError, "\"%s\" is not a valid EDS line"%assignment.strip() # If entry is an index or a subindex if is_entry: # Verify that entry has an ObjectType values["OBJECTTYPE"] = values.get("OBJECTTYPE", 7) # Extract parameters defined keys = Set(values.keys()) keys.discard("subindexes") # Extract possible parameters and parameters required possible = Set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"] + ENTRY_TYPES[values["OBJECTTYPE"]]["optional"]) required = Set(ENTRY_TYPES[values["OBJECTTYPE"]]["require"]) # Verify that parameters defined contains all the parameters required if not keys.issuperset(required): missing = required.difference(keys)._data.keys() if len(missing) > 1: attributes = "Attributes %s are"%", ".join(["\"%s\""%attribute for attribute in missing]) else: attributes = "Attribute \"%s\" is"%missing[0] raise SyntaxError, "Error on section \"[%s]\":\n%s required for a%s entry"%(section_name, attributes, ENTRY_TYPES[values["OBJECTTYPE"]]["name"]) # Verify that parameters defined are all in the possible parameters if not keys.issubset(possible): unsupported = keys.difference(possible)._data.keys() if len(unsupported) > 1: attributes = "Attributes %s are"%", ".join(["\"%s\""%attribute for attribute in unsupported]) else: attributes = "Attribute \"%s\" is"%unsupported[0] raise SyntaxError, "Error on section \"[%s]\":\n%s unsupported for a%s entry"%(section_name, attributes, ENTRY_TYPES[values["OBJECTTYPE"]]["name"]) VerifyValue(values, section_name, "ParameterValue") VerifyValue(values, section_name, "DefaultValue") return eds_dict | 56162b84b67d9ee4f8dd7e430cc40d3b75aa5880 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11017/56162b84b67d9ee4f8dd7e430cc40d3b75aa5880/eds_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
2056,
55,
812,
12,
10561,
4672,
1675,
87,
67,
1576,
273,
2618,
468,
2720,
585,
977,
1675,
87,
67,
768,
273,
1696,
12,
10561,
11189,
86,
16063,
896,
1435,
7178,
273,
8152,
15965,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2884,
2056,
55,
812,
12,
10561,
4672,
1675,
87,
67,
1576,
273,
2618,
468,
2720,
585,
977,
1675,
87,
67,
768,
273,
1696,
12,
10561,
11189,
86,
16063,
896,
1435,
7178,
273,
8152,
15965,
... |
align_view Alignment view. Integer 0-11, passed as a string. | align_view Alignment view. Integer 0-11, passed as a string or integer. | def blastpgp(blastcmd, database, infile, align_view='7', **keywds): """blastpgp(blastcmd, database, infile, align_view='7', **keywds) -> read, error Undohandles Execute and retrieve data from blastpgp. blastcmd is the command used to launch the 'blastpgp' executable. database is the path to the database to search against. infile is the path to the file containing the sequence to search with. You may pass more parameters to **keywds to change the behavior of the search. Otherwise, optional values will be chosen by blastpgp. The Blast output is by default in XML format. Use the align_view keyword for output in a different format. Scoring matrix Matrix to use. gap_open Gap open penalty. gap_extend Gap extension penalty. window_size Multiple hits window size. npasses Number of passes. passes Hits/passes. Integer 0-2. Algorithm gapped Whether to do a gapped alignment. T/F expectation Expectation value cutoff. wordsize Word size. keep_hits Number of beset hits from a region to keep. xdrop Dropoff value (bits) for gapped alignments. hit_extend Threshold for extending hits. region_length Length of region used to judge hits. db_length Effective database length. search_length Effective length of search space. nbits_gapping Number of bits to trigger gapping. pseudocounts Pseudocounts constants for multiple passes. xdrop_final X dropoff for final gapped alignment. xdrop_extension Dropoff for blast extensions. model_threshold E-value threshold to include in multipass model. required_start Start of required region in query. required_end End of required region in query. Processing XXX should document default values program The blast program to use. (PHI-BLAST) filter Filter query sequence with SEG? T/F believe_query Believe the query defline? T/F nprocessors Number of processors to use. Formatting html Produce HTML output? T/F descriptions Number of one-line descriptions. alignments Number of alignments. align_view Alignment view. Integer 0-11, passed as a string. show_gi Show GI's in deflines? T/F seqalign_file seqalign file to output. align_outfile Output file for alignment. checkpoint_outfile Output file for PSI-BLAST checkpointing. restart_infile Input file for PSI-BLAST restart. hit_infile Hit file for PHI-BLAST. matrix_outfile Output file for PSI-BLAST matrix in ASCII. align_infile Input alignment file for PSI-BLAST restart. """ att2param = { 'matrix' : '-M', 'gap_open' : '-G', 'gap_extend' : '-E', 'window_size' : '-A', 'npasses' : '-j', 'passes' : '-P', 'gapped' : '-g', 'expectation' : '-e', 'wordsize' : '-W', 'keep_hits' : '-K', 'xdrop' : '-X', 'hit_extend' : '-f', 'region_length' : '-L', 'db_length' : '-Z', 'search_length' : '-Y', 'nbits_gapping' : '-N', 'pseudocounts' : '-c', 'xdrop_final' : '-Z', 'xdrop_extension' : '-y', 'model_threshold' : '-h', 'required_start' : '-S', 'required_end' : '-H', 'program' : '-p', 'database' : '-d', 'infile' : '-i', 'filter' : '-F', 'believe_query' : '-J', 'nprocessors' : '-a', 'html' : '-T', 'descriptions' : '-v', 'alignments' : '-b', 'align_view' : '-m', 'show_gi' : '-I', 'seqalign_file' : '-O', 'align_outfile' : '-o', 'checkpoint_outfile' : '-C', 'restart_infile' : '-R', 'hit_infile' : '-k', 'matrix_outfile' : '-Q', 'align_infile' : '-B' } if not os.path.exists(blastcmd): raise ValueError, "blastpgp does not exist at %s" % blastcmd params = [] params.extend([att2param['database'], database]) params.extend([att2param['infile'], infile]) params.extend([att2param['align_view'], align_view]) for attr in keywds.keys(): params.extend([att2param[attr], str(keywds[attr])]) w, r, e = os.popen3(" ".join([blastcmd] + params)) w.close() return File.UndoHandle(r), File.UndoHandle(e) | e3a1ed48e7c966af98578f368be532d6256f02c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/e3a1ed48e7c966af98578f368be532d6256f02c5/NCBIStandalone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19047,
84,
6403,
12,
30901,
4172,
16,
2063,
16,
14568,
16,
5689,
67,
1945,
2218,
27,
2187,
2826,
856,
91,
2377,
4672,
3536,
30901,
84,
6403,
12,
30901,
4172,
16,
2063,
16,
14568,
16,
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,
19047,
84,
6403,
12,
30901,
4172,
16,
2063,
16,
14568,
16,
5689,
67,
1945,
2218,
27,
2187,
2826,
856,
91,
2377,
4672,
3536,
30901,
84,
6403,
12,
30901,
4172,
16,
2063,
16,
14568,
16,
5... |
print 'Testing for CMake version %s at `%s`...' % (version, test_cmd) | print 'Testing for CMake version %s by running `%s`...' % (version, test_cmd) | def persist_cmake(self): if sys.platform == 'win32': version = '2.8.0' found_cmd = '' for test_cmd in (self.cmake_cmd, r'tool\cmake\bin\%s' % self.cmake_cmd): print 'Testing for CMake version %s at `%s`...' % (version, test_cmd) p = subprocess.Popen([test_cmd, '--version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) stdout, stderr = p.communicate() if p.returncode == 0 and stdout == 'cmake version %s\r\n' % version: # found one that works, hurrah! print 'Found valid CMake version' found_cmd = test_cmd # HACK: gotta go out so just hacking this for now if found_cmd == r'tool\cmake\bin\%s' % self.cmake_cmd: found_cmd = r'..\tool\cmake\bin\%s' % self.cmake_cmd break if not found_cmd: msg = 'CMake 2.8.0 not installed. Auto download now? [Y/n]' print msg, | f454dc64e3a0f9d4d7faf35dadf5eee4d798a48f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10355/f454dc64e3a0f9d4d7faf35dadf5eee4d798a48f/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3898,
67,
71,
6540,
12,
2890,
4672,
309,
2589,
18,
9898,
422,
296,
8082,
1578,
4278,
225,
1177,
273,
296,
22,
18,
28,
18,
20,
11,
1392,
67,
4172,
273,
875,
364,
1842,
67,
4172,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3898,
67,
71,
6540,
12,
2890,
4672,
309,
2589,
18,
9898,
422,
296,
8082,
1578,
4278,
225,
1177,
273,
296,
22,
18,
28,
18,
20,
11,
1392,
67,
4172,
273,
875,
364,
1842,
67,
4172,
316,
... |
symbols = {u'decimal': u'.', u'group': u',', u'list': u';', u'percentSign': u'%', u'nativeZeroDigit': u'0', u'patternDigit': u' u'plusSign': u'+', u'minusSign': u'-', u'exponential': u'E', u'perMille': u'\xe2\x88\x9e', u'infinity': u'\xef\xbf\xbd', u'nan': ''} | def format(self, obj, pattern=None): "See zope.i18n.interfaces.IFormat" # Make or get binary form of datetime pattern if pattern is not None: bin_pattern = parseDateTimePattern(pattern) else: bin_pattern = self._bin_pattern | 80c32656ede29eafb9f9529552784d711939e493 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9827/80c32656ede29eafb9f9529552784d711939e493/format.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
1081,
16,
1936,
33,
7036,
4672,
315,
9704,
998,
1306,
18,
77,
2643,
82,
18,
15898,
18,
45,
1630,
6,
468,
4344,
578,
336,
3112,
646,
434,
3314,
1936,
309,
1936,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
12,
2890,
16,
1081,
16,
1936,
33,
7036,
4672,
315,
9704,
998,
1306,
18,
77,
2643,
82,
18,
15898,
18,
45,
1630,
6,
468,
4344,
578,
336,
3112,
646,
434,
3314,
1936,
309,
1936,
353... | |
if (abs(actred) <= machep) and (prered <= machep) | if (abs(actred) <= machep) and (prered <= machep) \ | def iterfunct(myfunct, p, iter, fnorm, functkw=None, parinfo=None, quiet=0, dof=None, [iterkw keywords here]) | 92adc32a35faec42a9dc5f570b76056f1d809f12 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/682/92adc32a35faec42a9dc5f570b76056f1d809f12/mpfit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
74,
6931,
12,
4811,
74,
6931,
16,
293,
16,
1400,
16,
2295,
535,
16,
12882,
9987,
33,
7036,
16,
779,
1376,
33,
7036,
16,
10902,
33,
20,
16,
741,
74,
33,
7036,
16,
306,
2165,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1400,
74,
6931,
12,
4811,
74,
6931,
16,
293,
16,
1400,
16,
2295,
535,
16,
12882,
9987,
33,
7036,
16,
779,
1376,
33,
7036,
16,
10902,
33,
20,
16,
741,
74,
33,
7036,
16,
306,
2165,
9... |
char.socket.clilocmessage(501662) char.socket.attachtarget('key.lock_response',[key.serial]) | char.socket.clilocmessage(501662) char.socket.attachtarget('key.lock_response',[key.serial]) | def onUse(char, key): # Does this key open a lock? if not key.hastag('lock'): # The key is blank so we wan't to make a copy of it char.socket.clilocmessage(501663) char.socket.attachtarget('key.copy_response',[key.serial]) else: char.socket.clilocmessage(501662) char.socket.attachtarget('key.lock_response',[key.serial]) return 1 | 516c1fcdf800cd69abc81c17dada3a6bf321ca8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/516c1fcdf800cd69abc81c17dada3a6bf321ca8c/key.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3727,
12,
3001,
16,
498,
4672,
468,
9637,
333,
498,
1696,
279,
2176,
35,
309,
486,
498,
18,
76,
689,
346,
2668,
739,
11,
4672,
468,
1021,
498,
353,
7052,
1427,
732,
341,
304,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3727,
12,
3001,
16,
498,
4672,
468,
9637,
333,
498,
1696,
279,
2176,
35,
309,
486,
498,
18,
76,
689,
346,
2668,
739,
11,
4672,
468,
1021,
498,
353,
7052,
1427,
732,
341,
304,
14... |
radio.connect("clicked", self.select_disk_cb, device) radio.set_label(description) self.wTree.get_widget("vbox_disks").pack_start(radio, expand=False, fill=False) | def build_disks(self): gtk.gdk.threads_enter() import subprocess self.disks = {} inxi = subprocess.Popen("inxi -c0 -D", shell=True, stdout=subprocess.PIPE) parent = None for line in inxi.stdout: line = line.rstrip("\r\n") if(line.startswith("Disks:")): line = line.replace("Disks:", "") device = None sections = line.split(":") for section in sections: section = section.strip() if("/dev/" in section): device = None elements = section.split() for element in elements: if "/dev/" in element: device = element if elements[len(elements) -1].endswith("GB") or elements[elements[len(elements) -1]].endswith("GB"): size = elements[len(elements) -1] section = section.replace(size, "(%s)" % size) if device is not None: description = section.replace(device, "").strip() description = description.replace(" ", " ") self.disks[device] = description if(parent is None): self.device_node = device radio = gtk.RadioButton(None) radio.connect("clicked", self.select_disk_cb, device) radio.set_label(description) self.wTree.get_widget("vbox_disks").pack_start(radio, expand=False, fill=False) parent = radio else: radio = gtk.RadioButton(parent) radio.connect("clicked", self.select_disk_cb, device) radio.set_label(description) self.wTree.get_widget("vbox_disks").pack_start(radio, expand=False, fill=False) self.wTree.get_widget("vbox_disks").show_all() gtk.gdk.threads_leave() | 1cfbc4bd61d7c105fb066905a095f8a0565e6206 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1953/1cfbc4bd61d7c105fb066905a095f8a0565e6206/gtk_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
28577,
12,
2890,
4672,
22718,
18,
75,
2883,
18,
12495,
67,
2328,
1435,
1930,
6652,
365,
18,
28577,
273,
2618,
316,
27005,
273,
6652,
18,
52,
3190,
2932,
11414,
77,
300,
71,
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,
1361,
67,
28577,
12,
2890,
4672,
22718,
18,
75,
2883,
18,
12495,
67,
2328,
1435,
1930,
6652,
365,
18,
28577,
273,
2618,
316,
27005,
273,
6652,
18,
52,
3190,
2932,
11414,
77,
300,
71,
2... | |
If false, the Storage is opened read-only and for file-based Storages or those with locks, may be shared-read. | If true (default) the Storage is opened read-write otherwise if false the storage is opened read-only and for file-based Storages or those with locks, may be opened with shared-readers. | def __init__(self, **args): """Create an RDF Storage (constructor). | c90deafabbd799d43c5890dabb28ac780d9d95c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14754/c90deafabbd799d43c5890dabb28ac780d9d95c2/RDF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
1968,
4672,
3536,
1684,
392,
13539,
5235,
261,
12316,
2934,
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,
1001,
2738,
972,
12,
2890,
16,
2826,
1968,
4672,
3536,
1684,
392,
13539,
5235,
261,
12316,
2934,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cvere = re.compile(r'<td><font[^>]*>description</font></td>\s*<td><font[^>]*>(.*?)\s*</font>', re.I | re.DOTALL) | cvere = re.compile(r'<th.*?Description.*?<td.*?>(.*?)\s*</td>', re.I | re.DOTALL) | def _getnodetxt(node): L = [] for childnode in node.childNodes: if childnode.nodeType == childnode.TEXT_NODE: L.append(childnode.data) val = ''.join(L) if node.hasAttribute('encoding'): encoding = node.getAttribute('encoding') if encoding == 'base64': try: val = val.decode('base64') except: val = 'Cannot convert bug data from base64.' while entre.search(val): entity = entre.search(val).group(1) if entity in entities: val = entre.sub(entities[entity], val) else: val = entre.sub('?', val) return val | 2e08efdd35402987890db80e13cb0ea2fab589bf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3124/2e08efdd35402987890db80e13cb0ea2fab589bf/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
19888,
278,
15239,
12,
2159,
4672,
511,
273,
5378,
364,
1151,
2159,
316,
756,
18,
3624,
3205,
30,
309,
1151,
2159,
18,
2159,
559,
422,
1151,
2159,
18,
5151,
67,
8744,
30,
511... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19888,
278,
15239,
12,
2159,
4672,
511,
273,
5378,
364,
1151,
2159,
316,
756,
18,
3624,
3205,
30,
309,
1151,
2159,
18,
2159,
559,
422,
1151,
2159,
18,
5151,
67,
8744,
30,
511... |
task.schedule(self.connectionLost) | if self.connected: task.schedule(self.connectionLost) | def loseConnection(self): """ Stop accepting connections on this port. | 0af34b1785caf66bb98d3ea5e59a0c30afea53ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/0af34b1785caf66bb98d3ea5e59a0c30afea53ca/tcp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29612,
1952,
12,
2890,
4672,
3536,
5131,
25806,
5921,
603,
333,
1756,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29612,
1952,
12,
2890,
4672,
3536,
5131,
25806,
5921,
603,
333,
1756,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
dictcls = opts.get('dictcls', dict) | def __init__(self, iter=(), **opts): #{{{ dictcls = opts.get('dictcls', dict) if self.__class__ == BaseMappingSetType: raise NotImplementedError("BaseMappingSetType is an abstract class") elif not isiterable(iter): raise TypeError("%s object is not iterable" %iter.__class__.__name__) akey = self._adaptkey self._dict = dictcls(akey(k) for k in iter) | 5692ed97988b844b3fc73c0ff916ecbd137ea54b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2635/5692ed97988b844b3fc73c0ff916ecbd137ea54b/mappingset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1400,
33,
9334,
2826,
4952,
4672,
3735,
12187,
309,
365,
16186,
1106,
972,
422,
3360,
3233,
25181,
30,
1002,
11206,
2932,
2171,
3233,
25181,
353,
392,
8770,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1400,
33,
9334,
2826,
4952,
4672,
3735,
12187,
309,
365,
16186,
1106,
972,
422,
3360,
3233,
25181,
30,
1002,
11206,
2932,
2171,
3233,
25181,
353,
392,
8770,
... | |
platformutils.warnIfNotOnMainThread('VideoAreaView.exitFullScreen') | def exitFullScreen(self): platformutils.warnIfNotOnMainThread('VideoAreaView.exitFullScreen') if self.videoWindow.isFullScreen: self.window().addChildWindow_ordered_(self.videoWindow, NSWindowAbove) self.window().makeKeyAndOrderFront_(nil) self.videoWindow.exitFullScreen() | f4b4e51df0b4587bf9de91135851b92606bfeac8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/f4b4e51df0b4587bf9de91135851b92606bfeac8/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2427,
5080,
7956,
12,
2890,
4672,
309,
365,
18,
9115,
3829,
18,
291,
5080,
7956,
30,
365,
18,
5668,
7675,
1289,
1763,
3829,
67,
9885,
67,
12,
2890,
18,
9115,
3829,
16,
11472,
3829,
254... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2427,
5080,
7956,
12,
2890,
4672,
309,
365,
18,
9115,
3829,
18,
291,
5080,
7956,
30,
365,
18,
5668,
7675,
1289,
1763,
3829,
67,
9885,
67,
12,
2890,
18,
9115,
3829,
16,
11472,
3829,
254... | |
targetX,targetY,targetZ=normalizePosition(listener.mat.translationPart(),normalizationOffset,normalizationScale) | targetX,targetY,targetZ=normalizePosition(listener.mat.translationPart(),normalizationOffset,normalizationScale,False) | def choreoExport (scene,normalize=True): SelectedObjects = Blender.Object.GetSelected() listeners=Acoustic.getListeners() sources=[] target=None buffer="" for source in Acoustic.getSources(): if source.sel==1: sources.append(source) for listener in listeners: if listener.sel==1: target=listener break if target==None or not sources: Blender.Draw.PupMenu('You have to select one listener and at least one source objects!') return allAcousticObjects=Acoustic.getAcousticObjects(scene) # print list(allAcousticObjects) #TODO: refactor this (checked three times!) if normalize==True: normalizationOffset,normalizationScale=getNormalizationParameters(allAcousticObjects) for frame in range(Blender.Get('staframe'),Blender.Get('endframe')): Blender.Set('curframe',frame) roll,descention,azimuth=target.mat.toEuler() targetElevation=(-descention)%360 targetRoll=(roll)%360 targetAzimuth=(azimuth)%360 if normalize==True: targetX,targetY,targetZ=normalizePosition(listener.mat.translationPart(),normalizationOffset,normalizationScale) else: targetX,targetY,targetZ=listener.mat.translationPart() sourcesPositions="" for source in sources: if source.sel==1: if normalize==True: sourceX,sourceY,sourceZ=normalizePosition(source.mat.translationPart(),normalizationOffset,normalizationScale) else: sourceX,sourceY,sourceZ=source.mat.translationPart() sourcesPositions+=" %f %f %f" % (sourceX,sourceY,sourceZ) buffer+=ChoreoLineTemplate % vars() return buffer | db826d79aa0fcdbf20d0025f8b9f046ee5203638 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1456/db826d79aa0fcdbf20d0025f8b9f046ee5203638/exporter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
462,
479,
83,
6144,
261,
23694,
16,
12237,
33,
5510,
4672,
4352,
828,
4710,
273,
8069,
2345,
18,
921,
18,
967,
7416,
1435,
4679,
33,
37,
2894,
641,
335,
18,
588,
5583,
1435,
5550,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
462,
479,
83,
6144,
261,
23694,
16,
12237,
33,
5510,
4672,
4352,
828,
4710,
273,
8069,
2345,
18,
921,
18,
967,
7416,
1435,
4679,
33,
37,
2894,
641,
335,
18,
588,
5583,
1435,
5550,
33,
... |
cset,csetf = None,None | cc = seriesnode['ContourCount'].getValue() if cc==None: cc = 7 if logscale: loc = matplotlib.ticker.LogLocator() else: loc = matplotlib.ticker.MaxNLocator(cc+1) loc.create_dummy_axis() zmin,zmax = crange if zmin==None: zmin = C.min() if zmax==None: zmax = C.max() loc.set_bounds(zmin, zmax) lev = loc() zmargin = (zmax - zmin) * 0.000001 if zmax >= lev[-1]: lev[-1] += zmargin if zmin <= lev[0]: if logscale: lev[0] = 0.99 * zmin else: lev[0] -= zmargin if not fill: lev = lev[1:-1] defaultseriesnode['ContourCount'].setValue(len(lev)-2) | def update(self): """Update the figure. Everything happens here. The current set of customized properties is interpreted, data slices are obtained from the data sources, default figure properties are set based on properties of the obtained data, and the figure is built and shown. """ # We are called whenever figure properties change. If we do not want to update now, # just register that an update is needed and exit. if not self.updating: self.dirty = True return | ca77abda05c6ac461266d0b1ee4d4b11076d626e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/381/ca77abda05c6ac461266d0b1ee4d4b11076d626e/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
3536,
1891,
326,
7837,
18,
225,
26553,
10555,
2674,
18,
1021,
783,
444,
434,
29063,
1790,
353,
19898,
16,
501,
12390,
854,
12700,
628,
326,
501,
5550,
16,
805,
7837... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
2890,
4672,
3536,
1891,
326,
7837,
18,
225,
26553,
10555,
2674,
18,
1021,
783,
444,
434,
29063,
1790,
353,
19898,
16,
501,
12390,
854,
12700,
628,
326,
501,
5550,
16,
805,
7837... |
cu.execute("insert into npcs_instances(id,o_id,owner,creation) values\ (NULL, ?, ?,?)", (self.cloner[0], session.p_id, time())) | cu.execute("insert into npc_instances(id,n_id,location,creation) values\ (NULL, ?, ?,?)", (self.cloner[0], session.p_id, time.time())) | def do_clone(self, session, line): cu.execute("select id,name from objects where name = ?", (line.lower(),)) self.obj = cu.fetchone() cu.execute("select id,name from npcs where name = ?", (line.lower(),)) self.npc = cu.fetchone() if self.obj: cu.execute("select id,name from objects where name = ?", (line.lower(),)) self.cloner = cu.fetchone() cu.execute("insert into obj_instances(id,o_id,owner,creation) values\ (NULL, ?, ?,?)", (self.cloner[0], session.p_id, time())) session.push("%s has been cloned.\r\n" % str(self.cloner[1])) elif self.npc: cu.execute("select id,name from npcs where name = ?", (line.lower(),)) self.cloner = cu.fetchone() cu.execute("insert into npcs_instances(id,o_id,owner,creation) values\ (NULL, ?, ?,?)", (self.cloner[0], session.p_id, time())) session.push("%s has been cloned.\r\n" % str(self.cloner[1])) else: session.push("No such object or NPC.\r\n") | 1c5998314c3422331a3066a24ceb4a4b4eb8d1de /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5020/1c5998314c3422331a3066a24ceb4a4b4eb8d1de/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
14056,
12,
2890,
16,
1339,
16,
980,
4672,
15985,
18,
8837,
2932,
4025,
612,
16,
529,
628,
2184,
1625,
508,
273,
692,
3113,
261,
1369,
18,
8167,
9334,
3719,
365,
18,
2603,
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,
741,
67,
14056,
12,
2890,
16,
1339,
16,
980,
4672,
15985,
18,
8837,
2932,
4025,
612,
16,
529,
628,
2184,
1625,
508,
273,
692,
3113,
261,
1369,
18,
8167,
9334,
3719,
365,
18,
2603,
273,... |
args=[ _shmemBackstagePass(), size, type ]) | args=[ _shmemBackstagePass(), size, type, ExprLiteral.FALSE ]) | def _shmemAlloc(size, type): # starts out UNprotected return ExprCall(ExprVar('Shmem::Alloc'), args=[ _shmemBackstagePass(), size, type ]) | f9a26ef60951567325285dcc7543df9d28c8a654 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/f9a26ef60951567325285dcc7543df9d28c8a654/lower.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
674,
3917,
8763,
12,
1467,
16,
618,
4672,
468,
2542,
596,
5019,
1117,
327,
8074,
1477,
12,
4742,
1537,
2668,
1555,
3917,
2866,
8763,
19899,
833,
22850,
389,
674,
3917,
2711,
12869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
674,
3917,
8763,
12,
1467,
16,
618,
4672,
468,
2542,
596,
5019,
1117,
327,
8074,
1477,
12,
4742,
1537,
2668,
1555,
3917,
2866,
8763,
19899,
833,
22850,
389,
674,
3917,
2711,
12869,
... |
include_dirs = includes, | include_dirs = includes + CONTRIBS_INC, | def adjustLFLAGS(lfags, libdirs, libs): '''Extrace the -L and -l flags and put them in libdirs and libs as needed''' newLFLAGS = [] for flag in lflags: if flag[:2] == '-L': libdirs.append(flag[2:]) elif flag[:2] == '-l': libs.append(flag[2:]) else: newLFLAGS.append(flag) return newLFLAGS | 4c41721418d544175d81f2270bc305cc33de5f12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/4c41721418d544175d81f2270bc305cc33de5f12/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5765,
9105,
6552,
55,
12,
20850,
1341,
16,
2561,
8291,
16,
15042,
4672,
9163,
424,
5129,
326,
300,
48,
471,
300,
80,
2943,
471,
1378,
2182,
316,
2561,
8291,
471,
15042,
487,
3577,
26418,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5765,
9105,
6552,
55,
12,
20850,
1341,
16,
2561,
8291,
16,
15042,
4672,
9163,
424,
5129,
326,
300,
48,
471,
300,
80,
2943,
471,
1378,
2182,
316,
2561,
8291,
471,
15042,
487,
3577,
26418,... |
sim.getRNG().setSeed(12345) | sim.getRNG().set(seed=12345) | def randomMove(x, y): '''Pass parental information fields to offspring''' # shift right with high concentration of alleles... off_x = random.normalvariate((x[0]+x[1])/2., 0.1) off_y = random.normalvariate((y[0]+y[1])/2., 0.1) return off_x, off_y | 205f55f8c6cd28aed704d70838912648f07ac340 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/205f55f8c6cd28aed704d70838912648f07ac340/userGuide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2744,
7607,
12,
92,
16,
677,
4672,
9163,
6433,
982,
287,
1779,
1466,
358,
21174,
11638,
26418,
468,
4654,
2145,
598,
3551,
20570,
8230,
367,
434,
24634,
2777,
3397,
67,
92,
273,
2744,
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,
2744,
7607,
12,
92,
16,
677,
4672,
9163,
6433,
982,
287,
1779,
1466,
358,
21174,
11638,
26418,
468,
4654,
2145,
598,
3551,
20570,
8230,
367,
434,
24634,
2777,
3397,
67,
92,
273,
2744,
18... |
return self.y * self.height | return self.j * self.height | def get_bottom(self): return self.y * self.height | ae46287e32a1e7a487f4f47ee34d687ee3d6604c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7473/ae46287e32a1e7a487f4f47ee34d687ee3d6604c/tiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9176,
12,
2890,
4672,
327,
365,
18,
93,
380,
365,
18,
4210,
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,
336,
67,
9176,
12,
2890,
4672,
327,
365,
18,
93,
380,
365,
18,
4210,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
USE_FROZEN = hasattr(imp, "set_frozenmodules") | USE_ZIPIMPORT = "zipimport" in sys.builtin_module_names | def report(self): # XXX something decent pass | 109ecbf7a52786df6114cfb678bd19e19102e076 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/109ecbf7a52786df6114cfb678bd19e19102e076/bundlebuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
2890,
4672,
468,
11329,
5943,
2109,
319,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
2605,
12,
2890,
4672,
468,
11329,
5943,
2109,
319,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def java_omero(*args): | def java_omero(args): | def java_omero(*args): command = [ find_java() ] command.extend( calculate_memory_args() ) command.extend(["omero"]) command.extend(choose_omero_version()) command.extend(*args) execute(command) | 7e8b315f1a823542c65776d3db68173c150187c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/7e8b315f1a823542c65776d3db68173c150187c6/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2252,
67,
362,
2439,
12,
1968,
4672,
1296,
273,
306,
1104,
67,
6290,
1435,
308,
1296,
18,
14313,
12,
4604,
67,
7858,
67,
1968,
1435,
262,
1296,
18,
14313,
3816,
6,
362,
2439,
6,
5717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2252,
67,
362,
2439,
12,
1968,
4672,
1296,
273,
306,
1104,
67,
6290,
1435,
308,
1296,
18,
14313,
12,
4604,
67,
7858,
67,
1968,
1435,
262,
1296,
18,
14313,
3816,
6,
362,
2439,
6,
5717,
... |
pass | del self.fp | def close(self): pass | d373c54bda1cb5fdecd96413f5e88f25a57a2f87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d373c54bda1cb5fdecd96413f5e88f25a57a2f87/mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
1342,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
transporter = _TransportFactory[fmb['TransportMethod']] | transporter = _TransportFactory[template['TransportMethod']] | def localTransferFile(self, fileInfo, template): """ _localTransferFile_ | 488337f01f86931e07f0464f98d7197a92193809 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/488337f01f86931e07f0464f98d7197a92193809/RuntimeStageOut.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1191,
5912,
812,
12,
2890,
16,
12538,
16,
1542,
4672,
3536,
389,
3729,
5912,
812,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1191,
5912,
812,
12,
2890,
16,
12538,
16,
1542,
4672,
3536,
389,
3729,
5912,
812,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
data = rel_report(objects, **localcontext).render().getvalue() | if len(inspect.getargspec(rel_report.__call__)[0]) == 2: data = rel_report(objects, **localcontext).render().getvalue() else: localcontext['objects'] = objects data = rel_report(**localcontext).render().getvalue() | def parse(self, cursor, user, report, objects, datas, context): localcontext = {} localcontext['datas'] = datas localcontext['user'] = self.pool.get('res.user').\ browse(cursor, user, user) localcontext['formatLang'] = self.format_lang localcontext['decodestring'] = decodestring localcontext['StringIO'] = StringIO.StringIO localcontext['time'] = time localcontext['datetime'] = datetime localcontext.update(context) | 3e224ef547d5d6d016f341b91601043e64e9d868 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/3e224ef547d5d6d016f341b91601043e64e9d868/report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
3347,
16,
729,
16,
2605,
16,
2184,
16,
5386,
16,
819,
4672,
1191,
2472,
273,
2618,
1191,
2472,
3292,
13178,
3546,
273,
5386,
1191,
2472,
3292,
1355,
3546,
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,
1109,
12,
2890,
16,
3347,
16,
729,
16,
2605,
16,
2184,
16,
5386,
16,
819,
4672,
1191,
2472,
273,
2618,
1191,
2472,
3292,
13178,
3546,
273,
5386,
1191,
2472,
3292,
1355,
3546,
273,
365,
... |
(lowHunk, highHunk) = (chgLowID / HUNK_SIZE, chgHighID / HUNK_SIZE) | (lowHunk, highHunk) = (chgLowID / HUNK_SIZE, (chgHighID - 1) / HUNK_SIZE) | def changedRange(self, chgLowID, chgHighID): """ Record a range of data changes, for later flushing. | d1ed80091a72465710c0f667e6dbb19c01833b19 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11221/d1ed80091a72465710c0f667e6dbb19c01833b19/GLPrimitiveBuffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3550,
2655,
12,
2890,
16,
462,
75,
10520,
734,
16,
462,
75,
8573,
734,
4672,
3536,
5059,
279,
1048,
434,
501,
3478,
16,
364,
5137,
30121,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3550,
2655,
12,
2890,
16,
462,
75,
10520,
734,
16,
462,
75,
8573,
734,
4672,
3536,
5059,
279,
1048,
434,
501,
3478,
16,
364,
5137,
30121,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
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. | 720e5ded923917c498c7c441c6e39022ce60cd2f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/720e5ded923917c498c7c441c6e39022ce60cd2f/__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,
... |
homepos = self.parentframe.ClientToScreen(wxPoint(0,0)) floatpos = self.floatframe.GetPosition() if (abs(homepos.x - floatpos.x) < _DOCKTHRESHOLD and abs(homepos.y - floatpos.y) < _DOCKTHRESHOLD): self.Float(0) return if e.Dragging(): if not self.IsFloating(): self.Float(true) self.oldpos = (e.GetX(), e.GetY()) else: if hasattr(self, 'oldpos'): loc = self.floatframe.GetPosition() pt = wxPoint(loc.x - (self.oldpos[0]-e.GetX()), loc.y - (self.oldpos[1]-e.GetY())) self.floatframe.Move(pt) def _SetFauxBarVisible(self, vis): return if vis: if self.parentframe.GetToolBar() == None: if not hasattr(self, 'nullbar'): self.nullbar = wxToolBar(self.parentframe, -1) print "Adding fauxbar." self.nullbar.Reparent(self.parentframe) print "Reparented." self.parentframe.SetToolBar(self.nullbar) print "Set toolbar" col = wxNamedColour("GREY") self.nullbar.SetBackgroundColour(col) print "Set color" | self.floatframe.SetTitle(self.title) def Float(self, bool): "Floats or docks the toolbar programmatically." if bool: self.parentframe = wxPyTypeCast(self.GetParent(), 'wxFrame') print self.title if self.title: useStyle = wxDEFAULT_FRAME_STYLE else: useStyle = wxTHICK_FRAME self.floatframe = wxFrame(self.parentframe, -1, self.title, style = useStyle) self.Reparent(self.floatframe) self.parentframe.SetToolBar(None) self.floating = 1 psize = self.parentframe.GetSize() self.parentframe.SetSize(wxSize(0,0)) self.parentframe.SetSize(psize) self.floatframe.SetToolBar(self) self.oldcolor = self.GetBackgroundColour() w = psize.width h = self.GetSize().height if self.title: h = h + self.titleheight self.floatframe.SetSize(wxSize(w,h)) self.floatframe.SetClientSize(self.GetSize()) newpos = self.parentframe.GetPosition() newpos.y = newpos.y + _DOCKTHRESHOLD * 2 self.floatframe.SetPosition(newpos) self.floatframe.Show(true) EVT_CLOSE(self.floatframe, self.OnDock) else: self.Reparent(self.parentframe) self.parentframe.SetToolBar(self) self.floating = 0 self.floatframe.SetToolBar(None) self.floatframe.Destroy() | def OnMouse(self, e): if not self.IsFloatable(): e.Skip() return | 8211bdcc03edec14659d55433553dcdd648dc7db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/8211bdcc03edec14659d55433553dcdd648dc7db/floatbar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
9186,
12,
2890,
16,
425,
4672,
309,
486,
365,
18,
2520,
4723,
429,
13332,
425,
18,
6368,
1435,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
9186,
12,
2890,
16,
425,
4672,
309,
486,
365,
18,
2520,
4723,
429,
13332,
425,
18,
6368,
1435,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
pool = NSAutoreleasePool.alloc().init() alert = NSAlert.alloc().init() alert.setAlertStyle_(NSInformationalAlertStyle) alert.setMessageText_(u'DTV is up to date') alert.setInformativeText_(u'No updates are available. Please try again later.') alert.runModal() del alert del pool | summary = u'DTV is up to date' message = u'No updates are available. Please try again later.' showInformationalDialog(summary, message) | def dtvIsUpToDate(self): pool = NSAutoreleasePool.alloc().init() alert = NSAlert.alloc().init() alert.setAlertStyle_(NSInformationalAlertStyle) alert.setMessageText_(u'DTV is up to date') alert.setInformativeText_(u'No updates are available. Please try again later.') alert.runModal() del alert del pool | 6186e4a5c970f8e47cbfc5c7d887acc6a15561fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/6186e4a5c970f8e47cbfc5c7d887acc6a15561fb/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3681,
90,
2520,
1211,
31264,
12,
2890,
4672,
2845,
273,
423,
5233,
322,
479,
2508,
2864,
18,
9853,
7675,
2738,
1435,
6881,
273,
423,
5233,
9909,
18,
9853,
7675,
2738,
1435,
6881,
18,
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,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3681,
90,
2520,
1211,
31264,
12,
2890,
4672,
2845,
273,
423,
5233,
322,
479,
2508,
2864,
18,
9853,
7675,
2738,
1435,
6881,
273,
423,
5233,
9909,
18,
9853,
7675,
2738,
1435,
6881,
18,
542... |
self.inactive.coalesce() | def coalesce(self): """ Coalesce the internal segment lists. """ self.active.coalesce() self.inactive.coalesce() | bcd97bdeac084860dc395b535f5985906d79618c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/bcd97bdeac084860dc395b535f5985906d79618c/segments.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1825,
24827,
12,
2890,
4672,
3536,
7695,
24827,
326,
2713,
3267,
6035,
18,
3536,
365,
18,
3535,
18,
2894,
24827,
1435,
365,
18,
27366,
18,
2894,
24827,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1825,
24827,
12,
2890,
4672,
3536,
7695,
24827,
326,
2713,
3267,
6035,
18,
3536,
365,
18,
3535,
18,
2894,
24827,
1435,
365,
18,
27366,
18,
2894,
24827,
1435,
2,
-100,
-100,
-100,
-100,
-... | |
elif item in load: | elif item in (x.name for x in load): | def buildShallowDeps(): # Notes: # load time = before class = require # runtime = after class = use | 9fcc2e06b607aced774242b3f05d49061c46732e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/9fcc2e06b607aced774242b3f05d49061c46732e/DependencyLoader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
1555,
5965,
14430,
13332,
468,
29584,
30,
468,
1262,
813,
273,
1865,
667,
273,
2583,
468,
3099,
273,
1839,
667,
273,
999,
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,
0,
0,
0,
0,
0,
0,
0,
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,
1361,
1555,
5965,
14430,
13332,
468,
29584,
30,
468,
1262,
813,
273,
1865,
667,
273,
2583,
468,
3099,
273,
1839,
667,
273,
999,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return self.allTroves.findTroves(*args, **kw) | return self.allTroveList.findTroves(*args, **kw) | def findTroves(self, *args, **kw): return self.allTroves.findTroves(*args, **kw) | 5ce365bc7bf4954f9b1ce0c81d0375416bcf9c1e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/5ce365bc7bf4954f9b1ce0c81d0375416bcf9c1e/trovesource.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
56,
303,
3324,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
4672,
327,
365,
18,
454,
56,
303,
3324,
18,
4720,
56,
303,
3324,
30857,
1968,
16,
2826,
9987,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
56,
303,
3324,
12,
2890,
16,
380,
1968,
16,
2826,
9987,
4672,
327,
365,
18,
454,
56,
303,
3324,
18,
4720,
56,
303,
3324,
30857,
1968,
16,
2826,
9987,
13,
2,
-100,
-100,
-100,
-... |
lib = import_zlib() | zlib = import_zlib() | def PIL_imagedata(self): lib = import_zlib() if not zlib: return image = self.image myimage = image.convert('RGB') imgwidth, imgheight = myimage.size | a6c4f589284071f2d6c17a3d2e61a54594f5b9ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/a6c4f589284071f2d6c17a3d2e61a54594f5b9ed/pdfimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29407,
67,
381,
11349,
396,
12,
2890,
4672,
24220,
273,
1930,
67,
94,
2941,
1435,
309,
486,
24220,
30,
327,
1316,
273,
365,
18,
2730,
3399,
2730,
273,
1316,
18,
6283,
2668,
11343,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29407,
67,
381,
11349,
396,
12,
2890,
4672,
24220,
273,
1930,
67,
94,
2941,
1435,
309,
486,
24220,
30,
327,
1316,
273,
365,
18,
2730,
3399,
2730,
273,
1316,
18,
6283,
2668,
11343,
6134,
... |
x += '<input type="hidden" name="job_id" value="%s" />' % (fdict["job_id"]) | x += '<input type="hidden" name="job_id" value="%s" />' % ( fdict["job_id"]) | def html_job_info_table(fdict): """Returns a table of information on a given job with data taken from the MySQL database """ x = '' x += '<center>' x += '<table border="0" cellpadding="3" width="100%" class="explore_table">' ## user/email/passcode/structure name x += '<tr class="explore_table_head">' x += '<th colspan="2">User Information</th>' x += '<th>Session Information</th>' x += '</tr>' x += '<tr><td colspan="2">' x += '<table>' ## email address x += '<tr class="explore_table_row">' x += '<td class="r"><label>EMail Address:</td>' x += '<td class="l"><b>%s</b>' % (fdict.get("email", "")) x += '</label></td>' x += '</tr>' ## structure code x += '<tr>' x += '<td class="r"><label>Structure Code:</td>' x += '<td class="l"><b>%s</b>' % (fdict.get("structure_id", "")) x += '</label></td>' x += '</tr>' ## user comments x += '<tr>' x += '<td class="r"><label>Associated Notes:</td>' x += '<td class="l"><b>%s</b>' % (fdict.get("user_comment", "")) x += '</label></td>' x += '</tr>' x += '</table>' x += '</td>' ##========================================================================== ## session info x += '<td valign="top"><table>' x += '<tr><td class="r">TLSMD Job ID:</td>' x += '<td><b>%s</b></td></tr>' % (fdict["job_id"]) x += '<tr><td class="r">Job State:</td>' if fdict.has_key("state"): jobstate = (fdict["state"]) else: jobstate = "unknown" x += '<td><b>%s</b></td></tr>' % (jobstate) x += '<tr><td class="r">Submission IP Address: </td>' x += '<td><b>%s</b></td></tr>' % (fdict.get("ip_address", "")) x += '<tr><td class="r">Submission Date: </td>' if fdict.has_key("submit_time"): date = timestring(fdict["submit_time"]) else: date = "---" x += '<td><b>%s</b></td></tr>' % (date) x += '<tr><td class="r">Processing Start Date: </td>' if fdict.has_key("run_time_begin"): date = timestring(fdict["run_time_begin"]) else: date = "---" x += '<td><b>%s</b></td></tr>' % (date) x += '<tr><td class="r">Processing End Date: </td>' if fdict.has_key("run_time_end"): date = timestring(fdict["run_time_end"]) else: date = "---" x += '<td><b>%s</b></td></tr>' % (date) x += '<tr><td class="r">Processing Time(HH:MM): </td>' if fdict.has_key("run_time_end") and fdict.has_key("run_time_begin"): if (fdict["run_time_begin"] == None) or (fdict["run_time_end"] == None): hours = "----" else: hours = timediffstring(fdict["run_time_begin"], fdict["run_time_end"]) else: hours = "---" x += '<td><b>%s</b></td></tr>' % (hours) x += '</table></td>' x += '</tr>' ##========================================================================== ## Selected Chains for Analysis x += '<tr class="explore_table_head">' x += '<th colspan="3">Selected Chains</th></tr>' x += '<tr><td colspan="3">' x += '<table cellpadding="5" style="text-align:center;">' ## Thumbnail image of user's structure if conf.THUMBNAIL: x += '<tr><th colspan="3"><img src="%s"/></th></tr>' % ( conf.TLSMD_WORK_URL + "/" + fdict["job_id"] + "/struct.png") ## Selected chains information x += '<tr><th><font size="-5">Chain</font></th>' x += '<th><font size="-5">Processing Time (HH:MM.SS)</font></th>' chains = mysql.job_get_chain_sizes(fdict["job_id"]).rstrip(";") for c in chains.split(';'): x += '<tr><td>' chid, length, selected, type = misc.parse_chains(c) name = "CHAIN%s" % chid if selected == "1": if type == "aa": desc = "Chain: %s (%s Amino Acid Residues)" % (chid, length) elif type == "na": desc = "Chain: %s (%s Nucleic Acid Residues)" % (chid, length) x += '<tr>' x += '<td>%s</td>' % desc ## TODO: Record running time for each chain, 2009-05-29 processing_time = False #if cdict.has_key("processing_time"): if processing_time: #hours = secdiffstring(cdict["processing_time"]) hours = "0000" else: hours = "---" x += '<td>%s</td>' % (hours) x += '</tr>' x += '</table></td></tr>' ##========================================================================== ## Detailed advanced settings list x += '<tr class="explore_table_head">' x += '<th colspan="3">Advanced Settings</th></tr>' x += '<tr><td class="l"><pre>' ## TLS Model if fdict.get("tls_model") is None or fdict.get("tls_model") == "ISOT": x += left_justify_string('TLS Model', 'Isotropic') elif fdict.get("tls_model") == "ANISO": x += left_justify_string('TLS Model', 'Anisotropic') ## Least Squares Weighting (not reported) if fdict.get("weight") is None or fdict.get("weight") == "IUISO": x += left_justify_string('Least Squares Weighting', 'Inverse Atomic B_iso') elif fdict.get("weight") == "NONE": x += left_justify_string('Least Squares Weighting', 'No Weighting') ## Include Atoms if fdict.get("include_atoms") is None or fdict.get("include_atoms") == "ALL": x += left_justify_string('Include Atoms', 'Include All Atoms') elif fdict.get("include_atoms") == "MAINCHAIN": x += left_justify_string('Include Atoms', 'Main Chain Atoms') elif fdict.get("include_atoms") == "CA": x += left_justify_string('Include Atoms', 'C-Alpha Atoms') ## Jmol-viewer settings. 2008-11-13 if fdict.get("generate_jmol_view") == True: x += left_justify_string('Generate Jmol-viewer files', 'True') elif fdict.get("generate_jmol_view") == False: x += left_justify_string('Generate Jmol-viewer files', 'False') else: x += left_justify_string('Generate Jmol-viewer files', 'n/a') ## Jmol-animation settings. 2008-11-13 if fdict.get("generate_jmol_animate") == True: x += left_justify_string('Generate Jmol-animation files', 'True') elif fdict.get("generate_jmol_animate") == False: x += left_justify_string('Generate Jmol-animation files', 'False') else: x += left_justify_string('Generate Jmol-animation files', 'n/a') ## Histogram settings. 2008-11-13 if fdict.get("generate_histogram") == True: x += left_justify_string('Generate histogram files', 'True') elif fdict.get("generate_histogram") == False: x += left_justify_string('Generate histogram files', 'False') else: x += left_justify_string('Generate histogram files', 'n/a') ## Number of segments settings. 2008-11-13 if fdict.get("nparts") == "": x += left_justify_string('Maximum number of segments', 'n/a') else: x += left_justify_string('Maximum number of segments', '%s' % fdict["nparts"]) x += '</pre></td>' x += '</tr>' ##========================================================================== ## end form if fdict.has_key("removebutton"): x += '<form enctype="multipart/form-data" action="webtlsmd.cgi" method="post">' ## Job ID, user, passwd x += '<input type="hidden" name="page" value="%s" />' % (fdict.get("page", "index")) x += '<input type="hidden" name="edit_form" value="TRUE" />' x += '<input type="hidden" name="job_id" value="%s" />' % (fdict["job_id"]) x += '<tr>' x += '<td colspan="3" class="l">' x += '<input type="submit" name="submit" value="Remove Job" />' if fdict.has_key("signalbutton"): x += '<input type="submit" name="submit" value="Signal Job" />' if fdict.has_key("killbutton"): x += '<input type="submit" name="submit" value="Kill Job" />' ## FIXME: This is redundant if fdict.has_key("removebutton"): x += '</td>' x += '</form>' x += '</tr>' x += '</table>' return x | ebe7911aaa6579796c3b771f64c91ad7ae981d9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/ebe7911aaa6579796c3b771f64c91ad7ae981d9b/webtlsmd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
4688,
67,
1376,
67,
2121,
12,
74,
1576,
4672,
3536,
1356,
279,
1014,
434,
1779,
603,
279,
864,
1719,
598,
501,
9830,
628,
326,
13485,
2063,
3536,
225,
619,
225,
273,
875,
619... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4688,
67,
1376,
67,
2121,
12,
74,
1576,
4672,
3536,
1356,
279,
1014,
434,
1779,
603,
279,
864,
1719,
598,
501,
9830,
628,
326,
13485,
2063,
3536,
225,
619,
225,
273,
875,
619... |
go_deeper = True ids2 = self.search(cr, uid, [('name','=',dep.name)]) | def state_update(self, cr, uid, ids, newstate, states_to_update, context={}, level=50): if level<1: raise orm.except_orm(_('Error'), _('Recursion error in modules dependencies !')) demo = False for module in self.browse(cr, uid, ids): mdemo = False go_deeper = False for dep in module.dependencies_id: if dep.state == 'unknown': raise orm.except_orm(_('Error'), _('You try to install a module that depends on the module: %s.\nBut this module is not available in your system.') % (dep.name,)) if dep.state != newstate: go_deeper = True ids2 = self.search(cr, uid, [('name','=',dep.name)]) mdemo = self.state_update(cr, uid, ids2, newstate, states_to_update, context, level-1,) or mdemo if not go_deeper: mdemo = module.demo if module.state in states_to_update: self.write(cr, uid, [module.id], {'state': newstate, 'demo':mdemo}) demo = demo or mdemo return demo | 0c7932a043534276415cac7108dffd48983ff2e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/0c7932a043534276415cac7108dffd48983ff2e8/module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
2725,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
394,
2019,
16,
5493,
67,
869,
67,
2725,
16,
819,
28793,
1801,
33,
3361,
4672,
309,
1801,
32,
21,
30,
1002,
13969,
18,
14137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
919,
67,
2725,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
394,
2019,
16,
5493,
67,
869,
67,
2725,
16,
819,
28793,
1801,
33,
3361,
4672,
309,
1801,
32,
21,
30,
1002,
13969,
18,
14137... | |
for [returnType, names, arguments] in functions: | for [return_type, names, arguments] in functions: | file.write('typedef %s (GL_BINDING_CALL *%sProc)(%s);\n' % (returnType, names[0], arguments)) | 218a5a204661ad6185f01d6233b35b2d5f86027b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/218a5a204661ad6185f01d6233b35b2d5f86027b/generate_bindings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
585,
18,
2626,
2668,
723,
536,
738,
87,
261,
11261,
67,
2739,
67,
13730,
380,
9,
87,
15417,
13,
9275,
87,
20472,
82,
11,
738,
261,
2463,
559,
16,
1257,
63,
20,
6487,
1775,
3719,
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,
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,
585,
18,
2626,
2668,
723,
536,
738,
87,
261,
11261,
67,
2739,
67,
13730,
380,
9,
87,
15417,
13,
9275,
87,
20472,
82,
11,
738,
261,
2463,
559,
16,
1257,
63,
20,
6487,
1775,
3719,
2,
-100,
... |
or method == 'POST' and not isinstance(response, xmlrpc.Response) | or method == 'POST' and not isinstance(RESPONSE, xmlrpc.Response) | def __bobo_traverse__(self, REQUEST, name, RESPONSE=None): """ transparent access to session subobjects """ # is it a registered sub object data = self.getSubObject(name, REQUEST, RESPONSE) if data is not None: return data # or a standard attribute (maybe acquired...) # DM 2004-08-10: this breaks FTP/WebDAV's PUT: # If a new object should be created with an id that can # be acquired, then the existing object is silently overwritten # rather than a new one created. ## target = getattr(self, name, None) method = REQUEST.get('REQUEST_METHOD', 'GET').upper() if (len(REQUEST.get('TraversalRequestNameStack', ())) == 0 and not ( # logic from "ZPublisher.BaseRequest.BaseRequest.traverse" # to check whether this is a browser request method == 'GET' or method == 'POST' and not isinstance(response, xmlrpc.Response) ) ): if shasattr(self, name): target = getattr(self, name) else: target = None else: # we are allowed to acquire target = getattr(self, name, None) if target is not None: return target if (not method in ('GET', 'POST', 'HEAD') and not isinstance(RESPONSE, xmlrpc.Response)): from webdav.NullResource import NullResource return NullResource(self, name, REQUEST).__of__(self) # ok the RESPONSE is None for web traversal and sometimes the # REQUEST isn't a HTTPRequest object but a dict if hasattr(REQUEST, 'RESPONSE'): REQUEST.RESPONSE.notFoundError("%s\n%s" % (name, '')) | 701e3ad8a0c9bef98f4b495aec1746917aeed478 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/701e3ad8a0c9bef98f4b495aec1746917aeed478/BaseObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
70,
947,
83,
67,
2033,
2476,
972,
12,
2890,
16,
12492,
16,
508,
16,
20645,
33,
7036,
4672,
3536,
17270,
2006,
358,
1339,
720,
6911,
3536,
468,
353,
518,
279,
4104,
720,
733,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
70,
947,
83,
67,
2033,
2476,
972,
12,
2890,
16,
12492,
16,
508,
16,
20645,
33,
7036,
4672,
3536,
17270,
2006,
358,
1339,
720,
6911,
3536,
468,
353,
518,
279,
4104,
720,
733,
501,... |
if newnick[:1] == cfg.irc_to_dc_prefix: | if newnick.startswith(cfg.irc_to_dc_prefix): | def handleCmd_NICK(self, prefix, args): | 965b53ff789f71f50745fdf284fcd0d0521c8f22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12372/965b53ff789f71f50745fdf284fcd0d0521c8f22/dtella_bridgeserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
5931,
67,
50,
16656,
12,
2890,
16,
1633,
16,
833,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1640,
5931,
67,
50,
16656,
12,
2890,
16,
1633,
16,
833,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if len(lst) != len(fs.list): | if len(lst) != len(fs): | def cmp_post(fs, lst): if len(lst) != len(fs.list): print 'Lengths do not match: %r vs expected %r' % ( len(lst), len(fs.list)) return False for fs_item, (expect_name, expect_value) in zip(fs.list, lst): if fs_item.name != expect_name: print "Names don't match: %r vs expected %r" % ( fs_item.name, expect_name) if fs_item.value != expect_value: print "Items don't match: %r vs expected %r" % ( fs_item.value, expect_value) return False return True | 76da4633eae92f618adf40d530f340fa27a71d98 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2097/76da4633eae92f618adf40d530f340fa27a71d98/test_request_form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
67,
2767,
12,
2556,
16,
9441,
4672,
309,
562,
12,
16923,
13,
480,
562,
12,
2556,
4672,
1172,
296,
22406,
741,
486,
845,
30,
738,
86,
6195,
2665,
738,
86,
11,
738,
261,
562,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
67,
2767,
12,
2556,
16,
9441,
4672,
309,
562,
12,
16923,
13,
480,
562,
12,
2556,
4672,
1172,
296,
22406,
741,
486,
845,
30,
738,
86,
6195,
2665,
738,
86,
11,
738,
261,
562,
12,... |
print 'Instance of class %s already exist. Modifying...' \ % inst.classname | if p.parser.verbose: p.parser.log('Instance of class %s already exist. Modifying...' % inst.classname) | def p_mp_createInstance(p): """mp_createInstance : instanceDeclaration""" inst = p[1] print 'Creating instance of %s.' % inst.classname try: p.parser.handle.CreateInstance(inst) except pywbem.CIMError, ce: if ce.args[0] == pywbem.CIM_ERR_ALREADY_EXISTS: print 'Instance of class %s already exist. Modifying...' \ % inst.classname p.parser.handle.ModifyInstance(inst) else: raise | e45c009f365830e687525a374840aeb320395b29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10648/e45c009f365830e687525a374840aeb320395b29/mof_compiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
1291,
67,
2640,
1442,
12,
84,
4672,
3536,
1291,
67,
2640,
1442,
294,
791,
6094,
8395,
1804,
273,
293,
63,
21,
65,
1172,
296,
11092,
791,
434,
738,
87,
1093,
738,
1804,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
67,
1291,
67,
2640,
1442,
12,
84,
4672,
3536,
1291,
67,
2640,
1442,
294,
791,
6094,
8395,
1804,
273,
293,
63,
21,
65,
1172,
296,
11092,
791,
434,
738,
87,
1093,
738,
1804,
18,
1... |
except FileNotFoundException, e: _error("Error! File not found: "+e.filename) exit(_EXIT_STATUS_ERROR) | def _error(string): """Prints an error message to stderr. The --quiet option doesn't avoid this.""" sys.stderr.write(string+"\n") | 3089e341d4712dda45bebe9df71c72306ab7f2a6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3171/3089e341d4712dda45bebe9df71c72306ab7f2a6/immv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1636,
12,
1080,
4672,
3536,
15402,
392,
555,
883,
358,
4514,
18,
1021,
1493,
20380,
1456,
3302,
1404,
4543,
333,
12123,
2589,
18,
11241,
18,
2626,
12,
1080,
9078,
64,
82,
7923,
282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
1636,
12,
1080,
4672,
3536,
15402,
392,
555,
883,
358,
4514,
18,
1021,
1493,
20380,
1456,
3302,
1404,
4543,
333,
12123,
2589,
18,
11241,
18,
2626,
12,
1080,
9078,
64,
82,
7923,
282,... | |
def join(a, b): if isabs(b): return b if a == '' or a[-1:] in '/\\': return a + b return a + os.sep + b | def join(a, *p): path = a for b in p: if isabs(b): path = b elif path == '' or path[-1:] in '/\\': path = path + b else: path = path + os.sep + b return path | def isabs(s): s = splitdrive(s)[1] return s != '' and s[:1] in '/\\' | 29d10cc97a65cf1056ad28c7a02032299ba128c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/29d10cc97a65cf1056ad28c7a02032299ba128c3/dospath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31567,
12,
87,
4672,
272,
273,
1416,
25431,
12,
87,
25146,
21,
65,
327,
272,
480,
875,
471,
272,
10531,
21,
65,
316,
1173,
10471,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31567,
12,
87,
4672,
272,
273,
1416,
25431,
12,
87,
25146,
21,
65,
327,
272,
480,
875,
471,
272,
10531,
21,
65,
316,
1173,
10471,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if _debug: print "\t%s: Called JpegImage.__init__()" % rendererName | debugMsg("Called JpegImage.__init__()") | def __init__(self, scene): """ Initialises the JpegImage class object | c44140bd3d918f82e3b4fb0f16f6949f4d7b003e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/c44140bd3d918f82e3b4fb0f16f6949f4d7b003e/image.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9065,
4672,
3536,
10188,
6141,
326,
804,
9001,
2040,
667,
733,
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,
1001,
2738,
972,
12,
2890,
16,
9065,
4672,
3536,
10188,
6141,
326,
804,
9001,
2040,
667,
733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.assert_(proc is proc2) | self.assert_(proc is proc2, "This will fail if there is a timing issue") | def test_reading_twice_from_same_process(self): proc = self.pool.get() try: result = proc.read(2) self.assertEquals(result, 'y\n') finally: self.pool.put(proc) | c7728ee4a137dee176d27fb0d021905ed693dfc1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10078/c7728ee4a137dee176d27fb0d021905ed693dfc1/processes_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
21803,
67,
11246,
1812,
67,
2080,
67,
14307,
67,
2567,
12,
2890,
4672,
5418,
273,
365,
18,
6011,
18,
588,
1435,
775,
30,
563,
273,
5418,
18,
896,
12,
22,
13,
365,
18,
11231... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21803,
67,
11246,
1812,
67,
2080,
67,
14307,
67,
2567,
12,
2890,
4672,
5418,
273,
365,
18,
6011,
18,
588,
1435,
775,
30,
563,
273,
5418,
18,
896,
12,
22,
13,
365,
18,
11231... |
if params['normalize'] == 'log': | if imshow_kwargs['normalize'] == 'log': | def show_imshow_popup_menu(self, (x, y), image, subplot): ''' shows a popup menu at pos x,y with items to: - Show image histogram - Change contrast stretching ''' # Manage a dict of popup menus keyed by each subplot (x,y) location if 'popup_menus' not in self.__dict__: self.popup_menus = {} params = self.subplot_params[subplot] popup = self.popup_menus.get(subplot, None) if popup == None: # If no popup has been built for this subplot yet, then create one MENU_CONTRAST_RAW = wx.NewId() MENU_CONTRAST_NORMALIZED = wx.NewId() MENU_CONTRAST_LOG = wx.NewId() MENU_CHANNELS_RED = wx.NewId() MENU_CHANNELS_GREEN = wx.NewId() MENU_CHANNELS_BLUE = wx.NewId() self.popup_menus[subplot] = popup = wx.Menu() open_in_new_figure_item = wx.MenuItem(popup, -1, 'Open image in new figure') popup.AppendItem(open_in_new_figure_item) show_hist_item = wx.MenuItem(popup, -1, 'Show image histogram') popup.AppendItem(show_hist_item) submenu = wx.Menu() item_raw = submenu.Append(MENU_CONTRAST_RAW, 'Raw', 'Do not transform pixel intensities', wx.ITEM_RADIO) item_normalized = submenu.Append(MENU_CONTRAST_NORMALIZED, 'Normalized', 'Stretch pixel intensities to fit the interval [0,1]', wx.ITEM_RADIO) item_log = submenu.Append(MENU_CONTRAST_LOG, 'Log normalized', 'Log transform pixel intensities, then stretch them to fit the interval [0,1]', wx.ITEM_RADIO) if params['normalize'] == 'log': item_log.Check() elif params['normalize'] == True: item_normalized.Check() elif params['normalize'] == False: item_raw.Check() popup.AppendMenu(-1, 'Image contrast', submenu) def open_image_in_new_figure(evt): '''Callback for "Open image in new figure" popup menu item ''' new_title = self.subplot(subplot[0], subplot[1]).get_title() fig = create_or_find(self, -1, new_title, subplots=(1,1), name=new_title) fig.subplot_imshow(0, 0, self.images[subplot]) fig.figure.canvas.draw() def show_hist(evt): '''Callback for "Show image histogram" popup menu item''' new_title = '%s %s image histogram'%(self.Title, subplot) fig = create_or_find(self, -1, new_title, subplots=(1,1), name=new_title) fig.subplot_histogram(0, 0, self.images[subplot].flatten(), bins=200, xlabel='pixel intensity') fig.figure.canvas.draw() def change_contrast(evt): '''Callback for Image contrast menu items''' if evt.Id == MENU_CONTRAST_RAW: params['normalize'] = False elif evt.Id == MENU_CONTRAST_NORMALIZED: params['normalize'] = True elif evt.Id == MENU_CONTRAST_LOG: params['normalize'] = 'log' self.subplot_imshow(subplot[0], subplot[1], self.images[subplot]) self.figure.canvas.draw() if is_color_image(image): submenu = wx.Menu() item = submenu.Append(MENU_CHANNELS_RED, 'Red', 'Show/Hide the red channel', wx.ITEM_CHECK) if params['rgb_mask'][0]: item.Check() item = submenu.Append(MENU_CHANNELS_GREEN, 'Green', 'Show/Hide the green channel', wx.ITEM_CHECK) if params['rgb_mask'][1]: item.Check() item = submenu.Append(MENU_CHANNELS_BLUE, 'Blue', 'Show/Hide the blue channel', wx.ITEM_CHECK) if params['rgb_mask'][2]: item.Check() popup.AppendMenu(-1, 'Channels', submenu) def toggle_channels(evt): '''Callback for channel menu items.''' if 'rgb_mask' not in params: params['rgb_mask'] = [1, 1, 1] if evt.Id == MENU_CHANNELS_RED: params['rgb_mask'][0] = not params['rgb_mask'][0] elif evt.Id == MENU_CHANNELS_GREEN: params['rgb_mask'][1] = not params['rgb_mask'][1] elif evt.Id == MENU_CHANNELS_BLUE: params['rgb_mask'][2] = not params['rgb_mask'][2] self.subplot_imshow(subplot[0], subplot[1], self.images[subplot]) self.figure.canvas.draw() | 85566b0bd1d42c808fc402bbd3f334d859bd5243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2870/85566b0bd1d42c808fc402bbd3f334d859bd5243/cpfigure.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
381,
4500,
67,
16086,
67,
5414,
12,
2890,
16,
261,
92,
16,
677,
3631,
1316,
16,
19826,
4672,
9163,
17975,
279,
10431,
3824,
622,
949,
619,
16,
93,
598,
1516,
358,
30,
300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
381,
4500,
67,
16086,
67,
5414,
12,
2890,
16,
261,
92,
16,
677,
3631,
1316,
16,
19826,
4672,
9163,
17975,
279,
10431,
3824,
622,
949,
619,
16,
93,
598,
1516,
358,
30,
300,
... |
features = [ 'threading-multi' ] | def glob_remove(sequence,pattern): result = fnmatch.filter(sequence,pattern) if 0 == len(result): raise ValueError() for r in result: sequence.remove(r) | 7fd3402b2f4f82737ed801341b64ce21798622c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9981/7fd3402b2f4f82737ed801341b64ce21798622c6/BoostBuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4715,
67,
4479,
12,
6178,
16,
4951,
4672,
563,
273,
18764,
18,
2188,
12,
6178,
16,
4951,
13,
309,
374,
422,
562,
12,
2088,
4672,
1002,
2068,
1435,
364,
436,
316,
563,
30,
3102,
18,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4715,
67,
4479,
12,
6178,
16,
4951,
4672,
563,
273,
18764,
18,
2188,
12,
6178,
16,
4951,
13,
309,
374,
422,
562,
12,
2088,
4672,
1002,
2068,
1435,
364,
436,
316,
563,
30,
3102,
18,
4... | |
if contains_unsupported_variable_type(graph): return False | def look_inside_graph(self, graph): if contains_unsupported_variable_type(graph): return False try: func = graph.func except AttributeError: return True return self.look_inside_function(func) | 6b26b80550752eebc986c8c5cd7ef8476dc96310 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/6b26b80550752eebc986c8c5cd7ef8476dc96310/policy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2324,
67,
28091,
67,
4660,
12,
2890,
16,
2667,
4672,
775,
30,
1326,
273,
2667,
18,
644,
1335,
6394,
30,
327,
1053,
327,
365,
18,
7330,
67,
28091,
67,
915,
12,
644,
13,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2324,
67,
28091,
67,
4660,
12,
2890,
16,
2667,
4672,
775,
30,
1326,
273,
2667,
18,
644,
1335,
6394,
30,
327,
1053,
327,
365,
18,
7330,
67,
28091,
67,
915,
12,
644,
13,
2,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.