rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
fndir = os.path.dirname(filename) if filename[:1] == os.sep: coverpath = os.path.join(dirname, "."+fndir) else: coverpath = os.path.join(dirname, fndir) | modulename = os.path.split(results.modules[key])[1] | def create_results_log(results, dirname = ".", show_missing = 1, save_counts = 0): import re # turn the counts data ("(filename, lineno) = count") into something # accessible on a per-file basis per_file = {} for filename, lineno in results.counts.keys(): lines_hit = per_file[filename] = per_file.get(filename, {}) lines_hit[lineno] = results.counts[(filename, lineno)] # try and merge existing counts and modules file from dirname try: counts = marshal.load(open(os.path.join(dirname, "counts"))) modules = marshal.load(open(os.path.join(dirname, "modules"))) results.update(results.__class__(counts, modules)) except IOError: pass # there are many places where this is insufficient, like a blank # line embedded in a multiline string. blank = re.compile(r'^\s*(#.*)?$') # generate file paths for the coverage files we are going to write... fnlist = [] tfdir = tempfile.gettempdir() for key in per_file.keys(): filename = key # skip some "files" we don't care about... if filename == "<string>": continue # are these caused by code compiled using exec or something? if filename.startswith(tfdir): continue # XXX this is almost certainly not portable!!! fndir = os.path.dirname(filename) if filename[:1] == os.sep: coverpath = os.path.join(dirname, "."+fndir) else: coverpath = os.path.join(dirname, fndir) if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] # Get the original lines from the .py file try: lines = open(filename, 'r').readlines() except IOError, err: sys.stderr.write("%s: Could not open %s for reading " \ "because: %s - skipping\n" % \ ("trace", `filename`, err.strerror)) continue modulename = os.path.split(results.modules[key])[1] # build list file name by appending a ".cover" to the module name # and sticking it into the specified directory listfilename = os.path.join(coverpath, modulename + ".cover") #sys.stderr.write("modulename: %(modulename)s\n" # "filename: %(filename)s\n" # "coverpath: %(coverpath)s\n" # "listfilename: %(listfilename)s\n" # "dirname: %(dirname)s\n" # % locals()) try: outfile = open(listfilename, 'w') except IOError, err: sys.stderr.write( '%s: Could not open %s for writing because: %s" \ "- skipping\n' % ("trace", `listfilename`, err.strerror)) continue # If desired, get a list of the line numbers which represent # executable content (returned as a dict for better lookup speed) if show_missing: executable_linenos = find_executable_linenos(filename) else: executable_linenos = {} lines_hit = per_file[key] for i in range(len(lines)): line = lines[i] # do the blank/comment match to try to mark more lines # (help the reader find stuff that hasn't been covered) if lines_hit.has_key(i+1): # count precedes the lines that we captured outfile.write('%5d: ' % lines_hit[i+1]) elif blank.match(line): # blank lines and comments are preceded by dots outfile.write(' . ') else: # lines preceded by no marks weren't hit # Highlight them if so indicated, unless the line contains # '#pragma: NO COVER' (it is possible to embed this into # the text as a non-comment; no easy fix) if executable_linenos.has_key(i+1) and \ string.find(lines[i], string.join(['#pragma', 'NO COVER'])) == -1: outfile.write('>>>>>> ') else: outfile.write(' '*7) outfile.write(string.expandtabs(lines[i], 8)) outfile.close() if save_counts: # try and store counts and module info into dirname try: marshal.dump(results.counts, open(os.path.join(dirname, "counts"), "w")) marshal.dump(results.modules, open(os.path.join(dirname, "modules"), "w")) except IOError, err: sys.stderr.write("cannot save counts/modules " \ "files because %s" % err.strerror) | 894961335102d1da3e013a6c403542d89fcb4d40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/894961335102d1da3e013a6c403542d89fcb4d40/trace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4717,
67,
1330,
12,
4717,
16,
4283,
273,
4585,
16,
2405,
67,
7337,
273,
404,
16,
1923,
67,
8008,
273,
374,
4672,
1930,
283,
468,
7005,
326,
6880,
501,
7566,
12,
3459,
16,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
4717,
67,
1330,
12,
4717,
16,
4283,
273,
4585,
16,
2405,
67,
7337,
273,
404,
16,
1923,
67,
8008,
273,
374,
4672,
1930,
283,
468,
7005,
326,
6880,
501,
7566,
12,
3459,
16,
75... |
TO_CHECK = list(Set(['types', '__builtin__', 'sys']).union(Set(sys.builtin_module_names)). union(Set([ 'math', '_codecs', 'array', '_random', '_sre', 'time', '_socket', 'errno', 'marshal', 'binascii', 'parser']+os_layer))) TO_CHECK.remove('__main__') TO_CHECK.remove('xxsubtype') | mods = """ _codecs _random _sre _weakref array binascii cPickle cStringIO struct datetime gc itertools math cmath md5 operator parser sha unicodedata zipimport time """.split() TO_CHECK = (basic + os_layer + mods) | def navig(): return html.p(mods_report.link(None), "|",html.span('Types/Classes',**{'class': 'title'})) | ff0d2b538803dd460f5457f2817d7dd8bbd96981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ff0d2b538803dd460f5457f2817d7dd8bbd96981/delta.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
290,
4911,
13332,
327,
1729,
18,
84,
12,
22760,
67,
6006,
18,
1232,
12,
7036,
3631,
11747,
3113,
2620,
18,
3969,
2668,
2016,
19,
4818,
2187,
636,
27828,
1106,
4278,
296,
2649,
11,
31700,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
290,
4911,
13332,
327,
1729,
18,
84,
12,
22760,
67,
6006,
18,
1232,
12,
7036,
3631,
11747,
3113,
2620,
18,
3969,
2668,
2016,
19,
4818,
2187,
636,
27828,
1106,
4278,
296,
2649,
11,
31700,... |
def __init__ (self, fd): | def __init__(self, fd): | def __init__ (self, fd): self.fd = fd | 52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
1652,
1001,
2738,
972,
12,
2890,
16,
5194,
4672,
365,
18,
8313,
273,
5194,
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,
... | [
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,
225,
1652,
1001,
2738,
972,
12,
2890,
16,
5194,
4672,
365,
18,
8313,
273,
5194,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self['threads'][thread]['checkTime'].append( [self.dayList.index(optionCheck.capitalize()) % 7 , 0, 23] ) else: raise Exception, u"Could not identify valid day of the week for %s" % optionCheck | self['threads'][thread]['checkTime'].append( [self.dayList.index(optionCheck.capitalize()) % 7, 0,23] ) else: raise Exception, u"""Could not identify valid day of \ the week for %s""" % optionCheck | def parse(self): for option in self.boolOptionsGlobal: try: if option.lower() in self.options('global'): try: self['global'][option] = self.getboolean('global', option) except ValueError: print >> sys.stderr, u'failed to parse option %s in global' % option except ConfigParser.NoSectionError, m: raise SystemExit(unicodeC(m)) for option in self.stringOptionsGlobal: if option.lower() in self.options('global'): self['global'][option] = self._ifnone( self.get('global', option) ) for option in self.intOptionsGlobal: if option.lower() in self.options('global'): try: self['global'][option] = self.getint('global', option) except ValueError: print >> sys.stderr, u'failed to parse option %s in global' % option threads = self.sections() del threads[threads.index('global')] for thread in threads: self['threads'][thread] = ThreadLink() for option in self.boolOptionsThread: if option.lower() in self.options(thread): try: self['threads'][thread][option] = self.getboolean(thread, option) except ValueError: print >> sys.stderr, u'failed to parse option %s in thread %s' % (option, thread) for option in self.stringOptionsThread: if option.lower() in self.options(thread): self['threads'][thread][option] = self._ifnone( self.get(thread, option) ) for option in self.intOptionsThread: if option.lower() in self.options(thread): try: self['threads'][thread][option] = self.getint(thread, option) except ValueError: print >> sys.stderr, u'failed to parse option %s in thread %s' % (option, thread) #populate thread.downloads downList = [ x for x in self.options(thread) if x.lower().startswith('download') ] checkList = [ x for x in self.options(thread) if x.lower().startswith('checktime') ] downList.sort() for i in downList: if i.lower().endswith('false'): try: self['threads'][thread]['downloads'][-1]['False'] = self.getboolean(thread, i) # either boolean except ValueError: self['threads'][thread]['downloads'][-1]['False'] = self._ifnone( self.get(thread, i) ) # or a string elif i.lower().endswith('true'): try: self['threads'][thread]['downloads'][-1]['True'] = self.getboolean(thread, i) except ValueError: pass # let default holder elif i.lower().endswith('dir'): self['threads'][thread]['downloads'][-1]['Dir'] = self._ifnone( self.get(thread, i) ) elif i.lower().endswith('maxsize'): try: self['threads'][thread]['downloads'][-1]['maxSize'] = self.getint(thread, i) except ValueError: pass elif i.lower().endswith('minsize'): try: self['threads'][thread]['downloads'][-1]['minSize'] = self.getint(thread, i) except ValueError: pass elif i.lower().endswith('function'): self['threads'][thread]['downloads'][-1]['Function'] = self._ifnone( self.get(thread, i) ) else: self['threads'][thread]['downloads'].append( DownloadItemConfig( self.get(thread, i) ) ) # regex'd, would fail with None checkList.sort() for j in checkList: optionCheck = self.get(thread, j) if j.endswith('day'): if self.dayList.count(optionCheck.capitalize()): self['threads'][thread]['checkTime'].append( [self.dayList.index(optionCheck.capitalize()) % 7 , 0, 23] ) else: raise Exception, u"Could not identify valid day of the week for %s" % optionCheck elif j.endswith('start'): self['threads'][thread]['checkTime'][-1][1] = int(optionCheck) if self['threads'][thread]['checkTime'][-1][1] > 23: self['threads'][thread]['checkTime'][-1][1] = 23 elif self['threads'][thread]['checkTime'][-1][1] < 0: self['threads'][thread]['checkTime'][-1][1] = 0 elif j.endswith('stop'): self['threads'][thread]['checkTime'][-1][2] = int(optionCheck) if self['threads'][thread]['checkTime'][-1][2] > 23: self['threads'][thread]['checkTime'][-1][2] = 23 elif self['threads'][thread]['checkTime'][-1][2] < 0: self['threads'][thread]['checkTime'][-1][2] = 0 | 633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
4672,
364,
1456,
316,
365,
18,
6430,
1320,
5160,
30,
775,
30,
309,
1456,
18,
8167,
1435,
316,
365,
18,
2116,
2668,
6347,
11,
4672,
775,
30,
365,
3292,
6347,
3546,
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,
1109,
12,
2890,
4672,
364,
1456,
316,
365,
18,
6430,
1320,
5160,
30,
775,
30,
309,
1456,
18,
8167,
1435,
316,
365,
18,
2116,
2668,
6347,
11,
4672,
775,
30,
365,
3292,
6347,
3546,
63,
... |
baseURLHashed = md5.md5(display.baseURL).hexdigest() | def load_html(self, display): | b0f329a802f9ce83468ff603349eb2fa68eda7c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12354/b0f329a802f9ce83468ff603349eb2fa68eda7c0/HTMLDisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2620,
12,
2890,
16,
2562,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
2620,
12,
2890,
16,
2562,
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,... | |
rotatetarget = os.path.join(os.path.normpath(self.settings['General']['Log Directory']), os.path.normpath(time.strftime("%Y%m%d_%H%M%S") + '_' + self.settings['General']['Log File'])) | rotateTarget = os.path.join(os.path.normpath(self.settings['General']['Log Directory']), os.path.normpath(time.strftime("%Y%m%d_%H%M%S") + '_' + self.settings['General']['Log File'])) self.PrintDebug("\nRenaming\n" + self.writeTarget + "\nto" + rotateTarget + "\n") | def RotateLogs(self): '''This will close the log file, set self.log to None, move the file to a dated filename. Then, openlogfile will take care of opening a fresh logfile by itself.''' if self.log != None: rotatetarget = os.path.join(os.path.normpath(self.settings['General']['Log Directory']), os.path.normpath(time.strftime("%Y%m%d_%H%M%S") + '_' + self.settings['General']['Log File'])) self.log.close() self.log = None try: os.rename(self.writetarget, rotatetarget) except: self.PrintDebug("Error rotating logfile") | c4e157d184da9e66f26817a0588de46edbe4044e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3638/c4e157d184da9e66f26817a0588de46edbe4044e/logwriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24280,
7777,
12,
2890,
4672,
9163,
2503,
903,
1746,
326,
613,
585,
16,
444,
365,
18,
1330,
358,
599,
16,
3635,
326,
585,
358,
279,
302,
690,
1544,
18,
9697,
16,
1696,
28806,
903,
4862,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24280,
7777,
12,
2890,
4672,
9163,
2503,
903,
1746,
326,
613,
585,
16,
444,
365,
18,
1330,
358,
599,
16,
3635,
326,
585,
358,
279,
302,
690,
1544,
18,
9697,
16,
1696,
28806,
903,
4862,... |
commit_queue_url = self.bug_server_url + "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review%2B" log("Loading commit queue") | commit_queue_url = self.bug_server_url + "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B" | def fetch_bug_ids_from_commit_queue(self): # FIXME: We should have an option for restricting the search by email. Example: # unassigned_only = "&emailassigned_to1=1&emailtype1=substring&email1=unassigned" commit_queue_url = self.bug_server_url + "buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=review%2B" log("Loading commit queue") | cb6a0ec94969d020613174113da19b322fab7527 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/cb6a0ec94969d020613174113da19b322fab7527/bugzilla.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
67,
925,
67,
2232,
67,
2080,
67,
7371,
67,
4000,
12,
2890,
4672,
468,
9852,
30,
1660,
1410,
1240,
392,
1456,
364,
13108,
310,
326,
1623,
635,
2699,
18,
225,
5090,
30,
468,
640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
925,
67,
2232,
67,
2080,
67,
7371,
67,
4000,
12,
2890,
4672,
468,
9852,
30,
1660,
1410,
1240,
392,
1456,
364,
13108,
310,
326,
1623,
635,
2699,
18,
225,
5090,
30,
468,
640,
... |
if not wlock and not mywlock: mywlock = True try: wlock = self.wlock(wait=0) except lock.LockException: pass if wlock: | if fixup: cleanup = False if not wlock: try: wlock = self.wlock(wait=0) cleanup = True except lock.LockException: pass if wlock: for f in fixup: | def mfmatches(node): change = self.changelog.read(node) mf = self.manifest.read(change[0]).copy() for fn in mf.keys(): if not match(fn): del mf[fn] return mf | f09197bad936b6a75de5d9a30a88c4b77e63c0a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/f09197bad936b6a75de5d9a30a88c4b77e63c0a3/localrepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14749,
8436,
12,
2159,
4672,
2549,
273,
365,
18,
24083,
12970,
18,
896,
12,
2159,
13,
14749,
273,
365,
18,
14357,
18,
896,
12,
3427,
63,
20,
65,
2934,
3530,
1435,
364,
2295,
316,
14749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14749,
8436,
12,
2159,
4672,
2549,
273,
365,
18,
24083,
12970,
18,
896,
12,
2159,
13,
14749,
273,
365,
18,
14357,
18,
896,
12,
3427,
63,
20,
65,
2934,
3530,
1435,
364,
2295,
316,
14749... |
self.contributor = contributor self.questions = {} | def __init__(self, id, title, description, sortorder, start_date, end_date, public_registration, allow_file, line_comments, contributor, releasedate, lang): """ """ self.id = id self.contributor = contributor self.questions = {} NyValidation.__dict__['__init__'](self) NyCheckControl.__dict__['__init__'](self) NyContainer.__dict__['__init__'](self) BTreeFolder2.__init__(self) try: del self.title except: pass self.save_properties(title, description, sortorder, start_date, end_date, public_registration, allow_file, line_comments, releasedate, lang) NyProperties.__dict__['__init__'](self) self.submitted = 1 | 830e9e6b570e470058f6ed1cc28a85dc493f8add /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/830e9e6b570e470058f6ed1cc28a85dc493f8add/NyConsultation.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
612,
16,
2077,
16,
2477,
16,
1524,
1019,
16,
787,
67,
712,
16,
679,
67,
712,
16,
1071,
67,
14170,
16,
1699,
67,
768,
16,
980,
67,
9231,
16,
31123,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
612,
16,
2077,
16,
2477,
16,
1524,
1019,
16,
787,
67,
712,
16,
679,
67,
712,
16,
1071,
67,
14170,
16,
1699,
67,
768,
16,
980,
67,
9231,
16,
31123,
16... | |
mname = 'do_' + command | return 1 def handle(self): """Handle a single HTTP request. You normally don't need to override this method; see the class __doc__ string for information on how to handle specific HTTP commands such as GET and POST. """ self.raw_requestline = self.rfile.readline() if not self.parse_request(): return mname = 'do_' + self.command | def handle(self): """Handle a single HTTP request. | d13ed6d099f3dfa102d9ef830bb1cb77337decd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d13ed6d099f3dfa102d9ef830bb1cb77337decd7/BaseHTTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
3536,
3259,
279,
2202,
2239,
590,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
4672,
3536,
3259,
279,
2202,
2239,
590,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._version = _read_long(chunk) | self._version = _read_ulong(chunk) | def initfp(self, file): self._version = 0 self._decomp = None self._convert = None self._markers = [] self._soundpos = 0 self._file = Chunk(file) if self._file.getname() != 'FORM': raise Error, 'file does not start with FORM id' formdata = self._file.read(4) if formdata == 'AIFF': self._aifc = 0 elif formdata == 'AIFC': self._aifc = 1 else: raise Error, 'not an AIFF or AIFF-C file' self._comm_chunk_read = 0 while 1: self._ssnd_seek_needed = 1 try: chunk = Chunk(self._file) except EOFError: break chunkname = chunk.getname() if chunkname == 'COMM': self._read_comm_chunk(chunk) self._comm_chunk_read = 1 elif chunkname == 'SSND': self._ssnd_chunk = chunk dummy = chunk.read(8) self._ssnd_seek_needed = 0 elif chunkname == 'FVER': self._version = _read_long(chunk) elif chunkname == 'MARK': self._readmark(chunk) elif chunkname in _skiplist: pass else: raise Error, 'unrecognized chunk type '+chunk.chunkname chunk.skip() if not self._comm_chunk_read or not self._ssnd_chunk: raise Error, 'COMM chunk and/or SSND chunk missing' if self._aifc and self._decomp: import cl params = [cl.ORIGINAL_FORMAT, 0, cl.BITS_PER_COMPONENT, self._sampwidth * 8, cl.FRAME_RATE, self._framerate] if self._nchannels == 1: params[1] = cl.MONO elif self._nchannels == 2: params[1] = cl.STEREO_INTERLEAVED else: raise Error, 'cannot compress more than 2 channels' self._decomp.SetParams(params) | fefc7e4859f2d9a705d367d70077272ccc35a4a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fefc7e4859f2d9a705d367d70077272ccc35a4a0/aifc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
7944,
12,
2890,
16,
585,
4672,
365,
6315,
1589,
273,
374,
365,
6315,
323,
2919,
273,
599,
365,
6315,
6283,
273,
599,
365,
6315,
22807,
273,
5378,
365,
6315,
29671,
917,
273,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
7944,
12,
2890,
16,
585,
4672,
365,
6315,
1589,
273,
374,
365,
6315,
323,
2919,
273,
599,
365,
6315,
6283,
273,
599,
365,
6315,
22807,
273,
5378,
365,
6315,
29671,
917,
273,
374,
... |
def DoxyfileParse_(file, data, ENV): """ Parse a Doxygen source file and return a dictionary of all the values. Values will be strings and lists of strings. """ try: dir = os.path.dirname(file) import shlex lex = shlex.shlex(instream=open(file), posix=True) lex.wordchars += "*+=./-:@~$()" lex.whitespace = lex.whitespace.replace("\n", "") lex.escape = "\\" lineno = lex.lineno token = lex.get_token() key = None last_token = "" key_token = True next_key = False new_data = True def append_data(data, key, new_data, token): if new_data or len(data[key]) == 0: data[key].append(token) else: data[key][-1] += token while token: if token=='\n': if last_token!='\\': key_token = True elif token=='\\': pass elif key_token: key = token key_token = False else: if token=="+=" or (token=="=" and key=="@INCLUDE"): if not data.has_key(key): data[key] = [] elif token == "=": data[key] = [] else: token = EnvVar.sub(lambda m,ENV=ENV: str(ENV.get(m.group(1),"")),token) append_data(data, key, new_data, token) new_data = True if key=='@INCLUDE': inc = os.path.join(dir,data['@INCLUDE'][-1]) if os.path.exists(inc) : DoxyfileParse_(inc,data,ENV) last_token = token token = lex.get_token() if last_token=='\\' and token!='\n': new_data = False append_data(data, key, new_data, '\\') return data except: return {} | def DoxyfileParse(env,file): ENV = {} ENV.update(env.get("ENV",{})) ENV['TOPDIR'] = env.Dir('#').abspath data = DoxyfileParse_(file,{},ENV) for k,v in data.items(): if not v : del data[k] elif k in ("INPUT", "FILE_PATTERNS", "EXCLUDE_PATTERNS", "@INCLUDE", "TAGFILES") : continue elif len(v)==1 : data[k] = v[0] return data | 8a49eb4c03bcd853b2d5387026c9438fd0c282c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2548/8a49eb4c03bcd853b2d5387026c9438fd0c282c3/Doxygen.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
1698,
768,
3201,
12,
3074,
16,
768,
4672,
15615,
273,
2618,
15615,
18,
2725,
12,
3074,
18,
588,
2932,
11986,
3113,
2916,
3719,
15615,
3292,
10462,
4537,
3546,
273,
1550,
18,
1621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2256,
1698,
768,
3201,
12,
3074,
16,
768,
4672,
15615,
273,
2618,
15615,
18,
2725,
12,
3074,
18,
588,
2932,
11986,
3113,
2916,
3719,
15615,
3292,
10462,
4537,
3546,
273,
1550,
18,
1621,
... | |
extra_dl=ts_regex.compile("</dl>\n<dl>"), extra_ul=ts_regex.compile("</ul>\n<ul>"), extra_ol=ts_regex.compile("</ol>\n<ol>"), | extra_dl=regex.compile("</dl>\n<dl>"), extra_ul=regex.compile("</ul>\n<ul>"), extra_ol=regex.compile("</ol>\n<ol>"), | def __str__(self, extra_dl=ts_regex.compile("</dl>\n<dl>"), extra_ul=ts_regex.compile("</ul>\n<ul>"), extra_ol=ts_regex.compile("</ol>\n<ol>"), ): '''\ Return an HTML string representation of the structured text data. | b0fc40be7f6311ce8b53427d0435318a0e976412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b0fc40be7f6311ce8b53427d0435318a0e976412/StructuredText.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
16,
2870,
67,
5761,
33,
7584,
18,
11100,
2932,
1757,
5761,
5333,
82,
32,
5761,
2984,
3631,
2870,
67,
332,
33,
7584,
18,
11100,
2932,
1757,
332,
5333,
82,
32,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
701,
972,
12,
2890,
16,
2870,
67,
5761,
33,
7584,
18,
11100,
2932,
1757,
5761,
5333,
82,
32,
5761,
2984,
3631,
2870,
67,
332,
33,
7584,
18,
11100,
2932,
1757,
332,
5333,
82,
32,
... |
module = Module(name=name, path=pathname) | module = Module(name="exceptions", file=pathname) | def copy_additional_files(self, final_dir): # Some python versions (1.5) import the 'exceptions' # module BEFORE we can install our importer. file, pathname, desc = imp.find_module("exceptions") if file: file.close() module = Module(name=name, path=pathname) byte_compile([module], target_dir=final_dir, optimize=self.optimize, force=self.force, verbose=self.verbose, dry_run=self.dry_run) | 04c48a5504a90f7db27edc0cd86e6879e0a0b910 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/04c48a5504a90f7db27edc0cd86e6879e0a0b910/py2exe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
13996,
67,
2354,
12,
2890,
16,
727,
67,
1214,
4672,
468,
10548,
5790,
5244,
261,
21,
18,
25,
13,
1930,
326,
296,
11855,
11,
468,
1605,
21203,
732,
848,
3799,
3134,
15198,
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,
1610,
67,
13996,
67,
2354,
12,
2890,
16,
727,
67,
1214,
4672,
468,
10548,
5790,
5244,
261,
21,
18,
25,
13,
1930,
326,
296,
11855,
11,
468,
1605,
21203,
732,
848,
3799,
3134,
15198,
18,... |
if rebaselined_tests: self._test_expectations.RemovePlatformFromFile(rebaselined_tests, | if self._rebaselined_tests: self._test_expectations.RemovePlatformFromFile(self._rebaselined_tests, | def _UpdateRebaselinedTestsInFile(self, rebaselined_tests, backup): """Update the rebaselined tests in test expectations file. | f88af6d54c48237ad0edb1b3bd6a6d27d9f30401 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/f88af6d54c48237ad0edb1b3bd6a6d27d9f30401/rebaseline.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1891,
426,
9157,
292,
1920,
14650,
382,
812,
12,
2890,
16,
283,
9157,
292,
1920,
67,
16341,
16,
5114,
4672,
3536,
1891,
326,
283,
9157,
292,
1920,
7434,
316,
1842,
26305,
585,
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,
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,
1891,
426,
9157,
292,
1920,
14650,
382,
812,
12,
2890,
16,
283,
9157,
292,
1920,
67,
16341,
16,
5114,
4672,
3536,
1891,
326,
283,
9157,
292,
1920,
7434,
316,
1842,
26305,
585,
18,
... |
sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: chi = a2(0,0,0)+2*a2(1,0,0)+3*a2(2,0,0) sage: mu = 3*a2(0,0,0)+2*a2(1,0,0)+a2(2,0,0) sage: chi - mu -2*a2(0,0,0) + 2*a2(2,0,0) | sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: chi = a2(0,0,0)+2*a2(1,0,0)+3*a2(2,0,0) sage: mu = 3*a2(0,0,0)+2*a2(1,0,0)+a2(2,0,0) sage: chi - mu -2*a2(0,0,0) + 2*a2(2,0,0) | def _sub_(self, y): """ EXAMPLES: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: chi = a2(0,0,0)+2*a2(1,0,0)+3*a2(2,0,0) sage: mu = 3*a2(0,0,0)+2*a2(1,0,0)+a2(2,0,0) sage: chi - mu -2*a2(0,0,0) + 2*a2(2,0,0) """ return self._add_(y._neg_()) | 585641b32ec9003014ab40e39d632a05e840e883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/585641b32ec9003014ab40e39d632a05e840e883/weyl_characters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1717,
67,
12,
2890,
16,
677,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
432,
22,
273,
678,
402,
80,
7069,
10369,
12,
3292,
37,
2187,
22,
5717,
272,
410,
30,
279,
22,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1717,
67,
12,
2890,
16,
677,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
432,
22,
273,
678,
402,
80,
7069,
10369,
12,
3292,
37,
2187,
22,
5717,
272,
410,
30,
279,
22,
273,
... |
elts[i].style.display = ((cmd=="hide private")?"none":""); | elts[i].style.display = ((cmd && cmd.substr(0,4)=="hide")?"none":""); | def write_javascript(self, directory): jsfile = open(os.path.join(directory, 'epydoc.js'), 'w') print >> jsfile, self.TOGGLE_PRIVATE_JS print >> jsfile, self.GET_COOKIE_JS print >> jsfile, self.SET_FRAME_JS print >> jsfile, self.HIDE_PRIVATE_JS print >> jsfile, self.TOGGLE_CALLGRAPH_JS print >> jsfile, html_colorize.PYSRC_JAVASCRIPTS print >> jsfile, self.GET_ANCHOR_JS print >> jsfile, self.REDIRECT_URL_JS jsfile.close() | efa53d0cb5b90524e3e4219b8789997f18e8c97c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11420/efa53d0cb5b90524e3e4219b8789997f18e8c97c/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
11242,
12,
2890,
16,
1867,
4672,
3828,
768,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
5149,
16,
296,
881,
93,
2434,
18,
2924,
19899,
296,
91,
6134,
1172,
1671,
3828,
768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
11242,
12,
2890,
16,
1867,
4672,
3828,
768,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
5149,
16,
296,
881,
93,
2434,
18,
2924,
19899,
296,
91,
6134,
1172,
1671,
3828,
768,
... |
imaputil.flagsmaildir2imap(flags))[1] | imaputil.flagsmaildir2imap(flags)) assert r[0] == 'OK', 'Error with store: ' + r[1] r = r[1] | def addmessagesflags(self, uidlist, flags): imapobj = self.imapserver.acquireconnection() try: imapobj.select(self.getfullname()) r = imapobj.uid('store', ','.join([str(uid) for uid in uidlist]), '+FLAGS', imaputil.flagsmaildir2imap(flags))[1] finally: self.imapserver.releaseconnection(imapobj) resultcount = 0 for result in r: resultcount += 1 flags = imaputil.flags2hash(imaputil.imapsplit(result)[1])['FLAGS'] uid = long(imaputil.flags2hash(imaputil.imapsplit(result)[1])['UID']) self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags) assert resultcount == len(uidlist), "Got incorrect number of results back" | 817a10ce0f545a37cc5d47f1bd69c8436d6ec740 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/817a10ce0f545a37cc5d47f1bd69c8436d6ec740/IMAP.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
6833,
7133,
12,
2890,
16,
4555,
1098,
16,
2943,
4672,
20226,
2603,
273,
365,
18,
12161,
3567,
18,
1077,
1039,
4071,
1435,
775,
30,
20226,
2603,
18,
4025,
12,
2890,
18,
588,
21885,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
6833,
7133,
12,
2890,
16,
4555,
1098,
16,
2943,
4672,
20226,
2603,
273,
365,
18,
12161,
3567,
18,
1077,
1039,
4071,
1435,
775,
30,
20226,
2603,
18,
4025,
12,
2890,
18,
588,
21885,
... |
table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) bglabel = gtk.Label() bglabel.set_markup('<b>' + _('Interface') + '</b>') bglabel.set_alignment(0, 1) table_settings.attach(bglabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_settings.attach(gtk.Label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) | table_settings.attach(gtk.Label(), 1, 3, 1, 2, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) bglabel = gtk.Label() bglabel.set_markup('<b>' + _('Interface') + '</b>') bglabel.set_alignment(0, 1) table_settings.attach(bglabel, 1, 3, 2, 3, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 15, 0) table_settings.attach(gtk.Label(), 1, 3, 3, 4, gtk.FILL|gtk.EXPAND, gtk.FILL|gtk.EXPAND, 0, 0) | def show_prefs(self, action): self.prefs_dialog = gtk.Dialog(title=_("Mirage Preferences"), parent=self.window) self.prefs_dialog.set_has_separator(False) self.prefs_dialog.set_resizable(False) # Add "Interface" prefs: | a4d6024d09d807bd2a142bf54daca1a7d1873c7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/a4d6024d09d807bd2a142bf54daca1a7d1873c7f/mirage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1484,
2556,
12,
2890,
16,
1301,
4672,
365,
18,
1484,
2556,
67,
12730,
273,
22718,
18,
6353,
12,
2649,
33,
67,
2932,
49,
481,
410,
28310,
6,
3631,
982,
33,
2890,
18,
5668,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
1484,
2556,
12,
2890,
16,
1301,
4672,
365,
18,
1484,
2556,
67,
12730,
273,
22718,
18,
6353,
12,
2649,
33,
67,
2932,
49,
481,
410,
28310,
6,
3631,
982,
33,
2890,
18,
5668,
1... |
def get_free_attribute(self, name): | def get_attr_datatype(self, name): | def get_free_attribute(self, name): datatype = self.free_attributes.get(name) if datatype is None: raise XMLError, 'unexpected attribute "%s"' % name | 47816474b1dd1fd9dc98b3fdd31bb0386b7ed5ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/47816474b1dd1fd9dc98b3fdd31bb0386b7ed5ae/namespaces.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1747,
67,
21540,
12,
2890,
16,
508,
4672,
11172,
273,
365,
18,
9156,
67,
4350,
18,
588,
12,
529,
13,
309,
11172,
353,
599,
30,
1002,
3167,
668,
16,
296,
21248,
1566,
2213,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1747,
67,
21540,
12,
2890,
16,
508,
4672,
11172,
273,
365,
18,
9156,
67,
4350,
18,
588,
12,
529,
13,
309,
11172,
353,
599,
30,
1002,
3167,
668,
16,
296,
21248,
1566,
2213,
8... |
connection = self._getConnection( connection ) | def setFileOwner( self, lfns, connection = False ): connection = self._getConnection( connection ) """ Get set the group for the supplied files """ res = self._findFiles( lfns, ['FileID', 'UID'], connection = connection ) if not res['OK']: return res failed = res['Value']['Failed'] successful = {} for lfn in res['Value']['Successful'].keys(): owner = lfns[lfn]['Owner'] if type( owner ) in StringTypes: userRes = self.db.ugManager.findUser( owner ) if not userRes['OK']: return userRes owner = userRes['Value'] currentOwner = res['Value']['Successful'][lfn]['UID'] if int( owner ) == int( currentOwner ): successful[lfn] = True else: fileID = res['Value']['Successful'][lfn]['FileID'] res = self._setFileOwner( fileID, owner, connection = connection ) if not res['OK']: failed[lfn] = res['Message'] else: successful[lfn] = True return S_OK( {'Successful':successful, 'Failed':failed} ) | 730c8c8e8acbd225fa02fcc8d670bcbd786db665 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/730c8c8e8acbd225fa02fcc8d670bcbd786db665/FileManagerBase.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19658,
5541,
12,
365,
16,
18594,
2387,
16,
1459,
273,
1083,
262,
30,
3536,
968,
444,
326,
1041,
364,
326,
4580,
1390,
3536,
400,
273,
365,
6315,
4720,
2697,
12,
18594,
2387,
16,
10228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19658,
5541,
12,
365,
16,
18594,
2387,
16,
1459,
273,
1083,
262,
30,
3536,
968,
444,
326,
1041,
364,
326,
4580,
1390,
3536,
400,
273,
365,
6315,
4720,
2697,
12,
18594,
2387,
16,
10228,
... | |
This look at the extension to determine a class to use (eg: AudioFile for mp3 file) and fill data""" | This function try to determine file type by using extension and instancy the good class. eg: use of AudioFile class for a mp3 file) fill data fullpath -- an unicode string representing to full path to access a file. Return a BaseFile instance object. """ | def factory(fullpath): """This is the factory function of the file class. This look at the extension to determine a class to use (eg: AudioFile for mp3 file) and fill data""" | e201bea5b12f784c8ffb2a5deced8ca87b47f14b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5115/e201bea5b12f784c8ffb2a5deced8ca87b47f14b/file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3272,
12,
2854,
803,
4672,
3536,
2503,
353,
326,
3272,
445,
434,
326,
585,
667,
18,
1220,
2324,
622,
326,
2710,
358,
4199,
279,
667,
358,
999,
261,
1332,
30,
15045,
812,
364,
6749,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3272,
12,
2854,
803,
4672,
3536,
2503,
353,
326,
3272,
445,
434,
326,
585,
667,
18,
1220,
2324,
622,
326,
2710,
358,
4199,
279,
667,
358,
999,
261,
1332,
30,
15045,
812,
364,
6749,
23,... |
"""Clear the pattern cache""" | """Clear the pattern cache.""" | def purge(): """Clear the pattern cache""" _cache.clear() _cacheb.clear() | 5303f5cf8489972611294d934bcd0c3e2ed8636c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/5303f5cf8489972611294d934bcd0c3e2ed8636c/fnmatch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
13332,
3536,
9094,
326,
1936,
1247,
12123,
389,
2493,
18,
8507,
1435,
389,
2493,
70,
18,
8507,
1435,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
11668,
13332,
3536,
9094,
326,
1936,
1247,
12123,
389,
2493,
18,
8507,
1435,
389,
2493,
70,
18,
8507,
1435,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print(keys) print(vals) raise Exception("Number of vals does not equal number of keys") | raise Exception("Number of vals does not equal number of keys. \ Number of vals are: "+str(len(vals))+" and number of keys are: "+str(len(keys))) | def get_u_initial_guess_values(self): """ Extract ValueReference and InitialGuess values for all input variables. Returns: Dict with ValueReference as key and InitialGuess as value. """ keys = self._xpatheval("//ScalarVariable/ValueReference/text()[../../Causality=\"input\"]") vals = self._xpatheval("//ScalarVariable/Attributes/RealAttributes/InitialGuess/text()[../../../../Causality=\"input\"]") if len(keys)!=len(vals): print(keys) print(vals) raise Exception("Number of vals does not equal number of keys") return dict(zip(keys,vals)) | f764f349d643190118591f5efb0058e97cef2494 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/f764f349d643190118591f5efb0058e97cef2494/xmlparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
89,
67,
6769,
67,
20885,
67,
2372,
12,
2890,
4672,
3536,
8152,
1445,
2404,
471,
10188,
15977,
924,
364,
777,
810,
3152,
18,
225,
2860,
30,
9696,
598,
1445,
2404,
487,
498,
471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
89,
67,
6769,
67,
20885,
67,
2372,
12,
2890,
4672,
3536,
8152,
1445,
2404,
471,
10188,
15977,
924,
364,
777,
810,
3152,
18,
225,
2860,
30,
9696,
598,
1445,
2404,
487,
498,
471... |
dist = open('/etc/issue').read().split()[0] | dist = open('/etc/issue').read().strip('\n\t ').split()[0] | def detect_platform(): if platform.system() != 'Linux': return platform.system().lower() dist = '' (maj, min, patch) = platform.python_version_tuple() if (maj * 10 + min) >= 26: dist = platform.linux_distribution()[0] else: dist = platform.dist()[0] if dist == '': try: dist = open('/etc/issue').read().split()[0] except: dist = 'unknown' return dist.strip() | 2c7c610b722851c3e0a0d5752915601cd0932394 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3600/2c7c610b722851c3e0a0d5752915601cd0932394/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
9898,
13332,
309,
4072,
18,
4299,
1435,
480,
296,
19475,
4278,
327,
4072,
18,
4299,
7675,
8167,
1435,
225,
2411,
273,
875,
261,
12585,
16,
1131,
16,
4729,
13,
273,
4072,
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,
5966,
67,
9898,
13332,
309,
4072,
18,
4299,
1435,
480,
296,
19475,
4278,
327,
4072,
18,
4299,
7675,
8167,
1435,
225,
2411,
273,
875,
261,
12585,
16,
1131,
16,
4729,
13,
273,
4072,
18,
... |
self.check_sizeof({}, h + 3*l + 3*p + 8*(l + 2*p)) | self.check_sizeof({}, size(h + '3P3P') + 8*size('P2P')) | def test_specialtypes(self): i = self.i l = self.l p = self.p h = self.headersize # dict self.check_sizeof({}, h + 3*l + 3*p + 8*(l + 2*p)) longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8} self.check_sizeof(longdict, h + 3*l + 3*p + 8*(l + 2*p) + 16*(l + 2*p)) # list self.check_sizeof([], h + l + p + l) self.check_sizeof([1, 2, 3], h + l + p + l + 3*l) # unicode usize = len(u'\0'.encode('unicode-internal')) samples = [u'', u'1'*100] # we need to test for both sizes, because we don't know if the string # has been cached for s in samples: basicsize = h + l + p + l + p + usize * (len(s) + 1) self.check_sizeof(s, basicsize,\ size2=basicsize + sys.getsizeof(str(s))) # XXX trigger caching encoded version as Python string s = samples[1] try: getattr(sys, s) except AttributeError: pass finally: self.check_sizeof(s, basicsize + sys.getsizeof(str(s))) | 9cbed723c019f67adc5f76d1f21ed8d14c9df22c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/9cbed723c019f67adc5f76d1f21ed8d14c9df22c/test_sys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
2352,
12,
2890,
4672,
277,
273,
365,
18,
77,
328,
273,
365,
18,
80,
293,
273,
365,
18,
84,
366,
273,
365,
18,
2485,
554,
468,
2065,
365,
18,
1893,
67,
1467,
792,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9371,
2352,
12,
2890,
4672,
277,
273,
365,
18,
77,
328,
273,
365,
18,
80,
293,
273,
365,
18,
84,
366,
273,
365,
18,
2485,
554,
468,
2065,
365,
18,
1893,
67,
1467,
792,
23... |
pop = sim.loadPopulation('log/Pedigree.pop') | pop = sim.loadPopulation('log/pedigree.pop') | def passInfo(x, y, anc): 'Parental fields will be passed as tuples' off_anc = (anc[0] + anc[1])/2. off_x = (x[0] + x[1])/2 + random.normalvariate(off_anc - 0.5, 0.1) off_y = (y[0] + y[1])/2 + random.normalvariate(0, 0.1) return off_x, off_y, off_anc | d2c66baa0444af035fc0c797b376e7e4db6ba717 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/d2c66baa0444af035fc0c797b376e7e4db6ba717/userGuide.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1342,
966,
12,
92,
16,
677,
16,
392,
71,
4672,
296,
3054,
287,
1466,
903,
506,
2275,
487,
10384,
11,
3397,
67,
19292,
273,
261,
19292,
63,
20,
65,
397,
392,
71,
63,
21,
5717,
19,
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,
1342,
966,
12,
92,
16,
677,
16,
392,
71,
4672,
296,
3054,
287,
1466,
903,
506,
2275,
487,
10384,
11,
3397,
67,
19292,
273,
261,
19292,
63,
20,
65,
397,
392,
71,
63,
21,
5717,
19,
2... |
def __init__(self, xmlFilename, replacements, exceptions): | def __init__(self, xmlFilename, xmlStart, replacements, exceptions): | def __init__(self, xmlFilename, replacements, exceptions): self.xmlFilename = xmlFilename self.replacements = replacements self.exceptions = exceptions | 50b454f69bda5b41d4373a89be17ea7698a61651 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/50b454f69bda5b41d4373a89be17ea7698a61651/replace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2025,
5359,
16,
2025,
1685,
16,
11413,
16,
4798,
4672,
365,
18,
2902,
5359,
273,
2025,
5359,
365,
18,
2079,
1346,
273,
11413,
365,
18,
11855,
273,
4798,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2025,
5359,
16,
2025,
1685,
16,
11413,
16,
4798,
4672,
365,
18,
2902,
5359,
273,
2025,
5359,
365,
18,
2079,
1346,
273,
11413,
365,
18,
11855,
273,
4798,
... |
if k == -1: k = len(self.rawdata) | if k == -1: k = len(self.rawdata) return k | def parse_declaration(self, i): # override internal declaration handler to handle CDATA blocks if _debug: sys.stderr.write('entering parse_declaration\n') if self.rawdata[i:i+9] == '<![CDATA[': k = self.rawdata.find(']]>', i) if k == -1: k = len(self.rawdata) self.handle_data(_xmlescape(self.rawdata[i+9:k]), 0) return k+3 else: k = self.rawdata.find('>', i) return k+1 | 44482af2baebba8741223b8967e4efeaf8365c45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/44482af2baebba8741223b8967e4efeaf8365c45/feedparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
22448,
12,
2890,
16,
277,
4672,
468,
3849,
2713,
8266,
1838,
358,
1640,
28294,
4398,
309,
389,
4148,
30,
2589,
18,
11241,
18,
2626,
2668,
2328,
310,
1109,
67,
22448,
64,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22448,
12,
2890,
16,
277,
4672,
468,
3849,
2713,
8266,
1838,
358,
1640,
28294,
4398,
309,
389,
4148,
30,
2589,
18,
11241,
18,
2626,
2668,
2328,
310,
1109,
67,
22448,
64,
82,
... |
for src_name in src_names: | for src_name in sorted(src_names): | def do_update(self, subcmd, opts, startdir): """${cmd_name}: Update the hash pieces that are included in metalinks | ece8d08fdeb402a566df8669633e36b40facea3f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10990/ece8d08fdeb402a566df8669633e36b40facea3f/metalink-hasher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2725,
12,
2890,
16,
720,
4172,
16,
1500,
16,
787,
1214,
4672,
3536,
18498,
4172,
67,
529,
6713,
2315,
326,
1651,
10167,
716,
854,
5849,
316,
5100,
16194,
87,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
2725,
12,
2890,
16,
720,
4172,
16,
1500,
16,
787,
1214,
4672,
3536,
18498,
4172,
67,
529,
6713,
2315,
326,
1651,
10167,
716,
854,
5849,
316,
5100,
16194,
87,
2,
-100,
-100,
-1... |
sage: [NumberField(ZZx(_[i][1]), 't').is_galois() for i in range(len(_))] | sage: [NumberField(ZZx(x[1]), 't').is_galois() for x in ls] | def enumerate_totallyreal_fields_rel(F, m, B, a = [], verbose=0, return_seqs=False): r""" This function enumerates (primitive) totally real field extensions of degree $m>1$ of the totally real field F with discriminant $d \leq B$; optionally one can specify the first few coefficients, where the sequence $a$ corresponds to a polynomial by $$ a[d]*x^n + ... + a[0]*x^(n-d) $$ if length(a) = d+1, so in particular always a[d] = 1. If verbose == 1 (or 2), then print to the screen (really) verbosely; if verbose is a string, then print verbosely to the file specified by verbose. If return_seqs, then return the polynomials as sequences (for easier exporting to a file). NOTE: This is guaranteed to give all primitive such fields, and seems in practice to give many imprimitive ones. INPUT: F -- number field, the base field m -- integer, the degree B -- integer, the discriminant bound a -- list (default: []), the coefficient list to begin with verbose -- boolean or string (default: 0) return_seqs -- boolean (default: False) OUTPUT: the list of fields with entries [d,fabs,f], where d is the discriminant, fabs is an absolute defining polynomial, and f is a defining polynomial relative to F, sorted by discriminant. EXAMPLES: In this first simple example, we compute the totally real quadratic fields of Q(sqrt(2)) of discriminant <= 2000. sage: ZZx = ZZ['x'] sage: F.<t> = NumberField(x^2-2) sage: enumerate_totallyreal_fields_rel(F, 2, 2000) [[1600, x^4 - 6*x^2 + 4, xF^2 + xF - 1]] There is indeed only one such extension, given by F(sqrt(5)). Next, we list all totally real quadratic extensions of Q(sqrt(5)) with root discriminant <= 10. sage: F.<t> = NumberField(x^2-5) sage: ls = enumerate_totallyreal_fields_rel(F, 2, 10^4) sage: ls # random [[725, x^4 - x^3 - 3*x^2 + x + 1, xF^2 + (-1/2*t + 1/2)*xF - t - 2], [1125, x^4 - x^3 - 4*x^2 + 4*x + 1, xF^2 + (-1/2*t + 1/2)*xF - 1/2*t - 3/2], [1600, x^4 - 6*x^2 + 4, xF^2 - t - 3], [2000, x^4 - 5*x^2 + 5, xF^2 - 1/2*t - 5/2], [2225, x^4 - x^3 - 5*x^2 + 2*x + 4, xF^2 + (-1/2*t + 1/2)*xF - 3/2*t - 7/2], [2525, x^4 - 2*x^3 - 4*x^2 + 5*x + 5, xF^2 + (-1/2*t - 1/2)*xF - 1/2*t - 5/2], [3600, x^4 - 2*x^3 - 7*x^2 + 8*x + 1, xF^2 - 3/2*t - 9/2], [4225, x^4 - 9*x^2 + 4, xF^2 + (-1/2*t - 1/2)*xF - 3/2*t - 9/2], [4400, x^4 - 7*x^2 + 11, xF^2 - 1/2*t - 7/2], [4525, x^4 - x^3 - 7*x^2 + 3*x + 9, xF^2 + (-1/2*t - 1/2)*xF - 3], [5125, x^4 - 2*x^3 - 6*x^2 + 7*x + 11, xF^2 + (-1/2*t - 1/2)*xF - t - 4], [5225, x^4 - x^3 - 8*x^2 + x + 11, xF^2 + (-1/2*t - 1/2)*xF - 1/2*t - 7/2], [5725, x^4 - x^3 - 8*x^2 + 6*x + 11, xF^2 + (-1/2*t + 1/2)*xF - 1/2*t - 7/2], [6125, x^4 - x^3 - 9*x^2 + 9*x + 11, xF^2 + (-1/2*t + 1/2)*xF - t - 4], [7600, x^4 - 9*x^2 + 19, xF^2 - 1/2*t - 9/2], [7625, x^4 - x^3 - 9*x^2 + 4*x + 16, xF^2 + (-1/2*t - 1/2)*xF - 4], [8000, x^4 - 10*x^2 + 20, xF^2 - t - 5], [8525, x^4 - 2*x^3 - 8*x^2 + 9*x + 19, xF^2 + xF - 1/2*t - 9/2], [8725, x^4 - x^3 - 10*x^2 + 2*x + 19, xF^2 + (-1/2*t - 1/2)*xF - 1/2*t - 9/2], [9225, x^4 - x^3 - 10*x^2 + 7*x + 19, xF^2 + (-1/2*t + 1/2)*xF - 1/2*t - 9/2]] sage: [ f[0] for f in ls ] [725, 1125, 1600, 2000, 2225, 2525, 3600, 4225, 4400, 4525, 5125, 5225, 5725, 6125, 7600, 7625, 8000, 8525, 8725, 9225] sage: [NumberField(ZZx(_[i][1]), 't').is_galois() for i in range(len(_))] [False, True, True, True, False, False, True, True, False, False, False, False, False, True, False, False, True, False, False, False] Seven out of 18 such fields are Galois (with Galois group Z/4Z or Z/2Z + Z/2Z); the others have have Galois closure of degree 8 (with Galois group D_8). Finally, we compute the cubic extensions of Q(zeta_7)^+ with discriminant <= 17*10^9. sage: F.<t> = NumberField(ZZx([1,-4,3,1])) sage: F.disc() 49 sage: enumerate_totallyreal_fields_rel(F, 3, 17*10^9) [[16240385609L, x^9 - x^8 - 9*x^7 + 4*x^6 + 26*x^5 - 2*x^4 - 25*x^3 - x^2 + 7*x + 1, xF^3 + (-t^2 - 4*t + 1)*xF^2 + (t^2 + 3*t - 5)*xF + 3*t^2 + 11*t - 5]] # 32-bit [[16240385609, x^9 - x^8 - 9*x^7 + 4*x^6 + 26*x^5 - 2*x^4 - 25*x^3 - x^2 + 7*x + 1, xF^3 + (-t^2 - 4*t + 1)*xF^2 + (t^2 + 3*t - 5)*xF + 3*t^2 + 11*t - 5]] # 64-bit NOTES: We enumerate polynomials f(x) = x^n + a[n-1]*x^(n-1) + ... + a[0]. A relative Hunter's theorem gives bounds on a[n-1] and a[n-2]; then given a[n-1] and a[n-2], one can recursively compute bounds on a[n-3], ..., a[0] using the fact that the polynomial is totally real by looking at the zeros of successive derivatives and applying Rolle's theorem! See references in totallyreal.py. AUTHORS: - John Voight (2007-11-01) """ if not isinstance(m, Integer): try: m = Integer(m) except: raise TypeError, "cannot coerce m (= %s) to an integer"%n if (m < 1): raise ValueError, "m must be at least 1." n = F.degree()*m # Initialize T = tr_data_rel(F,m,B,a) S = [] Srel = [] dB_odlyzko = odlyzko_bound_totallyreal(n) dB = math.ceil(40000*dB_odlyzko**n) counts = [0,0,0,0] # Trivial case if m == 1: g = pari(F.defining_polynomial()).reverse().Vec() if return_seqs: return [[0,0,0,0],[1,g,[-1,1]]] else: return [[1,pari('x-1'),g]] if verbose: saveout = sys.stdout if type(verbose) == str: fsock = open(verbose, 'w') sys.stdout = fsock # Else, print to screen f_out = [0]*m + [1] if verbose == 2: T.incr(f_out,verbose) else: T.incr(f_out) Fx = PolynomialRing(F, 'xF') nfF = pari(str(F.defining_polynomial()).replace('x', str(F.primitive_element()) ) ) parit = pari(str(F.primitive_element())) while f_out[m] <> 0: counts[0] += 1 if verbose: print "==>", f_out, f_str = '' for i in range(len(f_out)): f_str += '(' + str(f_out[i]) + ')*x^' + str(i) if i < len(f_out)-1: f_str += '+' nf = pari(f_str).polresultant(nfF, parit) d = nf.poldisc() counts[0] += 1 if d > 0 and nf.polsturm_full() == n: da = int_has_small_square_divisor(Integer(d)) if d > dB or d <= B*da: counts[1] += 1 if nf.polisirreducible(): counts[2] += 1 [zk,d] = nf.nfbasis_d() if d <= B: if verbose: print "has discriminant", d, # Find a minimal lattice element counts[3] += 1 ng = pari([nf,zk]).polredabs() # Check if K is contained in the list. found = False ind = bisect.bisect_left(S, [d,ng]) while ind < len(S) and S[ind][0] == d: if S[ind][1] == ng: if verbose: print "but is not new" found = True break ind += 1 if not found: if verbose: print "and is new!" S.insert(ind, [d,ng]) Srel.insert(ind, Fx(f_out)) else: if verbose: print "has discriminant", abs(d), "> B" else: if verbose: print "is not absolutely irreducible" else: if verbose: print "has discriminant", abs(d), "with no large enough square divisor" else: if verbose: if d == 0: print "is not squarefree" else: print "is not totally real" if verbose == 2: T.incr(f_out,verbose=verbose) else: T.incr(f_out) # In the application of Smyth's theorem above, we exclude finitely # many possibilities which we must now throw back in. if m == 2: if Fx([-1,1,1]).is_irreducible(): K = F.extension(Fx([-1,1,1]), 'tK') Kabs = K.absolute_field('tKabs') Kabs_pari = pari(Kabs.defining_polynomial()) d = K.disc() if abs(d) <= B: ng = Kabs_pari.polredabs() ind = bisect.bisect_left(S, [d,ng]) S.insert(ind, [d,ng]) Srel.insert(ind, Fx([-1,1,1])) elif d == 2: for ff in [[1,-7,13,-7,1],[1,-8,14,-7,1]]: f = Fx(ff).factor()[0][0] K = F.extension(f, 'tK') Kabs = K.absolute_field('tKabs') Kabs_pari = pari(Kabs.defining_polynomial()) d = K.disc() if abs(d) <= B: ng = Kabs_pari.polredabs() ind = bisect.bisect_left(S, [d,ng]) S.insert(ind, [d,ng]) Srel.insert(ind, f) elif m == 3: if Fx([-1,6,-5,1]).is_irreducible(): K = F.extension(Fx([-1,6,-5,1]), 'tK') Kabs = K.absolute_field('tKabs') Kabs_pari = pari(Kabs.defining_polynomial()) d = K.disc() if abs(d) <= B: ng = Kabs_pari.polredabs() ind = bisect.bisect_left(S, [d,ng]) S.insert(ind, [d,ng]) Srel.insert(ind, Fx([-1,6,-5,1])) # Now check for isomorphic fields S = [[S[i][0],S[i][1],Srel[i]] for i in range(len(S))] weed_fields(S) # Output. if verbose: print "="*80 print "Polynomials tested:", counts[0] print "Irreducible polynomials:", counts[1] print "Polynomials with nfdisc <= B:", counts[2] for i in range(len(S)): print S[i] if type(verbose) == str: fsock.close() sys.stdout = saveout if return_seqs: return [counts,[[s[0],s[1].reverse().Vec(),s[2].coeffs()] for s in S]] else: return S | 0dd4436607c83105418c5e6236f5d98a1a2cdc8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/0dd4436607c83105418c5e6236f5d98a1a2cdc8a/totallyreal_rel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4241,
67,
3307,
1230,
7688,
67,
2821,
67,
2878,
12,
42,
16,
312,
16,
605,
16,
279,
273,
5378,
16,
3988,
33,
20,
16,
327,
67,
22437,
33,
8381,
4672,
436,
8395,
1220,
445,
3557,
815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4241,
67,
3307,
1230,
7688,
67,
2821,
67,
2878,
12,
42,
16,
312,
16,
605,
16,
279,
273,
5378,
16,
3988,
33,
20,
16,
327,
67,
22437,
33,
8381,
4672,
436,
8395,
1220,
445,
3557,
815,
... |
self.tk.call(self._w, 'bind', widget._w) | self.tk.call(self._w, 'bind', widget._w) | def bind_widget(self, widget): | 22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1993,
67,
6587,
12,
2890,
16,
3604,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1993,
67,
6587,
12,
2890,
16,
3604,
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,... |
min_args = 1 | min_args = 0 | def _run(proc_name, params): run_mode = params[0] func = _registered_plugins_[proc_name][10] if run_mode == RUN_NONINTERACTIVE: return apply(func, params[1:]) script_params = _registered_plugins_[proc_name][8] min_args = 1 if len(params) > 1: for i in range(1, len(params)): param_type = _obj_mapping[script_params[i - 1][0]] if not isinstance(params[i], param_type): break min_args = i if len(script_params) > min_args: start_params = params[:min_args + 1] if run_mode == RUN_WITH_LAST_VALS: default_params = _get_defaults(proc_name) params = start_params + default_params[min_args:] else: params = start_params else: run_mode = RUN_NONINTERACTIVE if run_mode == RUN_INTERACTIVE: try: res = _interact(proc_name, params[1:]) except CancelError: return else: res = apply(func, params[1:]) gimp.displays_flush() return res | 2c594fbc33cc40d4f1a28e412193326c089a2b52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11058/2c594fbc33cc40d4f1a28e412193326c089a2b52/gimpfu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
12,
9381,
67,
529,
16,
859,
4672,
1086,
67,
3188,
273,
859,
63,
20,
65,
1326,
273,
389,
14327,
67,
8057,
67,
63,
9381,
67,
529,
6362,
2163,
65,
225,
309,
1086,
67,
3188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2681,
12,
9381,
67,
529,
16,
859,
4672,
1086,
67,
3188,
273,
859,
63,
20,
65,
1326,
273,
389,
14327,
67,
8057,
67,
63,
9381,
67,
529,
6362,
2163,
65,
225,
309,
1086,
67,
3188,
... |
count = 0 seg_lines.reverse() for seg_id, start, duration in seg_lines: if seg_id == 0: cuts.append((count, start, duration)) break else: cuts.append((count, start, duration)) count += 1 cuts.reverse() | count = 0 seg_lines.reverse() print seg_lines for seg_id, start, duration in seg_lines: if seg_id == 0: cuts.append((count, start, duration)) break else: cuts.append((count, start, duration)) count += 1 cuts.reverse() print cuts | def cut_file_manually(self, filename): """ Cuts a file manually with Avidemux or VirtualDub and gets cuts from possibly created project files. returns: error_message, cuts, executable """ program, config_value = self.__get_program(filename, manually=True) if program < 0: return config_value, None, None if program == Program.AVIDEMUX: | a0948dc9b13e65f711abc27e8e84272f4e95811d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11048/a0948dc9b13e65f711abc27e8e84272f4e95811d/decodeorcut.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6391,
67,
768,
67,
4728,
3452,
12,
2890,
16,
1544,
4672,
3536,
385,
12940,
279,
585,
10036,
598,
432,
6768,
81,
2616,
578,
7269,
40,
373,
471,
5571,
6391,
87,
628,
10016,
2522,
1984,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6391,
67,
768,
67,
4728,
3452,
12,
2890,
16,
1544,
4672,
3536,
385,
12940,
279,
585,
10036,
598,
432,
6768,
81,
2616,
578,
7269,
40,
373,
471,
5571,
6391,
87,
628,
10016,
2522,
1984,
1... |
court_order(thing, (300, 300), 60) court_order(thing, (600, 300), 60) | def main(): clock = events.dispatcher('Clock') keyboard = events.dispatcher('Keyboard') rect = components.entity('Red Rect', clock, location=(300, 100), motion=components.motion(velocity=(3,-0.5)), graphics=components.graphics((255, 0, 0), (20, 20))) player = components.entity('White Rect', clock, keyboard, location=(0, 0), motion=components.motion([0, 0], [0, 0]), graphics=components.graphics((128, 128, 128), (10, 10))) accelerate_on_keypress(player, K_UP, (0, -0.25), frames=0) accelerate_on_keypress(player, K_DOWN, (0, 0.25), frames=0) accelerate_on_keypress(player, K_LEFT, (-0.25, 0), frames=0) accelerate_on_keypress(player, K_RIGHT, (0.25, 0), frames=0) things = [rect, player] for thing in things: attractor(thing, (300, 300), 5000) attractor(thing, (600, 300), 5000) velocity_updater(thing) court_order(thing, (300, 300), 60) court_order(thing, (600, 300), 60) location_updater(thing) location_clamper(thing, (0, 0), (1000, 600)) frame_time = 0.02 pygame.init() screen = pygame.display.set_mode((1000, 600)) tick_event = pygame.event.Event(TICK) while True: start = time.clock() clock.dispatch(tick_event) for event in pygame.event.get(): if event.type == QUIT: return 0 elif event.type == KEYDOWN or event.type == KEYUP: keyboard.dispatch(event) screen.fill((0, 0, 0)) for thing in things: if thing.graphics is not None and thing.location is not None: screen.fill(thing.graphics.color, pygame.Rect(thing.location[0] - thing.graphics.size[0] / 2, thing.location[1] - thing.graphics.size[1] / 2, thing.graphics.size[0], thing.graphics.size[1])) pygame.display.flip() delta = time.clock() - start if delta < frame_time: time.sleep(frame_time - delta) | 119cfe026c332e53b422ce373082a2b100697643 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13911/119cfe026c332e53b422ce373082a2b100697643/orbitals.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
7268,
273,
2641,
18,
18495,
2668,
14027,
6134,
16263,
273,
2641,
18,
18495,
2668,
17872,
6134,
4917,
273,
4085,
18,
1096,
2668,
3715,
9315,
2187,
7268,
16,
2117,
28657,
19249,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
7268,
273,
2641,
18,
18495,
2668,
14027,
6134,
16263,
273,
2641,
18,
18495,
2668,
17872,
6134,
4917,
273,
4085,
18,
1096,
2668,
3715,
9315,
2187,
7268,
16,
2117,
28657,
19249,
... | |
cmd = cmd + "pilotID IN (%s)" % ",".join( [ '%s' % x for x in pilotID ] ) else: cmd = cmd + "pilotID = %s" % pilotID | cmd = cmd + " WHERE pilotID IN (%s)" % ",".join( [ '%s' % x for x in pilotID ] ) else: cmd = cmd + " WHERE pilotID = %s" % pilotID | def getJobsForPilot( self, pilotID ): """ Get IDs of Jobs that were executed by a pilot """ cmd = "SELECT pilotID,JobID FROM JobToPilotMapping " if type( pilotID ) == ListType: cmd = cmd + "pilotID IN (%s)" % ",".join( [ '%s' % x for x in pilotID ] ) else: cmd = cmd + "pilotID = %s" % pilotID | a2cfd977cc656e1a9e1dccfef7b82caf61eb910a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/a2cfd977cc656e1a9e1dccfef7b82caf61eb910a/PilotAgentsDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7276,
1290,
52,
22797,
12,
365,
16,
293,
22797,
734,
262,
30,
3536,
968,
7115,
434,
26909,
716,
4591,
7120,
635,
279,
293,
22797,
3536,
1797,
273,
315,
4803,
293,
22797,
734,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7276,
1290,
52,
22797,
12,
365,
16,
293,
22797,
734,
262,
30,
3536,
968,
7115,
434,
26909,
716,
4591,
7120,
635,
279,
293,
22797,
3536,
1797,
273,
315,
4803,
293,
22797,
734,
16,
... |
if len (item) == 0: | sidebarTPB = Block.Block.findBlockByName ("SidebarTPB") (filteredCollection, rerender) = sidebarTPB.trunkDelegate._mapItemToCacheKeyItem(item) if len (filteredCollection) == 0: | def Draw (self, grid, attr, dc, rect, row, col, isSelected): DrawingUtilities.SetTextColorsAndFont (grid, attr, dc, isSelected) | 4413ae237bfd169633dc0bd228a1823e73516f90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/4413ae237bfd169633dc0bd228a1823e73516f90/SideBar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
261,
2890,
16,
3068,
16,
1604,
16,
6744,
16,
4917,
16,
1027,
16,
645,
16,
20956,
4672,
10184,
310,
11864,
18,
694,
1528,
12570,
1876,
5711,
261,
5222,
16,
1604,
16,
6744,
16,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10184,
261,
2890,
16,
3068,
16,
1604,
16,
6744,
16,
4917,
16,
1027,
16,
645,
16,
20956,
4672,
10184,
310,
11864,
18,
694,
1528,
12570,
1876,
5711,
261,
5222,
16,
1604,
16,
6744,
16,
20... |
user = self._doAddTempUser(name=name, password=password, roles=roles, domains=domains, firstname=firstname, | user = self._doAddTempUser(name=name, password=password, roles=roles, domains=domains, firstname=firstname, | def manage_addUser(self, name='', password='', confirm='', roles=[], domains=[], firstname='', lastname='', email='', strict=0, REQUEST=None, **kwargs): """ """ # Verify captcha captcha_gen_word = self.getSession('captcha', '') captcha_prov_word = kwargs.get('verify_word', captcha_gen_word) name_expr = re.compile('^[a-z0-9]*$') if not re.match(name_expr, name): raise Exception, 'Username: only lowercase letters and numbers allowed' if captcha_prov_word != captcha_gen_word: raise Exception, 'The word you typed does not match with the one shown in the image. Please try again.' if not firstname: raise Exception, 'The first name must be specified' if not lastname: raise Exception, 'The last name must be specified' if not email: raise Exception, 'The email must be specified' if getattr(self, 'email_expression', ''): email_expr = re.compile(self.email_expression, re.IGNORECASE) if not re.match(email_expr, email): raise Exception, 'Invalid email address.' if not name: raise Exception, 'An username must be specified' if not password or not confirm: raise Exception, 'Password and confirmation must be specified' if self.getUser(name) or (self._emergency_user and name == self._emergency_user.getUserName()): raise Exception, 'A user with the specified name already exists' if (password or confirm) and (password != confirm): raise Exception, 'Password and confirmation do not match' if strict: users = self.getUserNames() for n in users: us = self.getUser(n) if email.strip() == us.email: raise Exception, 'A user with the specified email already exists, username %s' % n if firstname == us.firstname and lastname == us.lastname: raise Exception, 'A user with the specified name already exists, username %s' % n #convert data roles = self.utConvertToList(roles) domains = self.utConvertToList(domains) # # Confirm by mail # if self.emailConfirmationEnabled(): user = self._doAddTempUser(name=name, password=password, roles=roles, domains=domains, firstname=firstname, lastname=lastname, email=email) else: user = self._doAddUser(name, password, roles, domains, firstname, lastname, email) if REQUEST: REQUEST.RESPONSE.redirect('manage_users_html') return user | d347d2826a42bbacd832272a529f30116170d574 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/d347d2826a42bbacd832272a529f30116170d574/AuthenticationTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10680,
67,
1289,
1299,
12,
2890,
16,
508,
2218,
2187,
2201,
2218,
2187,
6932,
2218,
2187,
4900,
22850,
6487,
10128,
22850,
6487,
1122,
529,
2218,
2187,
1142,
529,
2218,
2187,
2699,
2218,
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,
10680,
67,
1289,
1299,
12,
2890,
16,
508,
2218,
2187,
2201,
2218,
2187,
6932,
2218,
2187,
4900,
22850,
6487,
10128,
22850,
6487,
1122,
529,
2218,
2187,
1142,
529,
2218,
2187,
2699,
2218,
2... |
[(14.134725142, 0.18467291567), (21.022039637, -0.067789328954), (25.010857582, -0.055587278126)] | [(14.1347251, 0.184672915), (21.0220396, -0.0677893289), (25.0108575, -0.0555872781)] | def zeros_in_interval(self, x, y, stepsize, L=''): r""" Return the imaginary parts of (most of) the nontrivial zeros of the $L$-function on the line $\Re(s)=1/2$ with positive imaginary part between $x$ and $y$, along with a technical quantity for each. | 190d721b928fa19159704505db9bd5cd1aafd024 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/190d721b928fa19159704505db9bd5cd1aafd024/lcalc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4922,
67,
267,
67,
6624,
12,
2890,
16,
619,
16,
677,
16,
2235,
1467,
16,
511,
2218,
11,
4672,
436,
8395,
2000,
326,
30852,
2140,
434,
261,
10329,
434,
13,
326,
1661,
313,
20109,
4922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4922,
67,
267,
67,
6624,
12,
2890,
16,
619,
16,
677,
16,
2235,
1467,
16,
511,
2218,
11,
4672,
436,
8395,
2000,
326,
30852,
2140,
434,
261,
10329,
434,
13,
326,
1661,
313,
20109,
4922,
... |
1/(1 - (1/r)) | 1/(1 - 1/r) | def _repr_(self, simplify=True): """ TESTS: sage: a = (1-1/r)^(-1); a 1/(1 - (1/r)) sage: a.derivative(r) -1/((1 - (1/r))^2*r^2) | 7042f0e43d557a3d80ba470d1c31e104f0ec22eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/7042f0e43d557a3d80ba470d1c31e104f0ec22eb/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
12715,
67,
12,
2890,
16,
16499,
33,
5510,
4672,
3536,
22130,
55,
30,
272,
410,
30,
279,
273,
261,
21,
17,
21,
19,
86,
13,
66,
19236,
21,
1769,
279,
404,
19,
12,
21,
300,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
67,
12,
2890,
16,
16499,
33,
5510,
4672,
3536,
22130,
55,
30,
272,
410,
30,
279,
273,
261,
21,
17,
21,
19,
86,
13,
66,
19236,
21,
1769,
279,
404,
19,
12,
21,
300,
404,
... |
self.theStepperChacker = 1 | self.theStepperChecker = 1 | def loadRule( self, button_obj ) : self.theStepperChacker = 1 aFileName = self.theRuleFileSelection.get_filename() self.theRuleFileSelection.hide() self.theSession.printMessage( 'load rule file %s\n' % aFileName ) aGlobalNameMap = { 'aMainWindow' : self } execfile(aFileName, aGlobalNameMap) self.theModelInterpreter.load( self.theCellModelObject ) self.theEntryListWindow.update() self.theSession.theSimulator.initialize() | 8f2a6d91b6a947b937eb5fc3b937af3797e21ac3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8f2a6d91b6a947b937eb5fc3b937af3797e21ac3/MainWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
2175,
12,
365,
16,
3568,
67,
2603,
262,
294,
365,
18,
5787,
4160,
457,
8847,
273,
404,
279,
4771,
273,
365,
18,
5787,
2175,
812,
6233,
18,
588,
67,
3459,
1435,
365,
18,
5787,
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,
1262,
2175,
12,
365,
16,
3568,
67,
2603,
262,
294,
365,
18,
5787,
4160,
457,
8847,
273,
404,
279,
4771,
273,
365,
18,
5787,
2175,
812,
6233,
18,
588,
67,
3459,
1435,
365,
18,
5787,
2... |
else: | else: | def import_mesh(self,obj,groupidx,drawidx=0): root = self.getRoot() name = str(obj.name) # Do Mesh import here print " [Drawable Spans]" if groupidx==-1 or groupidx == 0xFFFFFFFF: # Check both signed and unsigned representations (unfortunate hack) return [] if self.fDIIndices[groupidx].fFlags==plDISpanIndex.Flags["kBone"]: return [] resmanager=self.getResManager() | ab10413dab5726ab172d23fd99b8f92284c9d65b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12286/ab10413dab5726ab172d23fd99b8f92284c9d65b/alc_DrawClasses.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
15557,
12,
2890,
16,
2603,
16,
1655,
3465,
16,
9446,
3465,
33,
20,
4672,
1365,
273,
365,
18,
588,
2375,
1435,
508,
273,
609,
12,
2603,
18,
529,
13,
468,
2256,
24341,
1930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
15557,
12,
2890,
16,
2603,
16,
1655,
3465,
16,
9446,
3465,
33,
20,
4672,
1365,
273,
365,
18,
588,
2375,
1435,
508,
273,
609,
12,
2603,
18,
529,
13,
468,
2256,
24341,
1930,
... |
yield (r"(?:\A|[^&]) | yield (r"!?(?<!&) | def get_wiki_syntax(self): yield (r"(?:\A|[^&])#\d+", # #123 but not { (HTML entity) lambda x, y, z: self._format_link(x, 'ticket', y[1:], y)) | 548366aaba6529620d5d089177717753cbde36b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/548366aaba6529620d5d089177717753cbde36b0/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
13044,
67,
14308,
12,
2890,
4672,
2824,
261,
86,
6,
15599,
37,
96,
5969,
10,
5717,
7,
64,
72,
15,
3113,
468,
468,
12936,
1496,
486,
6523,
12936,
31,
261,
4870,
1522,
13,
319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13044,
67,
14308,
12,
2890,
4672,
2824,
261,
86,
6,
15599,
37,
96,
5969,
10,
5717,
7,
64,
72,
15,
3113,
468,
468,
12936,
1496,
486,
6523,
12936,
31,
261,
4870,
1522,
13,
319... |
return s.split(NUL, 1)[0] | return s.rstrip(NUL) | def nts(s): """Convert a null-terminated string buffer to a python string. """ return s.split(NUL, 1)[0] | 864bba1981cbb3284b43cf19a40f909296323d02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/864bba1981cbb3284b43cf19a40f909296323d02/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
290,
3428,
12,
87,
4672,
3536,
2723,
279,
446,
17,
29133,
533,
1613,
358,
279,
5790,
533,
18,
3536,
327,
272,
18,
86,
6406,
12,
50,
1506,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
290,
3428,
12,
87,
4672,
3536,
2723,
279,
446,
17,
29133,
533,
1613,
358,
279,
5790,
533,
18,
3536,
327,
272,
18,
86,
6406,
12,
50,
1506,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
date = time.strptime(str(data['form']['date']), '%Y-%m-%d') | date = time.strptime(str(datas['form']['date']), '%Y-%m-%d') | def _action_open(self, cursor, user, data, context=None): if context is None: context = {} model_data_obj = self.pool.get('ir.model.data') act_window_obj = self.pool.get('ir.action.act_window') company_obj = self.pool.get('company.company') | 299f4343b67b644e4dd54e00511bcac4281d3d8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/299f4343b67b644e4dd54e00511bcac4281d3d8a/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1128,
67,
3190,
12,
2890,
16,
3347,
16,
729,
16,
501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
938,
67,
892,
67,
2603,
273,
365,
18,
6011,
18,
588,
266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1128,
67,
3190,
12,
2890,
16,
3347,
16,
729,
16,
501,
16,
819,
33,
7036,
4672,
309,
819,
353,
599,
30,
819,
273,
2618,
938,
67,
892,
67,
2603,
273,
365,
18,
6011,
18,
588,
266... |
homedirPath = values(['cn=defaults', 'grimoireHomedirPath'])[0].split('.') maildirPath = values(['cn=defaults', 'grimoireMaildirPath'])[0].split('.') | def unlocked(path, *args, **kws): conn = self._getpath(Grimoire.Types.TreeRoot).directory.get.parameters(['local', 'ldap', 'admin', 'conn'], cache=True) kws = getDefaultsConvertingParams(self._getpath(Grimoire.Types.TreeRoot)).compileArgs(args, [], kws).kws path = [Grimoire.Utils.encode(item, 'ascii') for item in path] groupPath = path[:-1] user = path[-1] | dad84c8749dbae2bc19bd89ba2084e4337919f5b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9377/dad84c8749dbae2bc19bd89ba2084e4337919f5b/user.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25966,
12,
803,
16,
380,
1968,
16,
2826,
79,
4749,
4672,
1487,
273,
365,
6315,
588,
803,
12,
20799,
381,
19847,
18,
2016,
18,
2471,
2375,
2934,
5149,
18,
588,
18,
3977,
12,
3292,
3729,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25966,
12,
803,
16,
380,
1968,
16,
2826,
79,
4749,
4672,
1487,
273,
365,
6315,
588,
803,
12,
20799,
381,
19847,
18,
2016,
18,
2471,
2375,
2934,
5149,
18,
588,
18,
3977,
12,
3292,
3729,... | |
('deletekey', None, 'Delete Key', 'Delete', None, self.remove), | def __init__(self): | 9a1189ef0a6c014f0c3d64fa26fdc291b0f3a6e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2312/9a1189ef0a6c014f0c3d64fa26fdc291b0f3a6e6/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
lambda w: autoconnect_set_data(w.get_active(), network) | lambda w: autoconnect_set_data(w.get_active(), self.network) | def get_text_from_textview(textview): buffer = textview.get_buffer() return buffer.get_text( buffer.get_start_iter(), buffer.get_end_iter() ) | 4e3fce086a885558cfbd2aca990b3731ca541fa8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/4e3fce086a885558cfbd2aca990b3731ca541fa8/servers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
955,
67,
2080,
67,
955,
1945,
12,
955,
1945,
4672,
1613,
273,
977,
1945,
18,
588,
67,
4106,
1435,
327,
1613,
18,
588,
67,
955,
12,
1613,
18,
588,
67,
1937,
67,
2165,
9334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
336,
67,
955,
67,
2080,
67,
955,
1945,
12,
955,
1945,
4672,
1613,
273,
977,
1945,
18,
588,
67,
4106,
1435,
327,
1613,
18,
588,
67,
955,
12,
1613,
18,
588,
67,
1937,
67,
2165,
9334,
... |
message['Subject'] = u'[%s] %s' % (host, subject.encode(encoding)) | message['Subject'] = '[%s] %s' % (host, subject.encode(encoding)) | def send_email(self, from_addr, to_addr, subject, body, **kw): # Check input data if not isinstance(subject, unicode): raise TypeError, 'the subject must be a Unicode string' if not isinstance(body, unicode): raise TypeError, 'the body must be a Unicode string' | 1c944528912e2c0f5edc1adb236499393c77f356 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12681/1c944528912e2c0f5edc1adb236499393c77f356/root.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
3652,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
4793,
16,
3221,
16,
1417,
16,
2826,
9987,
4672,
468,
2073,
810,
501,
309,
486,
1549,
12,
7857,
16,
5252,
4672,
1002,
3580,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
3652,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
4793,
16,
3221,
16,
1417,
16,
2826,
9987,
4672,
468,
2073,
810,
501,
309,
486,
1549,
12,
7857,
16,
5252,
4672,
1002,
3580,
1... |
return COMMASPACE.join(self.__msg.getall(key[7:], 'n/a')) | missing = [] all = self.__msg.get_all(key[7:], missing) if all is missing: return 'n/a' return COMMASPACE.join(all) | def __getitem__(self, key): if key.startswith('msg_'): return self.__msg.get(key[4:], 'n/a') elif key.startswith('allmsg_'): return COMMASPACE.join(self.__msg.getall(key[7:], 'n/a')) else: return SafeDict.__getitem__(self, key) | 326a1174d730585329db1c3a321d5c94c17af0b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/326a1174d730585329db1c3a321d5c94c17af0b2/SafeDict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
309,
498,
18,
17514,
1918,
2668,
3576,
4623,
4672,
327,
365,
16186,
3576,
18,
588,
12,
856,
63,
24,
30,
6487,
296,
82,
19,
69,
6134,
1327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
498,
4672,
309,
498,
18,
17514,
1918,
2668,
3576,
4623,
4672,
327,
365,
16186,
3576,
18,
588,
12,
856,
63,
24,
30,
6487,
296,
82,
19,
69,
6134,
1327,
... |
if (empty_cols >= cols - 1 or excel.cell_value(row[0]) == "Scientific Name" or excel.cell_value(row[0])[0:7] == "Species"): | if ((empty_cols == cols) or excel.cell_value(row[0]) == "Scientific Name" or excel.cell_value(row[0])[0:7] == "Species"): pass elif empty_cols == cols - 1: | def sci_name(value): """Returns genus/species/subspecies list from a scientific name""" values = value.split() list = [] if len(values) >= 2: [list.append(value) for value in values[0:2]] if len(values) == 3: list.append(values[2]) while len(list) < 3: list.append('') return list | fe7d1b1434083a0bee222d8566cca9afb72eff5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12606/fe7d1b1434083a0bee222d8566cca9afb72eff5f/dbtks_CRC_avianbodymass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31363,
67,
529,
12,
1132,
4672,
3536,
1356,
3157,
407,
19,
22657,
19,
1717,
22657,
666,
628,
279,
888,
1979,
1507,
508,
8395,
924,
273,
460,
18,
4939,
1435,
666,
273,
5378,
309,
562,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31363,
67,
529,
12,
1132,
4672,
3536,
1356,
3157,
407,
19,
22657,
19,
1717,
22657,
666,
628,
279,
888,
1979,
1507,
508,
8395,
924,
273,
460,
18,
4939,
1435,
666,
273,
5378,
309,
562,
1... |
@type format: string | @type format: Image object | def save(self, fname, format): """ Save the scene to a file | d6d0ed4232dd40752435c71c9acee3d19794bc06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/d6d0ed4232dd40752435c71c9acee3d19794bc06/scene.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
5299,
16,
740,
4672,
3536,
7074,
326,
9065,
358,
279,
585,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
5299,
16,
740,
4672,
3536,
7074,
326,
9065,
358,
279,
585,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
for k in w.header.getValue().keys() : self.assertEqual( w.header.getValue()[k], h[k] ) | for k in w["header"].getValue().keys() : self.assertEqual( w["header"].getValue()[k], h[k] ) | def testHeader( self ) : | e004c661c27575e3fe0c623ef1a090ae4e479bbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9042/e004c661c27575e3fe0c623ef1a090ae4e479bbb/ObjectWriter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1864,
12,
365,
262,
294,
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,
1842,
1864,
12,
365,
262,
294,
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... |
gLogger.info("RequestDBFile._setRequest: Attempting to set %s." % requestName) request = RequestContainer(requestString) | gLogger.info( "RequestDBFile._setRequest: Attempting to set %s." % requestName ) request = RequestContainer( requestString ) | def setRequest(self,requestName,requestString,desiredStatus=None): """ Set request to the database (including all sub-requests) """ gLogger.info("RequestDBFile._setRequest: Attempting to set %s." % requestName) request = RequestContainer(requestString) requestTypes = request.getSubRequestTypes()['Value'] try: for requestType in requestTypes: subRequestString = request.toXML(desiredType=requestType)['Value'] if subRequestString: if desiredStatus: status = desiredStatus elif not request.isRequestTypeEmpty(requestType)['Value']: status = 'ToDo' else: status = 'Done' subRequestDir = '%s/%s/%s' % (self.root,requestType,status) if not os.path.exists(subRequestDir): os.makedirs(subRequestDir) subRequestPath = '%s/%s' % (subRequestDir,requestName) subRequestFile = open(subRequestPath,'w') subRequestFile.write(subRequestString) subRequestFile.close() gLogger.info("RequestDBFile._setRequest: Successfully set %s." % requestName) return S_OK() except Exception, x: errStr = "RequestDBFile._setRequest: Exception while setting request." gLogger.exception(errStr,requestName,lException=x) self.deleteRequest(requestName) return S_ERROR(errStr) | 457151afa0c3cb1200853bb72493b03e8f994fca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/457151afa0c3cb1200853bb72493b03e8f994fca/RequestDBFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12475,
12,
2890,
16,
2293,
461,
16,
2293,
780,
16,
30458,
1482,
33,
7036,
4672,
3536,
1000,
590,
358,
326,
2063,
261,
31348,
777,
720,
17,
11420,
13,
3536,
314,
3328,
18,
1376,
12,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12475,
12,
2890,
16,
2293,
461,
16,
2293,
780,
16,
30458,
1482,
33,
7036,
4672,
3536,
1000,
590,
358,
326,
2063,
261,
31348,
777,
720,
17,
11420,
13,
3536,
314,
3328,
18,
1376,
12,
315... |
assert 'Department:</strong> Not on the list' in dept_readonly, dept_readonly | assert 'Not on the list' in dept_readonly, dept_readonly | def test_2_field_department_other(self): # Create package model.repo.new_revision() pkg = model.Package(name=u'test2') model.Session.add(pkg) pkg.extras = {u'department':u'Not on the list'} model.repo.commit_and_remove() | d5b92a835dfd85b05248b7f3ac94a0bd85a4b78d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/d5b92a835dfd85b05248b7f3ac94a0bd85a4b78d/test_package_gov.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22,
67,
1518,
67,
323,
15750,
67,
3011,
12,
2890,
4672,
468,
1788,
2181,
938,
18,
7422,
18,
2704,
67,
13057,
1435,
3475,
273,
938,
18,
2261,
12,
529,
33,
89,
1404,
395,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
22,
67,
1518,
67,
323,
15750,
67,
3011,
12,
2890,
4672,
468,
1788,
2181,
938,
18,
7422,
18,
2704,
67,
13057,
1435,
3475,
273,
938,
18,
2261,
12,
529,
33,
89,
1404,
395,
22,... |
confirmMainThread() | def get_current_time(self): confirmMainThread() try: position, format = self.playbin.query_position(gst.FORMAT_TIME) return to_seconds(position) except Exception, e: logging.warn("get_current_time: caught exception: %s" % e) return None | dad4fc88a54f5edbc781a136e2721baad72ddafc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/dad4fc88a54f5edbc781a136e2721baad72ddafc/gstreamerrenderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2972,
67,
957,
12,
2890,
4672,
775,
30,
1754,
16,
740,
273,
365,
18,
1601,
4757,
18,
2271,
67,
3276,
12,
75,
334,
18,
7254,
67,
4684,
13,
327,
358,
67,
7572,
12,
3276,
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,
336,
67,
2972,
67,
957,
12,
2890,
4672,
775,
30,
1754,
16,
740,
273,
365,
18,
1601,
4757,
18,
2271,
67,
3276,
12,
75,
334,
18,
7254,
67,
4684,
13,
327,
358,
67,
7572,
12,
3276,
13,... | |
print "Error running pyrexembed." sys.exit(ret) | print "sage: Error running pyrexembed." sys.exit(1) | def process_pyrexembed_file(f, m): # This is a pyrexembed file, so process accordingly. dir, base = os.path.split(f[:-5]) tmp = '%s/.tmp_pyrexembed'%dir if os.path.exists(tmp) and not os.path.isdir(tmp): print "Please delete file '%s' in %s"%(tmp, dir) sys.exit(1) if not os.path.exists(tmp): os.makedirs(tmp) pyxe_file = "%s/%s.pyxe"%(tmp, base) # The following files will be produced by pyrexembed. cpp_file = "%s/%s_embed.cpp"%(dir, base) c_file = "%s/%s.c"%(dir, base) pyx_file = "%s/%s.pyx"%(dir,base) pyx_embed_file = "%s/%s.pyx"%(tmp, base) h_file = "%s/%s_embed.h"%(tmp, base) if need_to_create(f, pyx_file) or need_to_create(f, cpp_file) or need_to_create(f, h_file): os.system('cp -p %s %s'%(f, pyxe_file)) os.system('cp -p %s/*.pxi %s'%(dir, tmp)) os.system('cp -p %s/*.pxd %s'%(dir, tmp)) os.system('cp -p %s/*.h %s'%(dir, tmp)) cmd = "pyrexembed %s"%pyxe_file print cmd ret = os.system(cmd) if ret != 0: print "Error running pyrexembed." sys.exit(ret) process_pyrex_file(pyx_embed_file, m) cmd = 'cp -p %s/*.pyx %s/; cp -p %s/*.c %s/; cp -p %s/*.h %s/; cp -p %s/*.cpp %s/'%(tmp, dir, tmp, dir, tmp, dir, tmp, dir) print cmd os.system(cmd) return [cpp_file, c_file] | c9984711e01afe58262b21866d825167c82ee1de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/c9984711e01afe58262b21866d825167c82ee1de/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2074,
266,
92,
8483,
67,
768,
12,
74,
16,
312,
4672,
468,
1220,
353,
279,
2395,
266,
92,
8483,
585,
16,
1427,
1207,
15905,
18,
1577,
16,
1026,
273,
1140,
18,
803,
18,
4939,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2074,
266,
92,
8483,
67,
768,
12,
74,
16,
312,
4672,
468,
1220,
353,
279,
2395,
266,
92,
8483,
585,
16,
1427,
1207,
15905,
18,
1577,
16,
1026,
273,
1140,
18,
803,
18,
4939,... |
else: | except ImportError: | def openrsrc(name, *mode): if not mode: mode = '*rb' else: mode = '*' + mode[0] return openrf(name, mode) | 332090238dba66da7714dbcbf1d59a0a84392aaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/332090238dba66da7714dbcbf1d59a0a84392aaf/binhex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
86,
4816,
12,
529,
16,
380,
3188,
4672,
309,
486,
1965,
30,
1965,
273,
14609,
6731,
11,
1335,
11308,
30,
1965,
273,
5306,
397,
1965,
63,
20,
65,
327,
1696,
5809,
12,
529,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1696,
86,
4816,
12,
529,
16,
380,
3188,
4672,
309,
486,
1965,
30,
1965,
273,
14609,
6731,
11,
1335,
11308,
30,
1965,
273,
5306,
397,
1965,
63,
20,
65,
327,
1696,
5809,
12,
529,
16,
1... |
self._sock.sendall(buffer(data, write_offset, buffer_size)) | self._sock.sendall(view[write_offset:write_offset+buffer_size]) | def flush(self): if self._wbuf: data = "".join(self._wbuf) self._wbuf = [] self._wbuf_len = 0 buffer_size = max(self._rbufsize, self.default_bufsize) data_size = len(data) write_offset = 0 try: while write_offset < data_size: self._sock.sendall(buffer(data, write_offset, buffer_size)) write_offset += buffer_size finally: if write_offset < data_size: remainder = data[write_offset:] del data # explicit free self._wbuf.append(remainder) self._wbuf_len = len(remainder) | 0fa6a37cac9253689ed7d8c58281299269a2a30e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/0fa6a37cac9253689ed7d8c58281299269a2a30e/socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
309,
365,
6315,
91,
4385,
30,
501,
273,
1408,
18,
5701,
12,
2890,
6315,
91,
4385,
13,
365,
6315,
91,
4385,
273,
5378,
365,
6315,
91,
4385,
67,
1897,
273,
374,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
309,
365,
6315,
91,
4385,
30,
501,
273,
1408,
18,
5701,
12,
2890,
6315,
91,
4385,
13,
365,
6315,
91,
4385,
273,
5378,
365,
6315,
91,
4385,
67,
1897,
273,
374,
1... |
if getattr(doc, SurveyTool.portal_id, None) is None: return doc | if not doc.__dict__.get(SurveyTool.portal_id, None): return doc | def _verify_doc(self, doc): """See super""" if getattr(doc, SurveyTool.portal_id, None) is None: return doc | 9da075e118b064e71f97f41416f3a7a1e1e82e43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/9da075e118b064e71f97f41416f3a7a1e1e82e43/add_survey_tool_to_nysite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8705,
67,
2434,
12,
2890,
16,
997,
4672,
3536,
9704,
2240,
8395,
309,
3869,
12,
2434,
16,
16680,
9062,
6364,
18,
24386,
67,
350,
16,
599,
13,
353,
599,
30,
327,
997,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8705,
67,
2434,
12,
2890,
16,
997,
4672,
3536,
9704,
2240,
8395,
309,
3869,
12,
2434,
16,
16680,
9062,
6364,
18,
24386,
67,
350,
16,
599,
13,
353,
599,
30,
327,
997,
2,
-100,
-1... |
"""%(name, name, libs, language, includes) | """%(name, name, extension, libs, language, includes) | def pyrex(filename, verbose=False, compile_message=False, make_c_file_nice=False, use_cache=False): if filename[-5:] != '.spyx': print "File (=%s) must have extension .spyx"%filename base = os.path.split(os.path.splitext(filename)[0])[1] build_dir = '%s/%s'%(SPYX_TMP, base) if os.path.exists(build_dir): # There is already a module here. Maybe we do not have to rebuild? # Find the name. if use_cache: prev_so = [F for F in os.listdir(build_dir) if F[-3:] == '.so'] if len(prev_so) > 0: prev_so = prev_so[0] # should have length 1 because of deletes below if os.path.getmtime(filename) <= os.path.getmtime('%s/%s'%(build_dir, prev_so)): # We do not have to rebuild. return prev_so[:-3], build_dir else: os.makedirs(build_dir) for F in os.listdir(build_dir): G = '%s/%s'%(build_dir,F) if not os.path.isdir(G): os.unlink(G) os.system('cd "%s"; ln -s "%s/devel/sage/sage/ext/interrupt.c" .'%(build_dir, SAGE_ROOT)) if compile_message: print "Compiling %s..."%filename F = open(filename).read() F, libs, includes, language = pyx_preparse(F) global sequence_number if not sequence_number.has_key(base): sequence_number[base] = 0 name = '%s_%s'%(base, sequence_number[base]) # increment the sequence number so will use a different one next time. sequence_number[base] += 1 pyx = '%s/%s.pyx'%(build_dir, name) open(pyx,'w').write(F) setup=""" | 4debbe82f9e9fc18b273b55503133f1d4ff8708a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/4debbe82f9e9fc18b273b55503133f1d4ff8708a/pyrex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2395,
266,
92,
12,
3459,
16,
3988,
33,
8381,
16,
4074,
67,
2150,
33,
8381,
16,
1221,
67,
71,
67,
768,
67,
82,
1812,
33,
8381,
16,
999,
67,
2493,
33,
8381,
4672,
309,
1544,
18919,
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,
2395,
266,
92,
12,
3459,
16,
3988,
33,
8381,
16,
4074,
67,
2150,
33,
8381,
16,
1221,
67,
71,
67,
768,
67,
82,
1812,
33,
8381,
16,
999,
67,
2493,
33,
8381,
4672,
309,
1544,
18919,
2... |
m = re.search('value="(\d+)" name=["\']wpEdittime["\']', text) if m: self._editTime = m.group(1) else: self._editTime = "0" m = re.search('value="(\d+)" name=["\']wpStarttime["\']', text) if m: self._startTime = m.group(1) else: self._startTime = "0" | def getEditPage(self, get_redirect=False, throttle = True, sysop = False): """ Get the contents of the Page via the edit page. Do not use this directly, use get() instead. Arguments: get_redirect - Get the contents, even if it is a redirect page This routine returns a unicode string containing the wiki text. """ isWatched = False editRestriction = None output(u'Getting page %s' % self.aslink()) path = self.site().edit_address(self.urlname()) # Make sure Brion doesn't get angry by waiting if the last time a page # was retrieved was not long enough ago. if throttle: get_throttle() # Try to retrieve the page until it was successfully loaded (just in case # the server is down or overloaded) # wait for retry_idle_time minutes (growing!) between retries. retry_idle_time = 1 while True: starttime = time.time() try: text = self.site().getUrl(path, sysop = sysop) except AttributeError: # We assume that the server is down. Wait some time, then try again. print "WARNING: Could not load %s%s. Maybe the server is down. Retrying in %i minutes..." % (self.site().hostname(), path, retry_idle_time) time.sleep(retry_idle_time * 60) # Next time wait longer, but not longer than half an hour retry_idle_time *= 2 if retry_idle_time > 30: retry_idle_time = 30 continue # Extract the actual text from the textedit field try: i1 = re.search('<textarea[^>]*>', text).end() i2 = re.search('</textarea>', text).start() except AttributeError: # find out if the username or IP has been blocked if text.find(mediawiki_messages.get('blockedtitle', self.site())) != -1: raise UserBlocked(self.site(), self.title()) else: # We assume that the server is down. Wait some time, then try again. print "WARNING: No text area found on %s%s. Maybe the server is down. Retrying in %i minutes..." % (self.site().hostname(), path, retry_idle_time) time.sleep(retry_idle_time * 60) # Next time wait longer, but not longer than half an hour retry_idle_time *= 2 if retry_idle_time > 30: retry_idle_time = 30 continue # We now know that there is a textarea. # Look for the edit token Rwatch = re.compile(r"\<input type='hidden' value=\"(.*?)\" name=\"wpEditToken\"") tokenloc = Rwatch.search(text) if tokenloc: self.site().putToken(tokenloc.group(1), sysop = sysop) elif not self.site().getToken(getalways = False): self.site().putToken('', sysop = sysop) # Find out if page actually exists. Only existing pages have a # version history tab. RversionTab = re.compile(r'<li id="ca-history"><a href=".*title=.*&action=history">.*</a></li>') matchVersionTab = RversionTab.search(text) if not matchVersionTab: raise NoPage(self.site(), self.title()) # Look if the page is on our watchlist R = re.compile(r"\<input tabindex='[\d]+' type='checkbox' name='wpWatchthis' checked='checked'") matchWatching = R.search(text) if matchWatching: isWatched = True # Get timestamps m = re.search('value="(\d+)" name=["\']wpEdittime["\']', text) if m: self._editTime = m.group(1) else: self._editTime = "0" m = re.search('value="(\d+)" name=["\']wpStarttime["\']', text) if m: self._startTime = m.group(1) else: self._startTime = "0" # Now process the contents of the textarea m = self.site().redirectRegex().match(text[i1:i2]) if self._editTime == "0": output(u"DBG> page may be locked?!") editRestriction = 'sysop' if m: if get_redirect: self._redirarg = m.group(1) else: output(u"DBG> %s is redirect to %s" % (self.title(), m.group(1))) raise IsRedirectPage(m.group(1)) x = text[i1:i2] x = unescape(x) while x and x[-1] in '\n ': x = x[:-1] return x, isWatched, editRestriction | 96cf7eeba930c03c67985c8fe0c128c94122d3f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/96cf7eeba930c03c67985c8fe0c128c94122d3f6/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21221,
1964,
12,
2890,
16,
336,
67,
7590,
33,
8381,
16,
18304,
273,
1053,
16,
2589,
556,
273,
1083,
4672,
3536,
968,
326,
2939,
434,
326,
3460,
3970,
326,
3874,
1363,
18,
2256,
486,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21221,
1964,
12,
2890,
16,
336,
67,
7590,
33,
8381,
16,
18304,
273,
1053,
16,
2589,
556,
273,
1083,
4672,
3536,
968,
326,
2939,
434,
326,
3460,
3970,
326,
3874,
1363,
18,
2256,
486,
99... | |
from aggdraw import Draw2 | from aggdraw import Draw | def MolToImage(mol,size=(300,300),kekulize=True, wedgeBonds=True,highlightAtoms=[]): """ returns a PIL image containing a drawing of the molecule """ if not mol: raise ValueError,'Null molecule provided' import MolDrawing try: from aggdraw import Draw2 import Image MolDrawing.registerCanvas('agg') Canvas = Draw useAGG=True except: useAGG=False try: import cairo2 import Image MolDrawing.registerCanvas('cairo') from cairoCanvas import Canvas useCAIRO=True except: useCAIRO=False from rdkit.sping.PIL.pidPIL import PILCanvas as Canvas canvas = Canvas(size=size,name='MolToImageFile') img = canvas._image MolDrawing.registerCanvas('sping') drawer = MolDrawing.MolDrawing(canvas) if useAGG or useCAIRO: img = Image.new("RGBA",size,"white") canvas = Canvas(img) if useAGG: canvas.setantialias(True) drawer = MolDrawing.MolDrawing(canvas) if kekulize: from rdkit import Chem mol = Chem.Mol(mol.ToBinary()) Chem.Kekulize(mol) if not mol.GetNumConformers(): from rdkit.Chem import AllChem AllChem.Compute2DCoords(mol) drawer.wedgeDashedBonds=wedgeBonds drawer.AddMol(mol,highlightAtoms=highlightAtoms) canvas.flush() return img | b5aa3aa03e739e241c23feb4e5d17135e4f2c405 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9195/b5aa3aa03e739e241c23feb4e5d17135e4f2c405/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
490,
355,
774,
2040,
12,
21260,
16,
1467,
28657,
19249,
16,
19249,
3631,
79,
3839,
332,
554,
33,
5510,
16,
341,
7126,
26090,
33,
5510,
16,
15978,
14280,
33,
8526,
4672,
3536,
1135,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
490,
355,
774,
2040,
12,
21260,
16,
1467,
28657,
19249,
16,
19249,
3631,
79,
3839,
332,
554,
33,
5510,
16,
341,
7126,
26090,
33,
5510,
16,
15978,
14280,
33,
8526,
4672,
3536,
1135,
279,
... |
elif (class_doc.variables[name].container==class_doc and class_doc.variables[name].overrides is UNKNOWN): | elif class_doc.variables[name].container==class_doc: | def inherit_docs(class_doc): for base_class in list(class_doc.mro(warn_about_bad_bases=True)): if base_class == class_doc: continue # Inherit any groups. Place them *after* this class's groups, # so that any groups that are important to this class come # first. if base_class.group_specs not in (None, UNKNOWN): class_doc.group_specs += [gs for gs in base_class.group_specs if gs not in class_doc.group_specs] # Inherit any variables. if base_class.variables is UNKNOWN: continue for name, var_doc in base_class.variables.items(): # If it's a __private variable, then don't inherit it. if name.startswith('__') and not name.endswith('__'): continue # Inhetit only from the defining class. Or else, in case of # multiple inheritance, we may import from a grand-ancestor # variables overridden by a class that follows in mro. if base_class != var_doc.container: continue # If class_doc doesn't have a variable with this name, # then inherit it. if name not in class_doc.variables: class_doc.variables[name] = var_doc # Otherwise, class_doc already contains a variable # that shadows var_doc. But if class_doc's var is # local, then record the fact that it overrides # var_doc. elif (class_doc.variables[name].container==class_doc and class_doc.variables[name].overrides is UNKNOWN): class_doc.variables[name].overrides = var_doc _inherit_info(class_doc.variables[name]) | af99c7e427827865cac6a60cad183aca8e6f7e8a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11420/af99c7e427827865cac6a60cad183aca8e6f7e8a/docbuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6811,
67,
8532,
12,
1106,
67,
2434,
4672,
364,
1026,
67,
1106,
316,
666,
12,
1106,
67,
2434,
18,
81,
303,
12,
8935,
67,
21071,
67,
8759,
67,
18602,
33,
5510,
3719,
30,
309,
1026,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6811,
67,
8532,
12,
1106,
67,
2434,
4672,
364,
1026,
67,
1106,
316,
666,
12,
1106,
67,
2434,
18,
81,
303,
12,
8935,
67,
21071,
67,
8759,
67,
18602,
33,
5510,
3719,
30,
309,
1026,
67,... |
xc = squeeze(random.normal(0,std*self.learn_rate, size=len(x0))) xnew = x0 + xc | xc = squeeze(random.normal(0, 1.0, size=self.dims)) xnew = x0 + xc*std*self.learn_rate | def update_guess(self, x0): std = min(sqrt(self.T), (self.upper-self.lower)/3.0/self.learn_rate) x0 = asarray(x0) xc = squeeze(random.normal(0,std*self.learn_rate, size=len(x0))) xnew = x0 + xc return xnew | 5d83f70d8d9b65f40e4932969c9d8113c8f4f8cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/5d83f70d8d9b65f40e4932969c9d8113c8f4f8cd/anneal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
20885,
12,
2890,
16,
619,
20,
4672,
2044,
273,
1131,
12,
24492,
12,
2890,
18,
56,
3631,
261,
2890,
18,
5797,
17,
2890,
18,
8167,
13176,
23,
18,
20,
19,
2890,
18,
21346,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
20885,
12,
2890,
16,
619,
20,
4672,
2044,
273,
1131,
12,
24492,
12,
2890,
18,
56,
3631,
261,
2890,
18,
5797,
17,
2890,
18,
8167,
13176,
23,
18,
20,
19,
2890,
18,
21346,
67,... |
[a, '''b''', c] | [a, '''b''', c, ''] | def strip_string_literals(code): r""" Returns a string with all literal quotes replaced with labels and a dict of labels for re-subsitution. This makes parsing much easier. EXAMPLES: sage: from sage.misc.preparser import strip_string_literals sage: s, literals = strip_string_literals(r'''['a', "b", 'c', "d\""]''') sage: s '[%(L1)s, %(L2)s, %(L3)s, %(L4)s]' sage: literals {'L4': '"d\\""', 'L2': '"b"', 'L3': "'c'", 'L1': "'a'"} sage: print s % literals ['a', "b", 'c', "d\""] Triple-quotes are handled as well. sage: s, literals = strip_string_literals("[a, '''b''', c]") sage: s '[a, %(L1)s, c]' sage: print s % literals [a, '''b''', c] """ new_code = [] literals = {} counter = 0 start = q = 0 in_quote = False raw = False while True: sig_q = code.find("'", q) dbl_q = code.find('"', q) q = min(sig_q, dbl_q) if q == -1: q = max(sig_q, dbl_q) if q == -1: new_code.append(code[start:].replace('%','%%')) return "".join(new_code), literals if in_quote: if not raw and code[q-1] == '\\': q += 1 if code[q:q+len(in_quote)] == in_quote: counter += 1 label = "L%s" % counter literals[label] = code[start:q+len(in_quote)] new_code.append("%%(%s)s" % label) q += len(in_quote) start = q in_quote = False else: q += 1 else: raw = q>0 and code[q-1] == 'r' if code[q+1] == code[q]: in_quote = code[q]*3 else: in_quote = code[q] new_code.append(code[start:q].replace('%', '%%')) start = q q += len(in_quote) | 126ec7ca15b4cb3b2967c6c988087023a08e7698 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/126ec7ca15b4cb3b2967c6c988087023a08e7698/preparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2569,
67,
1080,
67,
80,
11235,
12,
710,
4672,
436,
8395,
2860,
279,
533,
598,
777,
7158,
10681,
8089,
598,
3249,
471,
279,
2065,
434,
3249,
364,
283,
17,
22284,
305,
1421,
18,
1220,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2569,
67,
1080,
67,
80,
11235,
12,
710,
4672,
436,
8395,
2860,
279,
533,
598,
777,
7158,
10681,
8089,
598,
3249,
471,
279,
2065,
434,
3249,
364,
283,
17,
22284,
305,
1421,
18,
1220,
72... |
sage: len(setA) == 1 or len(setB) == 1 | sage: len(setA) == 1 or len(setB) == 1 | def edge_connectivity(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0): r""" Returns the edge connectivity of the graph. For more information, see the `Wikipedia article on connectivity <http://en.wikipedia.org/wiki/Connectivity_(graph_theory)>`_. | 08b3ef8c500132f63d2dfd7371451a85a1a6987d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/08b3ef8c500132f63d2dfd7371451a85a1a6987d/generic_graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3612,
2818,
12,
2890,
16,
460,
67,
3700,
33,
5510,
16,
999,
67,
7126,
67,
5336,
33,
8381,
16,
6928,
33,
8381,
16,
12776,
33,
7036,
16,
3988,
33,
20,
4672,
436,
8395,
2860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3591,
67,
3612,
2818,
12,
2890,
16,
460,
67,
3700,
33,
5510,
16,
999,
67,
7126,
67,
5336,
33,
8381,
16,
6928,
33,
8381,
16,
12776,
33,
7036,
16,
3988,
33,
20,
4672,
436,
8395,
2860,
... |
self.live_installer.window.set_cursor (None) | def on_steps_switch_page (self, foo, bar, current): | 9bfd21fbc5963e59248fe62b6d1feadd6c0494e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2662/9bfd21fbc5963e59248fe62b6d1feadd6c0494e2/gtkui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
8986,
67,
9610,
67,
2433,
261,
2890,
16,
8431,
16,
4653,
16,
783,
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,
... | [
1,
1,
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,
603,
67,
8986,
67,
9610,
67,
2433,
261,
2890,
16,
8431,
16,
4653,
16,
783,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
if builtinobject is object: return builtin except AttributeError: pass | if builtinobject is object: return builtin | def getmodule(object): """Try to guess which module an object was defined in.""" if isclass(object): return sys.modules.get(object.__module__) try: file = getabsfile(object) except TypeError: return None if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] for module in sys.modules.values(): if hasattr(module, '__file__'): modulesbyfile[getabsfile(module)] = module.__name__ if modulesbyfile.has_key(file): return sys.modules[modulesbyfile[file]] main = sys.modules['__main__'] try: mainobject = getattr(main, object.__name__) if mainobject is object: return main except AttributeError: pass builtin = sys.modules['__builtin__'] try: builtinobject = getattr(builtin, object.__name__) if builtinobject is object: return builtin except AttributeError: pass | d6c86dae430f16a4790418f8c96eb8ef11aab251 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6c86dae430f16a4790418f8c96eb8ef11aab251/inspect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
2978,
12,
1612,
4672,
3536,
7833,
358,
7274,
1492,
1605,
392,
733,
1703,
2553,
316,
12123,
309,
28209,
12,
1612,
4672,
327,
2589,
18,
6400,
18,
588,
12,
1612,
16186,
2978,
972,
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,
336,
2978,
12,
1612,
4672,
3536,
7833,
358,
7274,
1492,
1605,
392,
733,
1703,
2553,
316,
12123,
309,
28209,
12,
1612,
4672,
327,
2589,
18,
6400,
18,
588,
12,
1612,
16186,
2978,
972,
13,
... |
to_ = bridge.getParticipant(message.getTo().getResource()) | to_ = bridge.getParticipant(xmpp_c.nickname) | def _xmpp_message_handler(self, dispatcher, message): """[Internal] Manage XMPP messages.""" xmpp_c = dispatcher._owner if message.getType() == 'chat': self.error('==> Debug: Received XMPP chat message.', debug=True) self.error(message.__str__(fancy=1), debug=True) from_bare_jid = unicode(message.getFrom().getNode()+'@'+message.getFrom().getDomain()) for bridge in self.bridges: if from_bare_jid == bridge.xmpp_room.room_jid: # message comes from a room participant try: from_ = bridge.getParticipant(message.getFrom().getResource()) to_ = bridge.getParticipant(message.getTo().getResource()) if from_.protocol == 'xmpp': from_.sayOnIRCTo(to_.nickname, message.getBody()) else: self.error('=> Debug: received XMPP chat message from a non-XMPP participant, WTF ?', debug=True) except NoSuchParticipantException: if xmpp_c.nickname == self.nickname: xmpp_c.send(xmpp.protocol.Message(to=message.getFrom(), body=self.respond(message.getBody(), participant=from_), typ='chat')) return self.error('=> Debug: XMPP chat message not relayed', debug=True) return elif message.getType() == 'groupchat': # message comes from a room for child in message.getChildren(): if child.getName() == 'delay': # MUC delayed message return if xmpp_c.nickname != self.nickname: self.error('=> Debug: Ignoring XMPP MUC message not received on bot connection.', debug=True) return from_ = xmpp.protocol.JID(message.getFrom()) if unicode(from_.getResource()) == self.nickname: self.error('=> Debug: Ignoring XMPP MUC message sent by self.', debug=True) return room_jid = unicode(from_.getNode()+'@'+from_.getDomain()) for bridge in self.bridges: if room_jid == bridge.xmpp_room.room_jid: resource = unicode(from_.getResource()) if resource == '': # message comes from the room itself self.error('=> Debug: Ignoring XMPP groupchat message sent by the room.', debug=True) return else: # message comes from a participant of the room self.error('==> Debug: Received XMPP groupchat message.', debug=True) self.error(message.__str__(fancy=1), debug=True) try: participant_ = bridge.getParticipant(resource) except NoSuchParticipantException: if resource != self.nickname: self.error('=> Debug: NoSuchParticipantException "'+resource+'", WTF ?', debug=True) return participant_.sayOnIRC(message.getBody()) else: self.error('==> Debug: Received XMPP message of unknown type "'+message.getType()+'".', debug=True) self.error(message.__str__(fancy=1), debug=True) | 56904f96c829a1c5f5e3ee0cd7d45e1f31fff20f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9915/56904f96c829a1c5f5e3ee0cd7d45e1f31fff20f/bot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
92,
24109,
67,
2150,
67,
4176,
12,
2890,
16,
7393,
16,
883,
4672,
3536,
63,
3061,
65,
24247,
23216,
2743,
12123,
225,
619,
24109,
67,
71,
273,
7393,
6315,
8443,
225,
309,
883,
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,
389,
92,
24109,
67,
2150,
67,
4176,
12,
2890,
16,
7393,
16,
883,
4672,
3536,
63,
3061,
65,
24247,
23216,
2743,
12123,
225,
619,
24109,
67,
71,
273,
7393,
6315,
8443,
225,
309,
883,
18,... |
lib_opts = _gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs) | lib_opts = gen_lib_options (self.libraries + libraries, self.library_dirs + library_dirs, "-l%s", "-L%s") | def link_shared_object (self, objects, output_filename, libraries=None, library_dirs=None, build_info=None): | c294113f180cd0deb66857432463f21ead92392a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c294113f180cd0deb66857432463f21ead92392a/unixccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
67,
11574,
67,
1612,
261,
2890,
16,
2184,
16,
876,
67,
3459,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
16,
1361,
67,
1376,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
67,
11574,
67,
1612,
261,
2890,
16,
2184,
16,
876,
67,
3459,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
16,
1361,
67,
1376,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-... |
('adspanel.code', code)) | (code, 'adspanel.code')) | def render_admin_panel(self, req, cat, page, path_info): self._update_config() if req.method == 'POST': self.config.set('adspanel', 'hide_for_authenticated', req.args.get('hide_for_authenticated') in _TRUE_VALUES) self.config.set('adspanel', 'store_in_session', req.args.get('store_in_session') in _TRUE_VALUES) self.config.save() code = req.args.get('ads_code') cursor = self.env.get_db_cnx().cursor() cursor.execute('SELECT value FROM system WHERE name=%s', ('adspanel.code',)) if cursor.fetchone(): cursor.execute('UPDATE system SET value=%s WHERE name=%s', ('adspanel.code', code)) else: cursor.execute('INSERT INTO system (name,value) VALUES (%s,%s)', ('adspanel.code', code)) | a37ea75dcb4a1f638392998e2128d37e9ffe5bae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5801/a37ea75dcb4a1f638392998e2128d37e9ffe5bae/admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
3666,
67,
13916,
12,
2890,
16,
1111,
16,
6573,
16,
1363,
16,
589,
67,
1376,
4672,
365,
6315,
2725,
67,
1425,
1435,
309,
1111,
18,
2039,
422,
296,
3798,
4278,
365,
18,
1425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
67,
3666,
67,
13916,
12,
2890,
16,
1111,
16,
6573,
16,
1363,
16,
589,
67,
1376,
4672,
365,
6315,
2725,
67,
1425,
1435,
309,
1111,
18,
2039,
422,
296,
3798,
4278,
365,
18,
1425,
... |
def QpCR(p, prec = 20, print_mode = None, halt = 40, check=True): | def QpCR(p, prec = twenty, print_mode = None, halt = forty, check=True): | def QpCR(p, prec = 20, print_mode = None, halt = 40, check=True): return Qp(p=p, prec=prec, print_mode=print_mode, halt=halt, check=check, type = 'capped-rel') | 3d6a2f6640c9f91d771a4d25cd85172364acd9a1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3d6a2f6640c9f91d771a4d25cd85172364acd9a1/factory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2238,
84,
5093,
12,
84,
16,
13382,
273,
2339,
319,
93,
16,
1172,
67,
3188,
273,
599,
16,
18389,
273,
364,
4098,
16,
866,
33,
5510,
4672,
327,
2238,
84,
12,
84,
33,
84,
16,
13382,
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,
2238,
84,
5093,
12,
84,
16,
13382,
273,
2339,
319,
93,
16,
1172,
67,
3188,
273,
599,
16,
18389,
273,
364,
4098,
16,
866,
33,
5510,
4672,
327,
2238,
84,
12,
84,
33,
84,
16,
13382,
3... |
if self._status == 'stopped': raise DiscoError("%s already stopped" % self) | self.assert_status('running') | def stop(self): if self._status == 'stopped': raise DiscoError("%s already stopped" % self) try: os.kill(self.pid, signal.SIGTERM) while self._status == 'running': pass except Exception: pass return chain(self.status()) | ad8c242af148154828b966902f5ab8e49963a98c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/373/ad8c242af148154828b966902f5ab8e49963a98c/disco.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
2890,
4672,
365,
18,
11231,
67,
2327,
2668,
8704,
6134,
775,
30,
1140,
18,
16418,
12,
2890,
18,
6610,
16,
4277,
18,
18513,
15176,
13,
1323,
365,
6315,
2327,
422,
296,
8704,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
12,
2890,
4672,
365,
18,
11231,
67,
2327,
2668,
8704,
6134,
775,
30,
1140,
18,
16418,
12,
2890,
18,
6610,
16,
4277,
18,
18513,
15176,
13,
1323,
365,
6315,
2327,
422,
296,
8704,
4... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 895) else quickfix.IntField.__init__(self, 895, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1725,
8778,
13,
469,
9549,
904,
18,
1702,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1725,
8778,
13,
469,
9549,
904,
18,
1702,
974,
16186,
2738,
... |
self.poll(_deadstate=sys.maxint) | self._internal_poll(_deadstate=sys.maxint) | def __del__(self, sys=sys): if not self._child_created: # We didn't get to successfully create a child process. return # In case the child hasn't been waited on, check if it's done. self.poll(_deadstate=sys.maxint) if self.returncode is None and _active is not None: # Child is still running, keep us alive until we can wait on it. _active.append(self) | 70b06305bc34d798e2dcbf24f77c2dabf28cdbe8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/70b06305bc34d798e2dcbf24f77c2dabf28cdbe8/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3771,
972,
12,
2890,
16,
2589,
33,
9499,
4672,
309,
486,
365,
6315,
3624,
67,
4824,
30,
468,
1660,
10242,
1404,
336,
358,
4985,
752,
279,
1151,
1207,
18,
327,
468,
657,
648,
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,
1001,
3771,
972,
12,
2890,
16,
2589,
33,
9499,
4672,
309,
486,
365,
6315,
3624,
67,
4824,
30,
468,
1660,
10242,
1404,
336,
358,
4985,
752,
279,
1151,
1207,
18,
327,
468,
657,
648,
326,... |
pre = ob['pre'].lower() | pre = ob['pre'] | def _getDBFlags(self, ob): try: pre = ob['pre'].lower() except (KeyError, IndexError): pre = 'false' if pre == 'true': return self.flagmap[ob['flags']] | pyrpm.base.RPMSENSE_PREREQ return self.flagmap[ob['flags']] | 1bd6adee371af6defb14a869c8d6fece65e51000 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/1bd6adee371af6defb14a869c8d6fece65e51000/sqliterepodb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
2290,
5094,
12,
2890,
16,
3768,
4672,
775,
30,
675,
273,
3768,
3292,
1484,
3546,
1335,
261,
653,
668,
16,
10195,
4672,
675,
273,
296,
5743,
11,
309,
675,
422,
296,
3767,
4278... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2290,
5094,
12,
2890,
16,
3768,
4672,
775,
30,
675,
273,
3768,
3292,
1484,
3546,
1335,
261,
653,
668,
16,
10195,
4672,
675,
273,
296,
5743,
11,
309,
675,
422,
296,
3767,
4278... |
self.additional_headers = {} if client_id is not None and developer_key is not None: self.additional_headers = {'X-Gdata-Client': client_id, 'X-GData-Key': 'key=%s' % developer_key} elif developer_key and not client_id: | if developer_key and not client_id: | def __init__(self, email=None, password=None, source=None, server=YOUTUBE_SERVER, additional_headers=None, client_id=None, developer_key=None, **kwargs): """Creates a client for the YouTube service. | d4681decdfe4372a7468d2abf2df8ce6922bd0e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/d4681decdfe4372a7468d2abf2df8ce6922bd0e2/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2699,
33,
7036,
16,
2201,
33,
7036,
16,
1084,
33,
7036,
16,
1438,
33,
61,
5069,
3457,
41,
67,
4370,
16,
3312,
67,
2485,
33,
7036,
16,
1004,
67,
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,
1001,
2738,
972,
12,
2890,
16,
2699,
33,
7036,
16,
2201,
33,
7036,
16,
1084,
33,
7036,
16,
1438,
33,
61,
5069,
3457,
41,
67,
4370,
16,
3312,
67,
2485,
33,
7036,
16,
1004,
67,
350,
... |
wikipedia.output(u'The image is not identical to the one on Commons.') except (wikipedia.NoPage, wikipedia.IsRedirectPage), e: wikipedia.output(u'%s' % e[0]) | pywikibot.output( u'The image is not identical to the one on Commons.') except (pywikibot.NoPage, pywikibot.IsRedirectPage), e: pywikibot.output(u'%s' % e[0]) | def run(self): commons = wikipedia.getSite('commons', 'commons') comment = wikipedia.translate(self.site, nowCommonsMessage) | 3e7506930193ed64965aabc3e2d1d58bf15e5c6b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/3e7506930193ed64965aabc3e2d1d58bf15e5c6b/nowcommons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
24021,
273,
21137,
18,
588,
4956,
2668,
6054,
87,
2187,
296,
6054,
87,
6134,
2879,
273,
21137,
18,
13929,
12,
2890,
18,
4256,
16,
2037,
6517,
87,
1079,
13,
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,
1086,
12,
2890,
4672,
24021,
273,
21137,
18,
588,
4956,
2668,
6054,
87,
2187,
296,
6054,
87,
6134,
2879,
273,
21137,
18,
13929,
12,
2890,
18,
4256,
16,
2037,
6517,
87,
1079,
13,
2,
-10... |
assert v1 == self.default_install_loc, ("exp,act: ",self.default_install_loc, v1) | assert v1 == self.default_install_loc, \ ("exp,act: ",self.default_install_loc, v1) | def test_get_msvs_install_dirs(self): """Test retrieval of the list of visual studio installed locations""" v1 = get_msvs_install_dirs() assert v1 == self.default_install_loc, ("exp,act: ",self.default_install_loc, v1) for key, loc in self.install_locs.items(): v2 = get_msvs_install_dirs(key) assert v2 == loc, key + ': ' + str(v2) | 0ebbdcd19ef565ec68160c89cf4d6c80ade001b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/0ebbdcd19ef565ec68160c89cf4d6c80ade001b6/msvsTests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
959,
6904,
67,
5425,
67,
8291,
12,
2890,
4672,
3536,
4709,
22613,
434,
326,
666,
434,
11623,
384,
4484,
5876,
7838,
8395,
331,
21,
273,
336,
67,
959,
6904,
67,
5425,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
67,
959,
6904,
67,
5425,
67,
8291,
12,
2890,
4672,
3536,
4709,
22613,
434,
326,
666,
434,
11623,
384,
4484,
5876,
7838,
8395,
331,
21,
273,
336,
67,
959,
6904,
67,
5425,... |
preparetest.copy_to_target("seattlelib/repypp.py") | preparetest.copy_to_target("seattlelib/repypp.py", target_dir) | def run(self): """Do it""" #store root directory and get target directory target_dir = self.directory | f7d9760de7de1656800c225b5043c74ea0dc1888 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/f7d9760de7de1656800c225b5043c74ea0dc1888/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
3244,
518,
8395,
468,
2233,
1365,
1867,
471,
336,
1018,
1867,
1018,
67,
1214,
273,
365,
18,
5149,
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,
1086,
12,
2890,
4672,
3536,
3244,
518,
8395,
468,
2233,
1365,
1867,
471,
336,
1018,
1867,
1018,
67,
1214,
273,
365,
18,
5149,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
def setXLabel(self,label): | def setXLabel(self, label): | def setXLabel(self,label): """ Set the label of the x-axis | 525240b057c0121c2cab7772950af46d6399ad7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/525240b057c0121c2cab7772950af46d6399ad7e/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23733,
2224,
12,
2890,
16,
1433,
4672,
3536,
1000,
326,
1433,
434,
326,
619,
17,
4890,
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,
23733,
2224,
12,
2890,
16,
1433,
4672,
3536,
1000,
326,
1433,
434,
326,
619,
17,
4890,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
_colBorderSize = 0 | def GetAttr (self, row, column, kind): attribute = self.base_GetAttr (row, column, kind) if not attribute: type = self.GetTypeName (row, column) delegate = IAttributeEditor.GetAttributeEditorSingleton (type) attribute = self.defaultROAttribute """ An apparent bug in table asks for an attribute even when there are no entries in the table """ grid = self.GetView() if (grid.GetElementCount() != 0 and not grid.ReadOnly (row, column)[0] and not delegate.ReadOnly (grid.GetElementValue (row, column))): attribute = self.defaultRWAttribute attribute.IncRef() return attribute | cf44f5c47c1dde878e67c3139a94046ae5798d30 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/cf44f5c47c1dde878e67c3139a94046ae5798d30/ControlBlocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3843,
261,
2890,
16,
1027,
16,
1057,
16,
3846,
4672,
1566,
273,
365,
18,
1969,
67,
967,
3843,
261,
492,
16,
1057,
16,
3846,
13,
309,
486,
1566,
30,
618,
273,
365,
18,
967,
7947,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
3843,
261,
2890,
16,
1027,
16,
1057,
16,
3846,
4672,
1566,
273,
365,
18,
1969,
67,
967,
3843,
261,
492,
16,
1057,
16,
3846,
13,
309,
486,
1566,
30,
618,
273,
365,
18,
967,
7947,... | |
machines = map(lambda m: fromUUID(m['uuid']), ComputerGroupManager().request(ctx, request, bool, 0, -1, '')) | machines = map(lambda m: fromUUID(m), ComputerGroupManager().request(ctx, request, bool, 0, -1, '')) | def __getRestrictedComputersListQuery(self, ctx, filt = None, session = create_session()): """ Get the sqlalchemy query to get a list of computers with some filters """ query = session.query(Machine) query = query.filter(self.machine.c.deleted == 0).filter(self.machine.c.is_template == 0) query = self.__filter_on(query) if filt: # filtering on machines (name or uuid) try: query = query.filter(self.machine.c.name.like(filt['hostname']+'%')) except KeyError: pass try: query = query.filter(self.machine.c.name.like(filt['name']+'%')) except KeyError: pass try: query = query.filter(self.machine.c.name.like(filt['filter']+'%')) except KeyError: pass | 24577a31b2132d064d4f79f6ea7bd64c7c4afa2c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/24577a31b2132d064d4f79f6ea7bd64c7c4afa2c/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
18784,
7703,
414,
682,
1138,
12,
2890,
16,
1103,
16,
18553,
273,
599,
16,
1339,
273,
752,
67,
3184,
1435,
4672,
3536,
968,
326,
1847,
24182,
843,
358,
336,
279,
666,
434,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
18784,
7703,
414,
682,
1138,
12,
2890,
16,
1103,
16,
18553,
273,
599,
16,
1339,
273,
752,
67,
3184,
1435,
4672,
3536,
968,
326,
1847,
24182,
843,
358,
336,
279,
666,
434,
53... |
if lowercase == "notsiblings": | if lowercase == "siblings": | def find_vfqrepl(self, foldername): """Returns vfquery that VFOLDER:foldername represents""" lowercase = string.lower(foldername) if lowercase == "notsiblings": # Disjoin negations of child vfqs siblings = map(lambda x: x.vfquery, self.vf.getsiblings()) if siblings: return apply(VFQuery.Or, siblings).Not() else: return VFQuery("1") elif lowercase == "children": children = map(lambda x: x.vfquery, self.vf.getchildren()) if children: return apply(VFQuery.Or, children) else: return VFQuery("0") else: vf = vfolder_find(foldername) if not vf: raise QueryException("Can't find folder "+foldername+ " in query from "+self.vf.name) else: return VFolder(vf).vfquery | 5d826cf87eabaab894d9b81b3f335fbe09d92619 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3083/5d826cf87eabaab894d9b81b3f335fbe09d92619/vfolder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
90,
19206,
26745,
12,
2890,
16,
3009,
529,
4672,
3536,
1356,
28902,
2271,
716,
776,
17357,
30,
5609,
529,
8686,
8395,
12400,
273,
533,
18,
8167,
12,
5609,
529,
13,
309,
12400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
90,
19206,
26745,
12,
2890,
16,
3009,
529,
4672,
3536,
1356,
28902,
2271,
716,
776,
17357,
30,
5609,
529,
8686,
8395,
12400,
273,
533,
18,
8167,
12,
5609,
529,
13,
309,
12400,
... |
do_exec(cvs+(' export -r %s reportlab' % tagname), 'the export phase') | do_exec(cvs+(' export -r %s %s' % (tagname,projdir)), 'the export phase') | def cvs_checkout(d): os.chdir(d) recursive_rmdir(cvsdir) cvs = find_exe('cvs') if cvs is None: os.exit(1) os.environ['CVSROOT']=':pserver:%s@cvs.reportlab.sourceforge.net:/cvsroot/reportlab' % USER if release: do_exec(cvs+(' export -r %s reportlab' % tagname), 'the export phase') else: if py2pdf: do_exec(cvs+' co reportlab', 'the checkout phase') # now we need to move the files & delete those we don't need dst = py2pdf_dir recursive_rmdir(dst) os.mkdir(dst) do_exec("mv reportlab/demos/py2pdf/py2pdf.py %s"%dst, "mv py2pdf.py") do_exec("mv reportlab/demos/py2pdf/PyFontify.py %s" % dst, "mv pyfontify.py") do_exec("rm -r reportlab/demos reportlab/platypus reportlab/lib/styles.py reportlab/README.pdfgen.txt", "rm") do_exec("mv reportlab %s" % dst) CVS_remove(dst) else: do_exec(cvs+' co reportlab', 'the checkout phase') | 7847c3dfe100d88a859c3f440a9dee0bff61d3cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/7847c3dfe100d88a859c3f440a9dee0bff61d3cb/daily.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
6904,
67,
17300,
12,
72,
4672,
1140,
18,
343,
1214,
12,
72,
13,
5904,
67,
8864,
1214,
12,
71,
6904,
1214,
13,
225,
276,
6904,
273,
1104,
67,
14880,
2668,
71,
6904,
6134,
309,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
276,
6904,
67,
17300,
12,
72,
4672,
1140,
18,
343,
1214,
12,
72,
13,
5904,
67,
8864,
1214,
12,
71,
6904,
1214,
13,
225,
276,
6904,
273,
1104,
67,
14880,
2668,
71,
6904,
6134,
309,
27... |
os.close(master_fd) | def test_fork(self): debug("calling pty.fork()") pid, master_fd = pty.fork() if pid == pty.CHILD: if not os.isatty(1): debug("Child's fd 1 is not a tty?!") os._exit(3) debug("In child, calling os.setsid()") try: os.setsid() except OSError: debug("Good: OSError was raised.") pass except AttributeError: debug("No setsid() available?") pass except: debug("An unexpected error was raised.") os._exit(1) else: debug("os.setsid() succeeded! (bad!)") os._exit(2) os._exit(4) else: debug("Waiting for child (%d) to finish." % pid) (pid, status) = os.waitpid(pid, 0) res = status >> 8 debug("Child (%d) exited with status %d (%d)." % (pid, res, status)) if res == 1: self.fail("Child raised an unexpected exception in os.setsid()") elif res == 2: self.fail("pty.fork() failed to make child a session leader.") elif res == 3: self.fail("Child spawned by pty.fork() did not have a tty as stdout") elif res != 4: self.fail("pty.fork() failed for unknown reasons.") os.close(master_fd) | def handle_sig(sig, frame): raise TestFailed, "isatty hung" | f82d1d46ccd829824de7e262e4feb02b80d66424 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/f82d1d46ccd829824de7e262e4feb02b80d66424/test_pty.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
7340,
12,
7340,
16,
2623,
4672,
1002,
7766,
2925,
16,
315,
291,
270,
4098,
366,
20651,
6,
225,
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,
1640,
67,
7340,
12,
7340,
16,
2623,
4672,
1002,
7766,
2925,
16,
315,
291,
270,
4098,
366,
20651,
6,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
pyz = PYZ(pyz + recipes.pure, name='library.pyz') | pyz = PYZ(pyz, name='library.pyz') | def run_pyinstaller(args=sys.argv): subprocess.check_call(('/usr/bin/sudo', 'chown', '-R', 'kovid:users', glob.glob('/usr/lib/python*/site-packages/')[-1])) subprocess.check_call('rm -rf %(py)s/dist/* %(py)s/build/*'%dict(py=PYINSTALLER), shell=True) subprocess.check_call('make plugins', shell=True) cp = HOME+'/build/'+os.path.basename(os.getcwd()) spec = open(os.path.join(PYINSTALLER, 'calibre', 'calibre.spec'), 'wb') raw = re.sub(r'CALIBREPREFIX\s+=\s+\'___\'', 'CALIBREPREFIX = '+repr(cp), open(__file__).read()) spec.write(raw) spec.close() os.chdir(PYINSTALLER) subprocess.check_call('python -OO Build.py calibre/calibre.spec', shell=True) return 0 | 9dcf9200d0f0b9fafe09ba4376bc8090c5ae6bc7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/9dcf9200d0f0b9fafe09ba4376bc8090c5ae6bc7/linux_installer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2074,
20163,
12,
1968,
33,
9499,
18,
19485,
4672,
6652,
18,
1893,
67,
1991,
12,
2668,
19,
13640,
19,
4757,
19,
20566,
2187,
296,
343,
995,
2187,
2400,
54,
2187,
296,
28179,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
2074,
20163,
12,
1968,
33,
9499,
18,
19485,
4672,
6652,
18,
1893,
67,
1991,
12,
2668,
19,
13640,
19,
4757,
19,
20566,
2187,
296,
343,
995,
2187,
2400,
54,
2187,
296,
28179,
1... |
self.css = css.CssStylesheet.from_css(stylesheet_text) | self.css = CssStylesheet.from_css(stylesheet_text) | def add_current_style(self, stylesheet_text): if self.css is None: self.css = css.CssStylesheet.from_css(stylesheet_text) else: tmp = css.CssStylesheet.from_css(stylesheet_text) self.css = self.css.merge(tmp) | 50a7a182524186cc9f1bf07ae6fde517d7642da6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/50a7a182524186cc9f1bf07ae6fde517d7642da6/pml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2972,
67,
4060,
12,
2890,
16,
13820,
67,
955,
4672,
309,
365,
18,
5212,
353,
599,
30,
365,
18,
5212,
273,
19127,
24656,
18,
2080,
67,
5212,
12,
19403,
67,
955,
13,
469,
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,
527,
67,
2972,
67,
4060,
12,
2890,
16,
13820,
67,
955,
4672,
309,
365,
18,
5212,
353,
599,
30,
365,
18,
5212,
273,
19127,
24656,
18,
2080,
67,
5212,
12,
19403,
67,
955,
13,
469,
30,
... |
self.next_question() | self.quiz.next() | def on_flash_answer_button_clicked(self, widget, data=None): if isinstance(self.quiz, Weighted_Quiz): self.quiz.set_answer_quality( self.flash_answer_buttons.index(widget)) self.next_question() self.flash_notebook.set_current_page(0) | dbb3a1d1ccebc9e72c9205b92b12a2c180e76be9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2313/dbb3a1d1ccebc9e72c9205b92b12a2c180e76be9/quizdrill.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
13440,
67,
13490,
67,
5391,
67,
7475,
329,
12,
2890,
16,
3604,
16,
501,
33,
7036,
4672,
309,
1549,
12,
2890,
18,
18345,
16,
15437,
329,
67,
928,
452,
4672,
365,
18,
18345,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
13440,
67,
13490,
67,
5391,
67,
7475,
329,
12,
2890,
16,
3604,
16,
501,
33,
7036,
4672,
309,
1549,
12,
2890,
18,
18345,
16,
15437,
329,
67,
928,
452,
4672,
365,
18,
18345,
1... |
return stp, f, g | return stp | def step(self, stp, f, g, c1, c2, xtol, isave, dsave): if self.task[:5] == 'START': | f20e47bb3a047b63b4d3c746216e20287c942921 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/f20e47bb3a047b63b4d3c746216e20287c942921/linesearch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
12,
2890,
16,
384,
84,
16,
284,
16,
314,
16,
276,
21,
16,
276,
22,
16,
619,
3490,
16,
353,
836,
16,
3780,
836,
4672,
309,
365,
18,
4146,
10531,
25,
65,
422,
296,
7570,
4278,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2235,
12,
2890,
16,
384,
84,
16,
284,
16,
314,
16,
276,
21,
16,
276,
22,
16,
619,
3490,
16,
353,
836,
16,
3780,
836,
4672,
309,
365,
18,
4146,
10531,
25,
65,
422,
296,
7570,
4278,
... |
text = text.replace(' ', ' ') text = re.sub(r'(\s)\s+', r'\1', text) text = text.strip() | if type(text) == type([]): text = "(this message is a digest of %s messages)" % (len(text)) else: text = text.replace(' ', ' ') text = re.sub(r'(\s)\s+', r'\1', text) text = text.strip() | def _makeMessageInfo(self, message): """Given an email.Message, return an object with subjectHeader, fromHeader and bodySummary attributes. These objects are passed into appendMessages by onReview - passing email.Message objects directly uses too much memory.""" subjectHeader = message["Subject"] or "(none)" fromHeader = message["From"] or "(none)" try: part = typed_subpart_iterator(message, 'text', 'plain').next() text = part.get_payload() except StopIteration: try: part = typed_subpart_iterator(message, 'text', 'html').next() text = part.get_payload() text, unused = tokenizer.crack_html_style(text) text, unused = tokenizer.crack_html_comment(text) text = tokenizer.html_re.sub(' ', text) text = '(this message only has an HTML body)\n' + text except StopIteration: text = '(this message has no text body)' text = text.replace(' ', ' ') # Else they'll be quoted text = re.sub(r'(\s)\s+', r'\1', text) # Eg. multiple blank lines text = text.strip() | fdb79d57cfb71c2e896d62f00d147636c6b9ead4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/fdb79d57cfb71c2e896d62f00d147636c6b9ead4/pop3proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6540,
1079,
966,
12,
2890,
16,
883,
4672,
3536,
6083,
392,
2699,
18,
1079,
16,
327,
392,
733,
598,
3221,
1864,
16,
628,
1864,
471,
1417,
4733,
1677,
18,
225,
8646,
2184,
854,
2275... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6540,
1079,
966,
12,
2890,
16,
883,
4672,
3536,
6083,
392,
2699,
18,
1079,
16,
327,
392,
733,
598,
3221,
1864,
16,
628,
1864,
471,
1417,
4733,
1677,
18,
225,
8646,
2184,
854,
2275... |
def list(self, n): return [self(i) for i in range(0,n)] | def list(self, n): return [self(i) for i in range(0,n)] | 2c9ec0e9ee4b6a66dba3cad312fef1c27ffc8925 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2c9ec0e9ee4b6a66dba3cad312fef1c27ffc8925/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
327,
306,
2890,
12,
77,
13,
364,
277,
316,
1048,
12,
20,
16,
82,
25887,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
12,
2890,
16,
290,
4672,
327,
306,
2890,
12,
77,
13,
364,
277,
316,
1048,
12,
20,
16,
82,
25887,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
getBookingDate={ "query": [date, date+1], "range": "minmax"}, | getBookingDate={ "query": [date, date+0.9999], "range": "minmax"}, | def getPrevYearMonth(year, month): # Get the year and month for the previous month (watch out for January) prevmonth = month - 1 prevyear = year if prevmonth == 0: prevyear = year - 1 prevmonth = 12 return (prevyear, prevmonth) | 873f0e94384589159026c9286736e0d8a8dea906 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10431/873f0e94384589159026c9286736e0d8a8dea906/getDailyBookings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
9958,
5593,
5445,
12,
6874,
16,
3138,
4672,
468,
968,
326,
3286,
471,
3138,
364,
326,
2416,
3138,
261,
7585,
596,
364,
23214,
24335,
13,
2807,
7496,
273,
3138,
300,
404,
2807,
6874,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9958,
5593,
5445,
12,
6874,
16,
3138,
4672,
468,
968,
326,
3286,
471,
3138,
364,
326,
2416,
3138,
261,
7585,
596,
364,
23214,
24335,
13,
2807,
7496,
273,
3138,
300,
404,
2807,
6874,... |
if not self._connector: candidates = [ (prio, connector) for connector in self.connectors for repos_type, prio in connector.get_supported_types() if repos_type == self.repository_type ] if candidates: self._connector = max(candidates)[1] else: raise TracError(_('Unsupported version control system ' '"%(name)s". Check that the Python bindings ' 'for "%(name)s" are correctly installed.', name=self.repository_type)) | def get_repository(self, authname): if not self._connector: candidates = [ (prio, connector) for connector in self.connectors for repos_type, prio in connector.get_supported_types() if repos_type == self.repository_type ] if candidates: self._connector = max(candidates)[1] else: raise TracError(_('Unsupported version control system ' '"%(name)s". Check that the Python bindings ' 'for "%(name)s" are correctly installed.', name=self.repository_type)) db = self.env.get_db_cnx() # prevent possible deadlock, see #4465 try: self._lock.acquire() tid = threading._get_ident() if tid in self._cache: repos = self._cache[tid] else: rtype, rdir = self.repository_type, self.repository_dir if not os.path.isabs(rdir): rdir = os.path.join(self.env.path, rdir) repos = self._connector.get_repository(rtype, rdir, authname) self._cache[tid] = repos return repos finally: self._lock.release() | 3baf6f5fc9435f4fdd7d5368e385000e20ad588f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/3baf6f5fc9435f4fdd7d5368e385000e20ad588f/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9071,
12,
2890,
16,
1357,
529,
4672,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,
92,
1435,
468,
5309,
3323,
8363,
739,
16,
2621,
468,
6334,
9222,
775,
30,
365,
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,
336,
67,
9071,
12,
2890,
16,
1357,
529,
4672,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,
92,
1435,
468,
5309,
3323,
8363,
739,
16,
2621,
468,
6334,
9222,
775,
30,
365,
6... | |
defaultOptionsDlg._write("DefaultOptions_%1.xml"%x) | defaultOptionsDlg._write("DefaultOptions_%d.xml"%x) | def get_winrar_dlgs(rar_dlg, x): rar_dlg.MenuSelect(t["Options->Configure"][x]) optionsdlg = rar_dlg.app[t['Configure'][x]] optionsdlg._write("Options_%d.xml"%x) optionsdlg.CaptureAsImage().save("Options_%d.png"%x) optionsdlg[t['Buttons'][x]].Click() contextMenuDlg = rar_dlg.app[t['PeronnaliseToolbars'][x]] contextMenuDlg._write("PersonaliseToolbars_%d.xml"%x) contextMenuDlg.CaptureAsImage().save("PersonaliseToolbars_%d.png"%x) contextMenuDlg.OK.Click() optionsdlg.TabCtrl.Select(1) optionsdlg[t['CreateDefaultProfile'][x]].Click() defaultOptionsDlg = rar_dlg.app[t['ConfigureDefaultOptions'][x]] defaultOptionsDlg._write("DefaultOptions_%1.xml"%x) defaultOptionsDlg.CaptureAsImage().save("DefaultOptions_%d.png"%x) defaultOptionsDlg.OK.Click() optionsdlg.TabCtrl.Select(6) optionsdlg[t['ContextMenus'][x]].Click() anotherMenuDlg = rar_dlg.app[t['contextMenuDlg'][x]] anotherMenuDlg._write("2ndMenuDlg_%d.xml"%x) anotherMenuDlg.CaptureAsImage().save("2ndMenuDlg_%d.png"%x) anotherMenuDlg.OK.Click() optionsdlg.OK.Click() | 8cb797259a5dd707ab19640dc8298d5689cfefee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/8cb797259a5dd707ab19640dc8298d5689cfefee/get_winrar_info.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8082,
86,
297,
67,
5761,
564,
12,
86,
297,
67,
5761,
75,
16,
619,
4672,
436,
297,
67,
5761,
75,
18,
4599,
3391,
12,
88,
9614,
1320,
2122,
11207,
6,
6362,
92,
5717,
225,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8082,
86,
297,
67,
5761,
564,
12,
86,
297,
67,
5761,
75,
16,
619,
4672,
436,
297,
67,
5761,
75,
18,
4599,
3391,
12,
88,
9614,
1320,
2122,
11207,
6,
6362,
92,
5717,
225,
70... |
print "Got: ", type, x, y | def find(lst, obj): for i in lst: if i[0] == obj: return i return None | b90a027f1aea01cd6480dd9fabd75dc74343b89a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2696/b90a027f1aea01cd6480dd9fabd75dc74343b89a/supertux.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
12,
16923,
16,
1081,
4672,
364,
277,
316,
9441,
30,
309,
277,
63,
20,
65,
422,
1081,
30,
327,
277,
327,
599,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1104,
12,
16923,
16,
1081,
4672,
364,
277,
316,
9441,
30,
309,
277,
63,
20,
65,
422,
1081,
30,
327,
277,
327,
599,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
self.close_request(request) | self.shutdown_request(request) | def process_request(self, request, client_address): """Call finish_request. | 1504671759885ceab7d3fa573b5bb649b26637bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/1504671759885ceab7d3fa573b5bb649b26637bd/socketserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
3536,
1477,
4076,
67,
2293,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
3536,
1477,
4076,
67,
2293,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else | else: | def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 17) else quickfix.StringField.__init__(self, 17, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
8043,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,
12,
2890,
16,
8043,
13,
469,
30,
9549,
904,
18,
780,
974,
16186,
2738,
972,... |
<widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor=" <widget source="listlabel" render="Label" position="16,44" size="200,21" valign="center" font="Regular;18" /> | <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;19" valign="center" halign="center" backgroundColor=" <widget source="listlabel" render="Label" position="10,44" size="250,20" font="Regular;16" /> | def setText(self, text): self["content"].setText(text) | f4fb05eb60ba00cc91e7b955d7e228080c3ed1e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/f4fb05eb60ba00cc91e7b955d7e228080c3ed1e0/flasher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7883,
12,
2890,
16,
977,
4672,
365,
9614,
1745,
6,
8009,
542,
1528,
12,
955,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
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,
7883,
12,
2890,
16,
977,
4672,
365,
9614,
1745,
6,
8009,
542,
1528,
12,
955,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.