rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
<em>%s</em>.''') % cpuser | <em>%(cpuser)s</em>.''') | def main(): doc = HeadlessDocument() parts = Utils.GetPathPieces() if not parts or len(parts) < 2: doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_("Invalid options to CGI script."))) print doc.Format() return # get the list and user's name listname = string.lower(parts[0]) user = Utils.UnobscureEmail(string.join(parts[1:], '/')) # open list try: mlist = MailList.MailList(listname, lock=0) except Errors.MMListError, e: doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_('No such list <em>%s</em>') % listname)) print doc.Format() syslog('error', 'No such list "%s": %s\n' % (listname, e)) return os.environ['LANG'] = mlist.preferred_language # Sanity check the user user = Utils.LCDomain(user) if not mlist.members.has_key(user) and \ not mlist.digest_members.has_key(user): # then doc.AddItem(Header(2, _("Error"))) doc.AddItem(Bold(_("%s: No such member %s.") % (listname, `user`))) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format() return # find the case preserved email address (the one the user subscribed with) lcuser = mlist.FindUser(user) cpuser = mlist.GetUserSubscribedAddress(lcuser) if lcuser == cpuser: cpuser = None if mlist.obscure_addresses: presentable_user = Utils.ObscureEmail(user, for_text=1) if cpuser is not None: cpuser = Utils.ObscureEmail(cpuser, for_text=1) else: presentable_user = user # user's preferred language pluser = mlist.GetPreferredLanguage(user) os.environ['LANG'] = pluser # Do replacements replacements = mlist.GetStandardReplacements(pluser) replacements['<mm-digest-radio-button>'] = mlist.FormatOptionButton( mm_cfg.Digests, 1, user) replacements['<mm-undigest-radio-button>'] = mlist.FormatOptionButton( mm_cfg.Digests, 0, user) replacements['<mm-plain-digests-button>'] = mlist.FormatOptionButton( mm_cfg.DisableMime, 1, user) replacements['<mm-mime-digests-button>'] = mlist.FormatOptionButton( mm_cfg.DisableMime, 0, user) replacements['<mm-delivery-enable-button>'] = mlist.FormatOptionButton( mm_cfg.DisableDelivery, 0, user) replacements['<mm-delivery-disable-button>'] = mlist.FormatOptionButton( mm_cfg.DisableDelivery, 1, user) replacements['<mm-disabled-notice>'] = mlist.FormatDisabledNotice(user) replacements['<mm-dont-ack-posts-button>'] = mlist.FormatOptionButton( mm_cfg.AcknowledgePosts, 0, user) replacements['<mm-ack-posts-button>'] = mlist.FormatOptionButton( mm_cfg.AcknowledgePosts, 1, user) replacements['<mm-receive-own-mail-button>'] = mlist.FormatOptionButton( mm_cfg.DontReceiveOwnPosts, 0, user) replacements['<mm-dont-receive-own-mail-button>'] = ( mlist.FormatOptionButton(mm_cfg.DontReceiveOwnPosts, 1, user)) replacements['<mm-public-subscription-button>'] = ( mlist.FormatOptionButton(mm_cfg.ConcealSubscription, 0, user)) replacements['<mm-hide-subscription-button>'] = mlist.FormatOptionButton( mm_cfg.ConcealSubscription, 1, user) replacements['<mm-digest-submit>'] = mlist.FormatButton( 'setdigest', _('Submit My Changes')) replacements['<mm-unsubscribe-button>'] = ( mlist.FormatButton('unsub', _('Unsubscribe'))) replacements['<mm-digest-pw-box>'] = mlist.FormatSecureBox('digpw') replacements['<mm-unsub-pw-box>'] = mlist.FormatSecureBox('upw') replacements['<mm-old-pw-box>'] = mlist.FormatSecureBox('opw') replacements['<mm-new-pass-box>'] = mlist.FormatSecureBox('newpw') replacements['<mm-confirm-pass-box>'] = mlist.FormatSecureBox('confpw') replacements['<mm-other-subscriptions-pw-box>'] = ( mlist.FormatSecureBox('othersubspw')) replacements['<mm-other-subscriptions-submit>'] = ( mlist.FormatButton('othersubs', _('List my other subscriptions'))) replacements['<mm-change-pass-button>'] = ( mlist.FormatButton('changepw', _("Change My Password"))) replacements['<mm-form-start>'] = ( mlist.FormatFormStart('handle_opts', user)) replacements['<mm-user>'] = user replacements['<mm-presentable-user>'] = presentable_user replacements['<mm-email-my-pw>'] = mlist.FormatButton('emailpw', (_('Email My Password' ' To Me'))) replacements['<mm-umbrella-notice>'] = ( mlist.FormatUmbrellaNotice(user, _("password"))) if cpuser is not None: replacements['<mm-case-preserved-user>'] = _(''' | 79cc24f2ae2cdeedf05b3cb61884fd3f15c84b46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/79cc24f2ae2cdeedf05b3cb61884fd3f15c84b46/options.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
997,
273,
3667,
2656,
2519,
1435,
2140,
273,
6091,
18,
967,
743,
16539,
8610,
1435,
309,
486,
2140,
578,
562,
12,
6019,
13,
411,
576,
30,
997,
18,
986,
1180,
12,
1864,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
997,
273,
3667,
2656,
2519,
1435,
2140,
273,
6091,
18,
967,
743,
16539,
8610,
1435,
309,
486,
2140,
578,
562,
12,
6019,
13,
411,
576,
30,
997,
18,
986,
1180,
12,
1864,
12,... |
if ~config.has_section('locations'): raise 'Congfig file must have a \'location\' section' | if config.has_section('locations') is False: raise 'Congfig file must have a \'locations\' section' | def get_backup_info(config): """ @type configfile: ConfigParser @param configfile: The config file to read from @rtype: dictionary of tuples @return: Maps directory to a tuple of (src, days, weeks) Config file format: # Name directory pair [locations] trac = /var/backup/trac # Specifies a weekly and inremental # With 10 days of incremental and 4 weeks of weekly backups # Days and weeks can be missing and default values will be used [trac] days = 10 weeks = 4 src = /tmp/trac-backup """ if ~config.has_section('locations'): raise 'Congfig file must have a \'location\' section' backup_info = {} locations = config.options('locations') # Read in the days and weeks for each slection (10 and 4 if not given) for location in locations: # Where to do the backup directory = config.get('locations', location) # Change values if options are set def get_option(key, default): if config.has_section(location): if config.has_option(location, key): return config.get(location, key) else: return default weeks = get_option('weeks', 10) days = get_option('days', 4) src = get_option('src', os.path.join('/tmp', location + '-backup')) backup_info[directory] = (src, days, weeks) return backup_info | 73759f96700ef26063b5541b3befb24dbe11c3aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10608/73759f96700ef26063b5541b3befb24dbe11c3aa/backup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9572,
67,
1376,
12,
1425,
4672,
3536,
632,
723,
225,
642,
768,
30,
25076,
632,
891,
642,
768,
30,
1021,
642,
585,
358,
855,
628,
225,
632,
86,
723,
30,
225,
3880,
434,
10384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9572,
67,
1376,
12,
1425,
4672,
3536,
632,
723,
225,
642,
768,
30,
25076,
632,
891,
642,
768,
30,
1021,
642,
585,
358,
855,
628,
225,
632,
86,
723,
30,
225,
3880,
434,
10384... |
linkName += ": " + str(values[2]) | linkName += ": " + str(values[2]) | def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href=\"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: browser_dump, counter_dump = results[res] utils.debug("Working with test: " + res) utils.debug("Sending results: " + " ".join(browser_dump)) utils.stamped_msg("Transmitting test: " + res, "Started") filename = tempfile.mktemp() tmpf = open(filename, "w") if res in ('ts', 'twinopen'): i = 0 for val in browser_dump: val_list = val.split('|') for v in val_list: tmpf.write(result_format % (float(v), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 else: # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n name = '' if ((res == 'tp') or (res == 'tp_js')): name = '_loadtime' for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results: r = mypage.split(';') #skip this line if it isn't the correct format if len(r) == 1: continue r[1] = r[1].rstrip('/') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + name, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link utils.stamped_msg("Transmitting test: " + res, "Stopped") first_results = '' last_results = '' full_results = '\nRETURN:<p style="font-size:smaller;">Details:<br>' lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if linkName in ('tp_pbytes', 'tp_%cpu'): continue if float(values[2]) > 0: linkName += ": " + str(values[2]) url = url_format % (results_server, values[0]) link = link_format % (url, linkName) first_results = first_results + "\nRETURN:" + link + '<br>' else: url = url_format % (results_server, values[0]) link = link_format % (url, linkName) last_results = last_results + '| ' + link + ' ' full_results = first_results + full_results + last_results + '|</p>' print full_results | 916bafd8a5534277f3fd0dc798976aa5304b8ae9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/916bafd8a5534277f3fd0dc798976aa5304b8ae9/run_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
869,
67,
4660,
12,
4717,
67,
3567,
16,
1686,
67,
1232,
16,
2077,
16,
1509,
16,
4748,
67,
1425,
16,
1686,
4672,
268,
2147,
273,
2077,
880,
67,
2139,
273,
315,
2505,
23155,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
869,
67,
4660,
12,
4717,
67,
3567,
16,
1686,
67,
1232,
16,
2077,
16,
1509,
16,
4748,
67,
1425,
16,
1686,
4672,
268,
2147,
273,
2077,
880,
67,
2139,
273,
315,
2505,
23155,
8... |
buildscript.execute(branch_cmd, 'git', cwd=cwd) buildscript.execute(['git', 'reset', '--hard', commit], 'git', cwd=cwd) | buildscript.execute(branch_cmd, cwd=cwd) buildscript.execute(['git', 'reset', '--hard', commit], cwd=cwd) | def _update(self, buildscript, copydir=None): cwd = self.get_checkoutdir(copydir) buildscript.execute(['git', 'fetch'], 'git', cwd=cwd) | 1a224b0a56aeaf262d7650245ef6abcabae0d850 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4596/1a224b0a56aeaf262d7650245ef6abcabae0d850/git.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
12,
2890,
16,
1361,
4263,
16,
1610,
1214,
33,
7036,
4672,
7239,
273,
365,
18,
588,
67,
17300,
1214,
12,
3530,
1214,
13,
1361,
4263,
18,
8837,
12,
3292,
6845,
2187,
296,
5754... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
12,
2890,
16,
1361,
4263,
16,
1610,
1214,
33,
7036,
4672,
7239,
273,
365,
18,
588,
67,
17300,
1214,
12,
3530,
1214,
13,
1361,
4263,
18,
8837,
12,
3292,
6845,
2187,
296,
5754... |
self._fields[name] = field = f(name=form_name, form=self) | field = f(name=form_name, form=self) self._fields.append((name, field)) | def __init__(self, formdata=None, obj=None, prefix='', idprefix='', **kwargs): if prefix: prefix += '_' self._idprefix = idprefix | c23ea158d607fe220af6490f5b9e1935f6a6a9b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8614/c23ea158d607fe220af6490f5b9e1935f6a6a9b6/form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
30642,
33,
7036,
16,
1081,
33,
7036,
16,
1633,
2218,
2187,
612,
3239,
2218,
2187,
2826,
4333,
4672,
309,
1633,
30,
1633,
1011,
4427,
365,
6315,
350,
3239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
30642,
33,
7036,
16,
1081,
33,
7036,
16,
1633,
2218,
2187,
612,
3239,
2218,
2187,
2826,
4333,
4672,
309,
1633,
30,
1633,
1011,
4427,
365,
6315,
350,
3239,
... |
search_in_yahoo = False | config.copyright_yahoo = False | def main(): global search_in_google, search_in_yahoo, max_query_for_page, output_file gen = None # Can either be 'xmldump', 'textfile' or 'userinput'. source = None # the textfile's path, either absolute or relative, which will be used when # source is 'textfile'. textfilename = None # the category name which will be used when source is 'category'. categoryname = None # catrecurse = False # pages which will be processed when the -page parameter is used PageTitles = [] # IDs which will be processed when the -ids parameter is used ids = None # a page whose referrers will be processed when the -ref parameter is used referredPageTitle = None # an image page whose file links will be processed when the -filelinks parameter is used fileLinksPageTitle = None # a page whose links will be processed when the -links parameter is used linkingPageTitle = None # will become True when the user presses a ('yes to all') or uses the -always # commandline paramater. acceptall = False # Which namespaces should be processed? # default to [] which means all namespaces will be processed namespaces = [] # repeat = False firstPageTitle = None # Read commandline parameters. for arg in wikipedia.handleArgs(): if arg.startswith('-filelinks'): if len(arg) == 10: fileLinksPageTitle = wikipedia.input(u'Links to which image page should be processed?') else: fileLinksPageTitle = arg[11:] #TODO: Replace 'Image:' with something that automatically gets the name of images based on the language. fileLinksPage = wikipedia.Page(wikipedia.getSite(), 'Image:' + fileLinksPageTitle) gen = pagegenerators.FileLinksGenerator(fileLinksPage) elif arg.startswith('-repeat'): repeat = True elif arg.startswith('-y'): search_in_yahoo = True elif arg.startswith('-g'): search_in_google = True elif arg.startswith('-ny'): search_in_yahoo = False elif arg.startswith('-ng'): search_in_google = False elif arg.startswith('-output'): if len(arg) >= 8: output_file = arg[8:] elif arg.startswith('-maxquery'): if len(arg) >= 10: max_query_for_page = int(arg[10:]) elif arg.startswith('-new'): if len(arg) >=5: gen = pagegenerators.NewpagesPageGenerator(number=int(arg[5:]), repeat = repeat) else: gen = pagegenerators.NewpagesPageGenerator(number=60, repeat = repeat) elif arg.startswith('-file'): if len(arg) >= 6: textfilename = arg[6:] gen = pagegenerators.TextfilePageGenerator(textfilename) #elif arg.startswith('-idfile'): # if len(arg) >= 11: # textfilename = arg[11:] # ids = read_file(textfilename).splitlines() elif arg.startswith('-subcat'): catrecurse = True elif arg.startswith('-cat'): if len(arg) == 4: categoryname = wikipedia.input(u'Please enter the category name:') else: categoryname = arg[5:] cat = catlib.Category(wikipedia.getSite(), 'Category:%s' % categoryname) if firstPageTitle: gen = pagegenerators.CategorizedPageGenerator(cat, recurse = catrecurse, start = firstPageTitle) else: gen = pagegenerators.CategorizedPageGenerator(cat, recurse = catrecurse) elif arg.startswith('-xml'): if len(arg) == 4: xmlFilename = wikipedia.input(u'Please enter the XML dump\'s filename:') else: xmlFilename = arg[5:] elif arg.startswith('-page'): if len(arg) == 5: PageTitles.append(wikipedia.input(u'Which page do you want to change?')) else: PageTitles.append(arg[6:]) source = 'specificPages' elif arg.startswith('-ref'): if len(arg) == 4: referredPageTitle = wikipedia.input(u'Links to which page should be processed?') else: referredPageTitle = arg[5:] referredPage = wikipedia.Page(wikipedia.getSite(), referredPageTitle) gen = pagegenerators.ReferringPageGenerator(referredPage) elif arg.startswith('-links'): if len(arg) == 6: linkingPageTitle = wikipedia.input(u'Links from which page should be processed?') else: linkingPageTitle = arg[7:] linkingPage = wikipedia.Page(wikipedia.getSite(), linkingPageTitle) gen = pagegenerators.LinkedPageGenerator(linkingPage) elif arg.startswith('-start'): if len(arg) == 6: firstPageTitle = wikipedia.input(u'Which page do you want to change?') else: firstPageTitle = arg[7:] namespace = wikipedia.Page(wikipedia.getSite(), firstPageTitle).namespace() firstPageTitle = wikipedia.Page(wikipedia.getSite(), firstPageTitle).titleWithoutNamespace() gen = pagegenerators.AllpagesPageGenerator(firstPageTitle, namespace) elif arg.startswith('-namespace:'): namespaces.append(int(arg[11:])) if PageTitles: pages = [wikipedia.Page(wikipedia.getSite(), PageTitle) for PageTitle in PageTitles] gen = iter(pages) if ids: checks_by_ids(ids) if not gen and not ids: # syntax error, show help text from the top of this file wikipedia.output(__doc__, 'utf-8') if not gen: wikipedia.stopme() sys.exit() if namespaces != []: gen = pagegenerators.NamespaceFilterPageGenerator(gen, namespaces) preloadingGen = pagegenerators.PreloadingGenerator(gen, pageNumber = 20) bot = CheckRobot(preloadingGen) bot.run() | d445bcd2a4d71b17d4de9993e4f333dc7419cfb5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/d445bcd2a4d71b17d4de9993e4f333dc7419cfb5/copyright.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
1623,
67,
267,
67,
9536,
16,
1623,
67,
267,
67,
93,
9795,
5161,
16,
943,
67,
2271,
67,
1884,
67,
2433,
16,
876,
67,
768,
3157,
273,
599,
468,
4480,
3344,
506,
296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
1623,
67,
267,
67,
9536,
16,
1623,
67,
267,
67,
93,
9795,
5161,
16,
943,
67,
2271,
67,
1884,
67,
2433,
16,
876,
67,
768,
3157,
273,
599,
468,
4480,
3344,
506,
296,... |
qscanConfig = string.strip(cp.get("fu-"+depQscan, depIfoIniConfig)) | qscanConfig = self.fix_config_for_science_run( cp.get("fu-"+depQscan, depIfoIniConfig).strip(), timeref ) | def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan'] | 0e0ff4ad143c0e66865518a30b44d00ea912aafb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0e0ff4ad143c0e66865518a30b44d00ea912aafb/wscan_background.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4057,
16,
20299,
4672,
5993,
45,
617,
22129,
809,
273,
21479,
6797,
1425,
11,
365,
18,
15037,
45,
617,
1621,
273,
21479,
6797,
67,
85,
1017,
634,
67,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4057,
16,
20299,
4672,
5993,
45,
617,
22129,
809,
273,
21479,
6797,
1425,
11,
365,
18,
15037,
45,
617,
1621,
273,
21479,
6797,
67,
85,
1017,
634,
67,
142... |
""" | r""" | def _latex_(self): """ Return latex representation of self. | bfb3b216ddc2cde3bcc63da8db08632e880cf655 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/bfb3b216ddc2cde3bcc63da8db08632e880cf655/free_monoid_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
25079,
4335,
434,
365,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
26264,
67,
12,
2890,
4672,
436,
8395,
2000,
25079,
4335,
434,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
icon='/dl/filesystems/icon.png') | icon='/dl/cron/icon.png') | def get_ui(self): panel = UI.PluginPanel(UI.Label(text=self._log), title='Crontab', icon='/dl/filesystems/icon.png') panel.appendChild(self.get_default_ui()) return panel | afc66b61f02aa24201ecd14bc6dc4a1c97ecd912 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3600/afc66b61f02aa24201ecd14bc6dc4a1c97ecd912/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4881,
12,
2890,
4672,
6594,
273,
6484,
18,
3773,
5537,
12,
5370,
18,
2224,
12,
955,
33,
2890,
6315,
1330,
3631,
2077,
2218,
12893,
30335,
2187,
4126,
2218,
19,
5761,
19,
18041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4881,
12,
2890,
4672,
6594,
273,
6484,
18,
3773,
5537,
12,
5370,
18,
2224,
12,
955,
33,
2890,
6315,
1330,
3631,
2077,
2218,
12893,
30335,
2187,
4126,
2218,
19,
5761,
19,
18041,
... |
cn=sqlite3.connect(db) | cn=sqlite3.connect(db, isolation_level=None) | def generate(prefix): db=os.path.join(prefix,'data.db') pat=os.path.join(prefix,'*','*.txt') files=glob(pat) files.sort() try: os.unlink(db) except OSError: pass cn=sqlite3.connect(db) c=cn.cursor() c.executescript(SCHEMA) c.execute('BEGIN TRANSACTION') #for f in sys.argv[1:]: for f in files: print "adding [%s]..." % f c.execute(SQL_ADD_ROW, parse(f)) cn.commit() | e2e26a5cb558962c6fe27d2b7ed18a75e496716a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9462/e2e26a5cb558962c6fe27d2b7ed18a75e496716a/sqlGenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
3239,
4672,
1319,
33,
538,
18,
803,
18,
5701,
12,
3239,
11189,
892,
18,
1966,
6134,
9670,
33,
538,
18,
803,
18,
5701,
12,
3239,
11189,
14,
17023,
11146,
5830,
6134,
1390,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
12,
3239,
4672,
1319,
33,
538,
18,
803,
18,
5701,
12,
3239,
11189,
892,
18,
1966,
6134,
9670,
33,
538,
18,
803,
18,
5701,
12,
3239,
11189,
14,
17023,
11146,
5830,
6134,
1390,
33,... |
assert self.utf8 == self.stc.refstc.encoded | assert text == self.stc.refstc.encoded def testUTF8BOM(self): text = self.utf8_bom self.stc.encoding, self.stc.refstc.bom = detectEncoding(text) print self.stc.encoding self.stc.decodeText(text) self.stc.prepareEncoding() assert text == self.stc.refstc.encoded | def testUTF8(self): self.stc.encoding = detectEncoding(self.utf8) print self.stc.encoding self.stc.decodeText(self.utf8) self.stc.prepareEncoding() assert self.utf8 == self.stc.refstc.encoded | 8c2fdf4ae6ccd2cd0d7c40694df117e33c96e8bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11522/8c2fdf4ae6ccd2cd0d7c40694df117e33c96e8bb/test_unicode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5159,
28,
12,
2890,
4672,
365,
18,
334,
71,
18,
5999,
273,
5966,
4705,
12,
2890,
18,
3158,
28,
13,
1172,
365,
18,
334,
71,
18,
5999,
365,
18,
334,
71,
18,
3922,
1528,
12,
289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5159,
28,
12,
2890,
4672,
365,
18,
334,
71,
18,
5999,
273,
5966,
4705,
12,
2890,
18,
3158,
28,
13,
1172,
365,
18,
334,
71,
18,
5999,
365,
18,
334,
71,
18,
3922,
1528,
12,
289... |
if not mimetype or mimetype == 'None': | if mimetype == 'None': | def set(self, instance, value, **kwargs): """ Assign input value to object. If mimetype is not specified, pass to processing method without one and add mimetype returned to kwargs. Assign kwargs to instance. """ value = self._process_input(value, default=self.default, **kwargs) encoding = kwargs.get('encoding') if type(value) is type(u'') and encoding is None: encoding = 'UTF-8' | 9d8187044d899762c8753787db9e683b314146e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/9d8187044d899762c8753787db9e683b314146e0/Field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
791,
16,
460,
16,
2826,
4333,
4672,
3536,
12093,
810,
460,
358,
733,
18,
971,
12595,
353,
486,
1269,
16,
1342,
358,
4929,
707,
2887,
1245,
471,
527,
12595,
2106,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
791,
16,
460,
16,
2826,
4333,
4672,
3536,
12093,
810,
460,
358,
733,
18,
971,
12595,
353,
486,
1269,
16,
1342,
358,
4929,
707,
2887,
1245,
471,
527,
12595,
2106,
358... |
continue dest = os.path.join(self.dist_dir, basename) | dest = os.path.join(self.dist_dir, 'xulrunner', basename) else: dest = os.path.join(self.dist_dir, basename) | def moveDLLs(self): print "moving all DLL files to %s" % self.dist_dir for dll in glob(os.path.join(self.xul_dist_dir, '*.dll')): basename = os.path.basename(dll) if basename.lower() == 'python25.dll': continue dest = os.path.join(self.dist_dir, basename) if not os.path.exists(dest): shutil.move(dll, dest) else: # maybe we should check that they're the same here? os.remove(dll) | fff48e5932888eab22e6ed6d0f18f59e4c141f29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/fff48e5932888eab22e6ed6d0f18f59e4c141f29/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
40,
4503,
87,
12,
2890,
4672,
1172,
315,
81,
13767,
777,
463,
4503,
1390,
358,
738,
87,
6,
738,
365,
18,
4413,
67,
1214,
364,
302,
2906,
316,
4715,
12,
538,
18,
803,
18,
5701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3635,
40,
4503,
87,
12,
2890,
4672,
1172,
315,
81,
13767,
777,
463,
4503,
1390,
358,
738,
87,
6,
738,
365,
18,
4413,
67,
1214,
364,
302,
2906,
316,
4715,
12,
538,
18,
803,
18,
5701,
... |
logging.info('Using handler_map_file: %s' % handler_map_file) | logging.debug('Using handler_map_file: %s' % handler_map_file) | def start(self): if not self._web_socket_tests: logging.info('No need to start %s server.' % self._server_name) return if self.is_running(): raise PyWebSocketNotStarted('%s is already running.' % self._server_name) | e4109d2ab6d5441cc5bde539241ef0af8c757c58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/e4109d2ab6d5441cc5bde539241ef0af8c757c58/websocket_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
486,
365,
6315,
4875,
67,
7814,
67,
16341,
30,
2907,
18,
1376,
2668,
2279,
1608,
358,
787,
738,
87,
1438,
1093,
738,
365,
6315,
3567,
67,
529,
13,
327,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
486,
365,
6315,
4875,
67,
7814,
67,
16341,
30,
2907,
18,
1376,
2668,
2279,
1608,
358,
787,
738,
87,
1438,
1093,
738,
365,
6315,
3567,
67,
529,
13,
327,
309,
... |
if valign != 'TOP' or just != 'LEFT': | if valign != 'BOTTOM' or just != 'LEFT': | def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: self.canv.setFillColor(cellstyle.color) if cur is None or cellstyle.leading != cur.leading or cellstyle.fontname != cur.fontname or cellstyle.fontsize != cur.fontsize: self.canv.setFont(cellstyle.fontname, cellstyle.fontsize, cellstyle.leading) self._curcellstyle = cellstyle | 5b9fc40184557392afc2cd5ab22797a813d9e900 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/5b9fc40184557392afc2cd5ab22797a813d9e900/tables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9446,
4020,
12,
2890,
16,
2484,
1125,
16,
2484,
4060,
16,
261,
1293,
917,
16,
1027,
917,
3631,
261,
1293,
2819,
16,
1027,
4210,
3719,
30,
309,
365,
6315,
1397,
3855,
4060,
353,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9446,
4020,
12,
2890,
16,
2484,
1125,
16,
2484,
4060,
16,
261,
1293,
917,
16,
1027,
917,
3631,
261,
1293,
2819,
16,
1027,
4210,
3719,
30,
309,
365,
6315,
1397,
3855,
4060,
353,
48... |
self.troveFiles = trovecontents.TroveFiles(self.db) | self.troveFiles = trovefiles.TroveFiles(self.db) | def __init__(self, path): | 7b2802e08f37238833e8ab69cefb58fbaebe573c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/7b2802e08f37238833e8ab69cefb58fbaebe573c/trovestore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
589,
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,
1001,
2738,
972,
12,
2890,
16,
589,
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,... |
bytes_recv += len(chunk) | def test_user_during_transfer(self): # Test USER while already authenticated and a transfer is # in progress. self.client.login(user=USER, passwd=PASSWD) data = 'abcde12345' * 100000 self.file.write(data) self.file.close() | 43e96097e07522c982d4730886ac440df1d8dc07 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3782/43e96097e07522c982d4730886ac440df1d8dc07/test_ftpd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1355,
67,
72,
4017,
67,
13866,
12,
2890,
4672,
468,
7766,
7443,
1323,
1818,
9370,
471,
279,
7412,
353,
468,
316,
4007,
18,
365,
18,
2625,
18,
5819,
12,
1355,
33,
4714,
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,
1842,
67,
1355,
67,
72,
4017,
67,
13866,
12,
2890,
4672,
468,
7766,
7443,
1323,
1818,
9370,
471,
279,
7412,
353,
468,
316,
4007,
18,
365,
18,
2625,
18,
5819,
12,
1355,
33,
4714,
16,
... | |
if not (os.path.isdir(os.path.join(fullname, 'cur')) and os.path.isdir(os.path.join(fullname, 'new')) and os.path.isdir(os.path.join(fullname, 'tmp'))): self.debug(" skipping this entry (doesn't have cur, new, tmp)") continue foldername = dirname if extension != None: foldername = os.path.join(extension, dirname) | if (os.path.isdir(os.path.join(fullname, 'cur')) and os.path.isdir(os.path.join(fullname, 'new')) and os.path.isdir(os.path.join(fullname, 'tmp'))): self.debug(" This is a maildir folder.") foldername = dirname if extension != None: foldername = os.path.join(extension, dirname) | def _getfolders_scandir(self, root, extension = None): self.debug("_GETFOLDERS_SCANDIR STARTING. root = %s, extension = %s" \ % (root, extension)) # extension willl only be non-None when called recursively when # getsep() returns '/'. retval = [] | 6c1d5a0d27876b9187748468a3d76e07a916f0b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/6c1d5a0d27876b9187748468a3d76e07a916f0b0/Maildir.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
16064,
67,
1017,
23230,
12,
2890,
16,
1365,
16,
2710,
273,
599,
4672,
365,
18,
4148,
2932,
67,
3264,
17357,
55,
67,
2312,
1258,
4537,
10485,
1360,
18,
1365,
273,
738,
87,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
16064,
67,
1017,
23230,
12,
2890,
16,
1365,
16,
2710,
273,
599,
4672,
365,
18,
4148,
2932,
67,
3264,
17357,
55,
67,
2312,
1258,
4537,
10485,
1360,
18,
1365,
273,
738,
87,
16,... |
def do (): if not hasattr(context, "endIsSent"): context.endIsSent = True self.emit("drag-end", context) gobject.idle_add(do) | def on_drag_drop (self, receiver, context, x, y, timestamp): if hasattr(context, "isFinished"): context.finish(True, True, timestamp) return True position = self.parsePosition(x,y) sender = context.get_source_widget() # If the drop wasn't at a button if position == None: return if isinstance(receiver, gtk.Notebook): if sender == receiver: if position == POSITION_CENTER: return if len(sender.get_children()) == 1: return elif len(sender.get_children()) >= 1: # We rely on the automatic tab moving return else: # We need to undo the automatic tab moving child = receiver.get_nth_page(receiver.get_current_page()) title = receiver.get_tab_label(child) receiver.remove_page(receiver.get_current_page()) sender.append_page(child, title) child = sender.get_nth_page(sender.get_current_page()) title = sender.undock(child) self.dock(child, position, title) context.finish(True, True, timestamp) context.isFinished = True def do (): if not hasattr(context, "endIsSent"): context.endIsSent = True self.emit("drag-end", context) #self.on_drag_end(receiver, context) gobject.idle_add(do) return True | b74bada3c4a52655d2f0ff893e7a277c37cc7231 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/b74bada3c4a52655d2f0ff893e7a277c37cc7231/pydock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
15997,
67,
7285,
261,
2890,
16,
5971,
16,
819,
16,
619,
16,
677,
16,
2858,
4672,
309,
3859,
12,
2472,
16,
315,
291,
10577,
6,
4672,
819,
18,
13749,
12,
5510,
16,
1053,
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,
603,
67,
15997,
67,
7285,
261,
2890,
16,
5971,
16,
819,
16,
619,
16,
677,
16,
2858,
4672,
309,
3859,
12,
2472,
16,
315,
291,
10577,
6,
4672,
819,
18,
13749,
12,
5510,
16,
1053,
16,
... | |
import string | def encode(s): import string s = string.join(string.split(s, '&'), '&') s = string.join(string.split(s, '<'), '<') s = string.join(string.split(s, '>'), '>') s = string.join(string.split(s, '"'), '"') return s | 1313813332adaaa3197b56a7142c1558cf12f9f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7049/1313813332adaaa3197b56a7142c1558cf12f9f2/serializer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
87,
4672,
272,
273,
533,
18,
5701,
12,
1080,
18,
4939,
12,
87,
16,
9824,
3631,
5183,
931,
4359,
13,
272,
273,
533,
18,
5701,
12,
1080,
18,
4939,
12,
87,
16,
9138,
3631,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
87,
4672,
272,
273,
533,
18,
5701,
12,
1080,
18,
4939,
12,
87,
16,
9824,
3631,
5183,
931,
4359,
13,
272,
273,
533,
18,
5701,
12,
1080,
18,
4939,
12,
87,
16,
9138,
3631,
5... | |
self.fontdict = MakeFontDictionary(fontstartpos, len(self.fonts)) | fontdicttext = MakeFontDictionary(fontstartpos, len(self.fonts)) fontdictob = PDFLiteral(fontdicttext) self.add("FontDictionary", fontdictob) self.fontdict = self.objectReference("FontDictionary") | def __init__(self): self.objects = [] self.objectPositions = {} self.fonts = MakeType1Fonts() | 5c74a92bb729b6496a108dea735264cad2ee717d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5c74a92bb729b6496a108dea735264cad2ee717d/pdfdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
6911,
273,
5378,
365,
18,
1612,
11024,
273,
2618,
225,
365,
18,
22052,
273,
4344,
559,
21,
5711,
87,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
6911,
273,
5378,
365,
18,
1612,
11024,
273,
2618,
225,
365,
18,
22052,
273,
4344,
559,
21,
5711,
87,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
if row.type not in metaio.Types: | if row.type not in types.Types: | def append(self, row): if row.type not in metaio.Types: raise ligolw.ElementError, "ProcessParamsTable.append(): unrecognized type \"%s\"" % row.type LSCTableMulti.append(self, row) | d46e522d02fe145e0952a1497a30372a1274792d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/d46e522d02fe145e0952a1497a30372a1274792d/lsctables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
12,
2890,
16,
1027,
4672,
309,
1027,
18,
723,
486,
316,
1953,
18,
2016,
30,
1002,
16917,
355,
91,
18,
1046,
668,
16,
315,
2227,
1370,
1388,
18,
6923,
13332,
225,
28333,
618,
22049... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
12,
2890,
16,
1027,
4672,
309,
1027,
18,
723,
486,
316,
1953,
18,
2016,
30,
1002,
16917,
355,
91,
18,
1046,
668,
16,
315,
2227,
1370,
1388,
18,
6923,
13332,
225,
28333,
618,
22049... |
res[r] = (0, False) | res[r] = None | def _fnct_read(self2, self, cr, uid, ids, prop, val, context={}): property = self.pool.get('ir.property') definition_id = self2._field_get(self, cr, uid, prop) | 55b453f5fc25adeb3463fc7044ccec65d09a20b3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/55b453f5fc25adeb3463fc7044ccec65d09a20b3/fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4293,
299,
67,
896,
12,
2890,
22,
16,
365,
16,
4422,
16,
4555,
16,
3258,
16,
2270,
16,
1244,
16,
819,
12938,
4672,
1272,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
4468,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4293,
299,
67,
896,
12,
2890,
22,
16,
365,
16,
4422,
16,
4555,
16,
3258,
16,
2270,
16,
1244,
16,
819,
12938,
4672,
1272,
273,
365,
18,
6011,
18,
588,
2668,
481,
18,
4468,
6134,
... |
s.appendExten("8","Goto(%s,%s,1)" % (pbx,self.phone_8), self.pbx) | s.appendExten("8","Goto(%s,%s,1)" % (pbx,self.phone_8), context) | def createAsteriskConfig(self): s = AstConf("extensions.conf") s.setSection(self.name) if self.pbx: pbx = self.pbx else: pbx = "phones" s.append("include=%s" % pbx) s.appendExten("s","Set(TIMEOUT(digit)=%d)" % self.digittimeout, self.pbx) if self.moh: s.appendExten("s","Setmusiconhold(%s)" % self.moh, self.pbx) s.appendExten("s","Set(DIAL_OPTIONS=m)", self.pbx) else: s.appendExten("s","Set(DIAL_OPTIONS=r)", self.pbx) if self.ivrtime: if self.times: times=self.times.split(',') for t in times: s.appendExten("s","GotoIfTime(%s?%s,s,1)" % (t,self.ivrtime), self.pbx) if self.timeout: s.appendExten("s","Set(TIMEOUT(absolute)=%s)" % self.timeout, self.pbx) for i in range(self.repeat): s.appendExten("s","Background(%s)" % self.backgroundfile, self.pbx) if self.pause: s.appendExten("s","WaitExten(%s)" % self.pause, self.pbx) s.appendExten("s","WaitExten(%d)" % self.waittime, self.pbx) s.appendExten("s","Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) if self.ivr_1: s.appendExten("1","Goto(%s,s,1)" % self.ivr_1, self.pbx) if self.ivr_2: s.appendExten("2","Goto(%s,s,1)" % self.ivr_2, self.pbx) if self.ivr_3: s.appendExten("3","Goto(%s,s,1)" % self.ivr_3, self.pbx) if self.ivr_4: s.appendExten("4","Goto(%s,s,1)" % self.ivr_4, self.pbx) if self.ivr_5: s.appendExten("5","Goto(%s,s,1)" % self.ivr_5, self.pbx) if self.ivr_6: s.appendExten("6","Goto(%s,s,1)" % self.ivr_6, self.pbx) if self.ivr_7: s.appendExten("7","Goto(%s,s,1)" % self.ivr_7, self.pbx) if self.ivr_8: s.appendExten("8","Goto(%s,s,1)" % self.ivr_8, self.pbx) if self.ivr_9: s.appendExten("9","Goto(%s,s,1)" % self.ivr_9, self.pbx) if self.ivr_ast: s.appendExten("*","Goto(%s,s,1)" % self.ivr_ast, self.pbx) if self.phone_1: s.appendExten("1","Goto(%s,%s,1)" % (pbx,self.phone_1), self.pbx) if self.phone_2: s.appendExten("2","Goto(%s,%s,1)" % (pbx,self.phone_2), self.pbx) if self.phone_3: s.appendExten("3","Goto(%s,%s,1)" % (pbx,self.phone_3), self.pbx) if self.phone_4: s.appendExten("4","Goto(%s,%s,1)" % (pbx,self.phone_4), self.pbx) if self.phone_5: s.appendExten("5","Goto(%s,%s,1)" % (pbx,self.phone_5), self.pbx) if self.phone_6: s.appendExten("6","Goto(%s,%s,1)" % (pbx,self.phone_6), self.pbx) if self.phone_7: s.appendExten("7","Goto(%s,%s,1)" % (pbx,self.phone_7), self.pbx) if self.phone_8: s.appendExten("8","Goto(%s,%s,1)" % (pbx,self.phone_8), self.pbx) if self.phone_9: s.appendExten("9","Goto(%s,%s,1)" % (pbx,self.phone_9), self.pbx) if self.phone_ast: s.appendExten("*","Goto(%s,%s,1)" % (pbx,self.phone_ast), self.pbx) s.appendExten("0", "Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) s.appendExten("i","Playback(invalid)", self.pbx) s.appendExten("i","Goto(%s,%s,1)" % (pbx,self.operator), self.pbx) s.appendExten("t","ResetCDR(w)", self.pbx) s.appendExten("t","NoCDR", self.pbx) s.appendExten("t","Hangup", self.pbx) s.appendExten("T","ResetCDR(w)", self.pbx) s.appendExten("T","NoCDR", self.pbx) s.appendExten("T","Hangup", self.pbx) s.appendExten("#","ResetCDR(w)", self.pbx) s.appendExten("#","NoCDR", self.pbx) s.appendExten("#","Hangup", self.pbx) | e581660927aebaacc03692e1a06a4d11542ff6a3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2627/e581660927aebaacc03692e1a06a4d11542ff6a3/cfg_ivr_treenode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
272,
273,
16614,
3976,
2932,
9489,
18,
3923,
7923,
272,
18,
542,
5285,
12,
2890,
18,
529,
13,
309,
365,
18,
5733,
92,
30,
6386,
92,
273,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
37,
8190,
10175,
809,
12,
2890,
4672,
272,
273,
16614,
3976,
2932,
9489,
18,
3923,
7923,
272,
18,
542,
5285,
12,
2890,
18,
529,
13,
309,
365,
18,
5733,
92,
30,
6386,
92,
273,
36... |
version_pattern = re.compile('^...?.?\....?.?') | def gather_icl_versions(conf, versions): version_pattern = re.compile('^...?.?\....?.?') try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Intel\\Compilers\\C++') except WindowsError: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Intel\\Compilers\\C++') except WindowsError: return index = 0 while 1: try: version = _winreg.EnumKey(all_versions, index) except WindowsError: break index = index + 1 if not version_pattern.match(version): continue targets = [] for target,arch in all_icl_platforms: try: icl_version = _winreg.OpenKey(all_versions, version+'\\'+target) path,type = _winreg.QueryValueEx(icl_version,'ProductDir') if os.path.isfile(os.path.join(path, 'bin', 'iclvars.bat')): try: targets.append((target, (arch, conf.get_msvc_version('intel', version, target, os.path.join(path, 'bin', 'iclvars.bat'))))) except Configure.ConfigurationError: pass except WindowsError: continue major = version[0:2] versions.append(('intel ' + major, targets)) | 05495af483649bfc6f90e3fef7d4b6f6cdb27e4d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7302/05495af483649bfc6f90e3fef7d4b6f6cdb27e4d/msvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11090,
67,
335,
80,
67,
10169,
12,
3923,
16,
5244,
4672,
775,
30,
777,
67,
10169,
273,
389,
8082,
1574,
18,
3678,
653,
24899,
8082,
1574,
18,
44,
3297,
67,
14922,
67,
5535,
1792,
3740,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11090,
67,
335,
80,
67,
10169,
12,
3923,
16,
5244,
4672,
775,
30,
777,
67,
10169,
273,
389,
8082,
1574,
18,
3678,
653,
24899,
8082,
1574,
18,
44,
3297,
67,
14922,
67,
5535,
1792,
3740,... | |
METAVAR="FILE", help="file to store results") | metavar="FILE", help="file to store results") | def main(argv=None): """Main function: deal with command line arguments and start calculation as reqd.""" if not argv: argv = sys.argv #Parse command line options parser = optparse.OptionParser() parser.add_option("-f", "--filename", action="store", dest="foresults", default=run_config.foresults, type="string", METAVAR="FILE", help="file to store results") loggroup = optparse.OptionGroup(parser, "Log Options", "These options affect the verbosity of the log files generated.") loggroup.add_option("-q", "--quiet", action="store_const", const=logging.FATAL, dest="loglevel", help="only print fatal error messages") loggroup.add_option("-v", "--verbose", action="store_const", const=logging.INFO, dest="loglevel", help="print informative messages") loggroup.add_option("--debug", action="store_const", const=logging.DEBUG, dest="loglevel", help="print lots of debugging information", default=run_config.LOGLEVEL) parser.add_option_group(loggroup) (options, args) = parser.parse_args(args=argv[1:]) #Start the logging module helpers.startlogging(log, run_config.logfile, options.loglevel) log.info("-----------First order run requested------------------") if os.path.isfile(options.foresults): raise IOError("First order results file already exists!") foargs = run_config.foargs.copy() #Get k variable for first order run foargs["k"] = helpers.seq(run_config.kinit, run_config.kend, run_config.deltak) #Start first order run runfomodel(filename=options.foresults, foargs=foargs) return 0 | 632c4e591a29a33644664652f8f0a2552b3a483e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/632c4e591a29a33644664652f8f0a2552b3a483e/firstorder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
4672,
3536,
6376,
445,
30,
10490,
598,
1296,
980,
1775,
471,
787,
11096,
487,
1111,
72,
12123,
225,
309,
486,
5261,
30,
5261,
273,
2589,
18,
19485,
225,
468,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
33,
7036,
4672,
3536,
6376,
445,
30,
10490,
598,
1296,
980,
1775,
471,
787,
11096,
487,
1111,
72,
12123,
225,
309,
486,
5261,
30,
5261,
273,
2589,
18,
19485,
225,
468,
... |
if type: if type[0] == 'C': self._block_update(correct=1) elif type[0] == 'E': self._block_update(error=1) else: self._block_update(other=1) | self._runstats_update(type[0]) | def set_result(self, type): # combination of self.tally() and self.history() self.history(type[0]) self.tally(type=type) if type: if type[0] == 'C': self._block_update(correct=1) elif type[0] == 'E': self._block_update(error=1) else: self._block_update(other=1) | 58eb14000e09a21a3d1a6cc1aaa23c4e126e0cb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5701/58eb14000e09a21a3d1a6cc1aaa23c4e126e0cb5/pype.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2088,
12,
2890,
16,
618,
4672,
468,
10702,
434,
365,
18,
88,
1230,
1435,
471,
365,
18,
8189,
1435,
365,
18,
8189,
12,
723,
63,
20,
5717,
365,
18,
88,
1230,
12,
723,
33,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
2088,
12,
2890,
16,
618,
4672,
468,
10702,
434,
365,
18,
88,
1230,
1435,
471,
365,
18,
8189,
1435,
365,
18,
8189,
12,
723,
63,
20,
5717,
365,
18,
88,
1230,
12,
723,
33,
72... |
normalizedPosition[dimension]=(originalPosition[dimension]-offset[dimension])*scale[dimension] | normalizedPosition[dimension]=(originalPosition[dimension]-offset[dimension]) if version1==True: normalizedPosition[dimension]*=scale[dimension] | def normalizePosition(originalPosition,offset=_normalizationOffset,scale=_normalizationScale): normalizedPosition=[0,0,0] for dimension in range(3): normalizedPosition[dimension]=(originalPosition[dimension]-offset[dimension])*scale[dimension] return normalizedPosition | db826d79aa0fcdbf20d0025f8b9f046ee5203638 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1456/db826d79aa0fcdbf20d0025f8b9f046ee5203638/exporter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
2555,
12,
8830,
2555,
16,
3348,
33,
67,
6130,
1588,
2335,
16,
5864,
33,
67,
6130,
1588,
5587,
4672,
5640,
2555,
22850,
20,
16,
20,
16,
20,
65,
364,
4968,
316,
1048,
12,
23,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3883,
2555,
12,
8830,
2555,
16,
3348,
33,
67,
6130,
1588,
2335,
16,
5864,
33,
67,
6130,
1588,
5587,
4672,
5640,
2555,
22850,
20,
16,
20,
16,
20,
65,
364,
4968,
316,
1048,
12,
23,
467... |
if mtype <> REPLY: | if mtype != REPLY: | def unpack_replyheader(self): xid = self.unpack_uint() mtype = self.unpack_enum() if mtype <> REPLY: raise RuntimeError, 'no REPLY but %r' % (mtype,) stat = self.unpack_enum() if stat == MSG_DENIED: stat = self.unpack_enum() if stat == RPC_MISMATCH: low = self.unpack_uint() high = self.unpack_uint() raise RuntimeError, \ 'MSG_DENIED: RPC_MISMATCH: %r' % ((low, high),) if stat == AUTH_ERROR: stat = self.unpack_uint() raise RuntimeError, \ 'MSG_DENIED: AUTH_ERROR: %r' % (stat,) raise RuntimeError, 'MSG_DENIED: %r' % (stat,) if stat <> MSG_ACCEPTED: raise RuntimeError, \ 'Neither MSG_DENIED nor MSG_ACCEPTED: %r' % (stat,) verf = self.unpack_auth() stat = self.unpack_enum() if stat == PROG_UNAVAIL: raise RuntimeError, 'call failed: PROG_UNAVAIL' if stat == PROG_MISMATCH: low = self.unpack_uint() high = self.unpack_uint() raise RuntimeError, \ 'call failed: PROG_MISMATCH: %r' % ((low, high),) if stat == PROC_UNAVAIL: raise RuntimeError, 'call failed: PROC_UNAVAIL' if stat == GARBAGE_ARGS: raise RuntimeError, 'call failed: GARBAGE_ARGS' if stat <> SUCCESS: raise RuntimeError, 'call failed: %r' % (stat,) return xid, verf # Caller must get procedure-specific part of reply | 1ca8397a72985f1ea6854d833361d924adeec5fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1ca8397a72985f1ea6854d833361d924adeec5fa/rpc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
67,
10629,
3374,
12,
2890,
4672,
19031,
273,
365,
18,
17309,
67,
11890,
1435,
22189,
273,
365,
18,
17309,
67,
7924,
1435,
309,
22189,
480,
2438,
23893,
30,
1002,
7265,
16,
296,
213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
67,
10629,
3374,
12,
2890,
4672,
19031,
273,
365,
18,
17309,
67,
11890,
1435,
22189,
273,
365,
18,
17309,
67,
7924,
1435,
309,
22189,
480,
2438,
23893,
30,
1002,
7265,
16,
296,
213... |
- the other reboot type (L{constants.INSTANCE_REBOOT_HARD}) is not accepted here, since that mode is handled differently | - the other reboot type (L{constants.INSTANCE_REBOOT_FULL}) is not accepted here, since that mode is handled differently, in cmdlib, and translates into full stop and start of the instance (instead of a call_instance_reboot RPC) | def InstanceReboot(instance, reboot_type): """Reboot an instance. @type instance: L{objects.Instance} @param instance: the instance object to reboot @type reboot_type: str @param reboot_type: the type of reboot, one the following constants: - L{constants.INSTANCE_REBOOT_SOFT}: only reboot the instance OS, do not recreate the VM - L{constants.INSTANCE_REBOOT_HARD}: tear down and restart the VM (at the hypervisor level) - the other reboot type (L{constants.INSTANCE_REBOOT_HARD}) is not accepted here, since that mode is handled differently @rtype: boolean @return: the success of the operation """ running_instances = GetInstanceList([instance.hypervisor]) if instance.name not in running_instances: msg = "Cannot reboot instance %s that is not running" % instance.name logging.error(msg) return (False, msg) hyper = hypervisor.GetHypervisor(instance.hypervisor) if reboot_type == constants.INSTANCE_REBOOT_SOFT: try: hyper.RebootInstance(instance) except errors.HypervisorError, err: msg = "Failed to soft reboot instance %s: %s" % (instance.name, err) logging.error(msg) return (False, msg) elif reboot_type == constants.INSTANCE_REBOOT_HARD: try: stop_result = InstanceShutdown(instance) if not stop_result[0]: return stop_result return StartInstance(instance) except errors.HypervisorError, err: msg = "Failed to hard reboot instance %s: %s" % (instance.name, err) logging.error(msg) return (False, msg) else: return (False, "Invalid reboot_type received: %s" % (reboot_type,)) return (True, "Reboot successful") | 73e5a4f4a12870b541b7c53911636fd99ee90ea4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/73e5a4f4a12870b541b7c53911636fd99ee90ea4/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5180,
31569,
12,
1336,
16,
22852,
67,
723,
4672,
3536,
31569,
392,
791,
18,
225,
632,
723,
791,
30,
511,
95,
6911,
18,
1442,
97,
632,
891,
791,
30,
326,
791,
733,
358,
22852,
632,
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,
5180,
31569,
12,
1336,
16,
22852,
67,
723,
4672,
3536,
31569,
392,
791,
18,
225,
632,
723,
791,
30,
511,
95,
6911,
18,
1442,
97,
632,
891,
791,
30,
326,
791,
733,
358,
22852,
632,
72... |
triangles=GeomTriangles(Geom.UHDynamic) | triangles=GeomTriangles(Geom.UHDynamic) | def makeFrame(self, sizex, sizey): """Access: private. Each texture card is displayed with a two-pixel wide frame (a ring of black and a ring of white). This routine builds the frame geometry. It is necessary to be precise so that the frame exactly aligns to pixel boundaries, and so that it doesn't overlap the card at all.""" | 5bb896cb0484b3dd56dd9bd8ff956747acf28b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/5bb896cb0484b3dd56dd9bd8ff956747acf28b7b/BufferViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
3219,
12,
2890,
16,
272,
452,
338,
16,
272,
452,
402,
4672,
3536,
1862,
30,
3238,
18,
225,
8315,
11428,
5270,
353,
10453,
598,
279,
2795,
17,
11743,
14812,
2623,
261,
69,
9221,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
3219,
12,
2890,
16,
272,
452,
338,
16,
272,
452,
402,
4672,
3536,
1862,
30,
3238,
18,
225,
8315,
11428,
5270,
353,
10453,
598,
279,
2795,
17,
11743,
14812,
2623,
261,
69,
9221,
4... |
typ, none, option = content.rpartition(" ") | typ, none, option = content.strip().rpartition(" ") | def parseConfig(self, config): """parses a given configfile""" f = open(config) config = f.read() | 5248e0d4543ccefe6606f81cc2a26db837d9df8e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/5248e0d4543ccefe6606f81cc2a26db837d9df8e/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
809,
12,
2890,
16,
642,
4672,
3536,
1065,
2420,
279,
864,
642,
768,
8395,
225,
284,
273,
1696,
12,
1425,
13,
225,
642,
273,
284,
18,
896,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
809,
12,
2890,
16,
642,
4672,
3536,
1065,
2420,
279,
864,
642,
768,
8395,
225,
284,
273,
1696,
12,
1425,
13,
225,
642,
273,
284,
18,
896,
1435,
2,
-100,
-100,
-100,
-100,
-100,
... |
self.__trash_dir = os.path.join(self.__series_dir, 'trash') | self.__trash_dir = os.path.join(self._dir(), 'trash') | def __init__(self, name = None): """Takes a series name as the parameter. """ try: if name: self.__name = name else: self.__name = git.get_head_file() self.__base_dir = basedir.get() except git.GitException, ex: raise StackException, 'GIT tree not initialised: %s' % ex | 8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3/stack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
273,
599,
4672,
3536,
11524,
279,
4166,
508,
487,
326,
1569,
18,
3536,
775,
30,
309,
508,
30,
365,
16186,
529,
273,
508,
469,
30,
365,
16186,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
508,
273,
599,
4672,
3536,
11524,
279,
4166,
508,
487,
326,
1569,
18,
3536,
775,
30,
309,
508,
30,
365,
16186,
529,
273,
508,
469,
30,
365,
16186,
529,
... |
while instp.poll() == -1: | istat = instp.poll() while istat == -1: | def VerifyPackage(self, entry, modlist = []): '''Verify Package status for entry''' if not (entry.get('name') and entry.get('version')): print "Can't install package, not enough data." return False instp = Popen4("rpm -qi %s-%s" % (entry.attrib['name'], entry.attrib['version'])) while instp.poll() == -1: instp.fromchild.read() istat = instp.wait()/256 if istat == 0: if entry.attrib.get('verify', 'true') == 'true': if self.setup['quick']: return True verp = Popen4("rpm --verify -q %s-%s" % (entry.attrib['name'],entry.attrib['version']), bufsize=16384) odata = '' vstat = verp.poll() while vstat == -1: odata += verp.fromchild.read() vstat = verp.poll() >> 8 output = [line for line in odata.split("\n") if line] if vstat == 0: return True else: if len([name for name in output if name.split()[-1] not in modlist]): return True return False | 14ef312d2b750ecfe58ba89b8165780b87038c1a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/14ef312d2b750ecfe58ba89b8165780b87038c1a/Redhat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8553,
2261,
12,
2890,
16,
1241,
16,
681,
1098,
273,
5378,
4672,
9163,
8097,
7508,
1267,
364,
1241,
26418,
309,
486,
261,
4099,
18,
588,
2668,
529,
6134,
471,
1241,
18,
588,
2668,
1589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8553,
2261,
12,
2890,
16,
1241,
16,
681,
1098,
273,
5378,
4672,
9163,
8097,
7508,
1267,
364,
1241,
26418,
309,
486,
261,
4099,
18,
588,
2668,
529,
6134,
471,
1241,
18,
588,
2668,
1589,
... |
damageRatio = min(max(1.0*attack/defense,0.25),1.25) | defenseBase = 4 damageRatio = min(max(1.0*(attack + defenseBase) / (attack + defense),0.25),1.25) | def applyMine(self, tran, obj, attack, damage, ignoreshield): player = tran.db[obj.owner] targetindex = random.randrange(0,len(obj.ships)) designID, hp, shield, exp = obj.ships[targetindex] targetShip = player.shipDesigns[designID] level = Rules.shipExpToLevel.get(int(exp / targetShip.baseExp), Rules.shipDefLevel) defense = int(targetShip.missileDef * Rules.shipLevelEff[level]) #determine damage: damageRatio = min(max(1.0*attack/defense,0.25),1.25) #the better the defense, the less damage you take from the mine: 25% to 125% damage of normal mine damage = int(damage * damageRatio) if not damage: return 0,0 #mine did no damage due to low ATT value on mine #do damage: destroyed = 0 blocked = 0 if not ignoreshield and shield > 0: blocked = min(shield, dmg) obj.ships[targetindex][2] -= blocked dmg -= blocked elif ignoreshield and targetShip.hardShield > 0 and shield > 0: blocked = min(shield, int(dmg*(ship.hardShield))) #hard shields also reduce penetrating weapons obj.ships[targetindex][2] -= blocked dmg -= blocked if shield: #mines never pierce shields at this time; possible future expansion of the tech blocked = min(shield, dmg) dmg -= blocked obj.ships[target][2] -= blocked if damage > 0: if hp < damage: damage = hp destroyed = 1 self.cmd(obj).removeShips(tran, obj, [obj.ships[targetindex]]) else: obj.ships[targetindex][1] -= damage return damage + blocked, destroyed | 3bc6072e64f4bd18968d0b060ecfa55e0990bfdc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/503/3bc6072e64f4bd18968d0b060ecfa55e0990bfdc/IFleet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
49,
558,
12,
2890,
16,
13637,
16,
1081,
16,
13843,
16,
302,
301,
410,
16,
9750,
83,
1955,
491,
4672,
7291,
273,
13637,
18,
1966,
63,
2603,
18,
8443,
65,
1018,
1615,
273,
2744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
49,
558,
12,
2890,
16,
13637,
16,
1081,
16,
13843,
16,
302,
301,
410,
16,
9750,
83,
1955,
491,
4672,
7291,
273,
13637,
18,
1966,
63,
2603,
18,
8443,
65,
1018,
1615,
273,
2744,
... |
supported_versions = ['December 28, 2009'] | supported_versions = ['December 28, 2009', 'February 3, 2010'] | def xds_check_version_supported(xds_output_list): '''Check that the XDS version is supported.''' xds_version = _xds_version(xds_output_list) # supported_versions = ['January 30, 2009'] supported_versions = ['December 28, 2009'] if not xds_version in supported_versions: raise RuntimeError, 'XDS version "%s" not supported' % xds_version return | 30b5e6c3188139729e679fe90abd923b80d537ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3290/30b5e6c3188139729e679fe90abd923b80d537ee/XDS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
2377,
67,
1893,
67,
1589,
67,
4127,
12,
92,
2377,
67,
2844,
67,
1098,
4672,
9163,
1564,
716,
326,
1139,
3948,
1177,
353,
3260,
1093,
6309,
225,
619,
2377,
67,
1589,
273,
389,
92,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
2377,
67,
1893,
67,
1589,
67,
4127,
12,
92,
2377,
67,
2844,
67,
1098,
4672,
9163,
1564,
716,
326,
1139,
3948,
1177,
353,
3260,
1093,
6309,
225,
619,
2377,
67,
1589,
273,
389,
92,
... |
if creator: | if creator and creator[0] in metadata['subjects']: | def attribution(subject, metadata): """ Queries a dictionary of triples for cc:attributionName and cc:attributionURL. The result is returned as a tuple where the first element is the attributionName, followed by the attributionURL. """ attrib = { 'attributionName': '', 'attributionURL': '', } if subject not in metadata['subjects']: return attrib attribName= metadata['triples'][subject].get( CC('attributionName'), '') attribURL = metadata['triples'][subject].get( CC('attributionURL'), '') if not attribName: creator = metadata['triples'][subject].get( DCT('creator') ) or \ metadata['triples'][subject].get( DC('creator') ) or \ None if creator: attribName = metadata['triples'][creator[0]].get( FOAF('name'), '') if isinstance(attribName, list): attribName = attribName[0] if isinstance(attribURL, list): attribURL = attribURL[0] attrib['attributionName'] = attribName attrib['attributionURL'] = attribURL return attrib | 06beecfb6f3ad7e64a41f9f7329576051d9c7f18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8280/06beecfb6f3ad7e64a41f9f7329576051d9c7f18/metadata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
622,
4027,
12,
7857,
16,
1982,
4672,
3536,
30189,
279,
3880,
434,
22388,
364,
4946,
30,
270,
4027,
461,
471,
4946,
30,
270,
4027,
1785,
18,
225,
1021,
563,
353,
2106,
487,
279,
3193,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
622,
4027,
12,
7857,
16,
1982,
4672,
3536,
30189,
279,
3880,
434,
22388,
364,
4946,
30,
270,
4027,
461,
471,
4946,
30,
270,
4027,
1785,
18,
225,
1021,
563,
353,
2106,
487,
279,
3193,
1... |
print '%s is in group %s' % (principal.getId(), groups) | def getGroupsForPrincipal(self, principal, request=None): """ get the group information from the REQUEST """ view_name = createViewName('getGroupsForPrincipal', principal.getId()) cached_info = self.ZCacheable_get(view_name) if cached_info is not None: return cached_info groups = [] authUser = self.REQUEST.get('HTTP_EPPN') if authUser and authUser == principal.getId(): #groups = self.REQUEST.get('HTTP_KULPRIMONUMBER') groups = self.REQUEST.get('HTTP_KULOUNUMBER') if groups: groups = groups.split(';') else: return () groups = tuple(groups) print '%s is in group %s' % (principal.getId(), groups) self.ZCacheable_set(groups, view_name) return groups | 94bf14a55a4dd9afb7f738c0d2786175f7e39b64 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5909/94bf14a55a4dd9afb7f738c0d2786175f7e39b64/group.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22708,
1290,
9155,
12,
2890,
16,
8897,
16,
590,
33,
7036,
4672,
3536,
336,
326,
1041,
1779,
628,
326,
12492,
3536,
1476,
67,
529,
273,
15193,
461,
2668,
588,
3621,
1290,
9155,
2187,
8897... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22708,
1290,
9155,
12,
2890,
16,
8897,
16,
590,
33,
7036,
4672,
3536,
336,
326,
1041,
1779,
628,
326,
12492,
3536,
1476,
67,
529,
273,
15193,
461,
2668,
588,
3621,
1290,
9155,
2187,
8897... | |
min_p (int) -- (default: 3) only rule out primes >= min_p | min_p (int) -- (default: 2) only rule out primes >= min_p | def heegner_index(self, D, min_p=3, prec=5, verbose=False): """ Return an interval that contains the SQUARE of the index of the Heegner point in the group of K-rational points *modulo torsion* on the twist of the elliptic curve by D, computed using the Gross-Zagier formula and/or a point search. WARNING: This function uses the Gross-Zagier formula. When E is 681b and D=-8 for some reason the returned index is 9/4 which is off by a factor of 4. Evidently the GZ formula must be modified when D=-8. | ec46237b70e6978cb860cb30693db5cfe4292f94 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ec46237b70e6978cb860cb30693db5cfe4292f94/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3904,
1332,
1224,
67,
1615,
12,
2890,
16,
463,
16,
225,
1131,
67,
84,
33,
23,
16,
13382,
33,
25,
16,
3988,
33,
8381,
4672,
3536,
2000,
392,
3673,
716,
1914,
326,
348,
17483,
434,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3904,
1332,
1224,
67,
1615,
12,
2890,
16,
463,
16,
225,
1131,
67,
84,
33,
23,
16,
13382,
33,
25,
16,
3988,
33,
8381,
4672,
3536,
2000,
392,
3673,
716,
1914,
326,
348,
17483,
434,
326... |
origins.append([center[0], center[1], sz[i]/dar[2]]) | origins.append([center[0], center[1], sz[i]]) | def _add_slices(self, item, sgrid, contours=False): cvector = item.get('cvector') center = sgrid.GetCenter() dar = self._axis.get('daspect') sx, sy, sz = item.get('slices') if len(shape(sx)) == 2 and shape(sx) == shape(sy) == shape(sz): s = Surface(sx,sy,sz) sgrid2 = self._get_2d_structured_grid(s) plane = vtk.vtkStructuredGridGeometryFilter() plane.SetInput(sgrid2) plane.Update() data = self._cut_data(plane) implds = vtk.vtkImplicitDataSet() implds.SetDataSet(data.GetOutput()) implds.Modified() cut = vtk.vtkCutter() cut.SetInput(sgrid) cut.SetCutFunction(implds) cut.GenerateValues(10, -2,2) cut.GenerateCutScalarsOn() cut.Update() mapper = vtk.vtkPolyDataMapper() mapper.SetInput(cut.GetOutput()) mapper.SetLookupTable(self._axis._vtk_colormap) caxis = self._axis.get('caxis') if None in caxis: caxis = data.GetOutput().GetScalarRange() mapper.SetScalarRange(caxis) mapper.Update() actor = vtk.vtkActor() actor.SetMapper(mapper) self._set_shading(item, data, actor) self._set_actor_properties(item, actor) self._axis._renderer.AddActor(actor) self._axis._vtk_apd.AddInput(cut.GetOutput()) self._axis._vtk_apd.AddInput(data.GetOutput()) else: origins = [] normals = [] sx = ravel(sx)/dar[0] sy = ravel(sy)/dar[1] sz = ravel(sz)/dar[2] for i in range(len(sx)): normals.append([1,0,0]) origins.append([sx[i]/dar[0], center[1], center[2]]) for i in range(len(sy)): normals.append([0,1,0]) origins.append([center[0], sy[i]/dar[1], center[2]]) for i in range(len(sz)): normals.append([0,0,1]) origins.append([center[0], center[1], sz[i]/dar[2]]) for i in range(len(normals)): plane = vtk.vtkPlane() plane.SetOrigin(origins[i]) plane.SetNormal(normals[i]) cut = vtk.vtkCutter() cut.SetInput(sgrid) cut.SetCutFunction(plane) cut.Update() data = self._cut_data(cut) mapper = vtk.vtkPolyDataMapper() if contours: iso = vtk.vtkContourFilter() iso.SetInput(data.GetOutput()) if cvector is not None: for i in range(len(cvector)): iso.SetValue(i, cvector[i]) else: zmin, zmax = data.GetOutput().GetScalarRange() iso.GenerateValues(item.get('clevels'), zmin, zmax) iso.Update() mapper.SetInput(iso.GetOutput()) else: mapper.SetInput(data.GetOutput()) mapper.SetLookupTable(self._axis._vtk_colormap) caxis = self._axis.get('caxis') if None in caxis: caxis = sgrid.GetScalarRange() mapper.SetScalarRange(caxis) mapper.Update() actor = vtk.vtkActor() actor.SetMapper(mapper) if not contours: self._set_shading(item, data, actor) self._set_actor_properties(item, actor) self._axis._renderer.AddActor(actor) self._axis._vtk_apd.AddInput(cut.GetOutput()) | 8c9ac01e2abd6033fd126340689a7f8bfe3e4050 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4727/8c9ac01e2abd6033fd126340689a7f8bfe3e4050/vtk_.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
21562,
12,
2890,
16,
761,
16,
272,
5222,
16,
28109,
33,
8381,
4672,
276,
7737,
273,
761,
18,
588,
2668,
71,
7737,
6134,
4617,
273,
272,
5222,
18,
967,
8449,
1435,
302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1289,
67,
21562,
12,
2890,
16,
761,
16,
272,
5222,
16,
28109,
33,
8381,
4672,
276,
7737,
273,
761,
18,
588,
2668,
71,
7737,
6134,
4617,
273,
272,
5222,
18,
967,
8449,
1435,
302,
... |
todo = regimes[j].guess_action(j, tests[j], guess, actual, msg) | todo = rules[j].guess_action(j, tests[j], guess, actual, msg) | def main(): group_action = None guess_action = None regime = "perfect" which = None opts, args = getopt.getopt(sys.argv[1:], 's:r:', ['help', 'examples']) for opt, arg in opts: if opt == '-s': which = int(arg) - 1 if opt == '-r': regime = arg nsets = len(glob.glob("Data/Ham/Set*")) files = glob.glob("Data/*/Set*/*") files.sort(lambda a,b: cmp(os.path.basename(a), os.path.basename(b))) tests = [] regimes = [] nham_tested = [] nham_trained = [] nham_right = [] nham_wrong = [] nham_unsure = [] nspam_tested = [] nspam_trained = [] nspam_right = [] nspam_wrong = [] nspam_unsure = [] for j in range(0, nsets): # if which is not None and j != which: # continue tests.append(Test(classifier.Bayes())) exec """regimes.append(regimes.%s())""" % (regime) in globals(), locals() nham_tested.append([]) nham_trained.append([]) nham_right.append([]) nham_wrong.append([]) nham_unsure.append([]) nspam_tested.append([]) nspam_trained.append([]) nspam_right.append([]) nspam_wrong.append([]) nspam_unsure.append([]) oldgroup = 0 for f in files: base = os.path.basename(f) group = int(base.split('-')[0]); dir = os.path.dirname(f) set = os.path.basename(dir) set = int(set[3:]) - 1 isspam = (dir.find('Spam') >= 0) sys.stderr.write("%-78s\r" % ("%s : %d" % (base, set))) sys.stderr.flush() msg = msgs.Msg(dir, base) for j in range(0, nsets): if which is not None and j != which: continue if group != oldgroup: nham_tested[j].append(tests[j].nham_tested) nham_trained[j].append(tests[j].nham_trained) nham_right[j].append(tests[j].nham_right) nham_wrong[j].append(tests[j].nham_wrong) nham_unsure[j].append(tests[j].nham_unsure) nspam_tested[j].append(tests[j].nspam_tested) nspam_trained[j].append(tests[j].nspam_trained) nspam_right[j].append(tests[j].nspam_right) nspam_wrong[j].append(tests[j].nspam_wrong) nspam_unsure[j].append(tests[j].nspam_unsure) # tests[j].reset_test_results() regimes[j].group_action(j, tests[j]) if j != set: guess = tests[j].predict([msg], isspam) if isspam: actual = -1 else: actual = 1 todo = regimes[j].guess_action(j, tests[j], guess, actual, msg) if todo == -1: tests[j].train(None, [msg]) elif todo == 1: tests[j].train([msg], None) oldgroup = group sys.stderr.write("\n") sys.stderr.flush() for j in range(0, nsets): if which is not None and j != which: continue nham_tested[j].append(tests[j].nham_tested) nham_trained[j].append(tests[j].nham_trained) nham_right[j].append(tests[j].nham_right) nham_wrong[j].append(tests[j].nham_wrong) nham_unsure[j].append(tests[j].nham_unsure) nspam_tested[j].append(tests[j].nspam_tested) nspam_trained[j].append(tests[j].nspam_trained) nspam_right[j].append(tests[j].nspam_right) nspam_wrong[j].append(tests[j].nspam_wrong) nspam_unsure[j].append(tests[j].nspam_unsure) for j in range(0, nsets): if which is not None and j != which: continue print 'Set %d' % (j + 1) for k in range(0, len(nham_tested[j])): print '%d %d %d %d %d %d %d %d %d %d' % ( nham_tested[j][k], nham_trained[j][k], nham_right[j][k], nham_wrong[j][k], nham_unsure[j][k], nspam_tested[j][k], nspam_trained[j][k], nspam_right[j][k], nspam_wrong[j][k], nspam_unsure[j][k] ) print print '$ end' | 66a0456175d6d527468ebe9206962ba2e6f49635 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/66a0456175d6d527468ebe9206962ba2e6f49635/incremental.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1041,
67,
1128,
273,
599,
7274,
67,
1128,
273,
599,
225,
960,
494,
273,
315,
19825,
386,
6,
1492,
273,
599,
225,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1041,
67,
1128,
273,
599,
7274,
67,
1128,
273,
599,
225,
960,
494,
273,
315,
19825,
386,
6,
1492,
273,
599,
225,
1500,
16,
833,
273,
336,
3838,
18,
588,
3838,
12,
9499,
... |
positions where we can remove a box. | positions where we can remove a box. Indices are of the form [i,j] where i is the row-index and j is the column-index, and are 0-based. | def corners(self): """ Returns a list of the corners of the partitions. These are the positions where we can remove a box. | 4f1a7624d729b435a08de3ec20b5fdfc1c38db63 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/4f1a7624d729b435a08de3ec20b5fdfc1c38db63/partition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
18398,
12,
2890,
4672,
3536,
2860,
279,
666,
434,
326,
18398,
434,
326,
10060,
18,
225,
8646,
854,
326,
6865,
1625,
732,
848,
1206,
279,
3919,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
18398,
12,
2890,
4672,
3536,
2860,
279,
666,
434,
326,
18398,
434,
326,
10060,
18,
225,
8646,
854,
326,
6865,
1625,
732,
848,
1206,
279,
3919,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
rcv = getrc(defns) | rcv = getrc(defns) | def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, getFont, registerFont, _fonts from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Vera' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "Vera.ttf")) ttf = getFont(ttfn) t1f = getFont(t1fn) testCp1252 = 'copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9)) enc='cp1252' senc = 'utf8' intern(senc) ts = 'ABCDEF\xce\x91\xce\xb2G' utext = 'ABCDEF\xce\x91\xce\xb2G'.decode('utf8') fontSize = 12 defns="ttfn t1fn ttf t1f testCp1252 enc senc ts utext fontSize ttf.face ttf.face.charWidths ttf.face.defaultWidth t1f.widths t1f.encName t1f.substitutionFonts _fonts" rcv = getrc(defns) def tfunc(ts,fn,fontSize,enc): w1 = stringWidthU(ts,fn,fontSize,enc) w2 = _py_stringWidth(ts,fn,fontSize,enc) assert abs(w1-w2)<1e-10,"stringWidthU(%r,%r,%s,%r)-->%r != _py_stringWidth(...)-->%r" % (ts,fn,fontSize,enc,w1,w2) tfunc(testCp1252,t1fn,fontSize,enc) tfunc(ts,t1fn,fontSize,senc) tfunc(utext,t1fn,fontSize,senc) tfunc(ts,ttfn,fontSize,senc) tfunc(testCp1252,ttfn,fontSize,enc) tfunc(utext,ttfn,fontSize,senc) rcc = checkrc(defns,rcv) assert not rcc, "rc diffs (%s)" % rcc | f8a8b45252d21d93748d03c43fbe21bf1817b8d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3878/f8a8b45252d21d93748d03c43fbe21bf1817b8d1/test_rl_accel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
780,
2384,
12,
2890,
4672,
628,
389,
1321,
67,
30737,
1930,
533,
2384,
57,
628,
2605,
7411,
18,
7699,
1969,
18,
7699,
9597,
1930,
389,
2074,
67,
1080,
2384,
16,
18776,
16,
1744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
780,
2384,
12,
2890,
4672,
628,
389,
1321,
67,
30737,
1930,
533,
2384,
57,
628,
2605,
7411,
18,
7699,
1969,
18,
7699,
9597,
1930,
389,
2074,
67,
1080,
2384,
16,
18776,
16,
1744,
... |
tcord = C8 | if board.variant == FISCHERRANDOMCHESS: tcord = board.ini_rooks[1][0] else: tcord = C8 | def parseSAN (board, san): """ Parse a Short/Abbreviated Algebraic Notation string """ if not san: raise ParsingError, (san, _("the move is an empty string"), board.asFen()) elif len(san) < 2: raise ParsingError, (san, _("the move is too short"), board.asFen()) notat = san color = board.color if notat[-1] in ("+", "#"): notat = notat[:-1] flag = NORMAL_MOVE # If last char is a piece char, we assue it the promote char c = notat[-1].lower() if c in chr2Sign: flag = chr2Sign[c] + 2 if notat[-2] == "=": notat = notat[:-2] else: notat = notat[:-1] if len(notat) < 2: raise ParsingError, (san, _("the move needs a piece and a cord"), board.asFen()) notat = notat.replace("0","O").replace("o","O") if notat.startswith("O-O"): if color == WHITE: fcord = board.ini_kings[0] #E1 if notat == "O-O": flag = KING_CASTLE tcord = G1 else: flag = QUEEN_CASTLE tcord = C1 else: fcord = board.ini_kings[1] #E8 if notat == "O-O": flag = KING_CASTLE tcord = G8 else: flag = QUEEN_CASTLE tcord = C8 return newMove (fcord, tcord, flag) if notat[0] in ("Q", "R", "B", "K", "N"): piece = chr2Sign[notat[0].lower()] notat = notat[1:] else: piece = PAWN if "x" in notat: notat, tcord = notat.split("x") if not tcord in cordDic: raise ParsingError, ( san, _("the captured cord (%s) is incorrect") % tcord, board.asFen()) tcord = cordDic[tcord] if piece == PAWN: # If a pawn is attacking an empty cord, we assue it an enpassant if board.arBoard[tcord] == EMPTY: flag = ENPASSANT else: if not notat[-2:] in cordDic: raise ParsingError, ( san, "the end cord (%s) is incorrect" % notat[-2:], board.asFen()) tcord = cordDic[notat[-2:]] notat = notat[:-2] # If there is any extra location info, like in the move Bexd1 or Nh3f4 we # want to know frank = None ffile = None if notat and notat[0] in reprRank: frank = int(notat[0])-1 notat = notat[1:] if notat and notat[0] in reprFile: ffile = ord(notat[0]) - ord("a") notat = notat[1:] if notat and notat[0] in reprRank: frank = int(notat[0])-1 notat = notat[1:] # We find all pieces who could have done it. (If san was legal, there should # never be more than one) from lmovegen import genAllMoves for move in genAllMoves(board): if TCORD(move) != tcord: continue f = FCORD(move) if board.arBoard[f] != piece: continue if frank != None and frank != RANK(f): continue if ffile != None and ffile != FILE(f): continue if flag in PROMOTIONS and FLAG(move) != flag: continue board_clone = board.clone() board_clone.applyMove(move) if board_clone.opIsChecked(): continue return move errstring = "no %s is able to move to %s" % (reprPiece[piece], reprCord[tcord]) raise ParsingError, (san, errstring, board.asFen()) | a58b8aedb826b5e26dcb0cdef804c589b245a636 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5339/a58b8aedb826b5e26dcb0cdef804c589b245a636/lmove.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
22721,
261,
3752,
16,
272,
304,
4672,
3536,
2884,
279,
7925,
19,
11945,
2262,
29087,
335,
2288,
367,
533,
3536,
309,
486,
272,
304,
30,
1002,
19761,
668,
16,
261,
87,
304,
16,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22721,
261,
3752,
16,
272,
304,
4672,
3536,
2884,
279,
7925,
19,
11945,
2262,
29087,
335,
2288,
367,
533,
3536,
309,
486,
272,
304,
30,
1002,
19761,
668,
16,
261,
87,
304,
16,
38... |
self.zip_path = str(zip_file) | self.zip_path = str(zip_file) | def __init__(self, zip_file, mode="r", compression="deflated", allow_zip_64=False, encoding="CP437", thread_synchronize=True): """Create a FS that maps on to a zip file. | 087e40af7d766a4d399d31c3c4a6d0dc24c00ce5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/087e40af7d766a4d399d31c3c4a6d0dc24c00ce5/zipfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3144,
67,
768,
16,
1965,
1546,
86,
3113,
9154,
1546,
536,
80,
690,
3113,
1699,
67,
4450,
67,
1105,
33,
8381,
16,
2688,
1546,
4258,
24,
6418,
3113,
2650,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3144,
67,
768,
16,
1965,
1546,
86,
3113,
9154,
1546,
536,
80,
690,
3113,
1699,
67,
4450,
67,
1105,
33,
8381,
16,
2688,
1546,
4258,
24,
6418,
3113,
2650,
... |
sales=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],] for obj in self.browse(cr, uid, ids): periods =obj.analyzed_period1_id, obj.analyzed_period2_id, obj.analyzed_period3_id, obj.analyzed_period4_id, obj.analyzed_period5_id | sales = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],] for obj in self.browse(cr, uid, ids): periods = obj.analyzed_period1_id, obj.analyzed_period2_id, obj.analyzed_period3_id, obj.analyzed_period4_id, obj.analyzed_period5_id | def calculate_sales_history(self, cr, uid, ids, context, *args): sales=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],] for obj in self.browse(cr, uid, ids): periods =obj.analyzed_period1_id, obj.analyzed_period2_id, obj.analyzed_period3_id, obj.analyzed_period4_id, obj.analyzed_period5_id so_obj = self.pool.get('sale.order') so_line_obj= self.pool.get('sale.order.line') so_line_product_ids = so_line_obj.search(cr, uid, [('product_id','=', obj.product_id.id)], context = context) if so_line_product_ids: so_line_product_set = ','.join(map(str,so_line_product_ids)) if obj.analyzed_warehouse_id: shops = self.pool.get('sale.shop').search(cr, uid,[('warehouse_id','=', obj.analyzed_warehouse_id.id)], context = context) shops_set = ','.join(map(str,shops)) else: shops = False if obj.analyzed_dept_id: dept_obj = self.pool.get('hr.department') dept_id = obj.analyzed_dept_id.id and [obj.analyzed_dept_id.id] or [] dept_ids = dept_obj.search(cr,uid,[('parent_id','child_of',dept_id)]) | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
67,
87,
5408,
67,
8189,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
16,
380,
1968,
4672,
272,
5408,
273,
12167,
20,
16,
20,
16,
20,
16,
20,
6487,
63,
20,
16,
20,
16,
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,
4604,
67,
87,
5408,
67,
8189,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
16,
380,
1968,
4672,
272,
5408,
273,
12167,
20,
16,
20,
16,
20,
16,
20,
6487,
63,
20,
16,
20,
16,
2... |
evt = wxSizeEvent(ctrl.GetSize()) evt.SetId(ctrl.GetId()) wxPostEvent(ctrl, evt) | sizer = ctrl.GetSizer() if sizer: sizer.Layout() wxPostEvent(ctrl, wxSizeEvent(ctrl.GetSize(), ctrl.GetId())) wxCallAfter(ctrl.Refresh) | def relayoutCtrl(self, ctrl): self.forceResize = true # cleared by the event evt = wxSizeEvent(ctrl.GetSize()) evt.SetId(ctrl.GetId()) wxPostEvent(ctrl, evt) | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1279,
2012,
12418,
12,
2890,
16,
6414,
4672,
365,
18,
5734,
12182,
273,
638,
468,
16054,
635,
326,
871,
6324,
273,
7075,
1225,
1133,
12,
16277,
18,
967,
1225,
10756,
6324,
18,
18523,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1279,
2012,
12418,
12,
2890,
16,
6414,
4672,
365,
18,
5734,
12182,
273,
638,
468,
16054,
635,
326,
871,
6324,
273,
7075,
1225,
1133,
12,
16277,
18,
967,
1225,
10756,
6324,
18,
18523,
12,... |
self.query = query.strip("'").strip('"') | self.query = query.strip("'").strip('"').__str__() | def __init__(self, entity, query, key): self.entity = entity self.query = query.strip("'").strip('"') self.key = key | ff6f3d1235bd473d76ca06a22e835c9a9e49a04c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1104/ff6f3d1235bd473d76ca06a22e835c9a9e49a04c/cmts_extras.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1522,
16,
843,
16,
498,
4672,
365,
18,
1096,
273,
1522,
365,
18,
2271,
273,
843,
18,
6406,
2932,
4970,
2934,
6406,
2668,
5187,
2934,
972,
701,
972,
1435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1522,
16,
843,
16,
498,
4672,
365,
18,
1096,
273,
1522,
365,
18,
2271,
273,
843,
18,
6406,
2932,
4970,
2934,
6406,
2668,
5187,
2934,
972,
701,
972,
1435,... |
if process and not isinstance(file, mak.sources.hsource): | if process and file.process and not isinstance(file, mak.sources.hsource): | def pbxBuildTree(self, tree, process): w = self.file.write tree.id = newid() for name,dir in tree.directories.iteritems(): self.pbxBuildTree(dir, process) for file in tree.files: file.id = newid() file.buildid = newid() if process and not isinstance(file, mak.sources.hsource): w("\t%s = { isa = PBXBuildFile; fileRef = %s; };\n" % (file.buildid, file.id)) | c73f2456ec51b2b4797d870c08f234ed68da574a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/c73f2456ec51b2b4797d870c08f234ed68da574a/xcode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6386,
92,
3116,
2471,
12,
2890,
16,
2151,
16,
1207,
4672,
341,
273,
365,
18,
768,
18,
2626,
2151,
18,
350,
273,
394,
350,
1435,
364,
508,
16,
1214,
316,
2151,
18,
15121,
18,
2165,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6386,
92,
3116,
2471,
12,
2890,
16,
2151,
16,
1207,
4672,
341,
273,
365,
18,
768,
18,
2626,
2151,
18,
350,
273,
394,
350,
1435,
364,
508,
16,
1214,
316,
2151,
18,
15121,
18,
2165,
33... |
if byterange is not None: report.add_header(byterange) | if byterange is None: fro = 1 total = len(chunk.data) else: fro, to, total = byterange.decoded byterange = ByteRangeHeader((fro, fro+len(chunk.data)-1, total)) report.add_header(byterange) | def _handle_incoming_SEND(self, chunk): error = self._check_incoming_SEND(chunk) if error is None: code, comment = 200, 'OK' else: code, comment = error.code, error.comment if chunk.final: response = make_response(chunk, code, comment) if response is not None: self.outgoing.send((response, None)) if code==200: self._on_incoming_cb(chunk) if chunk.final and chunk.success_report=='yes': report = self.msrp.make_chunk(method='REPORT', message_id=chunk.message_id) report.add_header(StatusHeader('000 200 OK')) byterange = chunk.headers.get('Byte-Range') if byterange is not None: report.add_header(byterange) self.outgoing.send((report, None)) | 21b2ba4a5116fac8a630015209e65fa911811214 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3444/21b2ba4a5116fac8a630015209e65fa911811214/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
31033,
67,
21675,
12,
2890,
16,
2441,
4672,
555,
273,
365,
6315,
1893,
67,
31033,
67,
21675,
12,
6551,
13,
309,
555,
353,
599,
30,
981,
16,
2879,
273,
4044,
16,
296,
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,
389,
4110,
67,
31033,
67,
21675,
12,
2890,
16,
2441,
4672,
555,
273,
365,
6315,
1893,
67,
31033,
67,
21675,
12,
6551,
13,
309,
555,
353,
599,
30,
981,
16,
2879,
273,
4044,
16,
296,
3... |
self.socket = socket.socket (family, type) | self.socket = socket.socket(family, type) | def create_socket (self, family, type): self.family_and_type = family, type self.socket = socket.socket (family, type) self.socket.setblocking(0) self._fileno = self.socket.fileno() self.add_channel() | 52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
7814,
261,
2890,
16,
6755,
16,
618,
4672,
365,
18,
9309,
67,
464,
67,
723,
273,
6755,
16,
618,
365,
18,
7814,
273,
2987,
18,
7814,
12,
9309,
16,
618,
13,
365,
18,
7814,
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,
752,
67,
7814,
261,
2890,
16,
6755,
16,
618,
4672,
365,
18,
9309,
67,
464,
67,
723,
273,
6755,
16,
618,
365,
18,
7814,
273,
2987,
18,
7814,
12,
9309,
16,
618,
13,
365,
18,
7814,
18... |
LOG('Zope', ERROR, 'A problem was found in the global product registry but ' 'the attempt to rebuild the registry failed.', | LOG('Zope', ERROR, 'The attempt to rebuild the registry failed.', | def initialize(app): # Initialize the application # Initialize the cache: app.Control_Panel.initialize_cache() # The following items marked b/c are backward compatibility hacks # which make sure that expected system objects are added to the # bobobase. This is required because the bobobase in use may pre- # date the introduction of certain system objects such as those # which provide Lever support. # b/c: Ensure that Control Panel exists. if not hasattr(app, 'Control_Panel'): cpl=ApplicationManager() cpl._init() app._setObject('Control_Panel', cpl) get_transaction().note('Added Control_Panel') get_transaction().commit() # b/c: Ensure that a ProductFolder exists. if not hasattr(app.Control_Panel.aq_base, 'Products'): app.Control_Panel.Products=App.Product.ProductFolder() get_transaction().note('Added Control_Panel.Products') get_transaction().commit() # b/c: Ensure that std err msg exists. if not hasattr(app, 'standard_error_message'): import Document Document.manage_addDocument( app, 'standard_error_message', 'Standard Error Message', _standard_error_msg) get_transaction().note('Added standard_error_message') get_transaction().commit() # b/c: Ensure that Owner role exists. if hasattr(app, '__ac_roles__') and not ('Owner' in app.__ac_roles__): app.__ac_roles__=app.__ac_roles__ + ('Owner',) get_transaction().note('Added Owner role') get_transaction().commit() # ensure the Authenticated role exists. if hasattr(app, '__ac_roles__'): if not 'Authenticated' in app.__ac_roles__: app.__ac_roles__=app.__ac_roles__ + ('Authenticated',) get_transaction().note('Added Authenticated role') get_transaction().commit() # Make sure we have Globals root=app._p_jar.root() if not root.has_key('ZGlobals'): import BTree app._p_jar.root()['ZGlobals']=BTree.BTree() get_transaction().note('Added Globals') get_transaction().commit() # Install the initial user. if hasattr(app, 'acl_users'): users = app.acl_users if hasattr(users, '_createInitialUser'): app.acl_users._createInitialUser() get_transaction().note('Created initial user') get_transaction().commit() install_products(app) # Note that the code from here on only runs if we are not a ZEO # client, or if we are a ZEO client and we've specified by way # of env variable that we want to force products to load. if (os.environ.get('ZEO_CLIENT') and not os.environ.get('FORCE_PRODUCT_LOAD')): return # Check for dangling pointers (broken zclass dependencies) in the # global class registry. If found, rebuild the registry. Note that # if the check finds problems but fails to successfully rebuild the # registry we abort the transaction so that we don't leave it in an # indeterminate state. did_fixups=0 bad_things=0 try: if app.checkGlobalRegistry(): app.fixupZClassDependencies(rebuild=1) did_fixups=1 LOG('Zope', INFO, 'A broken ZClass dependency was found in the global ' \ 'class registry. This is probably due to a product ' \ 'being uninstalled. The registry has successfully ' \ 'been rebuilt.') get_transaction().note('Rebuilt global product registry') get_transaction().commit() except: bad_things=1 LOG('Zope', ERROR, 'A problem was found in the global product registry but ' 'the attempt to rebuild the registry failed.', error=sys.exc_info()) get_transaction().abort() # Now we need to see if any (disk-based) products were installed # during intialization. If so (and the registry has no errors), # there may still be zclasses dependent on a base class in the # newly installed product that were previously broken and need to # be fixed up. If any really Bad Things happened (dangling pointers # were found in the registry but it couldn't be rebuilt), we don't # try to do anything to avoid making the problem worse. if (not did_fixups) and (not bad_things): # App.Product.initializeProduct will set this if a disk-based # product was added or updated and we are not a ZEO client. if getattr(Globals, '__disk_product_installed__', 0): try: if app.fixupZClassDependencies(): get_transaction().commit() except: LOG('Zope', ERROR, 'Attempt to fixup ZClass dependencies after detecting ' \ 'an updated disk-based product failed.', error=sys.exc_info()) get_transaction().abort() | b3cbcc17ebb543bd146fa427d70436119a037aed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b3cbcc17ebb543bd146fa427d70436119a037aed/Application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2910,
4672,
468,
9190,
326,
2521,
225,
468,
9190,
326,
1247,
30,
595,
18,
3367,
67,
5537,
18,
11160,
67,
2493,
1435,
225,
468,
1021,
3751,
1516,
9350,
324,
19,
71,
854,
12555... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2910,
4672,
468,
9190,
326,
2521,
225,
468,
9190,
326,
1247,
30,
595,
18,
3367,
67,
5537,
18,
11160,
67,
2493,
1435,
225,
468,
1021,
3751,
1516,
9350,
324,
19,
71,
854,
12555... |
self.description = inspect.getdoc() | self.description = inspect.getdoc(self) | def __init__(self, bytes = None, timestamp = None): """initialize an ARP packet""" hrd = pcs.Field("hrd", 16, default = 1) pro = pcs.Field("pro", 16, default = 0x800) hln = pcs.Field("hln", 8, default = 6) pln = pcs.Field("pln", 8, default = 4) op = pcs.Field("op", 16) sha = pcs.StringField("sha", 48) spa = pcs.Field("spa", 32) tha = pcs.StringField("tha", 48) tpa = pcs.Field("tpa", 32) pcs.Packet.__init__(self, [hrd, pro, hln, pln, op, sha, spa, tha, tpa], bytes = bytes) self.description = inspect.getdoc() if timestamp == None: self.timestamp = time.time() else: self.timestamp = timestamp | 1fd8e1517da2ce604715010ba726451f08aabefc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5910/1fd8e1517da2ce604715010ba726451f08aabefc/arp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1731,
273,
599,
16,
2858,
273,
599,
4672,
3536,
11160,
392,
6052,
52,
4414,
8395,
366,
13623,
273,
31353,
18,
974,
2932,
7256,
72,
3113,
2872,
16,
805,
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,
1001,
2738,
972,
12,
2890,
16,
1731,
273,
599,
16,
2858,
273,
599,
4672,
3536,
11160,
392,
6052,
52,
4414,
8395,
366,
13623,
273,
31353,
18,
974,
2932,
7256,
72,
3113,
2872,
16,
805,
2... |
_nmtoken_rx = re.compile("[a-z][-._a-z0-9]*", re.IGNORECASE) | _nmtoken_rx = re.compile("[a-z][-._a-z0-9]*$", re.IGNORECASE) | def format_attrs(attrs, xml=0): attrs = attrs.items() attrs.sort() s = '' for name, value in attrs: if xml: s = '%s %s="%s"' % (s, name, escape(value)) else: # this is a little bogus, but should do for now if name == value and isnmtoken(value): s = "%s %s" % (s, value) elif istoken(value): s = "%s %s=%s" % (s, name, value) else: s = '%s %s="%s"' % (s, name, escape(value)) return s | 861788e1fb16ae0a8962842904084cfd11d581d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/861788e1fb16ae0a8962842904084cfd11d581d6/esis2sgml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
7039,
12,
7039,
16,
2025,
33,
20,
4672,
3422,
273,
3422,
18,
3319,
1435,
3422,
18,
3804,
1435,
272,
273,
875,
364,
508,
16,
460,
316,
3422,
30,
309,
2025,
30,
272,
273,
1995... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
7039,
12,
7039,
16,
2025,
33,
20,
4672,
3422,
273,
3422,
18,
3319,
1435,
3422,
18,
3804,
1435,
272,
273,
875,
364,
508,
16,
460,
316,
3422,
30,
309,
2025,
30,
272,
273,
1995... |
text = text.replace('\03{default}', chr(27) + '[0m') | text += unixColors['default'] | def printColorizedInUnix(self, text, targetStream): lastColor = None for key, value in unixColors.iteritems(): text = text.replace('\03{%s}' % key, value) text = text.replace('\03{default}', chr(27) + '[0m') # Unix end tag to switch back to default targetStream.write(text.encode(config.console_encoding, 'replace')) | 7d2f509015662db45777ca6afbf5904c6568fc24 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/7d2f509015662db45777ca6afbf5904c6568fc24/terminal_interface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
2957,
1235,
382,
18729,
12,
2890,
16,
977,
16,
1018,
1228,
4672,
1142,
2957,
273,
599,
364,
498,
16,
460,
316,
9753,
12570,
18,
2165,
3319,
13332,
977,
273,
977,
18,
2079,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1172,
2957,
1235,
382,
18729,
12,
2890,
16,
977,
16,
1018,
1228,
4672,
1142,
2957,
273,
599,
364,
498,
16,
460,
316,
9753,
12570,
18,
2165,
3319,
13332,
977,
273,
977,
18,
2079,
2668,
... |
This is the normal interface: it return a stripped | This is the normal interface: it returns a stripped | def getheader(self, name, default=None): """Get the header value for a name. This is the normal interface: it return a stripped version of the header value for a given header name, or None if it doesn't exist. This uses the dictionary version which finds the *last* such header. """ try: return self.dict[string.lower(name)] except KeyError: return default | 07ff2c4a9eb5a48789fa8eca55ea6b2bf0d4a7d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/07ff2c4a9eb5a48789fa8eca55ea6b2bf0d4a7d2/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
3374,
12,
2890,
16,
508,
16,
805,
33,
7036,
4672,
3536,
967,
326,
1446,
460,
364,
279,
508,
18,
225,
1220,
353,
326,
2212,
1560,
30,
518,
1135,
279,
13300,
1177,
434,
326,
1446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3374,
12,
2890,
16,
508,
16,
805,
33,
7036,
4672,
3536,
967,
326,
1446,
460,
364,
279,
508,
18,
225,
1220,
353,
326,
2212,
1560,
30,
518,
1135,
279,
13300,
1177,
434,
326,
1446,
... |
buildscript.execute([perl, 'Makefile.PL', 'INSTALLDIRS=vendor'], cwd=builddir) | cmd = '%s Makefile.PL INSTALLDIRS=vendor PREFIX=%s %s' % (perl, buildscript.config.prefix, self.makeargs) buildscript.execute(cmd, cwd=builddir) | def do_build(self, buildscript): buildscript.set_action('Building', self) builddir = self.get_builddir(buildscript) perl = os.environ.get('PERL', 'perl') make = os.environ.get('MAKE', 'make') buildscript.execute([perl, 'Makefile.PL', 'INSTALLDIRS=vendor'], cwd=builddir) buildscript.execute([make, 'LD_RUN_PATH='], cwd=builddir) | 77c98b4125c6f704d379627f680d8950fb788e75 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4596/77c98b4125c6f704d379627f680d8950fb788e75/perl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3510,
12,
2890,
16,
1361,
4263,
4672,
1361,
4263,
18,
542,
67,
1128,
2668,
16713,
2187,
365,
13,
25666,
330,
449,
481,
273,
365,
18,
588,
67,
70,
89,
330,
449,
481,
12,
3510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
3510,
12,
2890,
16,
1361,
4263,
4672,
1361,
4263,
18,
542,
67,
1128,
2668,
16713,
2187,
365,
13,
25666,
330,
449,
481,
273,
365,
18,
588,
67,
70,
89,
330,
449,
481,
12,
3510... |
self.self.inaccuracy = 2 | self.inaccuracy = 2 | def __init__(self): Weapon.__init__(self) self.damagePiercing = 2 self.damageRadius = 2 self.groundBlocked = True self.self.inaccuracy = 2 self.damage = 5 self.speed = 9.0 self.numDeathFrames = 1 self.deathAnim = "ObjPic_Bullet_Small" self.numFrames = 1 self.graphic = "ObjPic_Bullet_Small" | 86a12b2f159790ed2a935549f27b8bf09a3111eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1596/86a12b2f159790ed2a935549f27b8bf09a3111eb/weapons.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
1660,
28629,
16186,
2738,
972,
12,
2890,
13,
365,
18,
72,
301,
410,
52,
2453,
2822,
273,
576,
365,
18,
72,
301,
410,
10196,
273,
576,
365,
18,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
1660,
28629,
16186,
2738,
972,
12,
2890,
13,
365,
18,
72,
301,
410,
52,
2453,
2822,
273,
576,
365,
18,
72,
301,
410,
10196,
273,
576,
365,
18,
2915,
... |
label_angle += pi pos = self.xcenter+btm*sinval coslabel = cos(label_angle) sinlabel = sin(label_angle) labelgroup.transform = (coslabel,-sinlabel,sinlabel,coslabel, pos, self.ycenter+btm*cosval) else: if startangle > pi: labelgroup.contents[0].textAnchor='end' sinval, cosval = endsin, endcos else: label_angle += pi | label_angle = endangle - 0.5 * pi else : labelgroup.contents[0].textAnchor = 'end' | def get_feature_sigil(self, feature, locstart, locend, **kwargs): """ get_feature_sigil(self, feature, x0, x1, fragment) -> (element, element) | dedeae7a3f401727837b708621fe055cde80c497 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/dedeae7a3f401727837b708621fe055cde80c497/_CircularDrawer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7238,
67,
7340,
330,
12,
2890,
16,
2572,
16,
1515,
1937,
16,
1515,
409,
16,
2826,
4333,
4672,
3536,
336,
67,
7238,
67,
7340,
330,
12,
2890,
16,
2572,
16,
619,
20,
16,
619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7238,
67,
7340,
330,
12,
2890,
16,
2572,
16,
1515,
1937,
16,
1515,
409,
16,
2826,
4333,
4672,
3536,
336,
67,
7238,
67,
7340,
330,
12,
2890,
16,
2572,
16,
619,
20,
16,
619,
... |
atomsScheduledForDeletion = [] | atomsScheduledForDeletionDict = {} | def _remove_bases_from_duplex(self, group, resizeEndAxisAtom, numberOfBasePairsToRemove): """ AVAILABLE AS A DEBUG PREFERENCE ONLY AS OF 2008-03-27. Will be cleaned up further. Remove the spcified number of base pairs from the duplex. @param group: The DnaGroup which contains this duplex @type group: DnaGroup @param resizeEndAxisAtom: The end axis base atom at a DnaLadder end of the duplex. This end base atom is used as a starting base atom while determining which base atoms to remove. @type resizeEndAxisAtom: Atom @param numberOfBasePairsToRemove: The total number of base paris to remove from the duplex. @type numberOfBasePairsToRemove: int """ ladder = resizeEndAxisAtom.molecule.ladder atomsScheduledForDeletion = [] atm = resizeEndAxisAtom strand_neighbors_to_delete = self._strand_neighbors_to_delete(atm) atomsScheduledForDeletion.extend(strand_neighbors_to_delete) #Fix for bug 2712 -- #Determine the ladder end. Based on the ladder end, we will decide which #direction to proceed in ,to find the next base atom. (e.g. it its #ladderend 0, we will proceed towards ladder end 1. and vice versa) #This direction is used by WholeChain.yield_rail_index_direction_counter #which is a pythongenerator object. (we pass 'pos' tuple argument which #includes this direction. It is important to properly determine this #direction. Otherwise the generator will not yeild all the base atoms we #desire. Wrong direction will result in bugs like 2712. #[ -- Ninad 2008-03-27 comment.] | 4090824539fc516abf6a30244c3d3d05582e6bbc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/4090824539fc516abf6a30244c3d3d05582e6bbc/DnaDuplex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
67,
18602,
67,
2080,
67,
72,
2268,
92,
12,
2890,
16,
1041,
16,
7041,
1638,
6558,
3641,
16,
7922,
2171,
10409,
12765,
4672,
3536,
15068,
20027,
5355,
432,
6369,
7071,
10830,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4479,
67,
18602,
67,
2080,
67,
72,
2268,
92,
12,
2890,
16,
1041,
16,
7041,
1638,
6558,
3641,
16,
7922,
2171,
10409,
12765,
4672,
3536,
15068,
20027,
5355,
432,
6369,
7071,
10830,
20... |
arpspoof(target, victim, [interval=60]) -> None | arpcachepoison(target, victim, [interval=60]) -> None | def arpcachepoison(target, victim, interval=60): """Poison target's cache with (your MAC,victim's IP) couple | cc5b26e4b1f201a4360f6b9708270cdaafb0d18b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/cc5b26e4b1f201a4360f6b9708270cdaafb0d18b/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
419,
2436,
807,
1631,
4530,
12,
3299,
16,
28873,
381,
16,
3673,
33,
4848,
4672,
3536,
29198,
4530,
1018,
1807,
1247,
598,
261,
93,
477,
14246,
16,
11946,
381,
1807,
2971,
13,
1825,
2268,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
419,
2436,
807,
1631,
4530,
12,
3299,
16,
28873,
381,
16,
3673,
33,
4848,
4672,
3536,
29198,
4530,
1018,
1807,
1247,
598,
261,
93,
477,
14246,
16,
11946,
381,
1807,
2971,
13,
1825,
2268,... |
print s | print mods | def treesearch(code,name): arr={(code,name):None} # First make one step based on the language itself try: n=treestep(arr,code,name,abort_on_redirect=1) except wikipedia.IsRedirectPage: print "Is redirect page" return if n==0 and not arr[code,name]: print "Mother doesn't exist" return # Then add translations if we survived. autotranslate(name,arr) modifications=1 while modifications: modifications=0 for newcode,newname in arr.keys(): if arr[newcode,newname] is None: modifications+=treestep(arr,newcode,newname) return arr | 59f7c6407a69905bde42718cd2f9079d191f582a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/59f7c6407a69905bde42718cd2f9079d191f582a/treelang.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9787,
3392,
991,
12,
710,
16,
529,
4672,
2454,
5899,
12,
710,
16,
529,
4672,
7036,
97,
468,
5783,
1221,
1245,
2235,
2511,
603,
326,
2653,
6174,
775,
30,
290,
33,
27427,
395,
881,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9787,
3392,
991,
12,
710,
16,
529,
4672,
2454,
5899,
12,
710,
16,
529,
4672,
7036,
97,
468,
5783,
1221,
1245,
2235,
2511,
603,
326,
2653,
6174,
775,
30,
290,
33,
27427,
395,
881,
12,
... |
""" Kill all instances of process process_name. | """Kill all instances of process process_name. | def _killInstancesByName(self, process_name): """ Kill all instances of process process_name. | 9218dc2f0d51ce53383e4b7217791f435ce38d06 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1918/9218dc2f0d51ce53383e4b7217791f435ce38d06/browser_launchers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16418,
5361,
5911,
12,
2890,
16,
1207,
67,
529,
4672,
3536,
20520,
777,
3884,
434,
1207,
1207,
67,
529,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
16418,
5361,
5911,
12,
2890,
16,
1207,
67,
529,
4672,
3536,
20520,
777,
3884,
434,
1207,
1207,
67,
529,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
info = line.split() if line[42] == ' ' and len(info) > 4: frag += "+" + fragname + info[6] coeff = float(info[3]) if coeff < 0: orbital += '-' + info[4] + info[5].replace(":", "") else: orbital += '+' + info[4] + info[5].replace(":", "") elif line[42] == ' ': frag += "+" + fragname + info[3] coeff = float(info[0]) if coeff < 0: orbital += '-' + info[1] + info[2].replace(":","") else: orbital += '+' + info[1] + info[2].replace(":","") else: frag += "+" + info[3] + info[7] coeff = float(info[4]) if coeff < 0: orbital += '-' + info[5] + info[6].replace(":", "") else: orbital += "+" + info[5] + info[6].replace(":", "") sum += coeff**2 if sum == coeff**2: inputfile.next() | def parse(self, fupdate=0.05, cupdate=0.002): """Extract information from the logfile.""" inputfile = open(self.filename, "r") if self.progress: inputfile.seek(0, 2) #go to end of file nstep = inputfile.tell() inputfile.seek(0) self.progress.initialize(nstep) oldstep = 0 # Used to avoid extracting the final geometry twice in a GeoOpt NOTFOUND, GETLAST, NOMORE = range(3) finalgeometry = NOTFOUND # Used for calculating the scftarget (variables names taken from the ADF manual) accint = SCFconv = sconv2 = None # keep track of nosym and unrestricted case to parse Energies since it doens't have an all Irreps section nosymflag = False unrestrictedflag = False for line in inputfile: if self.progress and random.random() < cupdate: step = inputfile.tell() if step != oldstep: self.progress.update(step, "Unsupported Information") oldstep = step if line.find("INPUT FILE") >= 0: | 4331500fb6ad89973386c9376fe79c706ba5a705 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/4331500fb6ad89973386c9376fe79c706ba5a705/adfparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
16,
315,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
284,
2725,
33,
20,
18,
6260,
16,
276,
2725,
33,
20,
18,
24908,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
16,
315,
8... | |
gen.startElementNS((ns_uri, "doc"), "ns:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns:doc") | gen.startElementNS((ns_uri, "doc"), "ns1:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns1:doc") | def test_xmlgen_ns(): result = StringIO() gen = XMLGenerator(result) gen.startDocument() gen.startPrefixMapping("ns1", ns_uri) gen.startElementNS((ns_uri, "doc"), "ns:doc", {}) gen.endElementNS((ns_uri, "doc"), "ns:doc") gen.endPrefixMapping("ns1") gen.endDocument() return result.getvalue() == start + ('<ns1:doc xmlns:ns1="%s"></ns1:doc>' % ns_uri) | 6a7768ae4f90a79d79f4221f676281021f5f6f69 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6a7768ae4f90a79d79f4221f676281021f5f6f69/test_sax.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2902,
4507,
67,
2387,
13332,
563,
273,
15777,
1435,
3157,
273,
3167,
3908,
12,
2088,
13,
225,
3157,
18,
1937,
2519,
1435,
3157,
18,
1937,
2244,
3233,
2932,
2387,
21,
3113,
3153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2902,
4507,
67,
2387,
13332,
563,
273,
15777,
1435,
3157,
273,
3167,
3908,
12,
2088,
13,
225,
3157,
18,
1937,
2519,
1435,
3157,
18,
1937,
2244,
3233,
2932,
2387,
21,
3113,
3153... |
print "select", rpm.getFilename(), "over", \ newest.getFilename() | print "select", rpm.getFilename(), "over", newest.getFilename() | def selectNewestRpm(rpms, arch, arch_hash, verbose): """Select one package out of rpms that has the highest version number.""" newest = rpms[0] if arch == None: for rpm in rpms[1:]: if pkgCompare(newest, rpm) < 0: if verbose > 4: print "select", rpm.getFilename(), "over", \ newest.getFilename() newest = rpm return newest if len(rpms) == 1: return newest newestarch = arch_hash.get(newest["arch"], 999) for rpm in rpms[1:]: rpmarch = arch_hash.get(rpm["arch"], 999) if rpmarch < newestarch: if verbose > 4: print "select", rpm.getFilename(), "over", \ newest.getFilename() newest = rpm newestarch = rpmarch elif rpmarch == newestarch: if pkgCompare(newest, rpm) < 0: if verbose > 4: print "select", rpm.getFilename(), "over", \ newest.getFilename() newest = rpm newestarch = rpmarch return newest | 427871e48b993cbe1bec0e26f0693386c8014c95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/427871e48b993cbe1bec0e26f0693386c8014c95/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2027,
1908,
395,
54,
7755,
12,
13832,
959,
16,
6637,
16,
6637,
67,
2816,
16,
3988,
4672,
3536,
3391,
1245,
2181,
596,
434,
8715,
959,
716,
711,
326,
9742,
1177,
1300,
12123,
19824,
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,
2027,
1908,
395,
54,
7755,
12,
13832,
959,
16,
6637,
16,
6637,
67,
2816,
16,
3988,
4672,
3536,
3391,
1245,
2181,
596,
434,
8715,
959,
716,
711,
326,
9742,
1177,
1300,
12123,
19824,
273,
... |
self.assertEqual((400, "Bad request"), | self.assertEqual((501, "Method not implemented"), | def test(self): rapi = RapiMock() path = "/version" self.assertEqual((404, None), rapi.FetchResponse("/foo", "GET")) self.assertEqual((400, "Bad request"), rapi.FetchResponse("/version", "POST")) rapi.AddResponse("2") code, response = rapi.FetchResponse("/version", "GET") self.assertEqual(200, code) self.assertEqual("2", response) self.failUnless(isinstance(rapi.GetLastHandler(), rlib2.R_version)) | 091279045a7638e5d6425a59ffdd7326c5493309 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/091279045a7638e5d6425a59ffdd7326c5493309/ganeti.rapi.client_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
767,
7259,
273,
534,
2425,
9865,
1435,
589,
273,
2206,
1589,
6,
365,
18,
11231,
5812,
12443,
11746,
16,
599,
3631,
767,
7259,
18,
5005,
1064,
2932,
19,
11351,
3113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
4672,
767,
7259,
273,
534,
2425,
9865,
1435,
589,
273,
2206,
1589,
6,
365,
18,
11231,
5812,
12443,
11746,
16,
599,
3631,
767,
7259,
18,
5005,
1064,
2932,
19,
11351,
3113,... |
'paid':True | 'paid':True, 'other_move_id':other_move_id | def process_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') for slip in self.browse(cr,uid,ids): line_ids = [] partner = False partner_id = False partner = slip.employee_id.address_home_id.partner_id partner_id = partner.id period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',slip.date),('date_stop','>=',slip.date)])[0] move = { #'name': "Payment of Salary to %s" % (slip.employee_id.name), 'journal_id': slip.bank_journal_id.id, 'period_id': period_id, 'date': slip.date, 'type':'bank_pay_voucher', 'ref':slip.number, 'narration': 'Payment of Salary to %s' % (slip.employee_id.name) } move_id = move_pool.create(cr, uid, move) name = "To %s account" % (slip.employee_id.name) ded_rec = { 'move_id':move_id, 'name': name, #'partner_id': partner_id, 'date': slip.date, 'account_id': slip.employee_id.property_bank_account.id, 'debit': 0.0, 'credit' : slip.net, 'journal_id' : slip.journal_id.id, 'period_id' :period_id, 'ref':slip.number } line_ids += [movel_pool.create(cr, uid, ded_rec)] name = "By %s account" % (slip.employee_id.property_bank_account.name) cre_rec = { 'move_id':move_id, 'name': name, 'partner_id': partner_id, 'date': slip.date, 'account_id': partner.property_account_payable.id, 'debit': slip.net, 'credit' : 0.0, 'journal_id' : slip.journal_id.id, 'period_id' :period_id, 'ref':slip.number } line_ids += [movel_pool.create(cr, uid, cre_rec)] | 636663c0972dcecb1fe1891bee76266a5eb830e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/636663c0972dcecb1fe1891bee76266a5eb830e3/hr_payroll.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
8118,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3635,
67,
6011,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
8501,
6134,
7344,
941,
67,
6011,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
8118,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
3635,
67,
6011,
273,
365,
18,
6011,
18,
588,
2668,
4631,
18,
8501,
6134,
7344,
941,
67,
6011,
273,
365,
... |
ylist = N.zeros((num_samples, len(model.dx)+len(model.x)+len(model.w)), | ylist = N.zeros((num_samples, len(model.dx)+len(model.x)+len(model.u)+len(model.w)), | def __init__(self): self.parameters = None self.model = None self.t_sim_start = None self.t_sim_end = None self.t_sim_duration = None | d1c3673683919e8508dae3fa1499bfc51db58900 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/d1c3673683919e8508dae3fa1499bfc51db58900/sundials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
3977,
273,
599,
365,
18,
2284,
273,
599,
365,
18,
88,
67,
9812,
67,
1937,
273,
599,
365,
18,
88,
67,
9812,
67,
409,
273,
599,
365,
18,
88,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2890,
4672,
365,
18,
3977,
273,
599,
365,
18,
2284,
273,
599,
365,
18,
88,
67,
9812,
67,
1937,
273,
599,
365,
18,
88,
67,
9812,
67,
409,
273,
599,
365,
18,
88,... |
if callout: callout(self,g,thisx,y,colorNamePairs[count]) | if callout: callout(self,g,thisx,y,(col,name)) | def gAdd(t,g=g,fontName=fontName,fontSize=fontSize,fillColor=fillColor): t.fontName = fontName t.fontSize = fontSize t.fillColor = fillColor return g.add(t) | a3cb5bace045b38885c035998e20281066ff9a9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a3cb5bace045b38885c035998e20281066ff9a9e/legends.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
986,
12,
88,
16,
75,
33,
75,
16,
5776,
461,
33,
5776,
461,
16,
5776,
1225,
33,
5776,
1225,
16,
5935,
2957,
33,
5935,
2957,
4672,
268,
18,
5776,
461,
273,
3512,
461,
268,
18,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
986,
12,
88,
16,
75,
33,
75,
16,
5776,
461,
33,
5776,
461,
16,
5776,
1225,
33,
5776,
1225,
16,
5935,
2957,
33,
5935,
2957,
4672,
268,
18,
5776,
461,
273,
3512,
461,
268,
18,
5... |
buff.set_data('languages-manager', lm) font_desc = pango.FontDescription('monospace 10') if font_desc: self.editor.modify_font(font_desc) | def _new_tab(self, f, buff = None): l = [n for n in self.wins if n[1]==f] if len(l) == 0: lm = gtksourceview.SourceLanguagesManager() if buff is None: buff = CulebraBuffer() self.new = True buff.set_data('languages-manager', lm) font_desc = pango.FontDescription('monospace 10') if font_desc: self.editor.modify_font(font_desc) buff.connect('insert-text', self.insert_at_cursor_cb) buff.set_data("save", False) self.editor.set_buffer(buff) self.editor.grab_focus() buff.set_data('filename', f) self.wins.append([buff, f]) self.current_buffer = len(self.wins) - 1 | a718cf2af7a92f5271f218a3cfa71b84805d0ace /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/a718cf2af7a92f5271f218a3cfa71b84805d0ace/edit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2704,
67,
7032,
12,
2890,
16,
284,
16,
6139,
273,
599,
4672,
328,
273,
306,
82,
364,
290,
316,
365,
18,
91,
2679,
309,
290,
63,
21,
65,
631,
74,
65,
309,
562,
12,
80,
13,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2704,
67,
7032,
12,
2890,
16,
284,
16,
6139,
273,
599,
4672,
328,
273,
306,
82,
364,
290,
316,
365,
18,
91,
2679,
309,
290,
63,
21,
65,
631,
74,
65,
309,
562,
12,
80,
13,
42... | |
if mtime == 0 or mtime == -1: | if mtime in {0, -1}: | def main(): silent = 0 verbose = 0 if sys.argv[1:]: if sys.argv[1] == '-v': verbose = 1 elif sys.argv[1] == '-s': silent = 1 MAGIC = imp.get_magic() if not silent: print('Using MAGIC word', repr(MAGIC)) for dirname in sys.path: try: names = os.listdir(dirname) except os.error: print('Cannot list directory', repr(dirname)) continue if not silent: print('Checking ', repr(dirname), '...') names.sort() for name in names: if name[-3:] == '.py': name = os.path.join(dirname, name) try: st = os.stat(name) except os.error: print('Cannot stat', repr(name)) continue if verbose: print('Check', repr(name), '...') name_c = name + 'c' try: f = open(name_c, 'r') except IOError: print('Cannot open', repr(name_c)) continue magic_str = f.read(4) mtime_str = f.read(4) f.close() if magic_str != MAGIC: print('Bad MAGIC word in ".pyc" file', end=' ') print(repr(name_c)) continue mtime = get_long(mtime_str) if mtime == 0 or mtime == -1: print('Bad ".pyc" file', repr(name_c)) elif mtime != st[ST_MTIME]: print('Out-of-date ".pyc" file', end=' ') print(repr(name_c)) | c7eaede21ecb5259f2bd9e160a89b82d19cfb19b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/c7eaede21ecb5259f2bd9e160a89b82d19cfb19b/checkpyc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
10404,
273,
374,
3988,
273,
374,
309,
2589,
18,
19485,
63,
21,
30,
14542,
309,
2589,
18,
19485,
63,
21,
65,
422,
2400,
90,
4278,
3988,
273,
404,
1327,
2589,
18,
19485,
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,
2774,
13332,
10404,
273,
374,
3988,
273,
374,
309,
2589,
18,
19485,
63,
21,
30,
14542,
309,
2589,
18,
19485,
63,
21,
65,
422,
2400,
90,
4278,
3988,
273,
404,
1327,
2589,
18,
19485,
63,... |
message += 'upgrade %d outdated Quicktime component%s ' % (upgradeCount, upgradePlural) | message += 'upgrade %d outdated QuickTime component%s ' % (upgradeCount, upgradePlural) | def _buildMessage(installCount, upgradeCount): installPlural = '' if installCount > 1: installPlural = 's' upgradePlural = '' if upgradePlural > 1: upgradePlural = 's' message = 'Democracy can now ' if installCount > 0 and upgradeCount == 0: message += 'install %d Quicktime component%s.' % (installCount, installPlural) elif installCount == 0 and upgradeCount > 0: message += 'upgrade %d outdated Quicktime component%s ' % (upgradeCount, upgradePlural) message += '(old component%s will be moved to the Trash).' % (upgradePlural,) elif installCount > 0 and upgradeCount > 0: message += 'install %d Quicktime component%s ' % (installCount, installPlural) message += 'and upgrade %d outdated one%s ' % (upgradeCount, upgradePlural) message += '(old component%s will be moved to the Trash).' % (upgradePlural,) message += '\n\nDemocracy will automatically restart itself after this. ' message += 'Would you like to proceed ?' return message | 612b1072d3c185d5578dcb970ba098cfcc134b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/612b1072d3c185d5578dcb970ba098cfcc134b01/ComponentInstaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3510,
1079,
12,
5425,
1380,
16,
8400,
1380,
4672,
3799,
12968,
273,
875,
309,
3799,
1380,
405,
404,
30,
3799,
12968,
273,
296,
87,
11,
8400,
12968,
273,
875,
309,
8400,
12968,
405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3510,
1079,
12,
5425,
1380,
16,
8400,
1380,
4672,
3799,
12968,
273,
875,
309,
3799,
1380,
405,
404,
30,
3799,
12968,
273,
296,
87,
11,
8400,
12968,
273,
875,
309,
8400,
12968,
405,
... |
attr_node = doc.createElement("attribute") attr_node.setAttribute("id", k) | print >>f, '\t\t<attribute id="%s">' % k | def to_xml(self): """ Get this domain as an XML DOM Document """ from xml.dom.minidom import getDOMImplementation impl = getDOMImplementation() doc = impl.createDocument(None, 'Domain', None) doc.documentElement.setAttribute("id", self.name) for item in self: obj_node = doc.createElement('Item') obj_node.setAttribute("id", item.name) for k in item: attr_node = doc.createElement("attribute") attr_node.setAttribute("id", k) values = item[k] if not isinstance(values, list): values = [item[k]] | 9a1854494e1de2a569770fdb58d97a76aa4410b6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/9a1854494e1de2a569770fdb58d97a76aa4410b6/domain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
2902,
12,
2890,
4672,
3536,
968,
333,
2461,
487,
392,
3167,
4703,
4319,
3536,
628,
2025,
18,
9859,
18,
1154,
350,
362,
1930,
2343,
1872,
13621,
9380,
273,
2343,
1872,
13621,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
2902,
12,
2890,
4672,
3536,
968,
333,
2461,
487,
392,
3167,
4703,
4319,
3536,
628,
2025,
18,
9859,
18,
1154,
350,
362,
1930,
2343,
1872,
13621,
9380,
273,
2343,
1872,
13621,
143... |
handlevar = ExprVar('handle') | rawvar = ExprVar('rawmem') | def genShmemCreatedHandler(self): p = self.protocol assert p.decl.type.isToplevel() case = StmtBlock() | d9fcd325bb89a6dd20a5eefb536c3f9ee4bdf884 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/d9fcd325bb89a6dd20a5eefb536c3f9ee4bdf884/lower.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
1555,
3917,
6119,
1503,
12,
2890,
4672,
293,
273,
365,
18,
8373,
1815,
293,
18,
8840,
18,
723,
18,
291,
3401,
2815,
1435,
225,
648,
273,
13751,
1768,
1435,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3157,
1555,
3917,
6119,
1503,
12,
2890,
4672,
293,
273,
365,
18,
8373,
1815,
293,
18,
8840,
18,
723,
18,
291,
3401,
2815,
1435,
225,
648,
273,
13751,
1768,
1435,
2,
-100,
-100,
-100,
-... |
(fd, name) = tempfile.mkstemp(suffix=['.html', '.txt'][text], | (fd, path) = tempfile.mkstemp(suffix=['.html', '.txt'][text], | def handle(self, info=None): info = info or sys.exc_info() self.file.write(reset()) | 38cde6ffbf72d812563c017a42a3b38260fc3979 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/38cde6ffbf72d812563c017a42a3b38260fc3979/cgitb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
1123,
33,
7036,
4672,
1123,
273,
1123,
578,
2589,
18,
10075,
67,
1376,
1435,
365,
18,
768,
18,
2626,
12,
6208,
10756,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
12,
2890,
16,
1123,
33,
7036,
4672,
1123,
273,
1123,
578,
2589,
18,
10075,
67,
1376,
1435,
365,
18,
768,
18,
2626,
12,
6208,
10756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return http.Response(stream = message( | return HTMLResponse(stream = message( | def render(self, ctx): return http.Response(stream = message( 'The worksheet operation "%s" is not defined.'%self.op, '/home/'+self.ws.filename())) | 86a4ed9cb0aba48a11523b820246bf1c9d9e7be2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/86a4ed9cb0aba48a11523b820246bf1c9d9e7be2/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
327,
3982,
1064,
12,
3256,
273,
883,
12,
296,
1986,
13622,
1674,
2213,
87,
6,
353,
486,
2553,
1093,
9,
2890,
18,
556,
16,
1173,
8712,
2473,
15,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
327,
3982,
1064,
12,
3256,
273,
883,
12,
296,
1986,
13622,
1674,
2213,
87,
6,
353,
486,
2553,
1093,
9,
2890,
18,
556,
16,
1173,
8712,
2473,
15,
2890,
... |
self.saved_cookie = c.output() | self.saved_cookie = cookie | def setCookie(self): """ Set cookie for the current user cfg.cookie_lifetime and the user 'remember_me' setting set the lifetime of the cookie. lifetime in int hours, see table: value cookie lifetime ---------------------------------------------------------------- = 0 forever, ignoring user 'remember_me' setting > 0 n hours, or forever if user checked 'remember_me' < 0 -n hours, ignoring user 'remember_me' setting """ # Calculate cookie maxage and expires lifetime = int(self.cfg.cookie_lifetime) * 3600 forever = 10*365*24*3600 # 10 years now = time.time() if not lifetime: maxage = forever elif lifetime > 0: if self.user.remember_me: maxage = forever else: maxage = lifetime elif lifetime < 0: maxage = (-lifetime) expires = now + maxage # Set the cookie from Cookie import SimpleCookie c = SimpleCookie() c['MOIN_ID'] = self.user.id c['MOIN_ID']['max-age'] = maxage if self.cfg.cookie_domain: c['MOIN_ID']['domain'] = self.cfg.cookie_domain if self.cfg.cookie_path: c['MOIN_ID']['path'] = self.cfg.cookie_path else: c['MOIN_ID']['path'] = self.getScriptname() # Set expires for older clients c['MOIN_ID']['expires'] = self.httpDate(when=expires, rfc='850') self.setHttpHeader(c.output()) | 63802b2d2ac05d2344f28c1d53a2b0063863fa12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/63802b2d2ac05d2344f28c1d53a2b0063863fa12/request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26793,
12,
2890,
4672,
3536,
1000,
3878,
364,
326,
783,
729,
225,
2776,
18,
8417,
67,
17155,
471,
326,
729,
296,
28155,
67,
3501,
11,
3637,
444,
326,
12486,
434,
326,
3878,
18,
12486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26793,
12,
2890,
4672,
3536,
1000,
3878,
364,
326,
783,
729,
225,
2776,
18,
8417,
67,
17155,
471,
326,
729,
296,
28155,
67,
3501,
11,
3637,
444,
326,
12486,
434,
326,
3878,
18,
12486,
... |
self.parser.document.appendChild(Comment(data)) | self.parser.document.appendChild(CommentNode(data)) | def processComment(self, data): self.parser.document.appendChild(Comment(data)) | 861607e929f1534a95ca33dd122b35764af80fa3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/861607e929f1534a95ca33dd122b35764af80fa3/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
4469,
12,
2890,
16,
501,
4672,
365,
18,
4288,
18,
5457,
18,
6923,
1763,
12,
4469,
12,
892,
3719,
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,
1207,
4469,
12,
2890,
16,
501,
4672,
365,
18,
4288,
18,
5457,
18,
6923,
1763,
12,
4469,
12,
892,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for (page, date, length, user, comment) in wikipedia.newpages(1000): | for (page, date, length, loggedIn, user, comment) in wikipedia.newpages(1000): | def declare_alternative(self,alt): if not alt in knownwords[self.word]: knownwords[self.word].append(word) newwords.append(self.word) return self.alternatives | ffad99408ab3223df9947583b85934d1adfbc776 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/ffad99408ab3223df9947583b85934d1adfbc776/spellcheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14196,
67,
27071,
12,
2890,
16,
2390,
4672,
309,
486,
3770,
316,
4846,
3753,
63,
2890,
18,
1095,
14542,
4846,
3753,
63,
2890,
18,
1095,
8009,
6923,
12,
1095,
13,
394,
3753,
18,
6923,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14196,
67,
27071,
12,
2890,
16,
2390,
4672,
309,
486,
3770,
316,
4846,
3753,
63,
2890,
18,
1095,
14542,
4846,
3753,
63,
2890,
18,
1095,
8009,
6923,
12,
1095,
13,
394,
3753,
18,
6923,
1... |
entries_per_date[-1][1].append((page_name, name, version, href)) | entries_per_date[-1][1].append((page_name, name, version, diff_href)) | def expand_macro(self, formatter, name, content): prefix = limit = None if content: argv = [arg.strip() for arg in content.split(',')] if len(argv) > 0: prefix = argv[0] if len(argv) > 1: limit = int(argv[1]) | 091c5dfedb1e19109016a006fc4f2594f5044487 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/091c5dfedb1e19109016a006fc4f2594f5044487/macros.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4542,
67,
26448,
12,
2890,
16,
4453,
16,
508,
16,
913,
4672,
1633,
273,
1800,
273,
599,
309,
913,
30,
5261,
273,
306,
3175,
18,
6406,
1435,
364,
1501,
316,
913,
18,
4939,
12,
2187,
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,
4542,
67,
26448,
12,
2890,
16,
4453,
16,
508,
16,
913,
4672,
1633,
273,
1800,
273,
599,
309,
913,
30,
5261,
273,
306,
3175,
18,
6406,
1435,
364,
1501,
316,
913,
18,
4939,
12,
2187,
6... |
self.__block.release() | else: deadline = _time() + timeout while not self.__stopped: delay = deadline - _time() if delay <= 0: if __debug__: self._note("%s.join(): timed out", self) break self.__block.wait(delay) else: if __debug__: self._note("%s.join(): thread stopped", self) finally: self.__block.release() | def join(self, timeout=None): assert self.__initialized, "Thread.__init__() not called" assert self.__started, "cannot join thread before it is started" assert self is not currentThread(), "cannot join current thread" if __debug__: if not self.__stopped: self._note("%s.join(): waiting until thread stops", self) self.__block.acquire() if timeout is None: while not self.__stopped: self.__block.wait() if __debug__: self._note("%s.join(): thread stopped", self) else: deadline = _time() + timeout while not self.__stopped: delay = deadline - _time() if delay <= 0: if __debug__: self._note("%s.join(): timed out", self) break self.__block.wait(delay) else: if __debug__: self._note("%s.join(): thread stopped", self) self.__block.release() | 1d53cd0b6c8daed5381f5ef7204c834a6d3cbc8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1d53cd0b6c8daed5381f5ef7204c834a6d3cbc8f/threading.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
2890,
16,
2021,
33,
7036,
4672,
1815,
365,
16186,
13227,
16,
315,
3830,
16186,
2738,
972,
1435,
486,
2566,
6,
1815,
365,
16186,
14561,
16,
315,
12892,
1233,
2650,
1865,
518,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1233,
12,
2890,
16,
2021,
33,
7036,
4672,
1815,
365,
16186,
13227,
16,
315,
3830,
16186,
2738,
972,
1435,
486,
2566,
6,
1815,
365,
16186,
14561,
16,
315,
12892,
1233,
2650,
1865,
518,
35... |
try: if arr.isbyteswapped(): arr.byteswap() except AttributeError: | if not hasattr(arr, "type") or not hasattr(arr, "astype"): | def showArray(self, arr, **kargs): """Display a 2-d or 3-d grayscale integer numarray arrays. 3-d images are displayed as data cubes, meaning one can view a single z at a time or play through them as a movie, that sort of thing. Inputs: - arr: a numarray array; must be 2-d or 3-d: 2-d arrays have index order (y, x) 3-d arrays are loaded as a data cube index order (z, y, x) kargs: see Extra Keyword Arguments in the module doc string for information. Keywords that specify array info (see doc for showBinFile for the list) are ignored, because array info is determined from the array itself. Data types: - UInt8, Int16, Int32 and floating point types sent unmodified. - All other integer types are converted before transmission. - Complex types are rejected. Raises ValueError if arr's elements are not some kind of integer. Raises RuntimeError if ds9 is not running or returns an error message. """ try: if arr.isbyteswapped(): arr.byteswap() except AttributeError: arr = num.array(arr) if arr.type() in _ComplexTypes: raise TypeError("ds9 cannot handle complex data") | bb6c9ec4e10676e0f3bd040b434a42f6823f4b92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/bb6c9ec4e10676e0f3bd040b434a42f6823f4b92/DS9.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
1076,
12,
2890,
16,
2454,
16,
2826,
79,
1968,
4672,
3536,
4236,
279,
576,
17,
72,
578,
890,
17,
72,
16937,
5864,
3571,
818,
1126,
5352,
18,
890,
17,
72,
4602,
854,
10453,
487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1076,
12,
2890,
16,
2454,
16,
2826,
79,
1968,
4672,
3536,
4236,
279,
576,
17,
72,
578,
890,
17,
72,
16937,
5864,
3571,
818,
1126,
5352,
18,
890,
17,
72,
4602,
854,
10453,
487,
... |
print _('Editing entry %r\n' 'Please fill the following fields.\n' 'The current value is shown in square brackets.' 'NOTE: The current value is not preserved. You ' 'have to re-enter every value!') % entry | print self.edit_msg % entry help = _('Please fill the following fields. The current ' 'value is shown in square brackets. NOTE: The ' 'current value is not preserved. You have to ' 're-enter every value!') print textwrap.fill(help, 79) | def edit(self, entry=None): """Edits the specified `entry`. If `entry` is None, a new entry is created. | 6d04bdcf0080a5cf60c08e6edecce5d6655df9b6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/6d04bdcf0080a5cf60c08e6edecce5d6655df9b6/tel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3874,
12,
2890,
16,
1241,
33,
7036,
4672,
3536,
2671,
1282,
326,
1269,
1375,
4099,
8338,
971,
1375,
4099,
68,
353,
599,
16,
279,
394,
1241,
353,
2522,
18,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
3874,
12,
2890,
16,
1241,
33,
7036,
4672,
3536,
2671,
1282,
326,
1269,
1375,
4099,
8338,
971,
1375,
4099,
68,
353,
599,
16,
279,
394,
1241,
353,
2522,
18,
2,
-100,
-100,
-100,
-100,
-1... |
model.main_window.contact_editor.open_for_edit(item) | model.main_window.contact_editor_dialog.open_for_edit(item) | def _AH_EditItem(self): model = self.model() index = self.selectionModel().selectedIndexes()[0] item = model.data(index) if isinstance(item, ContactGroup): self.scrollTo(index) item.widget.edit() else: model.main_window.contact_editor.open_for_edit(item) | 15b35a29aa227e175798d038a927086fc4341175 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3447/15b35a29aa227e175798d038a927086fc4341175/contacts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
37,
44,
67,
4666,
1180,
12,
2890,
4672,
938,
273,
365,
18,
2284,
1435,
770,
273,
365,
18,
10705,
1488,
7675,
8109,
8639,
1435,
63,
20,
65,
761,
273,
938,
18,
892,
12,
1615,
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,
389,
37,
44,
67,
4666,
1180,
12,
2890,
4672,
938,
273,
365,
18,
2284,
1435,
770,
273,
365,
18,
10705,
1488,
7675,
8109,
8639,
1435,
63,
20,
65,
761,
273,
938,
18,
892,
12,
1615,
13,
... |
(True, None) | True | def _normal_label(g, comb_emb, external_face): """ Helper function to schnyder method for computing coordinates in the plane to plot a planar graph with no edge crossings. Constructs a normal labelling of a triangular graph g, given the planar combinatorial embedding of g and a designated external face. Returns labels dictionary. The normal label is constructed by first contracting the graph down to its external face, then expanding the graph back to the original while simultaneously adding angle labels. INPUT: g -- the graph to find the normal labeling of (g must be triangulated) comb_emb -- a planar combinatorial embedding of g external_face -- the list of three edges in the external face of g RETURNS: x -- tuple with entries x[0] = dict of dicts of normal labeling for each vertex of g and each adjacent neighbors u,v (u < v) of vertex: { vertex : { (u,v): angel_label } } x[1] = (v1,v2,v3) tuple of the three vertices of the external face. EXAMPLES: sage: from sage.graphs.schnyder import _triangulate, _normal_label, _realizer sage: g = graphs.CycleGraph(7) sage: g.is_planar(set_embedding=True) (True, None) sage: faces = g.trace_faces(g._embedding) sage: _triangulate(g, g._embedding) [(2, 0), (4, 2), (6, 4), (5, 0), (3, 5), (1, 3), (4, 0), (3, 0)] sage: tn = _normal_label(g, g._embedding, faces[0]) sage: _realizer(g, tn) ({0: [<sage.graphs.schnyder.TreeNode instance at ...>]}, (0, 1, 2)) """ contracted = [] contractible = [] labels = {} external_vertices = [external_face[0][0], external_face[1][0], external_face[2][0]] external_vertices.sort() v1,v2,v3 = external_vertices v1_neighbors = Set(g.neighbors(v1)) neighbor_count = {} for v in g.vertices(): neighbor_count[v] = 0 for v in g.neighbors(v1): neighbor_count[v] = len(v1_neighbors.intersection( Set(g.neighbors(v)))) for v in v1_neighbors: if v in [v1,v2,v3]: continue if neighbor_count[v] == 2: contractible.append(v) # contraction phase: while g.order() > 3: try: v = contractible.pop() except: raise Exception('Contractible list is empty but graph still has %d vertices. (Expected 3.)'%g.order()) break # going to contract v v_neighbors = Set(g.neighbors(v)) contracted.append( (v, v_neighbors, v_neighbors - v1_neighbors - Set([v1])) ) g.delete_vertex(v) v1_neighbors -= Set([v]) for w in v_neighbors - v1_neighbors - Set([v1]): # adding edge (v1, w) g.add_edge( (v1, w) ) if g.order() == 3: break v1_neighbors += v_neighbors - Set([v1]) contractible = [] for w in g.neighbors(v1): if(len(v1_neighbors.intersection( Set(g.neighbors(w))))) == 2 and w not in [v1, v2, v3]: contractible.append(w) # expansion phase: v1, v2, v3 = g.vertices() #always in sorted order labels[v1] = {(v2,v3):1} labels[v2] = {(v1,v3):2} labels[v3] = {(v1,v2):3} while len(contracted) > 0: v, new_neighbors, neighbors_to_delete = contracted.pop() # going to add back vertex v labels[v] = {} for w in neighbors_to_delete: g.delete_edge((v1,w)) if len(neighbors_to_delete) == 0: # we are adding v into the face new_neighbors w1, w2, w3 = sorted(new_neighbors) labels[v] = {(w1, w2): labels[w3].pop((w1,w2)), (w2,w3) : labels[w1].pop((w2,w3)), (w1,w3) : labels[w2].pop((w1,w3))} labels[w1][tuple(sorted((w2,v)))] = labels[v][(w2,w3)] labels[w1][tuple(sorted((w3,v)))] = labels[v][(w2,w3)] labels[w2][tuple(sorted((w1,v)))] = labels[v][(w1,w3)] labels[w2][tuple(sorted((w3,v)))] = labels[v][(w1,w3)] labels[w3][tuple(sorted((w1,v)))] = labels[v][(w1,w2)] labels[w3][tuple(sorted((w2,v)))] = labels[v][(w1,w2)] else: new_neighbors_set = Set(new_neighbors) angles_out_of_v1 = set() vertices_in_order = [] l = [] for angle in labels[v1].keys(): if len(Set(angle).intersection(new_neighbors_set)) == 2: angles_out_of_v1.add(angle) l = l + list(angle) # find a unique element in l l.sort() i = 0 while i < len(l): if l[i] == l[i+1]: i = i + 2 else: break angle_set = Set(angles_out_of_v1) vertices_in_order.append(l[i]) while len(angles_out_of_v1) > 0: for angle in angles_out_of_v1: if vertices_in_order[-1] in angle: break if angle[0] == vertices_in_order[-1]: vertices_in_order.append(angle[1]) else: vertices_in_order.append(angle[0]) angles_out_of_v1.remove(angle) w = vertices_in_order # is w[0] a 2 or a 3? top_label = labels[w[0]][tuple(sorted((v1, w[1])))] if top_label == 3: bottom_label = 2 else: bottom_label = 3 i = 0 while i < len(w) - 1: labels[v][ tuple(sorted((w[i],w[i+1]))) ] = 1 labels[w[i]][ tuple(sorted( (w[i+1], v) )) ] = top_label labels[w[i+1]][ tuple(sorted( (w[i], v) )) ] = bottom_label i = i + 1 labels[v][tuple(sorted( (v1, w[0])))] = bottom_label labels[v][tuple(sorted( (v1, w[-1])))] = top_label labels[w[0]][tuple(sorted((v1,v)))] = top_label labels[w[-1]][tuple(sorted((v1,v)))] = bottom_label labels[v1][tuple(sorted( (w[0],v) ))] = 1 labels[v1][tuple(sorted( (w[-1],v) ))] = 1 #delete all the extra labels for angle in angle_set: labels[v1].pop( angle ) labels[w[0]].pop( tuple (sorted( (v1, w[1]) ) )) labels[w[-1]].pop( tuple (sorted( (v1, w[-2]) ) )) i = 1 while i < len(w) - 1: labels[w[i]].pop(tuple(sorted( (v1, w[i+1])))) labels[w[i]].pop(tuple(sorted( (v1, w[i-1])))) i = i + 1 for w in new_neighbors: g.add_edge((v,w)) return labels, (v1,v2,v3) | 2c1e231c6e50bb3637cbe9b8c7ed4b4d289a4888 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2c1e231c6e50bb3637cbe9b8c7ed4b4d289a4888/schnyder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6130,
67,
1925,
12,
75,
16,
3894,
67,
351,
70,
16,
3903,
67,
865,
4672,
3536,
9705,
445,
358,
18551,
18538,
765,
707,
364,
20303,
5513,
316,
326,
11017,
358,
3207,
279,
4995,
297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6130,
67,
1925,
12,
75,
16,
3894,
67,
351,
70,
16,
3903,
67,
865,
4672,
3536,
9705,
445,
358,
18551,
18538,
765,
707,
364,
20303,
5513,
316,
326,
11017,
358,
3207,
279,
4995,
297,... |
self._post_handlers = [ | post_handlers = [ | def __init__(self, request, client_address, socket_server): self._connect_handlers = [ self.RedirectConnectHandler, self.ServerAuthConnectHandler, self.DefaultConnectResponseHandler] self._get_handlers = [ self.NoCacheMaxAgeTimeHandler, self.NoCacheTimeHandler, self.CacheTimeHandler, self.CacheExpiresHandler, self.CacheProxyRevalidateHandler, self.CachePrivateHandler, self.CachePublicHandler, self.CacheSMaxAgeHandler, self.CacheMustRevalidateHandler, self.CacheMustRevalidateMaxAgeHandler, self.CacheNoStoreHandler, self.CacheNoStoreMaxAgeHandler, self.CacheNoTransformHandler, self.DownloadHandler, self.DownloadFinishHandler, self.EchoHeader, self.EchoHeaderOverride, self.EchoAllHandler, self.FileHandler, self.RealFileWithCommonHeaderHandler, self.RealBZ2FileWithCommonHeaderHandler, self.SetCookieHandler, self.AuthBasicHandler, self.AuthDigestHandler, self.SlowServerHandler, self.ContentTypeHandler, self.ServerRedirectHandler, self.ClientRedirectHandler, self.ChromiumSyncTimeHandler, self.MultipartHandler, self.DefaultResponseHandler] self._post_handlers = [ self.EchoTitleHandler, self.EchoAllHandler, self.ChromiumSyncCommandHandler, self.EchoHandler, self.DeviceManagementHandler] + self._get_handlers self._put_handlers = [ self.EchoTitleHandler, self.EchoAllHandler, self.EchoHandler] + self._get_handlers | 46d7e577d0e847e6026682c5b5b949a376ec7be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/46d7e577d0e847e6026682c5b5b949a376ec7be3/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
590,
16,
1004,
67,
2867,
16,
2987,
67,
3567,
4672,
365,
6315,
3612,
67,
11046,
273,
306,
365,
18,
5961,
5215,
1503,
16,
365,
18,
2081,
1730,
5215,
1503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
590,
16,
1004,
67,
2867,
16,
2987,
67,
3567,
4672,
365,
6315,
3612,
67,
11046,
273,
306,
365,
18,
5961,
5215,
1503,
16,
365,
18,
2081,
1730,
5215,
1503,
... |
prefix, | eg.ParseString(prefix), | def __call__( self, choices, fore, back, fontInfo, prefix, monitor=0 | b2110a8fa39849f82b1df07f3e8a997b676815cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8076/b2110a8fa39849f82b1df07f3e8a997b676815cd/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
365,
16,
7246,
16,
895,
16,
1473,
16,
3512,
966,
16,
9130,
18,
3201,
780,
12,
3239,
3631,
6438,
33,
20,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
365,
16,
7246,
16,
895,
16,
1473,
16,
3512,
966,
16,
9130,
18,
3201,
780,
12,
3239,
3631,
6438,
33,
20,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
this = apply(_quickfix.new_SideGrossTradeAmt, args) | this = _quickfix.new_SideGrossTradeAmt(*args) | def __init__(self, *args): this = apply(_quickfix.new_SideGrossTradeAmt, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
8895,
43,
3984,
22583,
31787,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
8895,
43,
3984,
22583,
31787,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
... |
def xtol(str): | def xtol(s): | def xtol(str): raise DeprecatedIDCError, "xtol() is deprecated. Use python long() instead." | 76aa24fecdace41c9fc827e500b95cfdf5053272 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/76aa24fecdace41c9fc827e500b95cfdf5053272/idc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
3490,
12,
87,
4672,
1002,
9336,
734,
39,
668,
16,
315,
92,
3490,
1435,
353,
6849,
18,
2672,
5790,
1525,
1435,
3560,
1199,
282,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
619,
3490,
12,
87,
4672,
1002,
9336,
734,
39,
668,
16,
315,
92,
3490,
1435,
353,
6849,
18,
2672,
5790,
1525,
1435,
3560,
1199,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if self.minimize_to_systray: | if self.notebook.get_current_page() == self.TAB_LIBRARY and self.searchbutton.get_property('visible'): self.on_search_end(None) elif self.notebook.get_current_page() == self.TAB_CURRENT and self.filterbox_visible: self.searchfilter_toggle(None) elif self.minimize_to_systray: | def on_topwindow_keypress(self, widget, event): shortcut = gtk.accelerator_name(event.keyval, event.state) shortcut = shortcut.replace("<Mod2>", "") # These shortcuts were moved here so that they don't # interfere with searching the library if shortcut == 'BackSpace': self.browse_parent_dir(None) elif shortcut == 'Escape': if self.minimize_to_systray: if HAVE_STATUS_ICON and self.statusicon.is_embedded() and self.statusicon.get_visible(): self.withdraw_app() elif HAVE_EGG and self.trayicon.get_property('visible') == True: self.withdraw_app() elif self.notebook.get_current_page() == self.TAB_CURRENT and self.filterbox_visible: self.searchfilter_toggle(None) elif self.notebook.get_current_page() == self.TAB_LIBRARY and self.searchbutton.get_property('visible'): self.on_search_end(None) elif shortcut == 'Delete': self.remove(None) | 5037043b852b4a3888df717bf8c58bebf85eb45e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/5037043b852b4a3888df717bf8c58bebf85eb45e/sonata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3669,
5668,
67,
856,
1028,
12,
2890,
16,
3604,
16,
871,
4672,
10995,
273,
22718,
18,
30737,
7385,
67,
529,
12,
2575,
18,
856,
1125,
16,
871,
18,
2019,
13,
10995,
273,
10995,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3669,
5668,
67,
856,
1028,
12,
2890,
16,
3604,
16,
871,
4672,
10995,
273,
22718,
18,
30737,
7385,
67,
529,
12,
2575,
18,
856,
1125,
16,
871,
18,
2019,
13,
10995,
273,
10995,
... |
tar.extractall(dest) | for tarinfo in tar: tar.extract(tarinfo, path=dest) | def unpack(self, file, dest = './', opts=None): """Update a package. Exceptions: - InvalidUrlError Arguments: - file: file to unpack - dest : destination folder. - opts : arguments for the unpacker """ try: tar = tarfile.open(file) if not os.path.isdir(dest): os.makedirs(dest) tar.extractall(dest) tar.close() except Exception, e: message = 'Tar Unpack error\n\t%s' % e raise interfaces.UnpackerRuntimeError(message) | 731c54b06be6d9b55422ba03ed2e93fc8f06a610 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9393/731c54b06be6d9b55422ba03ed2e93fc8f06a610/tar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
12,
2890,
16,
585,
16,
1570,
273,
12871,
2187,
1500,
33,
7036,
4672,
3536,
1891,
279,
2181,
18,
12781,
30,
300,
1962,
1489,
668,
13599,
30,
300,
585,
30,
585,
358,
6167,
300,
157... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
12,
2890,
16,
585,
16,
1570,
273,
12871,
2187,
1500,
33,
7036,
4672,
3536,
1891,
279,
2181,
18,
12781,
30,
300,
1962,
1489,
668,
13599,
30,
300,
585,
30,
585,
358,
6167,
300,
157... |
request, client_address = self.get_request() | request, client_address = self.await_request() | def handle_request(self): """Handle one request, possibly blocking.""" try: request, client_address = self.get_request() except socket.error: return if self.verify_request(request, client_address): try: self.process_request(request, client_address) except: self.handle_error(request, client_address) self.close_request(request) | e21a25730e31e68b7c39a643be0bc0743ca7a706 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/e21a25730e31e68b7c39a643be0bc0743ca7a706/SocketServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2293,
12,
2890,
4672,
3536,
3259,
1245,
590,
16,
10016,
9445,
12123,
775,
30,
590,
16,
1004,
67,
2867,
273,
365,
18,
30515,
67,
2293,
1435,
1335,
2987,
18,
1636,
30,
327,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2293,
12,
2890,
4672,
3536,
3259,
1245,
590,
16,
10016,
9445,
12123,
775,
30,
590,
16,
1004,
67,
2867,
273,
365,
18,
30515,
67,
2293,
1435,
1335,
2987,
18,
1636,
30,
327,
309... |
self.hatari.debug_command("s %s %06x %06x" % (filename, address, length)) | self.hatari.debug_command("s %s $%06x $%06x" % (filename, address, length)) | def memsave_cb(self, widget): if not self.dialog_save: self.dialog_save = SaveDialog(self.window) (filename, address, length) = self.dialog_save.run(self.address.get()) if filename and address and length: self.hatari.debug_command("s %s %06x %06x" % (filename, address, length)) | 9b9c5609dfbddf355007116fedb8e4b397858c40 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2811/9b9c5609dfbddf355007116fedb8e4b397858c40/debugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1663,
5688,
67,
7358,
12,
2890,
16,
3604,
4672,
309,
486,
365,
18,
12730,
67,
5688,
30,
365,
18,
12730,
67,
5688,
273,
7074,
6353,
12,
2890,
18,
5668,
13,
261,
3459,
16,
1758,
16,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1663,
5688,
67,
7358,
12,
2890,
16,
3604,
4672,
309,
486,
365,
18,
12730,
67,
5688,
30,
365,
18,
12730,
67,
5688,
273,
7074,
6353,
12,
2890,
18,
5668,
13,
261,
3459,
16,
1758,
16,
76... |
print 'MenuBarMenusCDTC.SetMenu' | def SetMenu(self, value): print 'MenuBarMenusCDTC.SetMenu' self.textConstrLst[self.index].params['menu'] = value | e6d3b1101435c39fbaff23b10ac5d7e8db0c67f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/e6d3b1101435c39fbaff23b10ac5d7e8db0c67f3/UtilCompanions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4599,
12,
2890,
16,
460,
4672,
365,
18,
955,
442,
701,
28134,
63,
2890,
18,
1615,
8009,
2010,
3292,
5414,
3546,
273,
460,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
4599,
12,
2890,
16,
460,
4672,
365,
18,
955,
442,
701,
28134,
63,
2890,
18,
1615,
8009,
2010,
3292,
5414,
3546,
273,
460,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
this = apply(_quickfix.new_TotalAffectedOrders, args) | this = _quickfix.new_TotalAffectedOrders(*args) | def __init__(self, *args): this = apply(_quickfix.new_TotalAffectedOrders, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
5269,
23775,
16528,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
5269,
23775,
16528,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... |
__slots__ = ('prunedExpr') | __slots__ = ('prunedExpr',) | def remove(self, x): i = self.index(x) self._removeSubexprs(self[x:x+1]) return super(ExclusiveExpressionNode, self).remove(x) | caf63a919d4613b05ddbf11262b7f72a4edfcc18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5223/caf63a919d4613b05ddbf11262b7f72a4edfcc18/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
619,
4672,
277,
273,
365,
18,
1615,
12,
92,
13,
365,
6315,
4479,
1676,
8638,
87,
12,
2890,
63,
92,
30,
92,
15,
21,
5717,
327,
2240,
12,
17075,
2300,
907,
16,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
12,
2890,
16,
619,
4672,
277,
273,
365,
18,
1615,
12,
92,
13,
365,
6315,
4479,
1676,
8638,
87,
12,
2890,
63,
92,
30,
92,
15,
21,
5717,
327,
2240,
12,
17075,
2300,
907,
16,
36... |
if not self.resetInput: val = float(self.display.text) if self.op is not None: val = self.op(self.X, val) self.display.text = str(val) self.resetInput = True self.X = val self.op = self.operations[sender.label] | try: if not self.resetInput: val = float(self.display.text) if self.op is not None: val = self.op(self.X, val) self.display.text = str(val) self.X = val self.resetInput = True self.op = sender.calcOp except: self.clear() self.display.text = '-- Error --' | def operate(self, sender=None): if not self.resetInput: val = float(self.display.text) if self.op is not None: val = self.op(self.X, val) self.display.text = str(val) self.resetInput = True self.X = val self.op = self.operations[sender.label] | 27e16bbdd0150637761796a1255cdc8f3b935731 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2219/27e16bbdd0150637761796a1255cdc8f3b935731/calculator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20829,
12,
2890,
16,
5793,
33,
7036,
4672,
309,
486,
365,
18,
6208,
1210,
30,
1244,
273,
1431,
12,
2890,
18,
5417,
18,
955,
13,
309,
365,
18,
556,
353,
486,
599,
30,
1244,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20829,
12,
2890,
16,
5793,
33,
7036,
4672,
309,
486,
365,
18,
6208,
1210,
30,
1244,
273,
1431,
12,
2890,
18,
5417,
18,
955,
13,
309,
365,
18,
556,
353,
486,
599,
30,
1244,
273,
365,
... |
rest['bg']='black' | rest['bg']=theme.disabledforeground | def __init__(self, master, entries, auto_update = 1, auto_rebuild = None, **rest): if auto_update: rest['postcommand'] = MakeMethodCommand(self.Update) if auto_rebuild is not None: rest['postcommand'] = MakeMethodCommand(self.RebuildMenu) self.rebuild_func = auto_rebuild rest['tearoffcommand'] = MakeMethodCommand(self._tearoff) rest['bg']='black' rest['relief']='flat' rest['bd']=1 rest['activeborderwidth']=0 rest['tearoff']=0 self.menu = apply(Menu, (master,), rest) self.SetEntries(entries) | 69b8dca7f04bdb646bdb595f16211e2e647e027d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/69b8dca7f04bdb646bdb595f16211e2e647e027d/tkext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
16,
3222,
16,
3656,
67,
2725,
273,
404,
16,
3656,
67,
266,
3510,
273,
599,
16,
2826,
8792,
4672,
225,
309,
3656,
67,
2725,
30,
3127,
3292,
2767,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4171,
16,
3222,
16,
3656,
67,
2725,
273,
404,
16,
3656,
67,
266,
3510,
273,
599,
16,
2826,
8792,
4672,
225,
309,
3656,
67,
2725,
30,
3127,
3292,
2767,
... |
temp_poly_object = vert_to_ieq(self._vertices, rays = self._rays) | temp_poly_object = vert_to_ieq(self._vertices, rays = self._rays, cdd_type = self._cdd_type) | def ieqs(self, force_from_vertices = False): """ Return the inequalities (half-planes) defining the polyhedron. | ff2469d377f6b8dbf0bce8ee43e9ce75aea16b54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ff2469d377f6b8dbf0bce8ee43e9ce75aea16b54/polyhedra.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9228,
12926,
12,
2890,
16,
2944,
67,
2080,
67,
17476,
273,
1083,
4672,
3536,
2000,
326,
316,
9729,
1961,
261,
20222,
17,
7088,
281,
13,
9364,
326,
7573,
18550,
1949,
18,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9228,
12926,
12,
2890,
16,
2944,
67,
2080,
67,
17476,
273,
1083,
4672,
3536,
2000,
326,
316,
9729,
1961,
261,
20222,
17,
7088,
281,
13,
9364,
326,
7573,
18550,
1949,
18,
2,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.