rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
sum(m.product_qty*u.factor)::decimal as product_qty, sum(pt.standard_price * m.product_qty * u.factor)::decimal as value from | coalesce(sum(m.product_qty*u.factor)::decimal, 0.0) as product_qty, coalesce(sum(pt.standard_price * m.product_qty * u.factor)::decimal, 0.0) as value FROM | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
8513,
18,
7285,
67,
1945,
67,
430,
67,
1808,
12,
3353,
16,
296,
6006,
67,
15381,
67,
26024,
6134,
4422,
18,
8837,
2932,
3660,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
12,
2890,
16,
4422,
4672,
8513,
18,
7285,
67,
1945,
67,
430,
67,
1808,
12,
3353,
16,
296,
6006,
67,
15381,
67,
26024,
6134,
4422,
18,
8837,
2932,
3660,
2,
-100,
-100,
-100,
-100,... |
for name, conf in settings.INSTALLED_APPS.items(): router.add_app(name, conf) | for name in settings.INSTALLED_APPS: router.add_app(name) | def handle_noargs(self, **options): | e68452e860572f97062347a754efdb6b93194e55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/e68452e860572f97062347a754efdb6b93194e55/route.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2135,
1968,
12,
2890,
16,
2826,
2116,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2135,
1968,
12,
2890,
16,
2826,
2116,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts)) | response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts)) | def _call_nagios_comment(self, host, comment, command): """ build up the POST call for a host comment. Example of what nagios expects to get: cmd_typ=1&cmd_mod=2&host=app02.web.stage.ext.phx2.redhat.com&persistent=on&com_data=test+post&btnSubmit=Commit XXX: need to combine with other call methods """ opts = {} opts['host'] = host opts['cmd_typ'] = command opts['cmd_mod'] = '2' opts['btnSubmit']='Commit' opts['persistent']='on' opts['com_data'] = comment try: response = urllib2.urlopen(self.nagios_instance, urllib.urlencode(opts)) except: print "Failed call to Nagios for " + host raise | bb29eec751694579f6d2612e2ac277d88fc6328f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12876/bb29eec751694579f6d2612e2ac277d88fc6328f/nagios.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1991,
67,
27132,
7441,
67,
3469,
12,
2890,
16,
1479,
16,
2879,
16,
1296,
4672,
3536,
1361,
731,
326,
5485,
745,
364,
279,
1479,
2879,
18,
5090,
434,
4121,
290,
346,
7441,
10999,
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,
1991,
67,
27132,
7441,
67,
3469,
12,
2890,
16,
1479,
16,
2879,
16,
1296,
4672,
3536,
1361,
731,
326,
5485,
745,
364,
279,
1479,
2879,
18,
5090,
434,
4121,
290,
346,
7441,
10999,
3... |
info = [len(self.applied) - 1] + self.applied[-1].split(':') | if all: popi = 0 else: popi = len(self.applied) - 1 else: popi = info[0] + 1 if popi >= end: self.ui.warn("qpop: %s is already at the top\n" % patch) return info = [ popi ] + self.applied[popi].split(':') | def getfile(f, rev): t = repo.file(f).read(rev) try: repo.wfile(f, "w").write(t) except IOError: try: os.makedirs(os.path.dirname(repo.wjoin(f))) except OSError, err: if err.errno != errno.EEXIST: raise repo.wfile(f, "w").write(t) | 9b60545fdea31663a82948c533245eacb5685b72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/9b60545fdea31663a82948c533245eacb5685b72/mq.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
768,
12,
74,
16,
5588,
4672,
268,
273,
3538,
18,
768,
12,
74,
2934,
896,
12,
9083,
13,
775,
30,
3538,
18,
91,
768,
12,
74,
16,
315,
91,
20387,
2626,
12,
88,
13,
1335,
8340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
768,
12,
74,
16,
5588,
4672,
268,
273,
3538,
18,
768,
12,
74,
2934,
896,
12,
9083,
13,
775,
30,
3538,
18,
91,
768,
12,
74,
16,
315,
91,
20387,
2626,
12,
88,
13,
1335,
8340,
... |
"Predicate for inclusion in the readable for select()" | """Predicate for inclusion in the readable for select().""" | def readable(self): "Predicate for inclusion in the readable for select()" # cannot use the old predicate, it violates the claim of the # set_terminator method. #return (len(self.ac_in_buffer) <= self.ac_in_buffer_size) return self.receive | e1763c9db15d5d6d781646fb0678f3c70d95867a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/e1763c9db15d5d6d781646fb0678f3c70d95867a/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7471,
12,
2890,
4672,
3536,
8634,
364,
26485,
316,
326,
7471,
364,
2027,
1435,
12123,
468,
2780,
999,
326,
1592,
5641,
16,
518,
12471,
815,
326,
7516,
434,
326,
468,
444,
67,
9505,
639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7471,
12,
2890,
4672,
3536,
8634,
364,
26485,
316,
326,
7471,
364,
2027,
1435,
12123,
468,
2780,
999,
326,
1592,
5641,
16,
518,
12471,
815,
326,
7516,
434,
326,
468,
444,
67,
9505,
639,
... |
help="don't set cfg permissions") | help="don't set file permissions") | def arguments(): """Defines the command line arguments for the script.""" main_desc = ("Mirror a remote FTP directory into a local directory or vice " "versa through the lftp program") subs_desc = "Select a running mode from the following:" epilog = ("For detailed help for each mode, select a mode followed by help " "option, e.g.:{0}{0}%(prog)s shell -h").format(os.linesep) cron_use = "%(prog)s [-h]" shell_use = ("%(prog)s site remote local [options]{0}{0}By default " "downloads the changes from remote FTP directory to local " "directory.{0}To upload changes from local to remote FTP, use " "the 'r, --reverse' option").format(os.linesep) file_use = ("%(prog)s config_file [-h]{0}{0}The structure of the " "config file (a simple text file) is as follows:{0}{0}[section]" "{0}site = {{ftp server URL or IP}}{0}port = (ftp server port)" "{0}remote = {{remote directory}}{0}local = {{local directory}}" "{0}user = (ftp server username){0}password = (user password " "encoded in base64){0}options = (other options){0}{0}Section is" " a name that defines the mirror operation. Usually is the ftp " "server's name or directory' name. Useful for distinguish one " "mirror operation from others. Write one section for each " "mirror action with no limits in the number of sections.{0}{0}" "Values between curly brackets '{{}}' are required arguments " "and values between brackets '()' are optional arguments. If " "don't want optional arguments, left them blank. In case you do" " not specify a username and password, you must add the '-a' " "option which specifies that the connection is made with the " "anonymous user.{0}{0}The order of arguments doesn't matter, " "but all are needed.{0}{0}").format(os.linesep) parser = ArgumentParser(description=main_desc, epilog=epilog) subparsers = parser.add_subparsers(title="running modes", description=subs_desc) cron = subparsers.add_parser("cron", help="ideal to run as a scheduled task" ". Takes arguments from parameters defined " "within the script", usage=cron_use) cron.add_argument("cron", action="store_true", help=SUPPRESS, default=SUPPRESS) cron.add_argument("cfg", action="store_false", help=SUPPRESS, default=SUPPRESS) cfg = subparsers.add_parser("cfg", help="ideal for mirror multiple sites/" "directories. Imports the arguments from a " "config file", usage=file_use) cfg.add_argument("cron", action="store_false", help=SUPPRESS, default=SUPPRESS) cfg.add_argument("cfg", action="store_true", help=SUPPRESS, default=SUPPRESS) cfg.add_argument("config_file", help="config file to import arguments") shell = subparsers.add_parser("shell", help="usual mode, takes arguments " "from the command line ", usage=shell_use) shell.add_argument("cron", action="store_false", help=SUPPRESS, default=SUPPRESS) shell.add_argument("cfg", action="store_false", help=SUPPRESS, default=SUPPRESS) shell.add_argument("site", help="the ftp server (URL or IP)") shell.add_argument("remote", help="the remote directory") shell.add_argument("local", help="the local directory") auth = shell.add_mutually_exclusive_group(required=True) auth.add_argument("-l", "--login", dest="login", nargs=2, help="the ftp account's username and password", metavar=("user", "password")) auth.add_argument("-a", "--anon", action="store_true", dest="anonymous", help="set user as anonymous", default=False) shell.add_argument("-p", "--port", dest="port", default="", help="the ftp server port", metavar="port") shell.add_argument("-s", "--secure", action="store_const", const="s", dest="secure", default="", help="use the sftp protocol instead of ftp") shell.add_argument("-e", "--erase", action="store_const", const="e", dest="erase", default="", help="delete files not present at target site") shell.add_argument("-n", "--newer", action="store_const", const="n", dest="newer", default="", help="download only newer files") shell.add_argument("-P", "--parallel", action="store_const", const="P", dest="parallel", default="", help="download files in parallel") shell.add_argument("-r", "--reverse", action="store_const", const="R", dest="reverse", default="", help="reverse, upload files from local to remote") shell.add_argument("--delete-first", action="store_const", const=" --delete-first", dest="del_first", default="", help="delete old files before transferring new ones") shell.add_argument("--depth-first", action="store_const", const=" --depth-first", dest="depth_first", default="", help="descend into subdirectories, before transfer files") shell.add_argument("--no-empty-dirs", action="store_const", const=" --no-empty-dirs", dest="no_empty_dir", default="", help="don't create empty dirs (needs --depth-first)") shell.add_argument("--no-recursion", action="store_const", const=" --no-recursion", dest="no_recursion", default="", help="don't go to subdirectories") shell.add_argument("--dry-run", action="store_const", const=" --dry-run", dest="dry_run", default="", help="simulation, don't execute anything. Writes to log") shell.add_argument("--use-cache", action="store_const", const=" --use-cache", dest="use_cache", default="", help="use cached directory listings") shell.add_argument("--del-source", action="store_const", const=" --Remove-source-files", dest="del_source", default="", help="remove files (no dirs) after transfer (Caution!)") shell.add_argument("--only-missing", action="store_const", const=" --only-missing", dest="missing", default="", help="download only missing files") shell.add_argument("--only-existing", action="store_const", const=" --only-existing", dest="existing", default="", help="download only files already existing at target") shell.add_argument("--loop", action="store_const", const=" --loop", dest="loop", default="", help="Loop until no changes found") shell.add_argument("--ignore-size", action="store_const", const=" --ignore-size", dest="size", default="", help="ignore size when deciding whether to download") shell.add_argument("--ignore-time", action="store_const", const=" --ignore-time", dest="time", default="", help="ignore time when deciding whether to download") shell.add_argument("--no-perms", action="store_const", const=" --no-perms", dest="no_perms", default="", help="don't set cfg permissions") shell.add_argument("--no-umask", action="store_const", const=" --no-umask", dest="no_umask", default="", help="don't apply umask to cfg modes") shell.add_argument("--no-symlinks", action="store_const", const=" --no-symlinks", dest="no_symlinks", default="", help="don't create symbolic links") shell.add_argument("--allow-suid", action="store_const", const=" --allow-suid", dest="suid", default="", help="set suid/sgid bits according to remote site") shell.add_argument("--allow-chown", action="store_const", const=" --allow-chown", dest="chown", default="", help="try to set owner and group on files") shell.add_argument("--dereference", action="store_const", const=" --dereference", dest="dereference", default="", help="download symbolic links as files") shell.add_argument("--exclude-glob", dest="exc_glob", default="", metavar="GP", help="exclude matching files. GP is a glob pattern, e.g." " '*.zip'") shell.add_argument("--include-glob", dest="inc_glob", default="", metavar="GP", help="include matching files. GP is a glob pattern, e.g." " '*.zip'") shell.add_argument("-q", "--quiet", action="store_true", dest="quiet", help="the detailed shell process is no " "displayed, but is added to the log", default=False) shell.add_argument("--no-compress", action="store_true", dest="no_compress", help="don't create daily archive " "files", default=False) shell.add_argument("--no-email", action="store_true", dest="no_email", help="no sends email with the log", default=False) shell.add_argument("--smtp_server", dest="smtp_server", default="localhost", metavar="server", help="set a smtp server") shell.add_argument("--smtp_user", dest="smtp_user", default="", metavar="user", help="the smtp server username") shell.add_argument("--smtp_pass", dest="smtp_pass", default="", metavar="password", help="the smtp server password") shell.add_argument("--from_addr", dest="from_addr", default="", metavar="email", help="sender's email address") shell.add_argument("--to_addrs", dest="to_addrs", default="", nargs='+', metavar="email", help="a list of receiver(s)' email address(es)") parser.add_argument("-v", "--version", action="version", version="%(prog)s {0}".format(__version__), help="show program's version number and exit") return parser | c7e05ae4c1252c5135721aef8454b6d595bc159a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11247/c7e05ae4c1252c5135721aef8454b6d595bc159a/lftp_mirror.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1775,
13332,
3536,
15109,
326,
1296,
980,
1775,
364,
326,
2728,
12123,
2774,
67,
5569,
273,
7566,
13035,
279,
2632,
19324,
1867,
1368,
279,
1191,
1867,
578,
31842,
315,
315,
2496,
69,
3059... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1775,
13332,
3536,
15109,
326,
1296,
980,
1775,
364,
326,
2728,
12123,
2774,
67,
5569,
273,
7566,
13035,
279,
2632,
19324,
1867,
1368,
279,
1191,
1867,
578,
31842,
315,
315,
2496,
69,
3059... |
navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/output_formats_manage?ln=%s">%s</a>'''%(config.weburl, ln, _("Manage Output Formats"))) | navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class="navtrail" href="%s/admin/bibformat/bibformatadmin.py/output_formats_manage?ln=%s">%s</a>'''%(config.weburl, ln, _("Manage Output Formats"))) | def validate_format(req, ln=config.cdslang, bfo=None, bft=None, bfe=None): """ Returns a page showing the status of an output format or format template or format element. This page is called from output formats management page or format template management page or format elements documentation. The page only shows the status of one of the format, depending on the specified one. If multiple are specified, shows the first one. @param ln language @param bfo an output format 6 chars code @param bft a format element filename @param bfe a format element name """ ln = wash_language(ln) _ = gettext_set_language(ln) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(req, 'cfgbibformat') if not auth_code: if bfo is not None: #Output format validation bfo = wash_url_argument(bfo, 'str') navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/output_formats_manage?ln=%s">%s</a>'''%(config.weburl, ln, _("Manage Output Formats"))) if not bibformatadminlib.can_read_output_format(bfo): #No read permission return page(title=_("Restricted Output Format"), body = """You don't have permission to view this output format.""", language=ln, navtrail = navtrail_previous_links, errors = [("ERR_BIBFORMAT_CANNOT_READ_OUTPUT_FILE", bfo , "")], lastupdated=__lastupdated__, req=req) output_format = bibformat_engine.get_output_format(code=bfo, with_attributes=True) name = output_format['attrs']['names']['generic'] title = _("Validation of Output Format %s" % name) elif bft is not None: #Format template validation bft = wash_url_argument(bft, 'str') navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/format_templates_manage?ln=%s">%s</a>''' % (config.weburl, ln, _("Manage Format Templates"))) if not bibformatadminlib.can_read_format_template(bft): #No read permission return page(title=_("Restricted Format Template"), body = """You don't have permission to view this format template.""", language=ln, navtrail = navtrail_previous_links, errors = [("ERR_BIBFORMAT_CANNOT_READ_TEMPLATE_FILE", bft , "")], lastupdated=__lastupdated__, req=req) name = bibformat_engine.get_format_template_attrs(bft)['name'] title = _("Validation of Format Template %s" % name) elif bfe is not None: #Format element validation bfe = wash_url_argument(bfe, 'str') navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/format_elements_doc?ln=%s#%s">%s</a>''' % (config.weburl, ln , bfe.upper() , _("Format Elements Documentation"))) if not bibformatadminlib.can_read_format_element(bfe) and \ not bibformat_dblayer.tag_exists_for_name(bfe): #No read permission return page(title=_("Restricted Format Element"), body = """You don't have permission to view this format element.""", language=ln, navtrail = navtrail_previous_links, errors = [("ERR_BIBFORMAT_CANNOT_READ_ELEMENT_FILE", bfe ,"")], lastupdated=__lastupdated__, req=req) title = _("Validation of Format Element %s" % bfe) else: #No format specified return page(title=_("Format Validation"), uid=uid, language=ln, errors = [("ERR_BIBFORMAT_VALIDATE_NO_FORMAT")], navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) return page(title=title, body=bibformatadminlib.perform_request_format_validate(ln=ln, bfo=bfo, bft=bft, bfe=bfe), uid=uid, language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) else: navtrail_previous_links = bibformatadminlib.getnavtrail(''' > <a class=navtrail href="%s/admin/bibformat/bibformatadmin.py/?ln=%s'''%(config.weburl, ln)) return page_not_authorized(req=req, text=auth_msg, navtrail=navtrail_previous_links) | e3c65e7c4a0899b02ece5dff48dab4e0925dd99f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/e3c65e7c4a0899b02ece5dff48dab4e0925dd99f/bibformatadmin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
67,
2139,
12,
3658,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
16,
324,
617,
33,
7036,
16,
324,
1222,
33,
7036,
16,
324,
3030,
33,
7036,
4672,
3536,
2860,
279,
1363,
17253,
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,
1954,
67,
2139,
12,
3658,
16,
7211,
33,
1425,
18,
4315,
2069,
539,
16,
324,
617,
33,
7036,
16,
324,
1222,
33,
7036,
16,
324,
3030,
33,
7036,
4672,
3536,
2860,
279,
1363,
17253,
326,
... |
except KeyError, ValueError as errmsg: msg = "stream translation error (%s) " % errmsg | except (KeyError, ValueError), errmsg: msg = "stream translation error (%s) " % str(errmsg) | def parsetuple(self,xmltuple): """ Parse an XML tuple returned by pyRXP into a dictionary of LIGO metadata elements. The dictionary contains one entry for each table found in the XML tuple. """ # first extract all the table and columns from the tuple from the # children of the ligo lightweight parent tuple table = {} tupleidx = 0 for tag in xmltuple[2]: if tag[0] == 'Table' or tag[0] == 'table': tab = tag[1]['Name'].encode('ascii').lower() try: tab = self.tabrx.match(tab).group(2) except AttributeError: raise LIGOLwParseError, 'unable to parse a valid table name '+tab # initalize the table dictionary for this table table[tab] = { 'pos' : tupleidx, 'column' : {}, 'stream' : (), 'query' : '' } # parse for columns in the tables children # look for the column name and type in the attributes # store the index in which the columns were found as # we need this to decode the stream later for subtag in tag[2]: if subtag[0] == 'Column' or subtag[0] == 'column': col = subtag[1]['Name'].encode('ascii').lower() try: col = self.colrx.match(col).group(3) except AttributeError: raise LIGOLwParseError, 'unable to parse a valid column name '+col try: typ = subtag[1]['Type'].encode('ascii').lower() except KeyError: raise LIGOLwParseError, 'type is missing for column '+col table[tab]['column'][col] = typ table[tab].setdefault('orderedcol',[]).append(col) tupleidx += 1 | d2429910a6c77df9ca00deb00170db67c02a61af /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/d2429910a6c77df9ca00deb00170db67c02a61af/ldbd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
779,
542,
2268,
12,
2890,
16,
2902,
8052,
4672,
3536,
2884,
392,
3167,
3193,
2106,
635,
2395,
54,
60,
52,
1368,
279,
3880,
434,
511,
3047,
51,
1982,
2186,
18,
1021,
3880,
1914,
1245,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
779,
542,
2268,
12,
2890,
16,
2902,
8052,
4672,
3536,
2884,
392,
3167,
3193,
2106,
635,
2395,
54,
60,
52,
1368,
279,
3880,
434,
511,
3047,
51,
1982,
2186,
18,
1021,
3880,
1914,
1245,
1... |
output.extend( model_create(model, set(), self.style)[0] ) | output.extend( model_create(model, self.get_all_models_in_app_from_table_name(table_name), self.style)[0] ) | def get_drop_column_sql( self, table_name, col_name ): model = self.get_model_from_table_name(table_name) qn = self.connection.ops.quote_name kw = self.style.SQL_KEYWORD tqn = lambda s: self.style.SQL_TABLE(qn(s)) fqn = lambda s: self.style.SQL_FIELD(qn(s)) output = [] output.append( '-- FYI: sqlite does not support deleting columns, so we create a new ' + qn(table_name) +' and delete the old (ie, this could take a while if you have a lot of data)' ) tmp_table_name = table_name + '_1337_TMP' # unlikely to produce a namespace conflict output.extend( self.get_change_table_name_sql( tmp_table_name, table_name ) ) output.extend( model_create(model, set(), self.style)[0] ) new_cols = [] for f in model._meta.fields: new_cols.append( qn(f.column) ) output.append( kw('INSERT INTO ')+ tqn(table_name) + kw(' SELECT ') + fqn(','.join(new_cols)) + kw(' FROM ')+ tqn(tmp_table_name) +';' ) output.append( kw('DROP TABLE ')+ tqn(tmp_table_name) +';' ) return output | 752a5180af1947be683ecae3a679becba2f396b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8472/752a5180af1947be683ecae3a679becba2f396b1/sqlite3.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7285,
67,
2827,
67,
4669,
12,
365,
16,
1014,
67,
529,
16,
645,
67,
529,
262,
30,
938,
273,
365,
18,
588,
67,
2284,
67,
2080,
67,
2121,
67,
529,
12,
2121,
67,
529,
13,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7285,
67,
2827,
67,
4669,
12,
365,
16,
1014,
67,
529,
16,
645,
67,
529,
262,
30,
938,
273,
365,
18,
588,
67,
2284,
67,
2080,
67,
2121,
67,
529,
12,
2121,
67,
529,
13,
31... |
example = str(r'\x01\u263a\x00\ufeff', 'unicode-escape') smallerexample = str(r'\x01\u263a\x00\ufefe', 'unicode-escape') biggerexample = str(r'\x01\u263a\x01\ufeff', 'unicode-escape') | example = '\x01\u263a\x00\ufeff' smallerexample = '\x01\u263a\x00\ufefe' biggerexample = '\x01\u263a\x01\ufeff' | def test_nounicode(self): a = array.array(self.typecode, self.example) self.assertRaises(ValueError, a.fromunicode, str('')) self.assertRaises(ValueError, a.tounicode) | d55a28931eb188ab739dffa7b92d835ddb62cef7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/d55a28931eb188ab739dffa7b92d835ddb62cef7/test_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
82,
465,
3487,
12,
2890,
4672,
279,
273,
526,
18,
1126,
12,
2890,
18,
723,
710,
16,
365,
18,
8236,
13,
365,
18,
11231,
12649,
6141,
12,
23610,
16,
279,
18,
2080,
9124,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
82,
465,
3487,
12,
2890,
4672,
279,
273,
526,
18,
1126,
12,
2890,
18,
723,
710,
16,
365,
18,
8236,
13,
365,
18,
11231,
12649,
6141,
12,
23610,
16,
279,
18,
2080,
9124,
16,
... |
item = menu_help.Append(wx.ID_ANY, _("User guide")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("user guide.html")), item) item = menu_help.Append(wx.ID_ANY, _("Key Command Quick Reference")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("key commands.txt")), item) item = menu_help.Append(wx.ID_ANY, _("What's &new")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("whats new.txt")), item) item = menu_help.Append(wx.ID_ANY, _("Web site")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile("http://www.nvda-project.org/"), item) item = menu_help.Append(wx.ID_ANY, _("Readme")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("readme.txt")), item) item = menu_help.Append(wx.ID_ANY, _("License")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("copying.txt", False)), item) item = menu_help.Append(wx.ID_ANY, _("Contributors")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("contributors.txt", False)), item) | if not globalVars.appArgs.secure: item = menu_help.Append(wx.ID_ANY, _("User guide")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("user guide.html")), item) item = menu_help.Append(wx.ID_ANY, _("Key Command Quick Reference")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("key commands.txt")), item) item = menu_help.Append(wx.ID_ANY, _("What's &new")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("whats new.txt")), item) item = menu_help.Append(wx.ID_ANY, _("Web site")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile("http://www.nvda-project.org/"), item) item = menu_help.Append(wx.ID_ANY, _("Readme")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("readme.txt")), item) item = menu_help.Append(wx.ID_ANY, _("License")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("copying.txt", False)), item) item = menu_help.Append(wx.ID_ANY, _("Contributors")) self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("contributors.txt", False)), item) | def __init__(self, frame): super(SysTrayIcon, self).__init__() icon=wx.Icon(ICON_PATH,wx.BITMAP_TYPE_ICO) self.SetIcon(icon, appTitle) | 39c050a2743c88b3bb97c384ef8e26333c2e5b23 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/39c050a2743c88b3bb97c384ef8e26333c2e5b23/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2623,
4672,
2240,
12,
12712,
56,
435,
5554,
16,
365,
2934,
972,
2738,
972,
1435,
4126,
33,
27226,
18,
5554,
12,
21745,
67,
4211,
16,
27226,
18,
15650,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2623,
4672,
2240,
12,
12712,
56,
435,
5554,
16,
365,
2934,
972,
2738,
972,
1435,
4126,
33,
27226,
18,
5554,
12,
21745,
67,
4211,
16,
27226,
18,
15650,
83... |
('fs_is', '=', fs_id), | ('fs_id', '=', fs_id), | def get_id(self, cursor, user, module, fs_id): """ Return for an fs_id the corresponding db_id. | 35cc5e82d682dba3b8f399ca30d4677cb610e152 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/35cc5e82d682dba3b8f399ca30d4677cb610e152/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
350,
12,
2890,
16,
3347,
16,
729,
16,
1605,
16,
2662,
67,
350,
4672,
3536,
2000,
364,
392,
2662,
67,
350,
326,
4656,
1319,
67,
350,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
350,
12,
2890,
16,
3347,
16,
729,
16,
1605,
16,
2662,
67,
350,
4672,
3536,
2000,
364,
392,
2662,
67,
350,
326,
4656,
1319,
67,
350,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100... |
manufacturer_name = currLnb.unicableMatrixManufacturer.value manufacturer = currLnb.unicableMatrix[manufacturer_name] product_name = manufacturer.product.value sec.setLNBSatCR(manufacturer.scr[product_name].index) sec.setLNBSatCRvco(manufacturer.vco[product_name][manufacturer.scr[product_name].index].value*1000) sec.setLNBSatCRpositions(manufacturer.positions[product_name][0].value) sec.setLNBLOFL(manufacturer.lofl[product_name][0].value * 1000) sec.setLNBLOFH(manufacturer.lofh[product_name][0].value * 1000) sec.setLNBThreshold(manufacturer.loft[product_name][0].value * 1000) currLnb.unicableMatrixManufacturer.save_forced = True manufacturer.product.save_forced = True manufacturer.vco[product_name][manufacturer.scr[product_name].index].save_forced = True | setupUnicable(currLnb.unicableMatrixManufacturer, currLnb.unicableMatrix) | def updateAdvanced(self, sec, slotid): try: if config.Nims[slotid].advanced.unicableconnected is not None: if config.Nims[slotid].advanced.unicableconnected.value == True: config.Nims[slotid].advanced.unicableconnectedTo.save_forced = True self.linkNIMs(sec, slotid, int(config.Nims[slotid].advanced.unicableconnectedTo.value)) connto = self.getRoot(slotid, int(config.Nims[slotid].advanced.unicableconnectedTo.value)) if not self.linked.has_key(connto): self.linked[connto] = [] self.linked[connto].append(slotid) else: config.Nims[slotid].advanced.unicableconnectedTo.save_forced = False except: pass | 7d841169e08113d2fa20de0605147117c6ed86f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/7d841169e08113d2fa20de0605147117c6ed86f0/NimManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23618,
12,
2890,
16,
1428,
16,
4694,
350,
4672,
775,
30,
309,
642,
18,
50,
12097,
63,
14194,
350,
8009,
27080,
18,
318,
335,
429,
8537,
353,
486,
599,
30,
309,
642,
18,
50,
120... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
23618,
12,
2890,
16,
1428,
16,
4694,
350,
4672,
775,
30,
309,
642,
18,
50,
12097,
63,
14194,
350,
8009,
27080,
18,
318,
335,
429,
8537,
353,
486,
599,
30,
309,
642,
18,
50,
120... |
c.nick(e.arguments()[0] + "_") | def on_nickinuse(c, e): print "Nickname in use" c.nick(e.arguments()[0] + "_") old_nick = e.arguments()[0] #new_nick = old_nick + "_" new_nick = old_nick[:-1] + chr(ord(old_nick[:1]) + 1) print "%s nick in use, using %s" % (old_nick, new_nick) cfg["irc_nick"] = new_nick c.nick(new_nick) | cd61f61e183deb56f4068d8bba892e3bf17df5d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2496/cd61f61e183deb56f4068d8bba892e3bf17df5d5/modirclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
17091,
267,
1202,
12,
71,
16,
425,
4672,
1172,
315,
29756,
529,
316,
999,
6,
1592,
67,
17091,
273,
425,
18,
7099,
1435,
63,
20,
65,
468,
2704,
67,
17091,
273,
1592,
67,
1709... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17091,
267,
1202,
12,
71,
16,
425,
4672,
1172,
315,
29756,
529,
316,
999,
6,
1592,
67,
17091,
273,
425,
18,
7099,
1435,
63,
20,
65,
468,
2704,
67,
17091,
273,
1592,
67,
1709... | |
menu_items = wrapper.context_menu_callback(wrapper) menu = osxmenus.make_context_menu(menu_items) NSMenu.popUpContextMenu_withEvent_forView_(menu, event, self) | if wrapper.context_menu_callback is not None: menu_items = wrapper.context_menu_callback(wrapper) menu = osxmenus.make_context_menu(menu_items) NSMenu.popUpContextMenu_withEvent_forView_(menu, event, self) | def handleContextMenu_(self, event): self.window().makeFirstResponder_(self) point = self.convertPoint_fromView_(event.locationInWindow(), nil) row = self.rowAtPoint_(point) selection = self.selectedRowIndexes() if not selection.containsIndex_(row): index_set = NSIndexSet.alloc().initWithIndex_(row) self.selectRowIndexes_byExtendingSelection_(index_set, NO) wrapper = wrappermap.wrapper(self) menu_items = wrapper.context_menu_callback(wrapper) menu = osxmenus.make_context_menu(menu_items) NSMenu.popUpContextMenu_withEvent_forView_(menu, event, self) | 6e08036c76318f40599c70ac408cf963e9c45d1a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/6e08036c76318f40599c70ac408cf963e9c45d1a/tableview.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
27315,
67,
12,
2890,
16,
871,
4672,
365,
18,
5668,
7675,
6540,
3759,
28840,
67,
12,
2890,
13,
1634,
273,
365,
18,
6283,
2148,
67,
2080,
1767,
67,
12,
2575,
18,
3562,
382,
3829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27315,
67,
12,
2890,
16,
871,
4672,
365,
18,
5668,
7675,
6540,
3759,
28840,
67,
12,
2890,
13,
1634,
273,
365,
18,
6283,
2148,
67,
2080,
1767,
67,
12,
2575,
18,
3562,
382,
3829,
... |
pos=wx.Point(0, 0), size=wx.Size(80, 24), style=wx.RB_SINGLE) | pos=wx.Point(0, 0), size=wx.Size(80, 24), style=0) | def _init_ctrls(self, prnt): wx.Dialog.__init__(self, id=ID_MAPVARIABLEDIALOG, name='CommunicationDialog', parent=prnt, pos=wx.Point(376, 223), size=wx.Size(444, 186), style=wx.DEFAULT_DIALOG_STYLE, title='Add Map Variable') self.SetClientSize(wx.Size(444, 186)) | 1d6d9d96c1a38fccf8e43dbb76cd934781ca5e15 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11017/1d6d9d96c1a38fccf8e43dbb76cd934781ca5e15/commondialogs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
16277,
87,
12,
2890,
16,
846,
496,
4672,
7075,
18,
6353,
16186,
2738,
972,
12,
2890,
16,
612,
33,
734,
67,
8352,
16444,
2565,
18683,
16,
508,
2218,
25219,
6353,
2187,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
16277,
87,
12,
2890,
16,
846,
496,
4672,
7075,
18,
6353,
16186,
2738,
972,
12,
2890,
16,
612,
33,
734,
67,
8352,
16444,
2565,
18683,
16,
508,
2218,
25219,
6353,
2187,
98... |
ret.append(probe) | ret.append(probe) | def GetProbes(self, _): '''Return a set of probes for execution on client''' ret = [] if self.probes: bangline = re.compile('^#!(?P<interpreter>(/\w+)+)$') for name, entry in [(name, entry) for name, entry in \ self.probes.entries.iteritems() if entry.data]: probe = lxml.etree.Element('probe') probe.set('name', name ) probe.set('source', self.__name__) probe.text = entry.data match = bangline.match(entry.data.split('\n')[0]) if match: probe.set('interpreter', match.group('interpreter')) else: probe.set('interpreter', '/bin/sh') ret.append(probe) return ret | 64101c5f8b38250df239058b6af6374df92f7e3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/64101c5f8b38250df239058b6af6374df92f7e3b/Metadata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
9152,
281,
12,
2890,
16,
389,
4672,
9163,
990,
279,
444,
434,
3137,
281,
364,
4588,
603,
1004,
26418,
325,
273,
5378,
309,
365,
18,
7748,
281,
30,
324,
539,
1369,
273,
283,
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,
968,
9152,
281,
12,
2890,
16,
389,
4672,
9163,
990,
279,
444,
434,
3137,
281,
364,
4588,
603,
1004,
26418,
325,
273,
5378,
309,
365,
18,
7748,
281,
30,
324,
539,
1369,
273,
283,
18,
... |
self.datapoints.append(point) print >>csvfile, ','.join(str(x) for x in chain(point, (self.net_value(vec, point),))) | point_and_value = tuple(chain(point, (self.net_value(vec, point),))) self.datapoints.append(point_and_value) print >>csvfile, ','.join(str(x) for x in point_and_value) | def tmpfiles(self): """Generate some points in a temporary file and return the filename.""" import random rand = random.Random(self.seed) | 45ee118793ddd245c55d64537019099d09d7928f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/966/45ee118793ddd245c55d64537019099d09d7928f/rbf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1853,
2354,
12,
2890,
4672,
3536,
4625,
2690,
3143,
316,
279,
6269,
585,
471,
327,
326,
1544,
12123,
1930,
2744,
5605,
273,
2744,
18,
8529,
12,
2890,
18,
12407,
13,
2,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1853,
2354,
12,
2890,
4672,
3536,
4625,
2690,
3143,
316,
279,
6269,
585,
471,
327,
326,
1544,
12123,
1930,
2744,
5605,
273,
2744,
18,
8529,
12,
2890,
18,
12407,
13,
2,
-100,
-100,
-100,
... |
" parameter (since version > 0.5.4)", MigrateDeprecationWarning) | " parameter (since version > 0.5.4)", exceptions.MigrateDeprecationWarning) | def run(self, engine, step): """Core method of Script file. Exectues :func:`update` or :func:`downgrade` functions | d4285e65ffededbda9b5f32814ddefa228b0d471 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9035/d4285e65ffededbda9b5f32814ddefa228b0d471/py.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
4073,
16,
2235,
4672,
3536,
4670,
707,
434,
7739,
585,
18,
1312,
386,
3610,
294,
644,
28288,
2725,
68,
578,
294,
644,
28288,
2378,
3994,
68,
4186,
2,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
4073,
16,
2235,
4672,
3536,
4670,
707,
434,
7739,
585,
18,
1312,
386,
3610,
294,
644,
28288,
2725,
68,
578,
294,
644,
28288,
2378,
3994,
68,
4186,
2,
-100,
-100,
-1... |
self.canv.setPageRotation(getattr(self.pageTemplate,'rotation',0) | self.canv.setPageRotation(getattr(self.pageTemplate,'rotation',0)) | def handle_pageEnd(self): ''' show the current page check the next page template hang a page begin ''' #detect infinite loops... if self._curPageFlowableCount == 0: self._emptyPages = self._emptyPages + 1 else: self._emptyPages = 0 if self._emptyPages >= self._emptyPagesAllowed: if 1: ident = "More than %d pages generated without content - halting layout. Likely that a flowable is too large for any frame." % self._emptyPagesAllowed #leave to keep apart from the raise raise LayoutError(ident) else: pass #attempt to restore to good state else: if self._onProgress: self._onProgress('PAGE', self.canv.getPageNumber()) self.pageTemplate.afterDrawPage(self.canv, self) self.pageTemplate.onPageEnd(self.canv, self) self.afterPage() self.canv.setPageRotation(getattr(self.pageTemplate,'rotation',0) self.canv.showPage() | 0a056dd9e4656a46ec3f26b7fdd886fecc4aed5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/0a056dd9e4656a46ec3f26b7fdd886fecc4aed5b/doctemplate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
2433,
1638,
12,
2890,
4672,
9163,
2405,
326,
783,
1363,
866,
326,
1024,
1363,
1542,
25733,
279,
1363,
2376,
9163,
468,
16518,
14853,
14075,
2777,
309,
365,
6315,
1397,
1964,
5249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2433,
1638,
12,
2890,
4672,
9163,
2405,
326,
783,
1363,
866,
326,
1024,
1363,
1542,
25733,
279,
1363,
2376,
9163,
468,
16518,
14853,
14075,
2777,
309,
365,
6315,
1397,
1964,
5249... |
self.widget.Enable(state) | if self.widget.IsEnabled() != state: self.widget.Enable(state) | def showEnable(self): state = self.isEnabled() if self.widget is not None: if self.debuglevel > 1: assert self.dprint(u"menu item %s (widget id=%d) enabled=%s" % (self.getName(), self.global_id, state)) self.widget.Enable(state) if self.tool is not None: if self.debuglevel > 1: assert self.dprint(u"menu item %s (widget id=%d) enabled=%s tool=%s" % (self.getName(), self.global_id, state, self.tool)) self.tool.EnableTool(self.global_id, state) | 7bd16236b92beb431ca02effaa58fbc7fa4cbb00 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/7bd16236b92beb431ca02effaa58fbc7fa4cbb00/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
8317,
12,
2890,
4672,
919,
273,
365,
18,
291,
1526,
1435,
309,
365,
18,
6587,
353,
486,
599,
30,
309,
365,
18,
4148,
2815,
405,
404,
30,
1815,
365,
18,
72,
1188,
12,
89,
6,
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,
2405,
8317,
12,
2890,
4672,
919,
273,
365,
18,
291,
1526,
1435,
309,
365,
18,
6587,
353,
486,
599,
30,
309,
365,
18,
4148,
2815,
405,
404,
30,
1815,
365,
18,
72,
1188,
12,
89,
6,
5... |
if key == IHALPHA and scanner.sees("y"): | if key == "IHALPHA" and scanner.sees("y"): | def debugme(): "Access to the internals for debugging." proutn("Reset levels? ") if ja() == True: if game.energy < game.inenrg: game.energy = game.inenrg game.shield = game.inshld game.torps = game.intorps game.lsupres = game.inlsr proutn("Reset damage? ") if ja() == True: for i in range(NDEVICES): if game.damage[i] > 0.0: game.damage[i] = 0.0 proutn("Toggle debug flag? ") if ja() == True: idebug = not idebug if idebug: prout("Debug output ON") else: prout("Debug output OFF") proutn("Cause selective damage? ") if ja() == True: for i in range(NDEVICES): proutn("Kill %s?" % device[i]) scanner.chew() key = scanner.next() if key == IHALPHA and scanner.sees("y"): game.damage[i] = 10.0 proutn("Examine/change events? ") if ja() == True: ev = event() w = coord() legends = { FSNOVA: "Supernova ", FTBEAM: "T Beam ", FSNAP: "Snapshot ", FBATTAK: "Base Attack ", FCDBAS: "Base Destroy ", FSCMOVE: "SC Move ", FSCDBAS: "SC Base Destroy ", FDSPROB: "Probe Move ", FDISTR: "Distress Call ", FENSLV: "Enslavement ", FREPRO: "Klingon Build ", } for i in range(1, NEVENTS): proutn(legends[i]) if is_scheduled(i): proutn("%.2f" % (scheduled(i)-game.state.date)) if i == FENSLV or i == FREPRO: ev = findevent(i) proutn(" in %s" % ev.quadrant) else: proutn("never") proutn("? ") scanner.chew() key = scanner.next() if key == 'n': unschedule(i) scanner.chew() elif key == IHREAL: ev = schedule(i, scanner.real) if i == FENSLV or i == FREPRO: scanner.chew() proutn("In quadrant- ") key = scanner.next() # IHEOL says to leave coordinates as they are if key != IHEOL: if key != IHREAL: prout("Event %d canceled, no x coordinate." % (i)) unschedule(i) continue w.i = int(round(scanner.real)) key = scanner.next() if key != IHREAL: prout("Event %d canceled, no y coordinate." % (i)) unschedule(i) continue w.j = int(round(scanner.real)) ev.quadrant = w scanner.chew() proutn("Induce supernova here? ") if ja() == True: game.state.galaxy[game.quadrant.i][game.quadrant.j].supernova = True atover(True) | af15867a294e48006eba4fd9997cae401ccbfb05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/af15867a294e48006eba4fd9997cae401ccbfb05/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
3501,
13332,
315,
1862,
358,
326,
8216,
1031,
364,
10450,
1199,
450,
322,
82,
2932,
7013,
7575,
35,
9369,
309,
26879,
1435,
422,
1053,
30,
309,
7920,
18,
15358,
411,
7920,
18,
267,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
3501,
13332,
315,
1862,
358,
326,
8216,
1031,
364,
10450,
1199,
450,
322,
82,
2932,
7013,
7575,
35,
9369,
309,
26879,
1435,
422,
1053,
30,
309,
7920,
18,
15358,
411,
7920,
18,
267,... |
mean must be a 1 dimensional array. cov must be a square two dimensional array with the same number of rows and columns as mean has elements. | def multivariate_normal(mean, cov, size=None): """multivariate_normal(mean, cov) or multivariate_normal(mean, cov, [m, n, ...]) returns an array containing multivariate normally distributed random numbers with specified mean and covariance. | def multivariate_normal(mean, cov, shape=[]): """multivariate_normal(mean, cov) or multivariate_normal(mean, cov, [m, n, ...]) returns an array containing multivariate normally distributed random numbers with specified mean and covariance. mean must be a 1 dimensional array. cov must be a square two dimensional array with the same number of rows and columns as mean has elements. The first form returns a single 1-D array containing a multivariate normal. The second form returns an array of shape (m, n, ..., cov.shape[0]). In this case, output[i,j,...,:] is a 1-D array containing a multivariate normal.""" # Check preconditions on arguments mean = Numeric.array(mean) cov = Numeric.array(cov) if len(mean.shape) != 1: raise ArgumentError, "mean must be 1 dimensional." if (len(cov.shape) != 2) or (cov.shape[0] != cov.shape[1]): raise ArgumentError, "cov must be 2 dimensional and square." if mean.shape[0] != cov.shape[0]: raise ArgumentError, "mean and cov must have same length." # Compute shape of output if isinstance(shape, int): shape = [shape] final_shape = list(shape[:]) final_shape.append(mean.shape[0]) # Create a matrix of independent standard normally distributed random # numbers. The matrix has rows with the same length as mean and as # many rows are necessary to form a matrix of shape final_shape. x = standard_normal(Numeric.multiply.reduce(final_shape)) x.shape = (Numeric.multiply.reduce(final_shape[0:len(final_shape)-1]), mean.shape[0]) # Transform matrix of standard normals into matrix where each row # contains multivariate normals with the desired covariance. # Compute A such that matrixmultiply(transpose(A),A) == cov. # Then the matrix products of the rows of x and A has the desired # covariance. Note that sqrt(s)*v where (u,s,v) is the singular value # decomposition of cov is such an A. (u,s,v) = LinearAlgebra.singular_value_decomposition(cov) x = Numeric.matrixmultiply(x*Numeric.sqrt(s),v) # The rows of x now have the correct covariance but mean 0. Add # mean to each row. Then each row will have mean mean. Numeric.add(mean,x,x) x.shape = tuple(final_shape) return x | 9bb983356b5dc2f19a389befc72da89fafe4fef8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9bb983356b5dc2f19a389befc72da89fafe4fef8/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1778,
27693,
67,
6130,
12,
7079,
16,
10613,
16,
2179,
33,
8526,
4672,
3536,
5421,
27693,
67,
6130,
12,
7079,
16,
10613,
13,
578,
1778,
27693,
67,
6130,
12,
7079,
16,
10613,
16,
306,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1778,
27693,
67,
6130,
12,
7079,
16,
10613,
16,
2179,
33,
8526,
4672,
3536,
5421,
27693,
67,
6130,
12,
7079,
16,
10613,
13,
578,
1778,
27693,
67,
6130,
12,
7079,
16,
10613,
16,
306,
81... |
_CheckRetCode, c_int | _ret_lc_concord() | # typedef void (*lc_callback)(uint32_t, uint32_t, uint32_t, void*); | 252469d959d952d07c6c2b796be96c97a8628abc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3138/252469d959d952d07c6c2b796be96c97a8628abc/libconcord.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
618,
536,
918,
261,
14,
17704,
67,
3394,
21433,
11890,
1578,
67,
88,
16,
2254,
1578,
67,
88,
16,
2254,
1578,
67,
88,
16,
918,
14,
1769,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
618,
536,
918,
261,
14,
17704,
67,
3394,
21433,
11890,
1578,
67,
88,
16,
2254,
1578,
67,
88,
16,
2254,
1578,
67,
88,
16,
918,
14,
1769,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
print saltos | def doiskip(pagetext): saltos=getautoskip() print saltos for salto in saltos: rex=ur'\{\{\s*['+salto[0].upper()+salto[0].lower()+']'+salto[1:]+'(\}\}|\|)' print rex if re.search(rex, pagetext): return True return False | 3544c7266aabc57fb0ad9f13cc0f9f47b922333d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/3544c7266aabc57fb0ad9f13cc0f9f47b922333d/imagecopy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
291,
1834,
12,
9095,
27830,
4672,
4286,
538,
33,
588,
21996,
1834,
1435,
225,
364,
12814,
869,
316,
4286,
538,
30,
28929,
33,
295,
8314,
23241,
23241,
87,
14,
3292,
15,
21982,
869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
291,
1834,
12,
9095,
27830,
4672,
4286,
538,
33,
588,
21996,
1834,
1435,
225,
364,
12814,
869,
316,
4286,
538,
30,
28929,
33,
295,
8314,
23241,
23241,
87,
14,
3292,
15,
21982,
869,
... | |
else: lc = meta_serv.loadChannelAcquisitionData([long(self._obj.id.val)]) | elif self._obj.logicalChannel is None: return None else: lc = meta_serv.loadChannelAcquisitionData([long(self._obj.logicalChannel.id.val)]) | def getLogicalChannel(self): meta_serv = self._conn.getMetadataService() if self._obj is None: return None else: lc = meta_serv.loadChannelAcquisitionData([long(self._obj.id.val)]) if lc is not None and len(lc) > 0: return LogicalChannelWrapper(self._conn, lc[0]) return None | 7e384659a5b51aae8c39adc52ea7771e0f4c8550 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/7e384659a5b51aae8c39adc52ea7771e0f4c8550/gateway.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9189,
1706,
2909,
12,
2890,
4672,
2191,
67,
23039,
273,
365,
6315,
4646,
18,
588,
2277,
1179,
1435,
309,
365,
6315,
2603,
353,
599,
30,
327,
599,
1327,
365,
6315,
2603,
18,
20300,
2909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9189,
1706,
2909,
12,
2890,
4672,
2191,
67,
23039,
273,
365,
6315,
4646,
18,
588,
2277,
1179,
1435,
309,
365,
6315,
2603,
353,
599,
30,
327,
599,
1327,
365,
6315,
2603,
18,
20300,
2909,
... |
if type(keys) is not ListType: keys=[keys] | if type(keys) is type(''): if not keys or not strip(keys): return None keys=[keys] | def _apply_index(self, request, cid='', ListType=[]): | c6fb076591e9ec507cf51843363f406b3b21db9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/c6fb076591e9ec507cf51843363f406b3b21db9c/TextIndex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9010,
67,
1615,
12,
2890,
16,
590,
16,
7504,
2218,
2187,
987,
559,
33,
8526,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9010,
67,
1615,
12,
2890,
16,
590,
16,
7504,
2218,
2187,
987,
559,
33,
8526,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return os.system(s) | if interactive: e = os.system(s) return e else: x = os.popen3(s).read() x[0].close() out = x[1].read() err = x[2].read() return out, err | def __call__(self, cmd, check_initialized=True): """ Run 'hg cmd' where cmd is an arbitrary string in the hg repository. """ self._warning() s = 'cd "%s" && hg %s'%(self.__dir, cmd) print s return os.system(s) | 4d72141a865873e331e745d132eac0c636099b90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/4d72141a865873e331e745d132eac0c636099b90/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1797,
16,
866,
67,
13227,
33,
5510,
4672,
3536,
1939,
296,
26981,
1797,
11,
1625,
1797,
353,
392,
11078,
533,
316,
326,
22576,
3352,
18,
3536,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1797,
16,
866,
67,
13227,
33,
5510,
4672,
3536,
1939,
296,
26981,
1797,
11,
1625,
1797,
353,
392,
11078,
533,
316,
326,
22576,
3352,
18,
3536,
365,
6315,
... |
def Abort(self, recipe_id, msg): | def Abort(self, task_id, msg): | def Abort(self, recipe_id, msg): """ Set task status to Aborted """ try: task = RecipeTask.by_id(task_id) except InvalidRequestError: raise BX(_('Invalid recipe ID: %s' % recipe_id)) return task.Abort(msg) | f6039c8131a27407379f7b50b2cedaa187691bf3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/f6039c8131a27407379f7b50b2cedaa187691bf3/recipetasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14263,
12,
2890,
16,
1562,
67,
350,
16,
1234,
4672,
3536,
1000,
1562,
1267,
358,
14263,
329,
3536,
775,
30,
1562,
273,
7776,
3151,
2174,
18,
1637,
67,
350,
12,
4146,
67,
350,
13,
1335,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14263,
12,
2890,
16,
1562,
67,
350,
16,
1234,
4672,
3536,
1000,
1562,
1267,
358,
14263,
329,
3536,
775,
30,
1562,
273,
7776,
3151,
2174,
18,
1637,
67,
350,
12,
4146,
67,
350,
13,
1335,... |
if not isinstance(doc, ClassDoc): continue | def _write_class_tree(self, public, private): """ @return: The HTML code for the class hierarchy tree. This is used by L{_trees_to_html} to construct the hierarchy page. @rtype: C{string} """ str = '<ul>\n' public.write(str); private.write(str) | dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
1106,
67,
3413,
12,
2890,
16,
1071,
16,
3238,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
667,
9360,
2151,
18,
225,
1220,
353,
1399,
635,
511,
95,
67,
17204,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
1106,
67,
3413,
12,
2890,
16,
1071,
16,
3238,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
667,
9360,
2151,
18,
225,
1220,
353,
1399,
635,
511,
95,
67,
17204,
... | |
result += ";" | result += ";\n" | def statements(node): result = "" length = len(node)-1 for pos, child in enumerate(node): code = compress(child) if code == "": continue result += code # Micro-Optimization: Omit semicolon in places where not required # Rule: Closing brace of the original child make a semicolon optional # Functions might be defined as a modern expression closure without braces if child.type == "function" and not getattr(child, "expressionClosure", False): continue # Switch/Try statements must have braces if child.type in ("switch", "try"): continue # If blocks might have braces for both, if and else if child.type == "if" and len(child.thenPart) != 1: continue # Loops might have braces => check body if child.type in ("while", "for_in", "for") and len(child.body) != 1: continue # Micro-Optimization: Omit semicolon on last statement if pos != length: result += ";" return result | dc4be74e05f8704c44c6e99305663d8c2247a4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/dc4be74e05f8704c44c6e99305663d8c2247a4b3/Compressor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6317,
12,
2159,
4672,
563,
273,
1408,
769,
273,
562,
12,
2159,
24950,
21,
364,
949,
16,
1151,
316,
4241,
12,
2159,
4672,
981,
273,
8099,
12,
3624,
13,
309,
981,
422,
1408,
30,
1324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6317,
12,
2159,
4672,
563,
273,
1408,
769,
273,
562,
12,
2159,
24950,
21,
364,
949,
16,
1151,
316,
4241,
12,
2159,
4672,
981,
273,
8099,
12,
3624,
13,
309,
981,
422,
1408,
30,
1324,
... |
def runRecordedScripts(options): | def runRecordedScripts(options, test=None): | def runRecordedScripts(options): """ Run recorded script tests >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> options.modes = ['release', 'debug'] >>> runRecordedScripts(options) /.../release/RunPython... Chandler.py --create --catch=tests --profileDir=test_profile --parcelPath=tools/cats/DataFiles --recordedTest=... - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... """ failed = False testlist = [] for item in glob.glob(os.path.join('tools', 'cats', 'recorded_scripts', '*.py')): testlist.append(os.path.split(item)[1][:-3]) for mode in options.modes: for test in testlist: cmd = options.runchandler[mode][:] cmd += ['--create', '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--recordedTest=%s' % test, ] if options.params: cmd += [options.params] if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=1200) if result != 0: log('***Error exit code=%d' % result) failed = True failedTests.append('recordedTest %s' % test) if not options.noStop: break log('- + ' * 15) return failed | e4b7ff91de90d811db3db9406715019851f3f81a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/e4b7ff91de90d811db3db9406715019851f3f81a/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
426,
3850,
785,
15041,
12,
2116,
16,
1842,
33,
7036,
4672,
3536,
1939,
16421,
2728,
7434,
225,
4080,
702,
273,
1109,
1320,
1435,
4080,
866,
1320,
12,
2116,
13,
4080,
702,
18,
25011... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
426,
3850,
785,
15041,
12,
2116,
16,
1842,
33,
7036,
4672,
3536,
1939,
16421,
2728,
7434,
225,
4080,
702,
273,
1109,
1320,
1435,
4080,
866,
1320,
12,
2116,
13,
4080,
702,
18,
25011... |
, options[ "--reports" ].split( "," ) | , options[ '--reports' ].split( ',' ) | def accept_args( args ): ( option_pairs, rest_args ) = getopt.getopt( sys.argv[1:], "", [ "locate-root=" , "tag=" , "expected-results=" , "failures-markup=" , "comment=" , "results-dir=" , "results-prefix=" , "xsltproc=" , "dont-collect-logs" , "reports=" , "help" ] ) options = { "--comment": "" , "--expected-results": "" , "--failures-markup": "" , "--reports" : string.join( report_types, "," ) } map( lambda x: options.__setitem__( x[0], x[1] ), option_pairs ) if ( options.has_key( "--help" ) or len( options.keys() ) == 4 ): usage() sys.exit( 1 ) if not options.has_key( "--results-dir" ): options[ "--results-dir" ] = options[ "--locate-root" ] return ( options[ "--locate-root" ] , options[ "--tag" ] , options[ "--expected-results" ] , options[ "--failures-markup" ] , options[ "--comment" ] , options[ "--results-dir" ] , options[ "--results-prefix" ] , options[ "--xsltproc" ] , options.has_key( '--dont-collect-logs' ) , options[ "--reports" ].split( "," ) ) | 032bc19415907e1c169b60349b3cd5a706b5789e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/032bc19415907e1c169b60349b3cd5a706b5789e/report.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
67,
1968,
12,
833,
262,
30,
261,
1456,
67,
11545,
16,
3127,
67,
1968,
262,
273,
336,
3838,
18,
588,
3838,
12,
2589,
18,
19485,
63,
21,
30,
6487,
23453,
306,
315,
25450,
17,
308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
67,
1968,
12,
833,
262,
30,
261,
1456,
67,
11545,
16,
3127,
67,
1968,
262,
273,
336,
3838,
18,
588,
3838,
12,
2589,
18,
19485,
63,
21,
30,
6487,
23453,
306,
315,
25450,
17,
308... |
""" Given a number of images, skip the first -number- images. """ | """ Given a number of files, skip the first -number- files. """ | def skipImages(self, skip_number, limit): """ Given a number of images, skip the first -number- images. """ # If the images to skip are more the images to check, make them the same number if skip_number == 0: wikipedia.output(u'\t\t>> No images to skip...<<') return False if skip_number > limit: skip_number = limit # Print a starting message only if no images has been skipped if self.skip_list == []: if skip_number == 1: wikipedia.output(u'Skipping the first file:\n') else: wikipedia.output(u'Skipping the first %s files:\n' % skip_number) # If we still have pages to skip: if len(self.skip_list) < skip_number: wikipedia.output(u'Skipping %s...' % self.imageName) self.skip_list.append(self.imageName) if skip_number == 1: wikipedia.output('') return True else: wikipedia.output('') # Print a blank line. return False | 8913e1740cb89be9fcacfa047c0f66333f53d469 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/8913e1740cb89be9fcacfa047c0f66333f53d469/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2488,
8946,
12,
2890,
16,
2488,
67,
2696,
16,
1800,
4672,
3536,
16803,
279,
1300,
434,
1390,
16,
2488,
326,
1122,
300,
2696,
17,
1390,
18,
3536,
468,
971,
326,
4602,
358,
2488,
854,
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,
2488,
8946,
12,
2890,
16,
2488,
67,
2696,
16,
1800,
4672,
3536,
16803,
279,
1300,
434,
1390,
16,
2488,
326,
1122,
300,
2696,
17,
1390,
18,
3536,
468,
971,
326,
4602,
358,
2488,
854,
18... |
self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ | pass | def __init__(self, about=None, meta=None, label=None, id=None, tree=None, network=None, valueOf_=None, mixedclass_=None, content_=None): super(TreeAndNetworkSet, self).__init__(about, meta, label, id, valueOf_, mixedclass_, content_, ) self.tree = _cast(None, tree) self.network = _cast(None, network) self.valueOf_ = valueOf_ if mixedclass_ is None: self.mixedclass_ = MixedContainer else: self.mixedclass_ = mixedclass_ if content_ is None: self.content_ = [] else: self.content_ = content_ self.valueOf_ = valueOf_ | 9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2973,
33,
7036,
16,
2191,
33,
7036,
16,
1433,
33,
7036,
16,
612,
33,
7036,
16,
2151,
33,
7036,
16,
2483,
33,
7036,
16,
4323,
67,
33,
7036,
16,
7826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2973,
33,
7036,
16,
2191,
33,
7036,
16,
1433,
33,
7036,
16,
612,
33,
7036,
16,
2151,
33,
7036,
16,
2483,
33,
7036,
16,
4323,
67,
33,
7036,
16,
7826,
... |
def __init__(self, id, name, parent, mimetype, urlbase, UPnPClass,update=False): | def __init__(self, id, name, parent, mimetype, urlbase, update=False): | def __init__(self, id, name, parent, mimetype, urlbase, UPnPClass,update=False): self.id = id self.name = name self.mimetype = mimetype self.parent = parent if parent: parent.add_child(self,update=update) | 28a4827f7edffc67075d2eb51c75e6d0acab3d07 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11626/28a4827f7edffc67075d2eb51c75e6d0acab3d07/buzztard_control.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
612,
16,
508,
16,
982,
16,
12595,
16,
880,
1969,
16,
1089,
33,
8381,
4672,
365,
18,
350,
273,
612,
365,
18,
529,
273,
508,
365,
18,
22571,
273,
12595,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
612,
16,
508,
16,
982,
16,
12595,
16,
880,
1969,
16,
1089,
33,
8381,
4672,
365,
18,
350,
273,
612,
365,
18,
529,
273,
508,
365,
18,
22571,
273,
12595,
... |
self.idletimer.start(0) | self.idletimer.start(100) | def run(self): self.gmainloop = gobject.MainLoop() self.gcontext = self.gmainloop.get_context() self.idletimer = QTimer(QApplication.instance()) QObject.connect(self.idletimer, SIGNAL('timeout()'), self.on_idle) self.idletimer.start(0) # FIXME: Ugly CPU-consuming hack! Not even sure if it actually fixes the # issue or works around it. But how else can we fix those # damn GLib Event Loop issues? Needs more research. The first # segfault is caused by pymsn/pymsn/gnet/io/iochannel.py # because of this function: self._channel.add_watch(cond, handler) self.app.exec_() | 1c16f6708de5fc182e1502702a9ffebf00454f13 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/206/1c16f6708de5fc182e1502702a9ffebf00454f13/main_loop.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
18,
75,
5254,
6498,
273,
314,
1612,
18,
6376,
6452,
1435,
365,
18,
75,
2472,
273,
365,
18,
75,
5254,
6498,
18,
588,
67,
2472,
1435,
365,
18,
350,
1810,
441... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
18,
75,
5254,
6498,
273,
314,
1612,
18,
6376,
6452,
1435,
365,
18,
75,
2472,
273,
365,
18,
75,
5254,
6498,
18,
588,
67,
2472,
1435,
365,
18,
350,
1810,
441... |
irc.ququeMsg(ircmsgs.IrcMsg("CAP LS")) | irc.queueMsg(ircmsgs.IrcMsg("CAP LS")) | def do376(self, irc, msg, force=False): # End of /MOTD command. """ The new freenode ircd-seven requires using the 'CAP' command to set capabilities, rather than hyperirons 'CAPAB' command. You request "CAP REQ IDENTIFY-MSG" and the server will respond with either "CAP <nick> ACK :identify-msg" to acknowledge, or "CAP <nick> NAK :identify-msg" to indicate failure. Other than that, it's the same. """ if not hasattr(irc.getRealIrc(), "_Freenode_capabed") or force: # Do this only once realIrc = irc.getRealIrc() realIrc._Freenode_capabed = False realIrc._Freenode_capabed_notices = False # Try the CAP command first irc.ququeMsg(ircmsgs.IrcMsg("CAP LS")) | 99a0d6ab9f937c66ebdffffba0fd0598989a6a69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3124/99a0d6ab9f937c66ebdffffba0fd0598989a6a69/plugin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
6418,
26,
12,
2890,
16,
277,
1310,
16,
1234,
16,
2944,
33,
8381,
4672,
468,
4403,
434,
342,
49,
1974,
40,
1296,
18,
3536,
1021,
394,
284,
2842,
390,
277,
1310,
72,
17,
307,
3995... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6418,
26,
12,
2890,
16,
277,
1310,
16,
1234,
16,
2944,
33,
8381,
4672,
468,
4403,
434,
342,
49,
1974,
40,
1296,
18,
3536,
1021,
394,
284,
2842,
390,
277,
1310,
72,
17,
307,
3995... |
def listdir(path): | def listdir(path=''): | def listdir(path): f = _findFileFromPath(path) if not isinstance(f, FakeDir): raise OSError(errno.ENOTDIR, '') return f.getChildren() | aa20dce7c6d5bb9f33d932aab3323692451f4886 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/aa20dce7c6d5bb9f33d932aab3323692451f4886/os_mock.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13529,
12,
803,
2218,
11,
4672,
284,
273,
389,
4720,
812,
23064,
12,
803,
13,
225,
309,
486,
1549,
12,
74,
16,
11551,
1621,
4672,
1002,
10002,
12,
19088,
18,
1157,
1974,
4537,
16,
2870... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13529,
12,
803,
2218,
11,
4672,
284,
273,
389,
4720,
812,
23064,
12,
803,
13,
225,
309,
486,
1549,
12,
74,
16,
11551,
1621,
4672,
1002,
10002,
12,
19088,
18,
1157,
1974,
4537,
16,
2870... |
target = _target_function04) | target = _target_function04, callback_stdout = ch.cb_stdout, buffer_stdout = buffer_stdout) | def _target_function04 (args, kwds, connection) : return _tst_print(*args, **kwds) | 87aa46994d8d95744d69de303382b8021d70b4a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/87aa46994d8d95744d69de303382b8021d70b4a8/thread_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3299,
67,
915,
3028,
261,
1968,
16,
17149,
16,
1459,
13,
294,
327,
389,
88,
334,
67,
1188,
30857,
1968,
16,
2826,
25577,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3299,
67,
915,
3028,
261,
1968,
16,
17149,
16,
1459,
13,
294,
327,
389,
88,
334,
67,
1188,
30857,
1968,
16,
2826,
25577,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
To provide usable information (ie., you want sensible df(1) | To provide usable information (ie., you want sensible df(1) | def statfs(self): """ Should return an object with statvfs attributes (f_bsize, f_frsize...). Eg., the return value of os.statvfs() is such a thing (since py 2.2). If you are not reusing an existing statvfs object, start with fuse.StatVFS(), and define the attributes. | 03de2eb4e374d82b78113e5f840457f7ceae9f0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5459/03de2eb4e374d82b78113e5f840457f7ceae9f0c/xmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
610,
2556,
12,
2890,
4672,
3536,
9363,
327,
392,
733,
598,
610,
90,
2556,
1677,
261,
74,
67,
70,
1467,
16,
284,
67,
4840,
1467,
2777,
2934,
512,
75,
12990,
326,
327,
460,
434,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
610,
2556,
12,
2890,
4672,
3536,
9363,
327,
392,
733,
598,
610,
90,
2556,
1677,
261,
74,
67,
70,
1467,
16,
284,
67,
4840,
1467,
2777,
2934,
512,
75,
12990,
326,
327,
460,
434,
1140,
... |
if self.HasCapture(): | if self.HasCapture(): | def LeftUpEvent(self,event): if self.HasCapture(): self.ReleaseMouse() if self.GUIMode: if self.GUIMode == "ZoomIn": if event.LeftUp() and not self.StartRBBox is None: self.PrevRBBox = None EndRBBox = event.GetPosition() StartRBBox = self.StartRBBox # if mouse has moved less that ten pixels, don't use the box. if ( abs(StartRBBox[0] - EndRBBox[0]) > 10 and abs(StartRBBox[1] - EndRBBox[1]) > 10 ): EndRBBox = self.PixelToWorld(EndRBBox) StartRBBox = self.PixelToWorld(StartRBBox) BB = array(((min(EndRBBox[0],StartRBBox[0]), min(EndRBBox[1],StartRBBox[1])), (max(EndRBBox[0],StartRBBox[0]), max(EndRBBox[1],StartRBBox[1]))),Float) self.ZoomToBB(BB) else: Center = self.PixelToWorld(StartRBBox) self.Zoom(1.5,Center) self.StartRBBox = None elif self.GUIMode == "Move": if not self.StartMove is None: StartMove = self.StartMove EndMove = array((event.GetX(),event.GetY())) if sum((StartMove-EndMove)**2) > 16: self.MoveImage(StartMove-EndMove,'Pixel') self.StartMove = None elif self.GUIMode == "Mouse": EventType = EVT_FC_LEFT_UP if not self.HitTest(event, EventType): self._RaiseMouseEvent(event, EventType) else: pass | 015737a4632b2631e9dafc264bfa40b10cb5db49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/015737a4632b2631e9dafc264bfa40b10cb5db49/FloatCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13338,
1211,
1133,
12,
2890,
16,
2575,
4672,
309,
365,
18,
5582,
12372,
13332,
365,
18,
7391,
9186,
1435,
309,
365,
18,
43,
5370,
2309,
30,
309,
365,
18,
43,
5370,
2309,
422,
315,
1149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13338,
1211,
1133,
12,
2890,
16,
2575,
4672,
309,
365,
18,
5582,
12372,
13332,
365,
18,
7391,
9186,
1435,
309,
365,
18,
43,
5370,
2309,
30,
309,
365,
18,
43,
5370,
2309,
422,
315,
1149... |
warn("Google App Engine not found in %s" % options.gae_lib_root, RuntimeWarning) | raise | def configure(self, options, config): super(NoseGAE, self).configure(options, config) if not self.enabled: return self.config = config if options.gae_app is not None: self._path = options.gae_app else: self._path = config.workingDir if options.gae_lib_root is not None: root = self._gae_path = options.gae_lib_root for d in self.lib_dirs: sys.path.insert(0, os.path.join(root, d)) else: self._gae_path = None if options.gae_data is not None: self._data_path = options.gae_data self._temp_data = False else: self._data_path = os.path.join(tempfile.gettempdir(), 'nosegae.datastore') self._temp_data = True self.sandbox_enabled = options.sandbox_enabled try: from google.appengine.tools import dev_appserver from google.appengine.tools.dev_appserver_main import \ DEFAULT_ARGS, ARG_CLEAR_DATASTORE, ARG_LOG_LEVEL, \ ARG_DATASTORE_PATH, ARG_HISTORY_PATH self._gae = {'dev_appserver': dev_appserver, 'ARG_LOG_LEVEL': ARG_LOG_LEVEL, 'ARG_CLEAR_DATASTORE': ARG_CLEAR_DATASTORE, 'ARG_DATASTORE_PATH': ARG_DATASTORE_PATH, 'ARG_HISTORY_PATH': ARG_HISTORY_PATH, 'DEFAULT_ARGS': DEFAULT_ARGS} # prefill these into sys.modules import webob import yaml import django except ImportError, e: self.enabled = False warn("Google App Engine not found in %s" % options.gae_lib_root, RuntimeWarning) if sys.version_info[0:2] < (2,5): raise EnvironmentError( "Python version must be 2.5 or greater, like the Google App Engine environment. " "Tests are running with: %s" % sys.version) # As of SDK 1.2.5 the dev_appserver.py aggressively adds some logging handlers. # This removes the handlers but note that Nose will still capture logging and # report it during failures. See Issue 25 for more info. rootLogger = logging.getLogger() for handler in rootLogger.handlers: if isinstance(handler, logging.StreamHandler): rootLogger.removeHandler(handler) | f492a3f5888c368f17ceeefc01f54f9322c3c59f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7673/f492a3f5888c368f17ceeefc01f54f9322c3c59f/nosegae.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
12,
2890,
16,
702,
16,
642,
4672,
2240,
12,
2279,
307,
43,
16985,
16,
365,
2934,
14895,
12,
2116,
16,
642,
13,
309,
486,
365,
18,
5745,
30,
327,
365,
18,
1425,
273,
642,
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,
5068,
12,
2890,
16,
702,
16,
642,
4672,
2240,
12,
2279,
307,
43,
16985,
16,
365,
2934,
14895,
12,
2116,
16,
642,
13,
309,
486,
365,
18,
5745,
30,
327,
365,
18,
1425,
273,
642,
309,
... |
str += self._class_summary(classes, doc.sort_order(), 'Classes') str += self._class_summary(excepts, doc.sort_order(), 'Exceptions') str += self._func_summary(doc.functions(), doc.sort_order()) str += self._var_summary(doc.variables(), doc.sort_order(), uid) | str += self._class_summary(classes, doc.sortorder(), 'Classes') str += self._class_summary(excepts, doc.sortorder(), 'Exceptions') str += self._func_summary(doc.functions(), doc.sortorder(), None) str += self._var_summary(doc.variables(), doc.sortorder(), uid) | def _module_to_html(self, uid): """ @return: An HTML page describing the module identified by C{uid}. @rtype: C{string} @param uid: The unique identifier for the module that should be documented. @type uid: L{UID} """ # Get the module's documentation. doc = self._docmap[uid] | c953b2de7aa23b0dce9a80366ed13af227c1f7f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/c953b2de7aa23b0dce9a80366ed13af227c1f7f3/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2978,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
16868,
326,
1605,
9283,
635,
385,
95,
1911,
5496,
632,
86,
723,
30,
385,
95,
1080,
97,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2978,
67,
869,
67,
2620,
12,
2890,
16,
4555,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
16868,
326,
1605,
9283,
635,
385,
95,
1911,
5496,
632,
86,
723,
30,
385,
95,
1080,
97,
... |
repl = convert(counter) | def mapper(found): counter = 0 translations = {} for entry in found: counter += 1 repl = convert(counter) while repl in found: counter += 1 repl = convert(counter) translations[entry] = repl return translations | 7ad7aae0a2562791bd55ca8b3ccdd8df59422e64 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/7ad7aae0a2562791bd55ca8b3ccdd8df59422e64/variableoptimizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5815,
12,
7015,
4672,
3895,
273,
374,
7863,
273,
2618,
225,
364,
1241,
316,
1392,
30,
3895,
1011,
404,
225,
1323,
6831,
316,
1392,
30,
3895,
1011,
404,
225,
7863,
63,
4099,
65,
273,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5815,
12,
7015,
4672,
3895,
273,
374,
7863,
273,
2618,
225,
364,
1241,
316,
1392,
30,
3895,
1011,
404,
225,
1323,
6831,
316,
1392,
30,
3895,
1011,
404,
225,
7863,
63,
4099,
65,
273,
68... | |
dirstosearch = [os.path.expanduser('~'),'/usr/local','/sw','/opt','/opt/local'] | dirstosearch = [os.path.expanduser('~'),'/usr/local','/sw','/opt','/opt/local','/usr'] | def check_ifnetcdf4(netcdf4_dir): try: f = open(os.path.join(netcdf4_dir,'include/netcdf.h')) except IOError: return False isnetcdf4 = False for line in f: if line.startswith('nc_inq_compound'): isnetcdf4 = True return isnetcdf4 | f1eb3aa64cc6cc1ad404ee0a22e41ed0ec896a2d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8103/f1eb3aa64cc6cc1ad404ee0a22e41ed0ec896a2d/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
430,
2758,
24799,
24,
12,
2758,
24799,
24,
67,
1214,
4672,
775,
30,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2758,
24799,
24,
67,
1214,
11189,
6702,
19,
2758,
24799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
430,
2758,
24799,
24,
12,
2758,
24799,
24,
67,
1214,
4672,
775,
30,
284,
273,
1696,
12,
538,
18,
803,
18,
5701,
12,
2758,
24799,
24,
67,
1214,
11189,
6702,
19,
2758,
24799,
... |
compat_25 = hasattr(stats, 'stream') | compat_25 = hasattr(prof_stats, 'stream') | def report(self, stream): """Output profiler report. """ log.debug('printing profiler report') self.prof.close() prof_stats = stats.load(self.pfile) prof_stats.sort_stats(self.sort) | 6a6b11f71a35993a0ec48fedbfb775b5d1c2b3f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11821/6a6b11f71a35993a0ec48fedbfb775b5d1c2b3f6/prof.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2605,
12,
2890,
16,
1407,
4672,
3536,
1447,
16583,
2605,
18,
3536,
613,
18,
4148,
2668,
1188,
310,
16583,
2605,
6134,
365,
18,
16121,
18,
4412,
1435,
9214,
67,
5296,
273,
3177,
18,
945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2605,
12,
2890,
16,
1407,
4672,
3536,
1447,
16583,
2605,
18,
3536,
613,
18,
4148,
2668,
1188,
310,
16583,
2605,
6134,
365,
18,
16121,
18,
4412,
1435,
9214,
67,
5296,
273,
3177,
18,
945,
... |
if not hasattr(sys, "frozen") and sys.platform.startswith("win") and \ sys.hexversion < 0x2040000: print >> self.file, ' | print >> self.file, ' | def do_gen_file_header(self): la = self.typelib.GetLibAttr() moduleDoc = self.typelib.GetDocumentation(-1) docDesc = "" if moduleDoc[1]: docDesc = moduleDoc[1] | ec8d8ae2d56a1d560a9539364e89286169d26bec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/ec8d8ae2d56a1d560a9539364e89286169d26bec/genpy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4507,
67,
768,
67,
3374,
12,
2890,
4672,
7125,
273,
365,
18,
12846,
30575,
18,
967,
5664,
3843,
1435,
1605,
1759,
273,
365,
18,
12846,
30575,
18,
967,
18905,
19236,
21,
13,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
4507,
67,
768,
67,
3374,
12,
2890,
4672,
7125,
273,
365,
18,
12846,
30575,
18,
967,
5664,
3843,
1435,
1605,
1759,
273,
365,
18,
12846,
30575,
18,
967,
18905,
19236,
21,
13,
99... |
return self.__class__(fp, self._mangle_from_, self.__maxheaderlen) | return self.__class__(fp, self._mangle_from_, self._maxheaderlen) | def clone(self, fp): """Clone this generator with the exact same options.""" return self.__class__(fp, self._mangle_from_, self.__maxheaderlen) | 06f820621b37df5c977e2d2239c494cb51a805fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/06f820621b37df5c977e2d2239c494cb51a805fb/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3236,
12,
2890,
16,
4253,
4672,
3536,
10930,
333,
4456,
598,
326,
5565,
1967,
702,
12123,
327,
365,
16186,
1106,
972,
12,
7944,
16,
365,
6315,
81,
4341,
67,
2080,
67,
16,
365,
16186,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3236,
12,
2890,
16,
4253,
4672,
3536,
10930,
333,
4456,
598,
326,
5565,
1967,
702,
12123,
327,
365,
16186,
1106,
972,
12,
7944,
16,
365,
6315,
81,
4341,
67,
2080,
67,
16,
365,
16186,
1... |
return self.webPrint(event) | return ITextArea(self).printClean(event) | def contactChangedNick(self, person, newnick): basechat.Conversation.contactChangedNick(self, person, newnick) event = "-!- %s is now known as %s" % (person.name, newnick) return self.webPrint(event) | 06c8966914958e7880646f44df34f9428860bdf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/06c8966914958e7880646f44df34f9428860bdf3/minchat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5388,
5033,
29756,
12,
2890,
16,
6175,
16,
394,
17091,
4672,
1026,
10880,
18,
15717,
18,
8994,
5033,
29756,
12,
2890,
16,
6175,
16,
394,
17091,
13,
871,
273,
3701,
5,
17,
738,
87,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5388,
5033,
29756,
12,
2890,
16,
6175,
16,
394,
17091,
4672,
1026,
10880,
18,
15717,
18,
8994,
5033,
29756,
12,
2890,
16,
6175,
16,
394,
17091,
13,
871,
273,
3701,
5,
17,
738,
87,
353,... |
spos, epos = (lnum, start), (lnum, end) | spos, epos, pos = (lnum, start), (lnum, end), end | def tokenize(readline, tokeneater=printtoken): lnum = parenlev = continued = 0 namechars, numchars = string.letters + '_', string.digits contstr = '' indents = [0] while 1: # loop over lines in stream line = readline() lnum = lnum + 1 pos, max = 0, len(line) if contstr: # continued string if not line: raise TokenError, "EOF within multi-line string" if endprog.search(line) >= 0: pos = end = endprog.regs[0][1] tokeneater(STRING, contstr + line[:end], strstart, (lnum, end), line) contstr = '' else: contstr = contstr + line continue elif parenlev == 0 and not continued: # new statement if not line: break column = 0 while pos < max: # measure leading whitespace if line[pos] == ' ': column = column + 1 elif line[pos] == '\t': column = (column/tabsize + 1)*tabsize elif line[pos] == '\f': column = 0 else: break pos = pos + 1 if pos == max: break if line[pos] in '#\r\n': # skip comments or blank lines tokeneater((NEWLINE, COMMENT)[line[pos] == '#'], line[pos:], (lnum, pos), (lnum, len(line)), line) continue if column > indents[-1]: # count indents or dedents indents.append(column) tokeneater(INDENT, line[:pos], (lnum, 0), (lnum, pos), line) while column < indents[-1]: indents = indents[:-1] tokeneater(DEDENT, line[:pos], (lnum, 0), (lnum, pos), line) else: # continued statement if not line: raise TokenError, "EOF within multi-line statement" continued = 0 while pos < max: if pseudoprog.match(line, pos) > 0: # scan for tokens start, end = pseudoprog.regs[1] spos, epos = (lnum, start), (lnum, end) token, initial = line[start:end], line[start] pos = end if initial in namechars: # ordinary name tokeneater(NAME, token, spos, epos, line) elif initial in numchars: # ordinary number tokeneater(NUMBER, token, spos, epos, line) elif initial in '\r\n': tokeneater(NEWLINE, token, spos, epos, line) elif initial == '#': tokeneater(COMMENT, token, spos, epos, line) elif initial == '\\': # continued stmt continued = 1 elif token in ('\'\'\'', '"""'): # triple-quoted endprog = endprogs[token] if endprog.search(line, pos) >= 0: # all on one line pos = endprog.regs[0][1] token = line[start:pos] tokeneater(STRING, token, spos, (lnum, pos), line) else: strstart = (lnum, start) # multiple lines contstr = line[start:] break elif initial in '\'"': if token[-1] == '\n': # continued string strstart = (lnum, start) endprog, contstr = endprogs[initial], line[start:] break else: # ordinary string tokeneater(STRING, token, spos, epos, line) else: if initial in '([{': parenlev = parenlev + 1 elif initial in ')]}': parenlev = parenlev - 1 tokeneater(OP, token, spos, epos, line) else: tokeneater(ERRORTOKEN, line[pos], spos, (lnum, pos+1), line) pos = pos + 1 for indent in indents[1:]: # pop remaining indent levels tokeneater(DEDENT, '', (lnum, 0), (lnum, 0), '') | 448f6b3aedc2486a91ef9b20e7f70017c051de7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/448f6b3aedc2486a91ef9b20e7f70017c051de7c/tokenize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13672,
12,
896,
1369,
16,
1147,
73,
2045,
33,
1188,
2316,
4672,
328,
2107,
273,
22146,
298,
90,
273,
17545,
5957,
273,
374,
508,
7549,
16,
818,
7549,
273,
533,
18,
26054,
397,
2070,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13672,
12,
896,
1369,
16,
1147,
73,
2045,
33,
1188,
2316,
4672,
328,
2107,
273,
22146,
298,
90,
273,
17545,
5957,
273,
374,
508,
7549,
16,
818,
7549,
273,
533,
18,
26054,
397,
2070,
21... |
for line in open(file).xreadlines(): | for line in open(file): | def eval_file(self, file): global skip_expected if skip_expected: raise unittest.SkipTest return for line in open(file).xreadlines(): line = line.replace('\r\n', '').replace('\n', '') #print line try: t = self.eval_line(line) except DecimalException, exception: #Exception raised where there shoudn't have been one. self.fail('Exception "'+exception.__class__.__name__ + '" raised on line '+line) | f6fcf1773375414de2096c5062c3bbd03540e518 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/f6fcf1773375414de2096c5062c3bbd03540e518/test_decimal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
67,
768,
12,
2890,
16,
585,
4672,
2552,
2488,
67,
3825,
309,
2488,
67,
3825,
30,
1002,
2836,
3813,
18,
6368,
4709,
327,
364,
980,
316,
1696,
12,
768,
4672,
980,
273,
980,
18,
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,
5302,
67,
768,
12,
2890,
16,
585,
4672,
2552,
2488,
67,
3825,
309,
2488,
67,
3825,
30,
1002,
2836,
3813,
18,
6368,
4709,
327,
364,
980,
316,
1696,
12,
768,
4672,
980,
273,
980,
18,
2... |
print "Try something like install_package('moin-1.5.4.p0')," | print "Try something like install_package('moin-1.5.6')," | def wiki_create_instance(directory='sage_wiki'): try: from MoinMoin.server.standalone import StandaloneConfig, run except ImportError: print "You must install the optional moin package." print "Try something like install_package('moin-1.5.4.p0')," print "but note that the package name may have a different" print "version. Use optional_packages() to get a list" print "of current package names." return share = '%s/share/moin'%misc.SAGE_LOCAL if os.path.exists(directory): print "Directory '%s' already exists."%directory return os.system('cp -r %s/data %s/'%(share,directory)) os.system('cp -r %s/underlay %s/'%(share,directory)) os.system('cp %s/config/wikiconfig.py %s/'%(share,directory)) os.system('cp %s/server/moin.py %s/'%(share,directory)) | 51acdbddbcade97e5c8335403eeb782789801f21 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/51acdbddbcade97e5c8335403eeb782789801f21/moin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9050,
67,
2640,
67,
1336,
12,
5149,
2218,
87,
410,
67,
13044,
11,
4672,
775,
30,
628,
490,
885,
49,
885,
18,
3567,
18,
10145,
12451,
1930,
934,
464,
12451,
809,
16,
1086,
1335,
11308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9050,
67,
2640,
67,
1336,
12,
5149,
2218,
87,
410,
67,
13044,
11,
4672,
775,
30,
628,
490,
885,
49,
885,
18,
3567,
18,
10145,
12451,
1930,
934,
464,
12451,
809,
16,
1086,
1335,
11308,
... |
SetupListAlert.configure_widgets(self, dialog, tree) | _SetupListAlert.configure_widgets(self, dialog, tree) | def configure_widgets(self, dialog, tree): assert self.min_select in (0, 1) SetupListAlert.configure_widgets(self, dialog, tree) selection = tree.get_selection() | 0c0d33f43620369fb91c3eb94fcd412bb75c28f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2366/0c0d33f43620369fb91c3eb94fcd412bb75c28f9/hig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
67,
18148,
12,
2890,
16,
6176,
16,
2151,
4672,
1815,
365,
18,
1154,
67,
4025,
316,
261,
20,
16,
404,
13,
225,
389,
7365,
682,
13298,
18,
14895,
67,
18148,
12,
2890,
16,
6176,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5068,
67,
18148,
12,
2890,
16,
6176,
16,
2151,
4672,
1815,
365,
18,
1154,
67,
4025,
316,
261,
20,
16,
404,
13,
225,
389,
7365,
682,
13298,
18,
14895,
67,
18148,
12,
2890,
16,
6176,
1... |
raise PKNotFoundError('table %r does not have a primary key defined' % attr) | raise PKNotFoundError('table %r does not have a primary key defined [columns: %s]' % (attr, ','.join(table.c.keys()))) | def __getattr__(self, attr): try: t = self._cache[attr] except KeyError: table = Table(attr, self._metadata, autoload=True, schema=self.schema) if not table.primary_key.columns: raise PKNotFoundError('table %r does not have a primary key defined' % attr) if table.columns: t = class_for_table(table) else: t = None self._cache[attr] = t return t | 773a7d92395be6607dacd3129b3b85f60cd06347 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/773a7d92395be6607dacd3129b3b85f60cd06347/sqlsoup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
775,
30,
268,
273,
365,
6315,
2493,
63,
1747,
65,
1335,
4999,
30,
1014,
273,
3555,
12,
1747,
16,
365,
6315,
4165,
16,
16674,
33,
5510,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
775,
30,
268,
273,
365,
6315,
2493,
63,
1747,
65,
1335,
4999,
30,
1014,
273,
3555,
12,
1747,
16,
365,
6315,
4165,
16,
16674,
33,
5510,
... |
zinfo.external_attr = st[0] << 16L | zinfo.external_attr = (st[0] & 0xFFFF) << 16L | def write(self, filename, arcname=None, compress_type=None): """Put the bytes from filename into the archive under the name arcname.""" st = os.stat(filename) mtime = time.localtime(st.st_mtime) date_time = mtime[0:6] # Create ZipInfo instance to store file information if arcname is None: zinfo = ZipInfo(filename, date_time) else: zinfo = ZipInfo(arcname, date_time) zinfo.external_attr = st[0] << 16L # Unix attributes if compress_type is None: zinfo.compress_type = self.compression else: zinfo.compress_type = compress_type self._writecheck(zinfo) fp = open(filename, "rb") zinfo.flag_bits = 0x00 zinfo.header_offset = self.fp.tell() # Start of header bytes # Must overwrite CRC and sizes with correct data later zinfo.CRC = CRC = 0 zinfo.compress_size = compress_size = 0 zinfo.file_size = file_size = 0 self.fp.write(zinfo.FileHeader()) zinfo.file_offset = self.fp.tell() # Start of file bytes if zinfo.compress_type == ZIP_DEFLATED: cmpr = zlib.compressobj(zlib.Z_DEFAULT_COMPRESSION, zlib.DEFLATED, -15) else: cmpr = None while 1: buf = fp.read(1024 * 8) if not buf: break file_size = file_size + len(buf) CRC = binascii.crc32(buf, CRC) if cmpr: buf = cmpr.compress(buf) compress_size = compress_size + len(buf) self.fp.write(buf) fp.close() if cmpr: buf = cmpr.flush() compress_size = compress_size + len(buf) self.fp.write(buf) zinfo.compress_size = compress_size else: zinfo.compress_size = file_size zinfo.CRC = CRC zinfo.file_size = file_size # Seek backwards and write CRC and file sizes position = self.fp.tell() # Preserve current position in file self.fp.seek(zinfo.header_offset + 14, 0) self.fp.write(struct.pack("<lll", zinfo.CRC, zinfo.compress_size, zinfo.file_size)) self.fp.seek(position, 0) self.filelist.append(zinfo) self.NameToInfo[zinfo.filename] = zinfo | 41e7536e49eaa7fb55bc383c27814bf7bc39e53c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/41e7536e49eaa7fb55bc383c27814bf7bc39e53c/zipfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1544,
16,
8028,
529,
33,
7036,
16,
8099,
67,
723,
33,
7036,
4672,
3536,
6426,
326,
1731,
628,
1544,
1368,
326,
5052,
3613,
326,
508,
8028,
529,
12123,
384,
273,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
1544,
16,
8028,
529,
33,
7036,
16,
8099,
67,
723,
33,
7036,
4672,
3536,
6426,
326,
1731,
628,
1544,
1368,
326,
5052,
3613,
326,
508,
8028,
529,
12123,
384,
273,
114... |
if self.editor.render(window, widget, cell_area, state): | if self.editor(self.field).render(window, widget, cell_area, state): | def do_render(self, window, widget, background_area, \ cell_area, expose_area, flags): | f913a722bbe1c4ed3cf5c041421b94067677ca63 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11468/f913a722bbe1c4ed3cf5c041421b94067677ca63/PropertyGrid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5902,
12,
2890,
16,
2742,
16,
3604,
16,
5412,
67,
5036,
16,
521,
2484,
67,
5036,
16,
15722,
67,
5036,
16,
2943,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
5902,
12,
2890,
16,
2742,
16,
3604,
16,
5412,
67,
5036,
16,
521,
2484,
67,
5036,
16,
15722,
67,
5036,
16,
2943,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for item_view in self.all_item_views(): | def _init_item_views(self): self.context_menu_handler = self.make_context_menu_handler() context_callback = self.context_menu_handler.callback for item_view in self.normal_item_views(): item_view.connect_weak('selection-changed', self.on_selection_changed) for item_view in self.all_item_views(): item_view.connect_weak('hotspot-clicked', self.on_hotspot_clicked) item_view.set_context_menu_callback(context_callback) item_view.set_drag_source(self.make_drag_handler()) item_view.set_drag_dest(self.make_drop_handler()) | 633f5e7dcda5bae30c881dc1140aeb4d2ad797f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/633f5e7dcda5bae30c881dc1140aeb4d2ad797f0/itemlistcontroller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2738,
67,
1726,
67,
7061,
12,
2890,
4672,
365,
18,
2472,
67,
5414,
67,
4176,
273,
365,
18,
6540,
67,
2472,
67,
5414,
67,
4176,
1435,
819,
67,
3394,
273,
365,
18,
2472,
67,
5414,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
67,
1726,
67,
7061,
12,
2890,
4672,
365,
18,
2472,
67,
5414,
67,
4176,
273,
365,
18,
6540,
67,
2472,
67,
5414,
67,
4176,
1435,
819,
67,
3394,
273,
365,
18,
2472,
67,
5414,... | |
work = newfiles(status, 'common/*.js', 'plone/kupu_plone_layer/*.js') | work = newfiles(status, 'common/*.js', 'plone/kupu_plone_layer/*.js', exclude=['diff_match_patch.js']) | def shutdown(self): # and then to shut down the threads when you've finished: for t in self.thread_pool: self.requestQueue.put(None) for t in self.thread_pool: t.join() | 1911ecb69e158fb4601f7b11137733bcf50c4f38 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10193/1911ecb69e158fb4601f7b11137733bcf50c4f38/lint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
2890,
4672,
468,
471,
1508,
358,
9171,
2588,
326,
7403,
1347,
1846,
8081,
6708,
30,
364,
268,
316,
365,
18,
5930,
67,
6011,
30,
365,
18,
2293,
3183,
18,
458,
12,
7036,
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,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5731,
12,
2890,
4672,
468,
471,
1508,
358,
9171,
2588,
326,
7403,
1347,
1846,
8081,
6708,
30,
364,
268,
316,
365,
18,
5930,
67,
6011,
30,
365,
18,
2293,
3183,
18,
458,
12,
7036,
13,
... |
moin_id = '' | cookie_string = '' | def deleteCookie(request): """ Delete the user cookie by sending expired cookie with null value According to http://www.cse.ohio-state.edu/cgi-bin/rfc/rfc2109.html#sec-4.2.2 Deleted cookie should have Max-Age=0. We also have expires attribute, which is probably needed for older browsers. Finally, delete the saved cookie and create a new user based on the new settings. """ moin_id = '' maxage = 0 # Set expires to one year ago for older clients expires = time.time() - (3600 * 24 * 365) # 1 year ago cookie = makeCookie(request, moin_id, maxage, expires) # Set cookie request.setHttpHeader(cookie) # IMPORTANT: Prevent caching of current page and cookie request.disableHttpCaching() | 52d72a54d36dd3229ef30015f18438b64a2efc64 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/52d72a54d36dd3229ef30015f18438b64a2efc64/auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
6151,
12,
2293,
4672,
3536,
2504,
326,
729,
3878,
635,
5431,
7708,
3878,
598,
446,
460,
225,
12848,
4643,
358,
1062,
2207,
5591,
18,
71,
307,
18,
16699,
1594,
17,
2019,
18,
28049,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
6151,
12,
2293,
4672,
3536,
2504,
326,
729,
3878,
635,
5431,
7708,
3878,
598,
446,
460,
225,
12848,
4643,
358,
1062,
2207,
5591,
18,
71,
307,
18,
16699,
1594,
17,
2019,
18,
28049,
... |
"""setLogging(self, int) | """ | def setLogging(self, bool): """setLogging(self, int) Set the logging flag to int (1=on, 0=off)""" self.__logging = bool | f04fa19eef5f5f80a5d3943b1a21e09f24f88a0c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/f04fa19eef5f5f80a5d3943b1a21e09f24f88a0c/Notifier.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
7735,
12,
2890,
16,
1426,
4672,
3536,
1000,
326,
2907,
2982,
358,
509,
261,
21,
33,
265,
16,
374,
33,
3674,
15574,
365,
16186,
11167,
273,
1426,
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,
444,
7735,
12,
2890,
16,
1426,
4672,
3536,
1000,
326,
2907,
2982,
358,
509,
261,
21,
33,
265,
16,
374,
33,
3674,
15574,
365,
16186,
11167,
273,
1426,
2,
-100,
-100,
-100,
-100,
-100,
-... |
name = cls._name or cls._inherit | def createInstance(cls, pool, module, cr): parent_names = getattr(cls, '_inherit', None) if parent_names: for parent_name in ((type(parent_names)==list) and parent_names or [parent_names]): parent_class = pool.get(parent_name).__class__ assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module) nattr = {} for s in ('_columns', '_defaults', '_inherits', '_constraints', '_sql_constraints'): new = copy.copy(getattr(pool.get(parent_name), s)) if hasattr(new, 'update'): new.update(cls.__dict__.get(s, {})) else: if s=='_constraints': for c in cls.__dict__.get(s, []): exist = False for c2 in range(len(new)): if new[c2][2]==c[2]: new[c2] = c exist = True break if not exist: new.append(c) else: new.extend(cls.__dict__.get(s, [])) nattr[s] = new name = cls._name or cls._inherit cls = type(name, (cls, parent_class), nattr) obj = object.__new__(cls) obj.__init__(pool, cr) return obj | 23f1fca8ea2bf4e508886db6d31bb0b7c6838d80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/23f1fca8ea2bf4e508886db6d31bb0b7c6838d80/osv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20075,
12,
6429,
16,
2845,
16,
1605,
16,
4422,
4672,
982,
67,
1973,
273,
3869,
12,
6429,
16,
2070,
6018,
2187,
599,
13,
309,
982,
67,
1973,
30,
364,
982,
67,
529,
316,
14015,
723,
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,
20075,
12,
6429,
16,
2845,
16,
1605,
16,
4422,
4672,
982,
67,
1973,
273,
3869,
12,
6429,
16,
2070,
6018,
2187,
599,
13,
309,
982,
67,
1973,
30,
364,
982,
67,
529,
316,
14015,
723,
12... | |
this = apply(_quickfix.new_Scope, args) | this = _quickfix.new_Scope(*args) | def __init__(self, *args): this = apply(_quickfix.new_Scope, 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,
3876,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
18,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
3876,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
365,
18,
221... |
""" | ''' | def hello(): print "Hi there!" | 9309008f769451c24a2114d1b377a0ccf8828835 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9837/9309008f769451c24a2114d1b377a0ccf8828835/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19439,
13332,
1172,
315,
25009,
1915,
4442,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
19439,
13332,
1172,
315,
25009,
1915,
4442,
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,... |
k = self.optionxform(optname) cursect[k] = "%s\n%s" % (cursect[k], value) | cursect[optname] = "%s\n%s" % (cursect[optname], value) | def __read(self, fp, fpname): """Parse a sectioned setup file. | 92ed640936b92665295d98ba8eae84e2874ec357 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/92ed640936b92665295d98ba8eae84e2874ec357/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
12,
2890,
16,
4253,
16,
4253,
529,
4672,
3536,
3201,
279,
2442,
329,
3875,
585,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
12,
2890,
16,
4253,
16,
4253,
529,
4672,
3536,
3201,
279,
2442,
329,
3875,
585,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.initialLoadFinished = True | def webView_didFinishLoadForFrame_(self, webview, frame): if (not self.initialLoadFinished) and (frame is self.view.mainFrame()): platformutils.warnIfNotOnMainThread('ManagedWebView.webView_didFinishLoadForFrame_') # Execute any function calls we queued because the page load # hadn't completed # NEEDS: there should be a lock here, preventing execAfterLoad # from dropping something in the queue just after we have finished # processing it for func in self.execQueue: func() self.execQueue = [] self.initialLoadFinished = True | e58799d897a7951bd79acce5f6f08838bacfdfb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/e58799d897a7951bd79acce5f6f08838bacfdfb8/HTMLDisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3311,
1767,
67,
14044,
11641,
2563,
1290,
3219,
67,
12,
2890,
16,
3311,
1945,
16,
2623,
4672,
309,
261,
902,
365,
18,
6769,
2563,
10577,
13,
471,
261,
3789,
353,
365,
18,
1945,
18,
525... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3311,
1767,
67,
14044,
11641,
2563,
1290,
3219,
67,
12,
2890,
16,
3311,
1945,
16,
2623,
4672,
309,
261,
902,
365,
18,
6769,
2563,
10577,
13,
471,
261,
3789,
353,
365,
18,
1945,
18,
525... | |
self.assertEqual(expected, signal_arguments) | for e in expected: self.assert_(e in signal_arguments[0]) | def new(*args, **kws): with SignalCatcher(self, generator, signal_name) \ as [signal_catched_event, signal_arguments]: function(*args, **kws) signal_catched_event.wait() self.assertEqual(expected, signal_arguments) return None | dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dc64c2fbf71ce3d9654b0a1435e40fa1375b23b8/test_liblarch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
30857,
1968,
16,
2826,
79,
4749,
4672,
598,
12032,
14842,
264,
12,
2890,
16,
4456,
16,
4277,
67,
529,
13,
521,
487,
306,
10420,
67,
14683,
329,
67,
2575,
16,
4277,
67,
7099,
14542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
30857,
1968,
16,
2826,
79,
4749,
4672,
598,
12032,
14842,
264,
12,
2890,
16,
4456,
16,
4277,
67,
529,
13,
521,
487,
306,
10420,
67,
14683,
329,
67,
2575,
16,
4277,
67,
7099,
14542... |
assert_almost_equal(w,0.90047299861907959,7) assert_almost_equal(pw,0.042089745402336121,7) | assert_almost_equal(w,0.90047299861907959,6) assert_almost_equal(pw,0.042089745402336121,6) | def check_basic(self): x1 = [0.11,7.87,4.61,10.14,7.95,3.14,0.46, 4.43,0.21,4.75,0.71,1.52,3.24, 0.93,0.42,4.97,9.53,4.55,0.47,6.66] w,pw = scipy.stats.shapiro(x1) assert_almost_equal(w,0.90047299861907959,7) assert_almost_equal(pw,0.042089745402336121,7) x2 = [1.36,1.14,2.92,2.55,1.46,1.06,5.27,-1.11, 3.48,1.10,0.88,-0.51,1.46,0.52,6.20,1.69, 0.08,3.67,2.81,3.49] w,pw = scipy.stats.shapiro(x2) assert_almost_equal(w,0.9590269923210144,7) assert_almost_equal(pw,0.52459925413131714,7) | 1b57dd2995121404b1732f25b5881a8cc5828b0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1b57dd2995121404b1732f25b5881a8cc5828b0e/test_morestats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
13240,
12,
2890,
4672,
619,
21,
273,
306,
20,
18,
2499,
16,
27,
18,
11035,
16,
24,
18,
9498,
16,
2163,
18,
3461,
16,
27,
18,
8778,
16,
23,
18,
3461,
16,
20,
18,
8749,
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,
866,
67,
13240,
12,
2890,
4672,
619,
21,
273,
306,
20,
18,
2499,
16,
27,
18,
11035,
16,
24,
18,
9498,
16,
2163,
18,
3461,
16,
27,
18,
8778,
16,
23,
18,
3461,
16,
20,
18,
8749,
16... |
nifti.writeImage(image, outfile, data_type, 3, self.format[6:]) | nifti.writeImage(image, self.filename, data_type, 3, self.format[6:]) | def writeNifti(self, image): from imaging import nifti | 749f1b9db81161a11454ca1b45898dce806671f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7241/749f1b9db81161a11454ca1b45898dce806671f0/WriteImage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
50,
2136,
77,
12,
2890,
16,
1316,
4672,
628,
709,
5755,
1930,
290,
2136,
77,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
50,
2136,
77,
12,
2890,
16,
1316,
4672,
628,
709,
5755,
1930,
290,
2136,
77,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.assertIsInstance(data, str) | self.assertTrue(isinstance(data, str)) | def test01_basic(self): d = db.DB() | 6a19b00668ef7f1db0b69f41dc05d2454176d0be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/6a19b00668ef7f1db0b69f41dc05d2454176d0be/test_recno.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1611,
67,
13240,
12,
2890,
4672,
302,
273,
1319,
18,
2290,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1611,
67,
13240,
12,
2890,
4672,
302,
273,
1319,
18,
2290,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
def start (self): self.__oper.start () def stop (self): self._check_duration () self.__oper.stop () def on_eos (self, event): self._check_duration () def on_error (self, event, message): | def start(self): self.duration_counter = 3 self.fuzzy_duration = True self.__oper.start() def stop(self): self.__oper.stop() def on_eos(self, event): pass def on_error(self, event, message): | def start (self): self.__oper.start () | 016aec4a85d3438c0d49f1f8b2012e23eb7805ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2207/016aec4a85d3438c0d49f1f8b2012e23eb7805ec/audio.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
261,
2890,
4672,
365,
16186,
4063,
18,
1937,
1832,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
261,
2890,
4672,
365,
16186,
4063,
18,
1937,
1832,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
return CommonUtil.env('SITE_NAME') | return ji['GANGA_HOSTNAME'] | def wn_dest_site(): """Build dest_site. Only run on worker node.""" return CommonUtil.env('SITE_NAME') | 3d31941fcc096ef695c2e7fa17aa4dcb8981529c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/3d31941fcc096ef695c2e7fa17aa4dcb8981529c/BatchUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
341,
82,
67,
10488,
67,
4256,
13332,
3536,
3116,
1570,
67,
4256,
18,
5098,
1086,
603,
4322,
756,
12123,
327,
5658,
1304,
18,
3074,
2668,
20609,
67,
1985,
6134,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
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,
341,
82,
67,
10488,
67,
4256,
13332,
3536,
3116,
1570,
67,
4256,
18,
5098,
1086,
603,
4322,
756,
12123,
327,
5658,
1304,
18,
3074,
2668,
20609,
67,
1985,
6134,
2,
-100,
-100,
-100,
-100,... |
print uri return Playlist(uri, self.api_key).fetch() | return Playlist(uri, *self.auth_data).fetch() | def fetchPlaylist(self, free_tracks_only = False): """Returns lit of the tracks tagged by this tag. * free_tracks_only: Set to True to include only free tracks. """ uri = 'lastfm://playlist/tag/%s' %self.tag if free_tracks_only: uri += '/freetracks' print uri return Playlist(uri, self.api_key).fetch() | b1ed3eef5bf1b1772c55649009d9222691e97329 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9926/b1ed3eef5bf1b1772c55649009d9222691e97329/pylast.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
30194,
12,
2890,
16,
4843,
67,
21499,
67,
3700,
273,
1083,
4672,
3536,
1356,
16297,
434,
326,
13933,
12503,
635,
333,
1047,
18,
380,
4843,
67,
21499,
67,
3700,
30,
1000,
358,
1053,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2158,
30194,
12,
2890,
16,
4843,
67,
21499,
67,
3700,
273,
1083,
4672,
3536,
1356,
16297,
434,
326,
13933,
12503,
635,
333,
1047,
18,
380,
4843,
67,
21499,
67,
3700,
30,
1000,
358,
1053,... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 728) else quickfix.IntField.__init__(self, 728, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
2371,
6030,
13,
469,
9549,
904,
18,
1702,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
2371,
6030,
13,
469,
9549,
904,
18,
1702,
974,
16186,
2738,
... |
except IndexError: | except: | def _iter_descendants_preorder(self): """ Iterator over all desdecendant nodes. """ to_visit = [] node = self while node: yield node to_visit = node.children + to_visit try: node = to_visit.pop(0) except IndexError: node = None | 5588b5a6163f7f000293d8cbe54d092d8bdcdebb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/5588b5a6163f7f000293d8cbe54d092d8bdcdebb/tree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2165,
67,
26236,
4388,
67,
1484,
1019,
12,
2890,
4672,
3536,
4498,
1879,
777,
2832,
4924,
409,
970,
2199,
18,
3536,
358,
67,
11658,
273,
5378,
756,
273,
365,
1323,
756,
30,
2824,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2165,
67,
26236,
4388,
67,
1484,
1019,
12,
2890,
4672,
3536,
4498,
1879,
777,
2832,
4924,
409,
970,
2199,
18,
3536,
358,
67,
11658,
273,
5378,
756,
273,
365,
1323,
756,
30,
2824,
... |
old_slice_node_ids = [ node_transcoder[node_id] for node_id in slice['node_ids']] | old_slice_node_ids = [ node_transcoder[node_id] for node_id in slice['node_ids'] \ if node_transcoder[node_id] in peer_nodes] | def sync(objects, peer_objects, classobj): """ Synchronizes two dictionaries of objects. objects should be a dictionary of local objects keyed on their foreign identifiers. peer_objects should be a dictionary of foreign objects keyed on their local (i.e., foreign to us) identifiers. Returns a final dictionary of local objects keyed on their foreign identifiers. """ | 0f6b5cac3ad4dd3221a7d0a3106d3f0ace9f892f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7598/0f6b5cac3ad4dd3221a7d0a3106d3f0ace9f892f/RefreshPeer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3792,
12,
6911,
16,
4261,
67,
6911,
16,
667,
2603,
4672,
3536,
26535,
3128,
2795,
16176,
434,
2184,
18,
2184,
1410,
506,
279,
3880,
434,
1191,
2184,
17408,
603,
3675,
5523,
9863,
18,
426... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3792,
12,
6911,
16,
4261,
67,
6911,
16,
667,
2603,
4672,
3536,
26535,
3128,
2795,
16176,
434,
2184,
18,
2184,
1410,
506,
279,
3880,
434,
1191,
2184,
17408,
603,
3675,
5523,
9863,
18,
426... |
if SchedulerConfig().client_check[key] == 'uuid': | if check[key] == 'uuid': | def getClientCheck(myT): ret = {} for key in SchedulerConfig().client_check: if SchedulerConfig().client_check[key] == 'ipaddr': ret.update({key: myT.target_ipaddr}) if SchedulerConfig().client_check[key] == 'name': ret.update({key: myT.target_name}) if SchedulerConfig().client_check[key] == 'uuid': ret.update({key: myT.target_uuid}) if SchedulerConfig().client_check[key] == 'macaddr': ret.update({key: myT.target_macaddr.split('||')[0]}) return ret; | 66d6132e7dbeaabdf8b63cbb376fe8e543435e28 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/66d6132e7dbeaabdf8b63cbb376fe8e543435e28/scheduling.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7635,
1564,
12,
4811,
56,
4672,
325,
273,
2618,
364,
498,
316,
12620,
809,
7675,
2625,
67,
1893,
30,
309,
12620,
809,
7675,
2625,
67,
1893,
63,
856,
65,
422,
296,
625,
4793,
4278,
325,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7635,
1564,
12,
4811,
56,
4672,
325,
273,
2618,
364,
498,
316,
12620,
809,
7675,
2625,
67,
1893,
30,
309,
12620,
809,
7675,
2625,
67,
1893,
63,
856,
65,
422,
296,
625,
4793,
4278,
325,... |
self.__doc__=f.__doc__+"\nOptions are:\n"+"\n".join((k+" : "+repr(self.options[k]) for k in self.options))+"\nTurn off heuristic by setting heuristic=False" | self.__doc__=f.__doc__ | def __init__(self,f,heuristic_function): (self.argnames,self.varargs,self.varopts,self.defaults)=getargspec(f) if hasattr(f,"options"): self.options=f.options else: self.options=dict(zip(self.argnames[-len(self.defaults):],self.defaults)) self.heuristicFunction=heuristic_function self.f=f self.__doc__=f.__doc__+"\nOptions are:\n"+"\n".join((k+" : "+repr(self.options[k]) for k in self.options))+"\nTurn off heuristic by setting heuristic=False" | e88e8dd5db3619640e169424c96bd19aa6773a4b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2046/e88e8dd5db3619640e169424c96bd19aa6773a4b/gbcore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
74,
16,
580,
18219,
67,
915,
4672,
225,
261,
2890,
18,
297,
1600,
753,
16,
2890,
18,
1401,
1968,
16,
2890,
18,
1401,
4952,
16,
2890,
18,
7606,
13,
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,
1001,
2738,
972,
12,
2890,
16,
74,
16,
580,
18219,
67,
915,
4672,
225,
261,
2890,
18,
297,
1600,
753,
16,
2890,
18,
1401,
1968,
16,
2890,
18,
1401,
4952,
16,
2890,
18,
7606,
13,
33,
... |
""" Called when a page has been modified. """ | """Called when a page has been modified.""" | def wiki_page_changed(page, version, t, comment, author, ipnr): """ Called when a page has been modified. """ | 6392f2a70e74c43e37782a00df9b97e7e92a6a57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/6392f2a70e74c43e37782a00df9b97e7e92a6a57/api.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9050,
67,
2433,
67,
6703,
12,
2433,
16,
1177,
16,
268,
16,
2879,
16,
2869,
16,
2359,
11611,
4672,
3536,
11782,
1347,
279,
1363,
711,
2118,
4358,
18,
3536,
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,
9050,
67,
2433,
67,
6703,
12,
2433,
16,
1177,
16,
268,
16,
2879,
16,
2869,
16,
2359,
11611,
4672,
3536,
11782,
1347,
279,
1363,
711,
2118,
4358,
18,
3536,
2,
-100,
-100,
-100,
-100,
-1... |
body = """To: %s | body = u"""To: %s | def sendmessage(self, message, options={}): result = error = None from_ = self.account.get('profile',{}).get('verifiedEmail') url = "https://mail.google.com/mail/b/%s/smtp/" % from_ to_ = options['to'] server = SMTP(self.host, self.port) server.set_debuglevel(True) subject = options.get('subject') # XXX TODO: fix headers, etc body = """To: %s | 57fb4a0fd638bfe3fa0fa2e96d42b0dd4976fd10 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12761/57fb4a0fd638bfe3fa0fa2e96d42b0dd4976fd10/google_.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
2150,
12,
2890,
16,
883,
16,
702,
12938,
4672,
563,
273,
555,
273,
599,
628,
67,
273,
365,
18,
4631,
18,
588,
2668,
5040,
2187,
2916,
2934,
588,
2668,
19685,
4134,
6134,
880,
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,
1366,
2150,
12,
2890,
16,
883,
16,
702,
12938,
4672,
563,
273,
555,
273,
599,
628,
67,
273,
365,
18,
4631,
18,
588,
2668,
5040,
2187,
2916,
2934,
588,
2668,
19685,
4134,
6134,
880,
273... |
rcs_file[:-1], revision[:-1]) | rcs_file[len(GetCVSRootDirName()):-3], revision[:-1]) | def BuildLog(log_date_command): import os, string reading_description = 0 description = [] log = [] # start reading cvs log output putting what we need in the log # list for line in os.popen(log_date_command, 'r').readlines(): if line[:5] == '=====' or line[:5] == '-----': if description != []: # append these items in the sort order we'll want later on. log.append(RcsDate2CtimeTuple(date), author, description, rcs_file[:-1], revision[:-1]) reading_description = 0 description = [] elif not reading_description and line[:len("Working file: ")] == "Working file: ": rcs_file = line[len("Working file: "):] elif not reading_description and line[:len("revision ")] == "revision ": revision = line[len("revision "):] elif not reading_description and line[:len("date: ")] == "date: ": (dd, aa, ss, ll) = string.splitfields(line, ';') (foo, date) = string.splitfields(dd, ': ') (foo, author) = string.splitfields(aa, ': ') reading_description = 1 elif reading_description: description.append(line) else: continue return log | 2b864fa9c5bd100d968753444b7fdde2e0c52171 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/2b864fa9c5bd100d968753444b7fdde2e0c52171/cvs2log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3998,
1343,
12,
1330,
67,
712,
67,
3076,
4672,
1930,
1140,
16,
533,
6453,
67,
3384,
273,
374,
2477,
273,
5378,
613,
273,
5378,
468,
787,
6453,
276,
6904,
613,
876,
29379,
4121,
732,
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,
3998,
1343,
12,
1330,
67,
712,
67,
3076,
4672,
1930,
1140,
16,
533,
6453,
67,
3384,
273,
374,
2477,
273,
5378,
613,
273,
5378,
468,
787,
6453,
276,
6904,
613,
876,
29379,
4121,
732,
16... |
if not PY_STRUCT_RANGE_CHECKING and code in self.BUGGY_RANGE_CHECK: if verbose: print "Skipping buggy range check for code", code else: deprecated_err(pack, ">" + code, x) deprecated_err(pack, "<" + code, x) | deprecated_err(pack, ">" + code, x) deprecated_err(pack, "<" + code, x) | def test_one(self, x, pack=struct.pack, unpack=struct.unpack, unhexlify=binascii.unhexlify): # Try signed. code = self.signed_code if self.signed_min <= x <= self.signed_max: # Try big-endian. expected = long(x) if x < 0: expected += 1L << self.bitsize self.assertTrue(expected > 0) expected = hex(expected)[2:-1] # chop "0x" and trailing 'L' if len(expected) & 1: expected = "0" + expected expected = unhexlify(expected) expected = "\x00" * (self.bytesize - len(expected)) + expected | 3671163d064d0a027d3f172fa8572d590fefeffc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/3671163d064d0a027d3f172fa8572d590fefeffc/test_struct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
476,
12,
2890,
16,
619,
16,
2298,
33,
1697,
18,
2920,
16,
6167,
33,
1697,
18,
17309,
16,
640,
7118,
22451,
33,
4757,
9184,
18,
318,
7118,
22451,
4672,
468,
6161,
6726,
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,
1842,
67,
476,
12,
2890,
16,
619,
16,
2298,
33,
1697,
18,
2920,
16,
6167,
33,
1697,
18,
17309,
16,
640,
7118,
22451,
33,
4757,
9184,
18,
318,
7118,
22451,
4672,
468,
6161,
6726,
18,
... |
Committer("Yury Semikhatsky", "yurys@chromium.org"), | def __init__(self, name, email_or_emails, irc_nickname=None): Committer.__init__(self, name, email_or_emails, irc_nickname) self.can_review = True | 1f766e392d8239c2ed938fee4d10caaf9a1e878f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/1f766e392d8239c2ed938fee4d10caaf9a1e878f/committers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
2699,
67,
280,
67,
22762,
16,
277,
1310,
67,
17091,
529,
33,
7036,
4672,
10269,
387,
16186,
2738,
972,
12,
2890,
16,
508,
16,
2699,
67,
280,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
2699,
67,
280,
67,
22762,
16,
277,
1310,
67,
17091,
529,
33,
7036,
4672,
10269,
387,
16186,
2738,
972,
12,
2890,
16,
508,
16,
2699,
67,
280,
6... | |
aTag['name'] = "Genre%s" % re.sub("\W","", genre) | aTag['name'] = "Genre_%s" % genre | def generateHTMLByGenre(self, genre, section_head, books, outfile): # Write an HTML file of this genre's book list # Return a list with [(first_author, first_book), (last_author, last_book)] | e067ad567aaad3c1ee62338310fadaee7dd82612 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/e067ad567aaad3c1ee62338310fadaee7dd82612/catalog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
4870,
858,
7642,
266,
12,
2890,
16,
3157,
266,
16,
2442,
67,
1978,
16,
6978,
87,
16,
8756,
4672,
468,
2598,
392,
3982,
585,
434,
333,
3157,
266,
1807,
6978,
666,
468,
2000,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
4870,
858,
7642,
266,
12,
2890,
16,
3157,
266,
16,
2442,
67,
1978,
16,
6978,
87,
16,
8756,
4672,
468,
2598,
392,
3982,
585,
434,
333,
3157,
266,
1807,
6978,
666,
468,
2000,
279,
... |
meta[d[uid]] = code.giss_data.Station(**d) | meta[d['uid']] = code.giss_data.Station(**d) | def USHCNV2meta(path): """Reads the station metadata from the USHCN v2 file, typically 'ushcn-v2-stations.txt', and returns it as a dict.""" file = open(path) fields = dict( uid=(0,6,str), lat=(7,15,float), lon=(16,25,float), stelev=(26,32,float), us_state=(33,35,str), name=(36,66,str), ) meta = {} for row in file: d = dict((field, convert(row[i:j])) for field,(i,j,convert) in fields.items()) meta[d[uid]] = code.giss_data.Station(**d) return meta | 8a689debd22be0c065d230aaf4f1d72b3989ae3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6890/8a689debd22be0c065d230aaf4f1d72b3989ae3c/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
587,
2664,
39,
11679,
22,
3901,
12,
803,
4672,
3536,
7483,
326,
13282,
1982,
628,
326,
587,
2664,
12821,
331,
22,
585,
16,
14755,
296,
1218,
10305,
17,
90,
22,
17,
31478,
18,
5830,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
587,
2664,
39,
11679,
22,
3901,
12,
803,
4672,
3536,
7483,
326,
13282,
1982,
628,
326,
587,
2664,
12821,
331,
22,
585,
16,
14755,
296,
1218,
10305,
17,
90,
22,
17,
31478,
18,
5830,
218... |
or event.filename.endswith('.tmp'): | or event.filename.startswith(' | def ShouldIgnore(event): '''Test if the event should be suppresed''' # FIXME should move event suppression out of the core if event.filename.split('/')[-1] == '.svn': return True if event.filename.endswith('~') or event.filename.endswith('.tmp') \ or event.filename.endswith('.tmp'): logger.error("Suppressing event for file %s" % (event.filename)) return True return False | 3e55be9beb131b33b56985053f05272918ecb4b8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/3e55be9beb131b33b56985053f05272918ecb4b8/Core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9363,
3777,
12,
2575,
4672,
9163,
4709,
309,
326,
871,
1410,
506,
1169,
1484,
730,
26418,
468,
9852,
1410,
3635,
871,
1169,
1337,
596,
434,
326,
2922,
309,
871,
18,
3459,
18,
4939,
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,
9363,
3777,
12,
2575,
4672,
9163,
4709,
309,
326,
871,
1410,
506,
1169,
1484,
730,
26418,
468,
9852,
1410,
3635,
871,
1169,
1337,
596,
434,
326,
2922,
309,
871,
18,
3459,
18,
4939,
2668,... |
class SonyReader900Input(InputProfile): | class SonyReader300Input(SonyReaderInput): name = 'Sony Reader 300' short_name = 'sony300' description = _('This profile is intended for the SONY PRS 300.') dpi = 200 class SonyReader900Input(SonyReaderInput): | def __init__(self, *args, **kwargs): _Plugin.__init__(self, *args, **kwargs) self.width, self.height = self.screen_size fsizes = list(self.fsizes) self.fkey = list(self.fsizes) self.fsizes = [] for (name, num), size in izip(FONT_SIZES, fsizes): self.fsizes.append((name, num, float(size))) self.fnames = dict((name, sz) for name, _, sz in self.fsizes if name) self.fnums = dict((num, sz) for _, num, sz in self.fsizes if num) | 43333568dd434d57c8032a6bdf31aa869bf1cf36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/43333568dd434d57c8032a6bdf31aa869bf1cf36/profiles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
389,
3773,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
2819,
16,
365,
18,
4210,
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,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
389,
3773,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
365,
18,
2819,
16,
365,
18,
4210,
273,
365,
... |
self.check_add_link('normal', newhref) | self.check_add_link('webpage', newhref) | def handle_anchor_links(self, link): """ Handle links of the form html#...""" | 4e50584b83e04b0d91e4f6342cfb1e98948d8d87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2861/4e50584b83e04b0d91e4f6342cfb1e98948d8d87/pageparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
16215,
67,
7135,
12,
2890,
16,
1692,
4672,
3536,
5004,
4716,
434,
326,
646,
1729,
7,
7070,
3660,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
16215,
67,
7135,
12,
2890,
16,
1692,
4672,
3536,
5004,
4716,
434,
326,
646,
1729,
7,
7070,
3660,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
la = avatar.parent.findFirst(userbase.LoginAccount, avatars=avatar.parent.getItemByID(avatar.idInParent)) | la = avatar.parent.findFirst( userbase.LoginAccount, userbase.LoginAccount.avatars == avatar.parent.getItemByID(avatar.idInParent)) | def endow(self, ticket, avatar): self.endowed += 1 la = avatar.parent.findFirst(userbase.LoginAccount, avatars=avatar.parent.getItemByID(avatar.idInParent)) | 0de92762adf2f380e4922f6ea0c5fa9e0c203b62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6979/0de92762adf2f380e4922f6ea0c5fa9e0c203b62/sipserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
543,
12,
2890,
16,
9322,
16,
16910,
4672,
365,
18,
409,
543,
329,
1011,
404,
7125,
273,
16910,
18,
2938,
18,
4720,
3759,
12,
1355,
1969,
18,
5358,
3032,
16,
1712,
270,
5913,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
543,
12,
2890,
16,
9322,
16,
16910,
4672,
365,
18,
409,
543,
329,
1011,
404,
7125,
273,
16910,
18,
2938,
18,
4720,
3759,
12,
1355,
1969,
18,
5358,
3032,
16,
1712,
270,
5913,
33,
... |
elif y in x.packageDeps: | elif y in x.packageDeps and x not in y.packageDeps: | def cmpFunc (x, y): if x.part_count != y.part_count: return cmp(x.part_count, y.part_count) else: if x in y.packageDeps: # y needs x, so x is "larger" (must be earlier) return 1 elif y in x.packageDeps: # other way round return -1 else: return 0 | 1ccdbb9cb94de1c871e12a7644cd6318422c9cb5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/1ccdbb9cb94de1c871e12a7644cd6318422c9cb5/Part.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
2622,
261,
92,
16,
677,
4672,
309,
619,
18,
2680,
67,
1883,
480,
677,
18,
2680,
67,
1883,
30,
327,
9411,
12,
92,
18,
2680,
67,
1883,
16,
677,
18,
2680,
67,
1883,
13,
469,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9411,
2622,
261,
92,
16,
677,
4672,
309,
619,
18,
2680,
67,
1883,
480,
677,
18,
2680,
67,
1883,
30,
327,
9411,
12,
92,
18,
2680,
67,
1883,
16,
677,
18,
2680,
67,
1883,
13,
469,
30,... |
add_link(req, 'prev', url, _('Version %(num)s', num=prev_version)) | add_link(req, 'prev', url, _("Version %(num)s", num=prev_version)) | def get_text(version): try: text = history[version]['value'] return text and text.splitlines() or [] except KeyError: raise ResourceNotFound(_('No version %(version)d for comment ' '%(cnum)d on ticket #%(ticket)s', version=version, cnum=cnum, ticket=ticket.id)) | 8a7505f666e8590328936fd32f0bc362d6e2a6a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/8a7505f666e8590328936fd32f0bc362d6e2a6a0/web_ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
955,
12,
1589,
4672,
775,
30,
977,
273,
4927,
63,
1589,
23962,
1132,
3546,
327,
977,
471,
977,
18,
4939,
3548,
1435,
578,
5378,
1335,
4999,
30,
1002,
2591,
2768,
24899,
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,
336,
67,
955,
12,
1589,
4672,
775,
30,
977,
273,
4927,
63,
1589,
23962,
1132,
3546,
327,
977,
471,
977,
18,
4939,
3548,
1435,
578,
5378,
1335,
4999,
30,
1002,
2591,
2768,
24899,
2668,
... |
if match: return match.group(1, 2) | if match: return map(unquote, match.group(1, 2)) | def splituser(host): """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.""" global _userprog if _userprog is None: import re _userprog = re.compile('^([^@]*)@(.*)$') match = _userprog.match(host) if match: return match.group(1, 2) return None, host | 9fc842f7959481858573bfb5ec5ec92148843fab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9fc842f7959481858573bfb5ec5ec92148843fab/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
1355,
12,
2564,
4672,
3536,
4939,
1355,
2668,
1355,
10531,
24002,
65,
36,
2564,
10531,
655,
3864,
13,
15431,
296,
1355,
10531,
24002,
65,
2187,
296,
2564,
10531,
655,
3864,
12123,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
1355,
12,
2564,
4672,
3536,
4939,
1355,
2668,
1355,
10531,
24002,
65,
36,
2564,
10531,
655,
3864,
13,
15431,
296,
1355,
10531,
24002,
65,
2187,
296,
2564,
10531,
655,
3864,
12123,
25... |
self.address = self.add_entry_row(table, 1, "Save address:", 8) | self.address = self.add_entry_row(table, 1, "Save address:", 6) | def add_table_content(self, table): entry = gtk.Entry() entry.set_width_chars(12) entry.set_editable(False) self.file = entry button = gtk.Button("Select...") button.connect("clicked", self.select_file_cb) hbox = gtk.HBox() hbox.add(entry) hbox.add(button) | 129a9cbee3e4185bd081ca4982b04d8bc84d3455 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/129a9cbee3e4185bd081ca4982b04d8bc84d3455/debugui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2121,
67,
1745,
12,
2890,
16,
1014,
4672,
1241,
273,
22718,
18,
1622,
1435,
1241,
18,
542,
67,
2819,
67,
7549,
12,
2138,
13,
1241,
18,
542,
67,
19653,
12,
8381,
13,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2121,
67,
1745,
12,
2890,
16,
1014,
4672,
1241,
273,
22718,
18,
1622,
1435,
1241,
18,
542,
67,
2819,
67,
7549,
12,
2138,
13,
1241,
18,
542,
67,
19653,
12,
8381,
13,
365,
18,... |
listdef = ListDef(None, annotation(t[0])) listdef.listitem.dont_change_any_more = False | listdef = ListDef(None, annotation(t[0]), mutated=True, resized=True) | listdef = ListDef(None, annotation(t[0])) | 0add7ae7b430a862c1c23feeef7db3883caa9584 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/0add7ae7b430a862c1c23feeef7db3883caa9584/signature.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
666,
536,
273,
987,
3262,
12,
7036,
16,
3204,
12,
88,
63,
20,
22643,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
666,
536,
273,
987,
3262,
12,
7036,
16,
3204,
12,
88,
63,
20,
22643,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
tmp = get_remote_file(url, verbose=True) shutil.move(tmp, dest) | from twisted.web.client import downloadPage def callback(result): return response d = downloadPage(url, dest) d.addCallback(callback) return d | def render(self, ctx): name = '' if ctx.args.has_key('newField'): newfield = ctx.args['newField'][0].strip() else: newfield = None if ctx.args.has_key('nameField'): name = ctx.args['nameField'][0].strip() url = ctx.args['urlField'][0].strip() | 65f6cc75235e5e42abd428f37f46efd25d43303c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/65f6cc75235e5e42abd428f37f46efd25d43303c/twist.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
508,
273,
875,
309,
1103,
18,
1968,
18,
5332,
67,
856,
2668,
2704,
974,
11,
4672,
394,
1518,
273,
1103,
18,
1968,
3292,
2704,
974,
3546,
63,
20,
8009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
1103,
4672,
508,
273,
875,
309,
1103,
18,
1968,
18,
5332,
67,
856,
2668,
2704,
974,
11,
4672,
394,
1518,
273,
1103,
18,
1968,
3292,
2704,
974,
3546,
63,
20,
8009,
... |
rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename).replace(" ", "\ ") ) rsync_filenames_server += "%s " %( filename.replace(" ", "\ ") ) | if filename.find("\\") != -1 or filename.find("'") != -1 or filename.find("&") != -1: dialog.destroy() msg=_("Special characters used in %s filename.\nPlease rename it." %os.path.basename(filename) ) shared.info_msg( msg ) return rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename).replace(" ", "\ ").replace("(", "\(").replace(")", "\)").replace("*", "\*").replace("!", "\!").replace("?", "\?").replace("\"", "\\\"") ) rsync_filenames_server += "%s " %( filename.replace(" ", "\ ").replace("(", "\(").replace(")", "\)").replace("*", "\*").replace("!", "\!").replace("?", "\?").replace("\"", "\\\"") ) | def menu_event_one(self, action): start1=time() (model, iter) = self.main.tabla.get_selection().get_selected() if iter == None: print_debug( "menu_event_one() not selected thin client !!!" ) return self.main.selected_host=model.get_value(iter,COL_HOST) self.main.selected_ip=model.get_value(iter, COL_IP) if not self.doaction_onthisclient(action, self.main.selected_ip): # show a msg shared.info_msg ( _("Can't exec this action because you are connected at this host!") ) return if action == 0: # refresh terminal # call to read remote info self.main.xmlrpc.newhost(self.main.selected_ip) self.main.xmlrpc.ip=self.main.selected_ip self.main.worker=shared.Workers( self.main,\ target=self.populate_datatxt, args=([self.main.selected_ip]) ).start() if action == 1: # clean datatxtbuffer self.main.datatxt.clean() if action == 2: # Ask for reboot reboot ip=self.main.selected_ip msg=_( _("Do you want to reboot %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("reboot") if action == 3: # Ask for poweroff reboot msg=_( _("Do you want to poweroff %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("poweroff") if action == 4: # lock screen if not self.main.xmlrpc.lockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 5: # unlock screen if not self.main.xmlrpc.unlockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 6: # start ivs self.main.worker=shared.Workers(self.main, target=self.start_ivs, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 7: # start vnc self.main.worker=shared.Workers(self.main, target=self.start_vnc, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 8: # screenshot !!! self.main.worker=shared.Workers(self.main, target=self.get_screenshot, args=[self.main.selected_ip]) self.main.worker.start() if action == 9: # give a remote xterm throught SSH pass_msg=_("Enter password of remote thin client (if asked for it)") cmd="xterm -e \"echo '%s'; ssh root@%s\"" %(pass_msg, self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) if action == 10: # launch personalize settings if client is TCOS (PXES and LTSP not supported) client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": cmd="gksu \"tcospersonalize --host=%s\"" %(self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) else: shared.info_msg( _("%s is not supported to personalize!") %(client_type) ) if action == 11: # reset xorg # Ask for it if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't logout, user is not logged") ) return user=self.main.localdata.GetUsernameAndHost(self.main.selected_ip) print_debug("menu_event_one() user=%s" %user) msg=_( _("Do you want to logout user \"%s\"?" ) %(user) ) if shared.ask_msg ( msg ): newusernames=[] remote_cmd="/usr/lib/tcos/session-cmd-send LOGOUT" if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) self.main.xmlrpc.DBus("exec", remote_cmd ) else: newusernames.append(user) result = self.main.dbus_action.do_exec(newusernames ,remote_cmd ) if not result: shared.error_msg ( _("Error while exec remote app:\nReason:%s") %( self.main.dbus_action.get_error_msg() ) ) if action == 12: # restart xorg with new settings # thin client must download again XXX.XXX.XXX.XXX.conf and rebuild xorg.conf client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": msg=_( "Restart X session of %s with new config?" ) %(self.main.selected_ip) if shared.ask_msg ( msg ): # see xmlrpc/xorg.h, rebuild will download and sed xorg.conf.tpl self.main.xmlrpc.tc.tcos.xorg("rebuild", "--restartxorg", \ self.main.xmlrpc.username, \ self.main.xmlrpc.password ) self.refresh_client_info(self.main.selected_ip) else: shared.info_msg( _("%s is not supported to restart Xorg!") %(client_type) ) if action == 13: # exec app self.askfor(mode="exec", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)]) if action == 14: # send message self.askfor(mode="mess", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] ) if action == 15: print_debug ("menu_event_one() show running apps" ) self.get_user_processes(self.main.selected_ip) if action == 16: # action sent by vidal_joshur at gva dot es # start video broadcast mode # search for connected users users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] client=[self.main.selected_ip] dialog = gtk.FileChooserDialog(_("Select audio/video file.."), None, gtk.FILE_CHOOSER_ACTION_OPEN, (_("Play DVD"), 1, _("Play SVCD/VCD"), 2, _("Play AudioCD"), 3, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) self.folder = self._folder = os.environ['HOME'] dialog.set_current_folder(self.folder) filter = gtk.FileFilter() filter.set_name("Media Files ( *.avi, *.mpg, *.mpeg, *.mp3, *.wav, etc.. )") file_types=["*.avi", "*.mpg", "*.mpeg", "*.ogg", "*.ogm", "*.asf", "*.divx", "*.wmv", "*.vob", "*.m2v", "*.m4v", "*.mp2", "*.mp4", "*.ac3", "*.ogg", "*.mp1", "*.mp2", "*.mp3", "*.wav", "*.wma"] for elem in file_types: filter.add_pattern( elem ) dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All Files") filter.add_pattern("*.*") dialog.add_filter(filter) | 53a3eea66bbc168c70ea325ef8439de22d83ed8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/53a3eea66bbc168c70ea325ef8439de22d83ed8b/TcosActions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
67,
2575,
67,
476,
12,
2890,
16,
1301,
4672,
787,
21,
33,
957,
1435,
261,
2284,
16,
1400,
13,
273,
365,
18,
5254,
18,
7032,
11821,
18,
588,
67,
10705,
7675,
588,
67,
8109,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
67,
2575,
67,
476,
12,
2890,
16,
1301,
4672,
787,
21,
33,
957,
1435,
261,
2284,
16,
1400,
13,
273,
365,
18,
5254,
18,
7032,
11821,
18,
588,
67,
10705,
7675,
588,
67,
8109,
1435... |
if m is None: m = re_irq.match(line) if m is not None: print getClock(m), m.group('data') | if m is not None: insn = int(m.group('insn'), 16) iname = dis(insn) Rd = (insn >> 12) & 0xF Rn = (insn >> 16) & 0xF Rdval = transRegVal(Rd, m.group('Rd')) Rnval = transRegVal(Rn, m.group('Rn')) if Rd == Rn: regs = Rdval | def procline(line): m = re_debug.match(line) if m is None: m = re_irq.match(line) if m is not None: print getClock(m), m.group('data') else: memalias.procline(line) return insn = int(m.group('insn'), 16) iname = dis(insn) Rd = (insn >> 12) & 0xF Rn = (insn >> 16) & 0xF Rdval = transRegVal(Rd, m.group('Rd')) Rnval = transRegVal(Rn, m.group('Rn')) if Rd == Rn and Rdval == Rnval: regs = Rdval else: regs = Rdval + " " + Rnval print "%s %s: %-30s # %s" % ( getClock(m), m.group('addr'), iname, regs) | 1fb3bfc1cc7464981e27d8f8340534f4d92180c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12923/1fb3bfc1cc7464981e27d8f8340534f4d92180c0/dis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
450,
830,
558,
12,
1369,
4672,
312,
273,
283,
67,
4148,
18,
1916,
12,
1369,
13,
309,
312,
353,
486,
599,
30,
29821,
273,
509,
12,
81,
18,
1655,
2668,
2679,
82,
19899,
2872,
13,
316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
450,
830,
558,
12,
1369,
4672,
312,
273,
283,
67,
4148,
18,
1916,
12,
1369,
13,
309,
312,
353,
486,
599,
30,
29821,
273,
509,
12,
81,
18,
1655,
2668,
2679,
82,
19899,
2872,
13,
316,
... |
def query(lines = [], max_query_len = 1300): | def query(lines = [], max_query_len = 1300, wikicode = True): | def query(lines = [], max_query_len = 1300): # Google max_query_len = 1480? # - '-Wikipedia ""' = 1467 # Google limit queries to 32 words. output = u"" n_query = 0 previous_group_url = 'none' for line in lines: line = cleanwikicode(line) for search_words in mysplit(line, 31, " "): if len(search_words) > 120: if config.copyright_economize_query: if economize_query(search_words): wikipedia.output('SKIP TEXT: ' + search_words) consecutive = False continue n_query += 1 #wikipedia.output(search_words) if config.copyright_max_query_for_page and n_query > config.copyright_max_query_for_page: wikipedia.output(u"Max query limit for page reached") return output if config.copyright_skip_query > n_query: continue if len(search_words) > max_query_len: search_words = search_words[:max_query_len] consecutive = False if " " in search_words: search_words = search_words[:search_words.rindex(" ")] results = get_results(search_words) group_url = '' for url, engine, comment in results: if comment: group_url += '\n*%s - %s (%s)' % (engine, url, "; ".join(comment)) else: group_url += '\n*%s - %s' % (engine, url) if results: group_url_list = group_url.splitlines() group_url_list.sort() group_url = '\n'.join(group_url_list) if previous_group_url == group_url: if consecutive: output += ' ' + search_words else: output += '\n**' + search_words else: output += group_url + '\n**' + search_words previous_group_url = group_url consecutive = True else: consecutive = False else: consecutive = False return output | df982418feb2fee96037cb0fe13fcf2215c639bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/df982418feb2fee96037cb0fe13fcf2215c639bd/copyright.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
3548,
273,
5378,
16,
943,
67,
2271,
67,
1897,
273,
5958,
713,
16,
341,
1766,
3487,
273,
1053,
4672,
468,
6124,
943,
67,
2271,
67,
1897,
273,
5045,
3672,
35,
468,
300,
2400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
12,
3548,
273,
5378,
16,
943,
67,
2271,
67,
1897,
273,
5958,
713,
16,
341,
1766,
3487,
273,
1053,
4672,
468,
6124,
943,
67,
2271,
67,
1897,
273,
5045,
3672,
35,
468,
300,
2400,
... |
s = '' | file = file.replace('<','<') s = """ <html> <head> """ s += '<title>%s | SAGE src browser</title>' % filename | def src_browser(self, path): self.send_head() i = path.find('?') if i == -1: return self.file_not_found(path) filename = path[i+1:] file = open('%s/devel/sage/sage/%s'%(SAGE_ROOT,filename)).read() s = '' s += '<link rel=stylesheet href="/highlight/prettify.css" type="text/css" />\n' s += '<h1 align=center>SAGE Source Browser</h1>\n' s += '<h2 align=center>devel/sage/sage%s</h2>\n'%filename s += '<br><hr><br>\n' s += '<pre id="code">%s</pre>\n'%file s += '<br><hr><br>\n' s += '<script src="/highlight/prettify.js"></script>\n' s += """<script> | 0c026463811e7d525ed27b29392c1242cb1d9074 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/0c026463811e7d525ed27b29392c1242cb1d9074/server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1705,
67,
11213,
12,
2890,
16,
589,
4672,
365,
18,
4661,
67,
1978,
1435,
277,
273,
589,
18,
4720,
2668,
4899,
13,
309,
277,
422,
300,
21,
30,
327,
365,
18,
768,
67,
902,
67,
7015,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1705,
67,
11213,
12,
2890,
16,
589,
4672,
365,
18,
4661,
67,
1978,
1435,
277,
273,
589,
18,
4720,
2668,
4899,
13,
309,
277,
422,
300,
21,
30,
327,
365,
18,
768,
67,
902,
67,
7015,
... |
curl_process = subprocess.Popen(['curl', '--silent', '--show-error', patch['url']], stdout=subprocess.PIPE) | patch_apply_process = None | def apply_patch(self, patch, force=False): # It's possible that the patch was not made from the root directory. # We should detect and handle that case. curl_process = subprocess.Popen(['curl', '--silent', '--show-error', patch['url']], stdout=subprocess.PIPE) args = [self.script_path('svn-apply'), '--reviewer', patch['reviewer']] if force: args.append('--force') patch_apply_process = subprocess.Popen(args, stdin=curl_process.stdout) | 6685782b391ab41ef08e1776a128ef7f67afc605 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/6685782b391ab41ef08e1776a128ef7f67afc605/scm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
2272,
12,
2890,
16,
4729,
16,
2944,
33,
8381,
4672,
468,
2597,
1807,
3323,
716,
326,
4729,
1703,
486,
7165,
628,
326,
1365,
1867,
18,
468,
1660,
1410,
5966,
471,
1640,
716,
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,
2230,
67,
2272,
12,
2890,
16,
4729,
16,
2944,
33,
8381,
4672,
468,
2597,
1807,
3323,
716,
326,
4729,
1703,
486,
7165,
628,
326,
1365,
1867,
18,
468,
1660,
1410,
5966,
471,
1640,
716,
6... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.