rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
skipped.append(system['id']) print "System vendor is '%s', skipping. Force with --all if desired." % (vendor) | print "%s vendor is '%s', skipping. Force with --all if desired." % (system['name'], vendor) | def subscribe_clients(key): '''Creates list of registered clients, and subscribes them to the platform_independent channel''' systems = client.system.list_systems(key) skipped = [] scheduled = [] for system in systems: # Check if it is a Dell system if options.verbose: print "Checking system %s with id: %i" % (system['name'], system['id']) system_dmi = client.system.get_dmi(key, system['id']) if system_dmi == '': vendor = 'unknown' else: vendor = system_dmi['vendor'] if options.verbose: print "System vendor is:", vendor if not ('Dell' in vendor or options.subscribe_all): #TODO - write skipped systems to a logfile or print out at end. Eventually add mechanism to retry these skipped.append(system['id']) print "System vendor is '%s', skipping. Force with --all if desired." % (vendor) if options.verbose: print "Removing %s from list" % (system['name']) system['skip'] = True else: system['skip'] = False try: base_channel = client.system.get_subscribed_base_channel(key, system['id'])['label'] system['base_channel'] = base_channel print "%s:%i is subscribed to: %s." % (system['name'], system['id'], base_channel) scheduled.append(system['id']) new_channel = DELL_INFO['label'] + '-' + PLATFORM_INDEPENDENT + '-' + base_channel system['platform_independent'] = new_channel if not subscribe(key, base_channel, new_channel, system['id']): #TODO - same as above, write to skipped list instead print "Error attempting to subscribe to %s." % (new_channel) | a505c3724245a7ab265bfa6c2d81e21adace87b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/a505c3724245a7ab265bfa6c2d81e21adace87b1/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9129,
67,
16931,
12,
856,
4672,
9163,
2729,
666,
434,
4104,
7712,
16,
471,
10189,
281,
2182,
358,
326,
4072,
67,
267,
10891,
1904,
26418,
14908,
273,
1004,
18,
4299,
18,
1098,
67,
4299,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9129,
67,
16931,
12,
856,
4672,
9163,
2729,
666,
434,
4104,
7712,
16,
471,
10189,
281,
2182,
358,
326,
4072,
67,
267,
10891,
1904,
26418,
14908,
273,
1004,
18,
4299,
18,
1098,
67,
4299,
... |
if params.get('bug_queries'): | if bt.query_url_type = 'xml': | #def generate_bug_project_name(self, bb): #return params['project_name'] | 4a88f99e679acb57d64de9e51af87e7eb72941dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/4a88f99e679acb57d64de9e51af87e7eb72941dd/bugzilla.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
536,
2103,
67,
925,
67,
4406,
67,
529,
12,
2890,
16,
7129,
4672,
468,
2463,
859,
3292,
4406,
67,
529,
3546,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
536,
2103,
67,
925,
67,
4406,
67,
529,
12,
2890,
16,
7129,
4672,
468,
2463,
859,
3292,
4406,
67,
529,
3546,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
except (DistutilsExecError, DistutilsFileError, DistutilsOptionError, | except (DistutilsError, | def setup (**attrs): """The gateway to the Distutils: do everything your setup script needs to do, in a highly flexible and user-driven way. Briefly: create a Distribution instance; find and parse config files; parse the command line; run each Distutils command found there, customized by the options supplied to 'setup()' (as keyword arguments), in config files, and on the command line. The Distribution instance might be an instance of a class supplied via the 'distclass' keyword argument to 'setup'; if no such class is supplied, then the Distribution class (in dist.py) is instantiated. All other arguments to 'setup' (except for 'cmdclass') are used to set attributes of the Distribution instance. The 'cmdclass' argument, if supplied, is a dictionary mapping command names to command classes. Each command encountered on the command line will be turned into a command class, which is in turn instantiated; any class found in 'cmdclass' is used in place of the default, which is (for command 'foo_bar') class 'foo_bar' in module 'distutils.command.foo_bar'. The command class must provide a 'user_options' attribute which is a list of option specifiers for 'distutils.fancy_getopt'. Any command-line options between the current and the next command are used to set attributes of the current command object. When the entire command-line has been successfully parsed, calls the 'run()' method on each command object in turn. This method will be driven entirely by the Distribution object (which each command object has a reference to, thanks to its constructor), and the command-specific options that became attributes of each command object. """ global _setup_stop_after, _setup_distribution # Determine the distribution class -- either caller-supplied or # our Distribution (see below). klass = attrs.get('distclass') if klass: del attrs['distclass'] else: klass = Distribution if not attrs.has_key('script_name'): attrs['script_name'] = os.path.basename(sys.argv[0]) if not attrs.has_key('script_args'): attrs['script_args'] = sys.argv[1:] # Create the Distribution instance, using the remaining arguments # (ie. everything except distclass) to initialize it try: _setup_distribution = dist = klass(attrs) except DistutilsSetupError, msg: if attrs.has_key('name'): raise SystemExit, "error in %s setup command: %s" % \ (attrs['name'], msg) else: raise SystemExit, "error in setup command: %s" % msg if _setup_stop_after == "init": return dist # Find and parse the config file(s): they will override options from # the setup script, but be overridden by the command line. dist.parse_config_files() if DEBUG: print "options (after parsing config files):" dist.dump_option_dicts() if _setup_stop_after == "config": return dist # Parse the command line; any command-line errors are the end user's # fault, so turn them into SystemExit to suppress tracebacks. try: ok = dist.parse_command_line() except DistutilsArgError, msg: raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg if DEBUG: print "options (after parsing command line):" dist.dump_option_dicts() if _setup_stop_after == "commandline": return dist # And finally, run all the commands found on the command line. if ok: try: dist.run_commands() except KeyboardInterrupt: raise SystemExit, "interrupted" except (IOError, os.error), exc: error = grok_environment_error(exc) if DEBUG: sys.stderr.write(error + "\n") raise else: raise SystemExit, error except (DistutilsExecError, DistutilsFileError, DistutilsOptionError, CCompilerError), msg: if DEBUG: raise else: raise SystemExit, "error: " + str(msg) return dist | ba3276af0ff6287f40f3018eeef37d3ac742b621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ba3276af0ff6287f40f3018eeef37d3ac742b621/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
261,
636,
7039,
4672,
3536,
1986,
6878,
358,
326,
19893,
5471,
30,
741,
7756,
3433,
3875,
2728,
4260,
358,
741,
16,
316,
279,
3551,
715,
16600,
1523,
471,
729,
17,
3069,
837,
4031,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
261,
636,
7039,
4672,
3536,
1986,
6878,
358,
326,
19893,
5471,
30,
741,
7756,
3433,
3875,
2728,
4260,
358,
741,
16,
316,
279,
3551,
715,
16600,
1523,
471,
729,
17,
3069,
837,
4031,... |
Rank not provably correct. | RuntimeError: Rank not provably correct. | def rank(self, use_database=False, verbose=False, only_use_mwrank=True, algorithm='mwrank_shell', proof=None): """ Return the rank of this elliptic curve, assuming no conjectures. | 57643f6e43fcee3aa6a07ee48a7bdca221c96447 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/57643f6e43fcee3aa6a07ee48a7bdca221c96447/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
999,
67,
6231,
33,
8381,
16,
3988,
33,
8381,
16,
1338,
67,
1202,
67,
81,
91,
11500,
33,
5510,
16,
4886,
2218,
81,
91,
11500,
67,
10304,
2187,
14601,
33,
7036,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
999,
67,
6231,
33,
8381,
16,
3988,
33,
8381,
16,
1338,
67,
1202,
67,
81,
91,
11500,
33,
5510,
16,
4886,
2218,
81,
91,
11500,
67,
10304,
2187,
14601,
33,
7036,
467... |
print cal.formatyear(int(args[1]), **optdict) | result = cal.formatyear(int(args[1]), **optdict) | def main(args): import optparse parser = optparse.OptionParser(usage="usage: %prog [options] [year] [month]") parser.add_option("-w", "--width", dest="width", type="int", default=2, help="width of date column (default 2, text only)") parser.add_option("-l", "--lines", dest="lines", type="int", default=1, help="number of lines for each week (default 1, text only)") parser.add_option("-s", "--spacing", dest="spacing", type="int", default=6, help="spacing between months (default 6, text only)") parser.add_option("-m", "--months", dest="months", type="int", default=3, help="months per row (default 3, text only)") parser.add_option("-c", "--css", dest="css", default="calendar.css", help="CSS to use for page (html only)") parser.add_option("-e", "--encoding", dest="encoding", default=None, help="Encoding to use for CSS output (html only)") parser.add_option("-t", "--type", dest="type", default="text", choices=("text", "html"), help="output type (text or html)") (options, args) = parser.parse_args(args) if options.type == "html": cal = HTMLCalendar() encoding = options.encoding if encoding is None: encoding = sys.getdefaultencoding() optdict = dict(encoding=encoding, css=options.css) if len(args) == 1: print cal.formatyearpage(datetime.date.today().year, **optdict) elif len(args) == 2: print cal.formatyearpage(int(args[1]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) else: cal = TextCalendar() optdict = dict(w=options.width, l=options.lines) if len(args) != 3: optdict["c"] = options.spacing optdict["m"] = options.months if len(args) == 1: print cal.formatyear(datetime.date.today().year, **optdict) elif len(args) == 2: print cal.formatyear(int(args[1]), **optdict) elif len(args) == 3: print cal.formatmonth(int(args[1]), int(args[2]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) | 243815ee949d8494ecadb24f0872307909b05fc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/243815ee949d8494ecadb24f0872307909b05fc8/calendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
1930,
2153,
2670,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
1546,
9167,
30,
738,
14654,
306,
2116,
65,
306,
6874,
65,
306,
7496,
4279,
13,
2082,
18,
1289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
1930,
2153,
2670,
2082,
273,
2153,
2670,
18,
1895,
2678,
12,
9167,
1546,
9167,
30,
738,
14654,
306,
2116,
65,
306,
6874,
65,
306,
7496,
4279,
13,
2082,
18,
1289,
... |
self.dialog.set_markup(text) | self.dialog.set_markup(xml.sax.saxutils.escape(text)) | def __init__ (self, title, text, type="ok", default=None, parent=None): self.rc = None if type == 'ok': buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_INFO elif type == 'warning': buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_WARNING elif type == 'okcancel': buttons = gtk.BUTTONS_OK_CANCEL style = gtk.MESSAGE_WARNING elif type == 'yesno': buttons = gtk.BUTTONS_YES_NO style = gtk.MESSAGE_QUESTION elif type == "error": buttons = gtk.BUTTONS_OK style = gtk.MESSAGE_ERROR elif type == "question": buttons = gtk.BUTTONS_YES_NO style = gtk.MESSAGE_QUESTION | b9b16b7f0671f05a9200593197aaf1f1034f13ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11137/b9b16b7f0671f05a9200593197aaf1f1034f13ce/messageWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2077,
16,
977,
16,
618,
1546,
601,
3113,
805,
33,
7036,
16,
982,
33,
7036,
4672,
365,
18,
1310,
273,
599,
309,
618,
422,
296,
601,
4278,
9502,
273,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
2077,
16,
977,
16,
618,
1546,
601,
3113,
805,
33,
7036,
16,
982,
33,
7036,
4672,
365,
18,
1310,
273,
599,
309,
618,
422,
296,
601,
4278,
9502,
273,
22... |
try: url = cls.build_url('direct/signupEvent/%s.json?siteId=%s' % (event_id, site)) event = simplejson.load(request.urlopen(url)) except urllib2.HTTPError, e: if e.code == 404: raise Http404 else: raise | request.opener.open( cls.build_url('direct/signupEvent/%s/edit' % event_id), data = urllib.urlencode({ 'siteId': site, 'allocToTSid': '0', 'userActionType': 'invalidAction', })) url = cls.build_url('direct/signupEvent/%s.json?siteId=%s' % (event_id, site)) event = simplejson.load(request.urlopen(url)) | def initial_context(cls, request, site, event_id): try: url = cls.build_url('direct/signupEvent/%s.json?siteId=%s' % (event_id, site)) event = simplejson.load(request.urlopen(url)) except urllib2.HTTPError, e: if e.code == 404: raise Http404 else: raise | fab4e3b6d4a9c811659059ec7e2684770bdd2202 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14173/fab4e3b6d4a9c811659059ec7e2684770bdd2202/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2172,
67,
2472,
12,
6429,
16,
590,
16,
2834,
16,
871,
67,
350,
4672,
775,
30,
880,
273,
2028,
18,
3510,
67,
718,
2668,
7205,
19,
2977,
416,
1133,
5258,
87,
18,
1977,
35,
4256,
548,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2172,
67,
2472,
12,
6429,
16,
590,
16,
2834,
16,
871,
67,
350,
4672,
775,
30,
880,
273,
2028,
18,
3510,
67,
718,
2668,
7205,
19,
2977,
416,
1133,
5258,
87,
18,
1977,
35,
4256,
548,
... |
sage: M = ModularForms(25,4) | sage: M = ModularForms(2,14) | def prec(self): """ Return the precision to which self.q_expansion() is currently known. Note that this may be 0. | 95746edaafe7efdfc0e1f168b024a106f4dd36d8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/95746edaafe7efdfc0e1f168b024a106f4dd36d8/element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13382,
12,
2890,
4672,
3536,
2000,
326,
6039,
358,
1492,
365,
18,
85,
67,
2749,
12162,
1435,
353,
4551,
4846,
18,
3609,
716,
333,
2026,
506,
374,
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,
0,
0,
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,
13382,
12,
2890,
4672,
3536,
2000,
326,
6039,
358,
1492,
365,
18,
85,
67,
2749,
12162,
1435,
353,
4551,
4846,
18,
3609,
716,
333,
2026,
506,
374,
18,
2,
-100,
-100,
-100,
-100,
-100,
-... |
self.putrequest(method, url) | if (headers.has_key('Host') or [k for k in headers.iterkeys() if k.lower() == "host"]): self.putrequest(method, url, skip_host=1) else: self.putrequest(method, url) | def _send_request(self, method, url, body, headers): self.putrequest(method, url) | 3921ff675ec544f3738bcaf606cca745b9a508ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3921ff675ec544f3738bcaf606cca745b9a508ea/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4661,
67,
2293,
12,
2890,
16,
707,
16,
880,
16,
1417,
16,
1607,
4672,
365,
18,
458,
2293,
12,
2039,
16,
880,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4661,
67,
2293,
12,
2890,
16,
707,
16,
880,
16,
1417,
16,
1607,
4672,
365,
18,
458,
2293,
12,
2039,
16,
880,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.time += np.max(slew_times) | self.time += (np.max(slew_times) if len(slew_times) > 0 else 0.) | def estimate_slew(timestamp): """Obtain instantaneous target position and estimate time to slew there.""" # Target position right now az, el = self._azel(target, timestamp, ant) # If target is below horizon, aim at closest point on horizon az_dist, el_dist = np.abs(az - ant_az), np.abs(max(el, 2.) - ant_el) # Ignore azimuth wraps and drive strategies az_dist = az_dist if az_dist < 180. else 360. - az_dist # Assume az speed of 2 deg/s, el speed of 1 deg/s and overhead of 1 second slew_time = max(0.5 * az_dist, 1.0 * el_dist) + 1.0 return az, el, slew_time | 52046463f2f51646d2ef172950b492308087dac4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5243/52046463f2f51646d2ef172950b492308087dac4/observe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11108,
67,
87,
298,
91,
12,
5508,
4672,
3536,
20019,
5934,
15522,
1018,
1754,
471,
11108,
813,
358,
272,
298,
91,
1915,
12123,
468,
5916,
1754,
2145,
2037,
10562,
16,
415,
273,
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,
11108,
67,
87,
298,
91,
12,
5508,
4672,
3536,
20019,
5934,
15522,
1018,
1754,
471,
11108,
813,
358,
272,
298,
91,
1915,
12123,
468,
5916,
1754,
2145,
2037,
10562,
16,
415,
273,
365,
6315... |
if platform.atom_debug: print_compact_stack("fyi, something called standard_inval twice (not illegal but weird -- bug hint?) in %r: " % self, linesep = '\n') | if _debug_standard_inval_twice: msg = "debug: fyi: something called standard_inval twice (not illegal but weird -- bug hint?) in %r" % self if _debug_standard_inval_twice_stack: print_compact_stack(msg + ": ", linesep = '\n') else: print msg | def standard_inval(self): """This is used to receive the invalidation signal, and call self.invalidator after some bookkeeping. See class docstring for more info. It also removes all cyclic or large attrs of self, to prevent memory leaks. """ # this needs to remove every subs except the one which is being fulfilled by calling it. # But it doesn't know which subs that is! So it has to remove them all, even that one, # so it has to call a remove method which is ok to call even for a subs that was already fulfilled. # The only way for that method to always work ok is for its semantics to be that it removes all current subs (0 or more) # which have the same fulfillment function (like subslist.remove_all_instances does). # That is only ok since our subs (self.standard_inval) is unique to this object, and this object # makes sure to give only one copy of it to one thing. (Another reason it could be ok is if it doesn't # matter how many times self.invalidator is called, once it's called once. This is true in all current uses [061119] # but perhaps not guaranteed.) inval = self.last_sub_invalidator self.last_sub_invalidator = 'hmm' # 061119 do this rather than using del, to avoid exception when we're called twice; either way avoids a memory leak if inval == 'hmm': # Something called standard_inval twice. This can happen (for reasons not yet clear to me) when some tracked state # is set and later used, all during the same computation -- normally, state used by a computation should never be set # during it, only before it (so as to trigger it, if the same computation used the same state last time around). # Maybe the problem is that sets of default values, within "initialization on demand", should be considered pure uses # but are being considered sets? Not sure yet -- this debug code only shows me a later event. ###k [061121 comment] if platform.atom_debug: print_compact_stack("fyi, something called standard_inval twice (not illegal but weird -- bug hint?) in %r: " % self, ## frame_repr = _std_frame_repr, #bruce 061120, might or might not be temporary, not normally seen linesep = '\n') return whatweused = self.whatweused self.whatweused = 444 # not a sequence for subslist in whatweused: ## can't use subslist.remove( self.last_sub_invalidator ), as explained above subslist.remove_all_instances( inval ) invalidator = self.invalidator del self.invalidator invalidator() return | a67c84dfc1dcc46957b737730d881108eea5d4dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a67c84dfc1dcc46957b737730d881108eea5d4dd/changes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
267,
1125,
12,
2890,
4672,
3536,
2503,
353,
1399,
358,
6798,
326,
22996,
4277,
16,
471,
745,
365,
18,
5387,
639,
1839,
2690,
6978,
10102,
310,
18,
2164,
667,
14525,
364,
1898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4529,
67,
267,
1125,
12,
2890,
4672,
3536,
2503,
353,
1399,
358,
6798,
326,
22996,
4277,
16,
471,
745,
365,
18,
5387,
639,
1839,
2690,
6978,
10102,
310,
18,
2164,
667,
14525,
364,
1898,
... |
sage: E.padic_regulator(5, 10) 4*5 + 3*5^2 + 2*5^4 + 2*5^5 + 2*5^6 + O(5^8) | sage: E.padic_regulator(5, 10) 4*5 + 3*5^2 + 2*5^4 + 2*5^5 + 2*5^6 + 2*5^8 + 3*5^9 + O(5^10) | def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True): r""" Computes the cyclotomic p-adic regulator of this curve. | d9d1ac8c7b2b5b15b00e1a30f25c9d630f17062d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/d9d1ac8c7b2b5b15b00e1a30f25c9d630f17062d/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4627,
335,
67,
1574,
11775,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
2072,
33,
7036,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
326,
6143,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4627,
335,
67,
1574,
11775,
12,
2890,
16,
293,
16,
13382,
33,
3462,
16,
2072,
33,
7036,
16,
866,
67,
76,
879,
10370,
281,
281,
33,
5510,
4672,
436,
8395,
14169,
281,
326,
6143,
830,
... |
svectors=map(lambda j: V(j * V.basis_matrix()),i[1]) resu.append(tuple([i[0],svectors,i[2]])) | svectors=Sequence(map(lambda j: V(j * V.basis_matrix()),i[1]), cr=True) resu.append((i[0],svectors,i[2])) | def eigenvectors(self,extend=True): """ Computes the subspace of eigenvectors of a given eigenvalue. INPUT: - extend (True) decides if base field extensions should be considered or not. OUTPUT: A sequence of tuples. Each tuple contains an eigenvalue, a list with a basis of the corresponding subspace of eigenvectors, and the algebraic multiplicity of the eigenvalue. EXAMPLES: :: sage: V=(QQ^4).subspace([[0,2,1,4],[1,2,5,0],[1,1,1,1]]) sage: H=(V.Hom(V))([[0,1,0],[-1,0,0],[0,0,3]]) sage: H.eigenvectors() [(3, [(0, 0, 1, -6/7)], 1), (-1*I, [(1, 1*I, 0, -0.571428571428572? + 2.428571428571429?*I)], 1), (1*I, [(1, -1*I, 0, -0.571428571428572? - 2.428571428571429?*I)], 1)] sage: H.eigenvectors(extend=False) [(3, [(0, 0, 1, -6/7)], 1)] sage: H1=(V.Hom(V))([[2,1,0],[0,2,0],[0,0,3]]) sage: H1.eigenvectors() [(3, [(0, 0, 1, -6/7)], 1), (2, [(0, 1, 0, 17/7)], 2)] sage: H1.eigenvectors(extend=False) [(3, [(0, 0, 1, -6/7)], 1), (2, [(0, 1, 0, 17/7)], 2)] | 9bb09580aa7e219d556bbf2e0ec6c8440ac569f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/9bb09580aa7e219d556bbf2e0ec6c8440ac569f7/free_module_morphism.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11043,
29098,
12,
2890,
16,
14313,
33,
5510,
4672,
3536,
14169,
281,
326,
720,
2981,
434,
11043,
29098,
434,
279,
864,
16719,
1132,
18,
225,
12943,
30,
225,
300,
2133,
261,
5510,
13,
210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11043,
29098,
12,
2890,
16,
14313,
33,
5510,
4672,
3536,
14169,
281,
326,
720,
2981,
434,
11043,
29098,
434,
279,
864,
16719,
1132,
18,
225,
12943,
30,
225,
300,
2133,
261,
5510,
13,
210... |
for c in obj: if c in cls: try: attrs = [a for a in cls[c].attrs.itervalues() if flt(a)] except self.GiveUp: return if attrs: print "%s:" % longname(c) pr(attrs) | for cdef in clsdefs: try: attrs = [a for a in cdef.attrs.itervalues() if flt(a)] except self.GiveUp: return if attrs: print "%s:" % cdef.name pr(attrs) | def longname(c): return "%s.%s" % (c.__module__, c.__name__) | 3ac5bb1ed56b13e6310f726517f709ac5b3e49d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/3ac5bb1ed56b13e6310f726517f709ac5b3e49d6/pdbplus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1525,
529,
12,
71,
4672,
327,
2213,
87,
7866,
87,
6,
738,
261,
71,
16186,
2978,
972,
16,
276,
16186,
529,
972,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1525,
529,
12,
71,
4672,
327,
2213,
87,
7866,
87,
6,
738,
261,
71,
16186,
2978,
972,
16,
276,
16186,
529,
972,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
global _OUTDIR | global _OUTDIR, RL_HOME, testsFolder | def setOutDir(name): """Is it a writable file system distro being invoked within test directory? If so, can write test output here. If not, it had better go in a temp directory. Only do this once per process""" global _OUTDIR if _OUTDIR: return _OUTDIR D = [d[9:] for d in sys.argv if d.startswith('--outdir=')] if D: _OUTDIR = D[-1] try: os.makedirs(_OUTDIR) except: pass map(sys.argv.remove,D) else: assert name=='__main__',"setOutDir should only be called in the main script" scriptDir=os.path.dirname(sys.argv[0]) if not scriptDir: scriptDir=os.getcwd() _OUTDIR = scriptDir if not isWritable(_OUTDIR): _OUTDIR = get_rl_tempdir('reportlab_test') return _OUTDIR | 295b7d2ab04d7215188e20c79b33e8e11347cb1f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7053/295b7d2ab04d7215188e20c79b33e8e11347cb1f/testutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
1182,
1621,
12,
529,
4672,
3536,
2520,
518,
279,
9691,
585,
2619,
27450,
3832,
8187,
3470,
1842,
1867,
35,
225,
971,
1427,
16,
848,
1045,
1842,
876,
2674,
18,
225,
971,
486,
16,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
1182,
1621,
12,
529,
4672,
3536,
2520,
518,
279,
9691,
585,
2619,
27450,
3832,
8187,
3470,
1842,
1867,
35,
225,
971,
1427,
16,
848,
1045,
1842,
876,
2674,
18,
225,
971,
486,
16,
5... |
if val is not None: tmp = util.testXMLValue(val) | tmp = util.testXMLValue(val) if tmp is not None: | def __init__(self, elem, namespace=DEFAULT_OWS_NAMESPACE): self.minx = None self.miny = None self.maxx = None self.maxy = None | 3267b87fb6bcf6c5d7af97c7d9f74f0bb3212329 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11708/3267b87fb6bcf6c5d7af97c7d9f74f0bb3212329/ows.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3659,
16,
1981,
33,
5280,
67,
22973,
67,
11368,
4672,
365,
18,
1154,
92,
273,
599,
365,
18,
1154,
93,
273,
599,
365,
18,
1896,
92,
273,
599,
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,
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,
3659,
16,
1981,
33,
5280,
67,
22973,
67,
11368,
4672,
365,
18,
1154,
92,
273,
599,
365,
18,
1154,
93,
273,
599,
365,
18,
1896,
92,
273,
599,
365,
18,
... |
raise RuntimeError, 'unimplemented list head: %s' % head | yield "<list>\n" for part in f[1:]: for s in mathml_fmla(part): yield s yield "</list>\n" | def mathml_fmla(f): """generate MathML version of JSON formula """ if type(f) is type([]): head = f[0] if head in ('forall', 'exists'): yield "<apply>\n" \ "<%s/>\n" % head for v in f[1]: # per 5 Using definitionURL for Bound Variable Identification. # http://www.w3.org/TR/mathml-bvar/#proposal yield '<bvar><ci id="%s">%s</ci></bvar>\n' % (v, v) assert(len(f) == 3) for s in mathml_fmla(f[2]): yield s yield "</apply>\n" elif head in ('and', 'implies'): yield "<apply><%s/>\n" % head for part in f[1:]: for s in mathml_fmla(part): yield s yield "</apply>\n" elif head == 'holds': yield "<apply><ci>holds</ci>\n" #@@hmm... for part in f[1:]: for s in mathml_fmla(part): yield s yield "</apply>\n" elif ':' in head: assert(len(f) == 1) u = f[0] try: ln = u.split("#")[1] except IndexError: ln = u yield '<csymbol definitionURL="' yield escape(u) yield '" encoding="RDF"><mi>' yield escape(ln) yield '</mi></csymbol>\n' # list function symbol elif head == 'list': yield "<apply><list/>\n" for part in f[1:]: for s in mathml_fmla(part): yield s yield "</apply>\n" else: raise RuntimeError, 'unimplemented list head: %s' % head # variable elif type(f) is type({}): v = f['var'] yield '<ci definitionURL="#%s">%s</ci>\n' % (v, v) # integer elif type(f) is type(1): yield '<cn type="integer">%d</cn>\n' % f elif type(f) is type(1.1): yield '<cn type="rational">%f</cn>\n' % f # string elif type(f) in (type(''), type(u'')): yield '<ms>' yield escape(f) yield '</ms>\n' else: raise RuntimeError, 'unimplemented syntactic type: %s %s' % (f, type(f)) | b5706376fa7c267d3812d6991ea3b71cf1a333ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/b5706376fa7c267d3812d6991ea3b71cf1a333ef/n3absyn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4233,
781,
67,
74,
781,
69,
12,
74,
4672,
3536,
7163,
2361,
1495,
1177,
434,
1796,
8013,
3536,
309,
618,
12,
74,
13,
353,
618,
3816,
65,
4672,
910,
273,
284,
63,
20,
65,
225,
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,
4233,
781,
67,
74,
781,
69,
12,
74,
4672,
3536,
7163,
2361,
1495,
1177,
434,
1796,
8013,
3536,
309,
618,
12,
74,
13,
353,
618,
3816,
65,
4672,
910,
273,
284,
63,
20,
65,
225,
309,
... |
return SkewTableau( filter(lambda z: z != [], map(lambda x: filter(lambda y: y <= n, x), t)) ) | return SkewTableau( filter(lambda z: z != [], map(lambda x: filter(lambda y: y is None or y <= n, x), t)) ) | def restrict(self, n): """ Returns the restriction of the standard skew tableau to all the numbers less than or equal to n. | c3307328703da8de8695cdd617ad72dbf95b61ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c3307328703da8de8695cdd617ad72dbf95b61ef/skew_tableau.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13108,
12,
2890,
16,
290,
4672,
3536,
2860,
326,
9318,
434,
326,
4529,
20001,
1014,
8377,
358,
777,
326,
5600,
5242,
2353,
578,
3959,
358,
290,
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,
0,
0,
0,
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,
13108,
12,
2890,
16,
290,
4672,
3536,
2860,
326,
9318,
434,
326,
4529,
20001,
1014,
8377,
358,
777,
326,
5600,
5242,
2353,
578,
3959,
358,
290,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
elif (( configLOCALPROTOCOL == "rfio" and ( configSTORAGEROOT == '/dpm' )) \ or ( configLOCALPROTOCOL == "file" and \ (('se03.esc.qmul.ac.uk' in defaultSE) or 'storm-fe.cr.cnaf.infn.it' in defaultSE))): | elif ( configLOCALPROTOCOL == "rfio" and ( configSTORAGEROOT == '/dpm' )) \ or ( configLOCALPROTOCOL == "file" and 'storm-fe.cr.cnaf.infn.it' in defaultSE) \ or ( configLOCALPROTOCOL == "file" and 'se03.esc.qmul.ac.uk' in defaultSE): | def _getPFNsLFC(guidMap, defaultSE, localsitesrm): guidReplicas = {} mapLFN = {} stUrlMap = {} fsizeMap = {} md5sumMap = {} print 'defaultSE: %s' %defaultSE # lfc_list structure stat = lfc.lfc_filestatg() # support of bulk-operation enableBulkOps = hasattr(lfc,'lfc_getreplicas') #enableBulkOps = False if enableBulkOps: print 'LFC bulk reading...' guids = guidMap.values() lfcattempts = 0 while lfcattempts<5: (res, rep_entries) = lfc.lfc_getreplicas(guids, '') if res == 0 or rep_entries != None: break lfcattempts = lfcattempts + 1 print 'End of LFC bulk reading.' for lfn,guid in guidMap.iteritems(): mapLFN[guid] = lfn for rep in rep_entries: if rep != None and ((not hasattr(rep,'errcode')) or \ (hasattr(rep,'errcode') and rep.errcode == 0)): #pat = re.compile(r'[^srm://][^/]+') pat = re.compile(r'^[^:]+://([^:/]+)') name = re.findall(pat, rep.sfn) if name: host = name[0] else: host = '' if (defaultSE and host in defaultSE) or \ rep.sfn.startswith(localsitesrm): surl = rep.sfn lfn = mapLFN[rep.guid] guidReplicas[lfn] = surl fsizeMap[lfn] = long(rep.filesize) md5sumMap[lfn] = rep.csumvalue # TURL match = re.search('^[^:]+://([^:/]+):*\d*/', surl) try: sURLHost = match.group(1) except: sURLHost = defaultSE[0] turl = [] if configLOCALPROTOCOL!='gfal' \ and not stUrlMap.has_key(sURLHost) \ and configLOCALPROTOCOL!='rfio' \ and configLOCALPROTOCOL!='file' \ and not 'ccsrm.in2p3.fr' in defaultSE: print 'Using lcg-gt for turl retrieval ...' # check which version of lcg-utils we're on if os.environ.has_key('lcgutil_num') and os.environ['lcgutil_num']!='' and eval(os.environ['lcgutil_num']) >= 1007002: cmd = "lcg-gt --connect-timeout 60 --sendreceive-timeout 60 --srm-timeout 60 --bdii-timeout 60 " + surl + " " + configLOCALPROTOCOL else: cmd = "lcg-gt -t 60 " + surl + " " + configLOCALPROTOCOL print cmd try: signal.signal(signal.SIGALRM, ghandler) signal.alarm(240) child = popen2.Popen3(cmd,1) child.tochild.close() out=child.fromchild err=child.childerr line=out.readline() if line: match = re.search('^[^:]+://([^:/]+:*\d*)/', line) if match: turl = line.split() signal.alarm(0) except IOError: print 'lcg-gt time out !' pass signal.alarm(0) if turl and turl[0]: match = re.search('^[^:]+://([^:/]+:*\d*)/', turl[0]) tURLHost = match.group(1) stUrlMap[sURLHost] = tURLHost else: print 'LFC single reading...' # start LFC session try: lfc.lfc_startsess('','') except NameError: pass for lfn,guid in guidMap.iteritems(): mapLFN[guid] = lfn if globalVerbose: sys.stdout.write('.') sys.stdout.flush() # get replica listp = lfc.lfc_list() fr = lfc.lfc_listreplica('',guid,lfc.CNS_LIST_BEGIN,listp) while fr: if defaultSE and fr.host in defaultSE: break fr = lfc.lfc_listreplica('',guid,lfc.CNS_LIST_CONTINUE,listp) lfc.lfc_listreplica('',guid,lfc.CNS_LIST_END,listp) # found if fr: if fr.sfn.startswith(localsitesrm): surl = fr.sfn guidReplicas[lfn] = surl res = lfc.lfc_statg("",guid,stat) fsizeMap[lfn] = long(stat.filesize) md5sumMap[lfn] = stat.csumvalue # TURL match = re.search('^[^:]+://([^:/]+):*\d*/', surl) try: sURLHost = match.group(1) except: sURLHost = defaultSE[0] turl = [] if configLOCALPROTOCOL!='gfal' \ and not stUrlMap.has_key(sURLHost) \ and configLOCALPROTOCOL!='rfio' \ and configLOCALPROTOCOL!='file' \ and not 'ccsrm.in2p3.fr' in defaultSE: print 'Using lcg-gt for turl retrieval ...' # check which version of lcg-utils we're on if os.environ.has_key('lcgutil_num') and os.environ['lcgutil_num']!='' and eval(os.environ['lcgutil_num']) >= 1007002: cmd = "lcg-gt --connect-timeout 60 --sendreceive-timeout 60 --srm-timeout 60 --bdii-timeout 60 " + surl + " " + configLOCALPROTOCOL else: cmd = "lcg-gt -t 60 " + surl + " " + configLOCALPROTOCOL try: signal.signal(signal.SIGALRM, ghandler) signal.alarm(240) child = popen2.Popen3(cmd,1) child.tochild.close() out=child.fromchild err=child.childerr line=out.readline() if line: match = re.search('^[^:]+://([^:/]+:*\d*)/', line) if match: turl = line.split() signal.alarm(0) except IOError: print 'lcg-gt time-out !' pass signal.alarm(0) if turl and turl[0]: match = re.search('^[^:]+://([^:/]+:*\d*)/', turl[0]) tURLHost = match.group(1) stUrlMap[sURLHost] = tURLHost try: lfc.lfc_endsess() except NameError: pass # Create TURL map tUrlMap = {} for lfn, surl in guidReplicas.iteritems(): if configLOCALPROTOCOL in [ "dcap", 'Xrootd', 'gsidcap' ]: match = re.search('^[^:]+://([^:/]+):*\d*/', surl) try: sURLHost = match.group(1) except: sURLHost = defaultSE[0] if stUrlMap.has_key(sURLHost): pfn = re.sub(sURLHost,stUrlMap[sURLHost],surl) else: if not 'ccsrm.in2p3.fr' in defaultSE: pfn = 'gfal:'+surl else: pfn = surl if configLOCALPROTOCOL == "dcap" and (stUrlMap.has_key(sURLHost) or 'ccsrm.in2p3.fr' in defaultSE): pfn = re.sub('srm://','dcap://',pfn) # Hack for ccin2p3 pfn = re.sub('ccsrm','ccdcapatlas',pfn) # Hack for TRIUMF if 'srm.triumf.ca' in defaultSE: pfn = re.sub('/atlas/dq2/','//pnfs/triumf.ca/data/atlas/dq2/',pfn) pfn = re.sub('/atlas/users/','//pnfs/triumf.ca/data/atlas/users/',pfn) pfn = re.sub('22125/atlas/','22125//pnfs/triumf.ca/data/atlas/',pfn) # Hack for SFU if 'wormhole.westgrid.ca' in defaultSE: pfn = re.sub('/atlas/dq2/','//pnfs/sfu.ca/data/atlas/dq2/',pfn) pfn = re.sub('/atlas/users/','//pnfs/sfu.ca/data/atlas/users/',pfn) pfn = re.sub('22125/atlas/','22125//pnfs/sfu.ca/data/atlas/',pfn) elif configLOCALPROTOCOL == "Xrootd": pfn = re.sub('srm://','root://',pfn) # Hack for ccin2p3 pfn = re.sub('ccsrm','ccxroot',pfn) pfn = re.sub('ccdcamli01','ccxroot',pfn) pfn = re.sub(':1094',':1094/',pfn) elif configLOCALPROTOCOL == "gsidcap": pfn = re.sub('srm://','gfal:gsidcap://',pfn) pfn = re.sub('22128/pnfs','22128//pnfs',pfn) elif (configLOCALPROTOCOL == "rfio" and configSTORAGEROOT == '/castor') \ or localsitesrm.find('gla.scotgrid.ac.uk')>-1: # remove protocol and host pfn = re.sub('^[^:]+://[^/]+','',surl) # remove redundant / pfn = re.sub('^//','/',pfn) pfn = "rfio:" + pfn elif (( configLOCALPROTOCOL == "rfio" and ( configSTORAGEROOT == '/dpm' )) \ or ( configLOCALPROTOCOL == "file" and \ (('se03.esc.qmul.ac.uk' in defaultSE) or 'storm-fe.cr.cnaf.infn.it' in defaultSE))): turl = [] print 'Using lcg-gt for turl retrieval ...' # check which version of lcg-utils we're on if os.environ.has_key('lcgutil_num') and os.environ['lcgutil_num']!='' and eval(os.environ['lcgutil_num']) >= 1007002: cmd = "lcg-gt --connect-timeout 60 --sendreceive-timeout 60 --srm-timeout 60 --bdii-timeout 60 " + surl + " " + configLOCALPROTOCOL else: cmd = "lcg-gt -t 60 " + surl + " " + configLOCALPROTOCOL print cmd try: signal.signal(signal.SIGALRM, ghandler) signal.alarm(240) child = popen2.Popen3(cmd,1) child.tochild.close() out=child.fromchild err=child.childerr line=out.readline() if line and line.find('rfio://')>=0: turl = [line.strip()] elif line and line.find('file://')>=0: turl = [line.strip()] signal.alarm(0) except IOError: print 'lcg-gt time-out !' pass signal.alarm(0) if turl and turl[0]: pfn = turl[0] else: # remove protocol and host pfn = re.sub('^[^:]+://[^/]+','',surl) # remove redundant / pfn = re.sub('^//','/',pfn) # prepend protocol pfn = configLOCALPROTOCOL + ":" + pfn # file protocol used on Storm/lustre (no lcg-gt) elif configLOCALPROTOCOL == "file": # remove protocol and host pfn = re.sub('^[^:]+://[^/]+','',surl) # remove redundant / pfn = re.sub('^//','/',pfn) # prepend protocol pfn = configLOCALPROTOCOL + "://" + pfn # If all fails use gfal:srm://... else: pfn = "gfal:"+surl tUrlMap[lfn] = pfn return guidReplicas, tUrlMap, fsizeMap, md5sumMap | 0759a2d29b86c4b756fa87f09801edcb6569e940 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/0759a2d29b86c4b756fa87f09801edcb6569e940/ganga-stage-in-out-dq2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
22026,
10386,
48,
4488,
12,
14066,
863,
16,
805,
1090,
16,
8985,
2997,
8864,
4672,
225,
9875,
17248,
273,
2618,
852,
9105,
50,
273,
2618,
384,
1489,
863,
273,
2618,
284,
1467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
22026,
10386,
48,
4488,
12,
14066,
863,
16,
805,
1090,
16,
8985,
2997,
8864,
4672,
225,
9875,
17248,
273,
2618,
852,
9105,
50,
273,
2618,
384,
1489,
863,
273,
2618,
284,
1467,
... |
os.path.exists(file_path) and os.remove(file_path) | self.files_to_remove.append(file_path) | def testCancelDownload(self): """Verify that we can cancel a download.""" # Create a big file (250 MB) on the fly, so that the download won't finish # before being cancelled. file_path = self._MakeFile(2**28) file_url = self.GetFileURLForPath(file_path) downloaded_pkg = os.path.join(self.GetDownloadDirectory().value(), os.path.basename(file_path)) os.path.exists(downloaded_pkg) and os.remove(downloaded_pkg) self.DownloadAndWaitForStart(file_url) self.PerformActionOnDownload(self._GetDownloadId(), 'cancel') os.path.exists(file_path) and os.remove(file_path) | 81d5136a73a508bf2445f4bbd3a84288451005c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/81d5136a73a508bf2445f4bbd3a84288451005c8/downloads.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6691,
7109,
12,
2890,
4672,
3536,
8097,
716,
732,
848,
3755,
279,
4224,
12123,
468,
1788,
279,
5446,
585,
261,
26520,
17897,
13,
603,
326,
21434,
16,
1427,
716,
326,
4224,
8462,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
6691,
7109,
12,
2890,
4672,
3536,
8097,
716,
732,
848,
3755,
279,
4224,
12123,
468,
1788,
279,
5446,
585,
261,
26520,
17897,
13,
603,
326,
21434,
16,
1427,
716,
326,
4224,
8462,
14... |
clause = '' | if context is None: context = {} | def _order_calc(self, cursor, user, field, otype, context=None): order_by = [] tables = [] field_name = None table_name = None link_field = None clause = '' | 151ca4d00596ae2adeea6a9a25f559f6b8e7f729 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/151ca4d00596ae2adeea6a9a25f559f6b8e7f729/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1019,
67,
12448,
12,
2890,
16,
3347,
16,
729,
16,
652,
16,
320,
723,
16,
819,
33,
7036,
4672,
1353,
67,
1637,
273,
5378,
4606,
273,
5378,
652,
67,
529,
273,
599,
1014,
67,
529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1019,
67,
12448,
12,
2890,
16,
3347,
16,
729,
16,
652,
16,
320,
723,
16,
819,
33,
7036,
4672,
1353,
67,
1637,
273,
5378,
4606,
273,
5378,
652,
67,
529,
273,
599,
1014,
67,
529,
... |
ext = filename.split('.')[1].lower() | ext = os.path.splitext(filename)[1].lower() | def save(self, filename='sage.png', xmin=None, xmax=None, ymin=None, ymax=None, figsize=DEFAULT_FIGSIZE, fig=None, sub=None, savenow=True, dpi=None): """ | 467e7b1f07811a5059c03b1971887ba802fa8a90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/467e7b1f07811a5059c03b1971887ba802fa8a90/plot.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1544,
2218,
87,
410,
18,
6446,
2187,
13777,
33,
7036,
16,
14016,
33,
7036,
16,
15763,
33,
7036,
16,
15275,
33,
7036,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
4291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1923,
12,
2890,
16,
1544,
2218,
87,
410,
18,
6446,
2187,
13777,
33,
7036,
16,
14016,
33,
7036,
16,
15763,
33,
7036,
16,
15275,
33,
7036,
16,
14697,
33,
5280,
67,
5236,
4574,
16,
4291,
... |
res[order.id]['amount_tax']=cur_obj.round(cr, uid, cur, val) res[order.id]['amount_untaxed']=cur_obj.round(cr, uid, cur, val1) res[order.id]['amount_total']=res[order.id]['amount_untaxed'] + res[order.id]['amount_tax'] | res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val) res[order.id]['amount_untaxed'] = cur_obj.round(cr, uid, cur, val1) res[order.id]['amount_total'] = res[order.id]['amount_untaxed'] + res[order.id]['amount_tax'] | def _amount_all(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_untaxed': 0.0, 'amount_tax': 0.0, 'amount_total': 0.0, } val = val1 = 0.0 cur=order.pricelist_id.currency_id for line in order.order_line: val1 += line.price_subtotal val += self._amount_line_tax(cr, uid, line, context) res[order.id]['amount_tax']=cur_obj.round(cr, uid, cur, val) res[order.id]['amount_untaxed']=cur_obj.round(cr, uid, cur, val1) res[order.id]['amount_total']=res[order.id]['amount_untaxed'] + res[order.id]['amount_tax'] return res | fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
400,
273,
2618,
662,
67,
2603,
33,
2890,
18,
6011,
18,
588,
2668,
455,
18,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8949,
67,
454,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
652,
67,
529,
16,
1501,
16,
819,
4672,
400,
273,
2618,
662,
67,
2603,
33,
2890,
18,
6011,
18,
588,
2668,
455,
18,
70... |
print filename, "in", localdir or "." | print `filename`, "in", `localdir or "."` | def mirrorsubdir(f, localdir): pwd = f.pwd() if localdir and not os.path.isdir(localdir): if verbose: print 'Creating local directory', localdir try: makedir(localdir) except os.error, msg: print "Failed to establish local directory", localdir return infofilename = os.path.join(localdir, '.mirrorinfo') try: text = open(infofilename, 'r').read() except IOError, msg: text = '{}' try: info = eval(text) except (SyntaxError, NameError): print 'Bad mirror info in %s' % infofilename info = {} subdirs = [] listing = [] if verbose: print 'Listing remote directory %s...' % pwd f.retrlines('LIST', listing.append) filesfound = [] for line in listing: if verbose > 1: print '-->', `line` if mac: # Mac listing has just filenames; # trailing / means subdirectory filename = string.strip(line) mode = '-' if filename[-1:] == '/': filename = filename[:-1] mode = 'd' infostuff = '' else: # Parse, assuming a UNIX listing words = string.split(line, None, 8) if len(words) < 6: if verbose > 1: print 'Skipping short line' continue filename = words[-1] if string.find(filename, " -> ") >= 0: if verbose > 1: print 'Skipping symbolic link %s' % \ filename continue infostuff = words[-5:-1] mode = words[0] skip = 0 for pat in skippats: if fnmatch(filename, pat): if verbose > 1: print 'Skip pattern', pat, print 'matches', filename skip = 1 break if skip: continue if mode[0] == 'd': if verbose > 1: print 'Remembering subdirectory', filename subdirs.append(filename) continue filesfound.append(filename) if info.has_key(filename) and info[filename] == infostuff: if verbose > 1: print 'Already have this version of', filename continue fullname = os.path.join(localdir, filename) tempname = os.path.join(localdir, '@'+filename) if interactive: doit = askabout('file', filename, pwd) if not doit: if not info.has_key(filename): info[filename] = 'Not retrieved' continue try: os.unlink(tempname) except os.error: pass try: fp = open(tempname, 'wb') except IOError, msg: print "Can't create %s: %s" % (tempname, str(msg)) continue if verbose: print 'Retrieving %s from %s as %s...' % \ (filename, pwd, fullname) if verbose: fp1 = LoggingFile(fp, 1024, sys.stdout) else: fp1 = fp t0 = time.time() try: f.retrbinary('RETR ' + filename, fp1.write, 8*1024) except ftplib.error_perm, msg: print msg t1 = time.time() bytes = fp.tell() fp.close() if fp1 != fp: fp1.close() try: os.unlink(fullname) except os.error: pass # Ignore the error try: os.rename(tempname, fullname) except os.error, msg: print "Can't rename %s to %s: %s" % (tempname, fullname, str(msg)) continue info[filename] = infostuff writedict(info, infofilename) if verbose: dt = t1 - t0 kbytes = bytes / 1024.0 print int(round(kbytes)), print 'Kbytes in', print int(round(dt)), print 'seconds', if t1 > t0: print '(~%d Kbytes/sec)' % \ int(round(kbytes/dt),) print # # Remove files from info that are no longer remote deletions = 0 for filename in info.keys(): if filename not in filesfound: if verbose: print "Removing obsolete info entry for", print filename, "in", localdir or "." del info[filename] deletions = deletions + 1 if deletions: writedict(info, infofilename) # # Remove local files that are no longer in the remote directory try: if not localdir: names = os.listdir(os.curdir) else: names = os.listdir(localdir) except os.error: names = [] for name in names: if name[0] == '.' or info.has_key(name) or name in subdirs: continue skip = 0 for pat in skippats: if fnmatch(name, pat): if verbose > 1: print 'Skip pattern', pat, print 'matches', name skip = 1 break if skip: continue fullname = os.path.join(localdir, name) if not rmok: if verbose: print 'Local file', fullname, print 'is no longer pertinent' continue if verbose: print 'Removing local file/dir', fullname remove(fullname) # # Recursively mirror subdirectories for subdir in subdirs: if interactive: doit = askabout('subdirectory', subdir, pwd) if not doit: continue if verbose: print 'Processing subdirectory', subdir localsubdir = os.path.join(localdir, subdir) pwd = f.pwd() if verbose > 1: print 'Remote directory now:', pwd print 'Remote cwd', subdir try: f.cwd(subdir) except ftplib.error_perm, msg: print "Can't chdir to", subdir, ":", msg else: if verbose: print 'Mirroring as', localsubdir mirrorsubdir(f, localsubdir) if verbose > 1: print 'Remote cwd ..' f.cwd('..') newpwd = f.pwd() if newpwd != pwd: print 'Ended up in wrong directory after cd + cd ..' print 'Giving up now.' break else: if verbose > 1: print 'OK.' | b295df44a3cc9054e9b2a0ec48ba4f9c34fd0b88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b295df44a3cc9054e9b2a0ec48ba4f9c34fd0b88/ftpmirror.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
27026,
373,
1214,
12,
74,
16,
1191,
1214,
4672,
14720,
273,
284,
18,
27487,
1435,
309,
1191,
1214,
471,
486,
1140,
18,
803,
18,
291,
1214,
12,
3729,
1214,
4672,
309,
3988,
30,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
312,
27026,
373,
1214,
12,
74,
16,
1191,
1214,
4672,
14720,
273,
284,
18,
27487,
1435,
309,
1191,
1214,
471,
486,
1140,
18,
803,
18,
291,
1214,
12,
3729,
1214,
4672,
309,
3988,
30,
117... |
sage: R = RealField() sage: list(xsrange(1, 5, R(0.5))) | sage: list(xsrange(1, 5, 0.5)) | def xsrange(start, end=None, step=1, universe=None, check=True, include_endpoint=False): """ Return an iterator over numbers \code{a, a+step, ..., a+k*step}, where \code{a+k*step < b} and \code{a+(k+1)*step > b}. INPUT: a -- number b -- number step -- number (default: 1) OUTPUT: iterator Unlike range, a and b can be any type of numbers, and the resulting iterator involves numbers of that type. SEE ALSO: srange. NOTE: This function is called \code{xsrange} to distinguish it from the builtin Python \code{xrange} command. EXAMPLES: sage: list(xsrange(1,10)) [1, 2, 3, 4, 5, 6, 7, 8, 9] sage: Q = RationalField() sage: list(xsrange(1, 10, Q('1/2'))) [1, 3/2, 2, 5/2, 3, 7/2, 4, 9/2, 5, 11/2, 6, 13/2, 7, 15/2, 8, 17/2, 9, 19/2] sage: R = RealField() sage: list(xsrange(1, 5, R(0.5))) [1.00000000000000, 1.50000000000000, 2.00000000000000, 2.50000000000000, 3.00000000000000, 3.50000000000000, 4.00000000000000, 4.50000000000000] sage: list(xsrange(0, 1, R('0.4'))) [0.000000000000000, 0.400000000000000, 0.800000000000000] Negative ranges are also allowed: sage: list(xrange(4,1,-1)) [4, 3, 2] sage: list(sxrange(4,1,-1)) [4, 3, 2] sage: list(sxrange(4,1,-1/2)) [4, 7/2, 3, 5/2, 2, 3/2] """ if end is None: end = start start = 0 if step == 0: raise ValueError, "step must not be 0" from sage.structure.sequence import Sequence from sage.rings.all import ZZ if check: if universe is None: universe = Sequence([start, end, step]).universe() start, end, step = universe(start), universe(end), universe(step) if include_endpoint: if universe in [int, long, ZZ]: if (start-end) % step == 0: end += step else: count = (start-end)/step if count == int(float(count)): end += step count += 1 if universe is int: return xrange(start, end, step) | 36b93ab6619945e0c434ccf0e5c5abb32e0b687e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/36b93ab6619945e0c434ccf0e5c5abb32e0b687e/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9280,
3676,
12,
1937,
16,
679,
33,
7036,
16,
2235,
33,
21,
16,
29235,
33,
7036,
16,
866,
33,
5510,
16,
2341,
67,
8003,
33,
8381,
4672,
3536,
2000,
392,
2775,
1879,
5600,
521,
710,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9280,
3676,
12,
1937,
16,
679,
33,
7036,
16,
2235,
33,
21,
16,
29235,
33,
7036,
16,
866,
33,
5510,
16,
2341,
67,
8003,
33,
8381,
4672,
3536,
2000,
392,
2775,
1879,
5600,
521,
710,
95... |
while len( levels ) > 1: | while len( levels ) > 0: | def getOption( self, opName, defaultValue = None ): """ Get option value with default applied | a07765898970cabae66e971ee8c4efe36dd53e5a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/a07765898970cabae66e971ee8c4efe36dd53e5a/CFG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5651,
12,
365,
16,
1061,
461,
16,
4593,
273,
599,
262,
30,
3536,
968,
1456,
460,
598,
805,
6754,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5651,
12,
365,
16,
1061,
461,
16,
4593,
273,
599,
262,
30,
3536,
968,
1456,
460,
598,
805,
6754,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if request.method == 'POST': form = DevelopmentManagerForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/dashboard/developmentmanagers/') else: return render_to_response('add_dm.html',{'form':form}) else: form = DevelopmentManagerForm() return render_to_response('add_dm.html',{'form':form}) | if request.method == 'POST': form = DevelopmentManagerForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/dashboard/developmentmanagers/') else: return render_to_response('add_dm.html',{'form':form}) else: form = DevelopmentManagerForm() return render_to_response('add_dm.html',{'form':form}) | def add_development_manager(request): if request.method == 'POST': form = DevelopmentManagerForm(request.POST) if form.is_valid(): form.save() return HttpResponseRedirect('/dashboard/developmentmanagers/') else: return render_to_response('add_dm.html',{'form':form}) else: form = DevelopmentManagerForm() return render_to_response('add_dm.html',{'form':form}) | 7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
26630,
67,
4181,
12,
2293,
4672,
309,
590,
18,
2039,
422,
296,
3798,
4278,
646,
273,
1505,
11284,
1318,
1204,
12,
2293,
18,
3798,
13,
309,
646,
18,
291,
67,
877,
13332,
646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26630,
67,
4181,
12,
2293,
4672,
309,
590,
18,
2039,
422,
296,
3798,
4278,
646,
273,
1505,
11284,
1318,
1204,
12,
2293,
18,
3798,
13,
309,
646,
18,
291,
67,
877,
13332,
646,
... |
block = self.scheduled.iterkeys().next() graph = self.scheduled.pop(block) | block, graph = self.scheduled.popitem() | def complete(self): while self.scheduled: block = self.scheduled.iterkeys().next() graph = self.scheduled.pop(block) self.flow_block(block, graph) | fcce6c2b4380a94ed9f48a215c3c5fe725be3452 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/fcce6c2b4380a94ed9f48a215c3c5fe725be3452/escape.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3912,
12,
2890,
4672,
1323,
365,
18,
23307,
30,
1203,
16,
2667,
273,
365,
18,
23307,
18,
5120,
1726,
1435,
365,
18,
2426,
67,
2629,
12,
2629,
16,
2667,
13,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3912,
12,
2890,
4672,
1323,
365,
18,
23307,
30,
1203,
16,
2667,
273,
365,
18,
23307,
18,
5120,
1726,
1435,
365,
18,
2426,
67,
2629,
12,
2629,
16,
2667,
13,
2,
-100,
-100,
-100,
-100,
... |
if (not context) or (not context.get('product')): | if not context: context = {} if (not context.get('product')) \ or not (isinstance(context['product'], (int, long))): | def get_quantity(self, cursor, user, ids, name, arg, context=None): product_obj = self.pool.get('product.product') date_obj = self.pool.get('ir.date') | 1cae397df63aacaa070ca816844215ea4a0fa9f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9298/1cae397df63aacaa070ca816844215ea4a0fa9f5/location.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
16172,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
3017,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
5896,
18,
5896,
6134,
1509,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
16172,
12,
2890,
16,
3347,
16,
729,
16,
3258,
16,
508,
16,
1501,
16,
819,
33,
7036,
4672,
3017,
67,
2603,
273,
365,
18,
6011,
18,
588,
2668,
5896,
18,
5896,
6134,
1509,
67,
... |
assert(changeType != '~') | if changeType == '~': job.append((name, (version, flavor), (version, flavor), byDef)) | def diffJob(derivativeTrove): trvCs, files, troves = derivativeTrove.diff(self) assert(not files) | 624f31b9d25e336f107394dfd4e3ca0011c8226b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/624f31b9d25e336f107394dfd4e3ca0011c8226b/trove.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3122,
2278,
12,
20615,
1535,
56,
303,
537,
4672,
433,
90,
14272,
16,
1390,
16,
23432,
3324,
273,
16417,
56,
303,
537,
18,
5413,
12,
2890,
13,
1815,
12,
902,
1390,
13,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3122,
2278,
12,
20615,
1535,
56,
303,
537,
4672,
433,
90,
14272,
16,
1390,
16,
23432,
3324,
273,
16417,
56,
303,
537,
18,
5413,
12,
2890,
13,
1815,
12,
902,
1390,
13,
2,
-100,
-100,
... |
os.system('/Python25/python.exe youtube-dl.py -f 34 -icw -o "' + folder + '/' + readable_id + '.flv" http://www.youtube.com/watch?v=' + youtube_id) | os.system('python.exe ../youtube-dl.py -f 34 -icw -o "' + folder + '/' + readable_id + '.flv" http://www.youtube.com/watch?v=' + youtube_id) | def urlretrieve(urlfile, fpath): chunk = 2**20 f = open(fpath, "wb") while 1: data = urlfile.read(chunk) if not data: break f.write(data) print "*", print | 76bac062bf36857c40eadc4576a2a26b283eb5b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/76bac062bf36857c40eadc4576a2a26b283eb5b8/download.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
880,
17466,
12,
718,
768,
16,
13543,
4672,
2441,
273,
576,
636,
3462,
284,
273,
1696,
12,
28900,
16,
315,
9464,
7923,
1323,
404,
30,
501,
273,
880,
768,
18,
896,
12,
6551,
13,
309,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
880,
17466,
12,
718,
768,
16,
13543,
4672,
2441,
273,
576,
636,
3462,
284,
273,
1696,
12,
28900,
16,
315,
9464,
7923,
1323,
404,
30,
501,
273,
880,
768,
18,
896,
12,
6551,
13,
309,
4... |
initial_events['presence'] = ['multipart/related'] | initial_events['presence'] = ['multipart/related', 'application/rlmi+xml', 'application/pidf+xml'] | def do_subscribe(**kwargs): global user_quit, lock, queue, do_trace_pjsip ctrl_d_pressed = False do_trace_pjsip = kwargs["do_trace_pjsip"] outbound_proxy = kwargs.pop("outbound_proxy") if outbound_proxy is None: proxy_host, proxy_port, proxy_is_ip = kwargs["domain"], None, False else: proxy_host, proxy_port, proxy_is_ip = outbound_proxy try: kwargs["route"] = Route(*lookup_srv(proxy_host, proxy_port, proxy_is_ip, 5060)) except RuntimeError, e: print e.message return initial_events = Engine.init_options_defaults["initial_events"] if kwargs['content_type'] is not None: initial_events['presence'] = [kwargs['content_type']] else: initial_events['presence'] = ['multipart/related'] e = Engine(event_handler, trace_sip=kwargs['trace_sip'], auto_sound=False, local_ip=kwargs.pop("local_ip"), local_port=kwargs.pop("local_port"), initial_events=initial_events) e.start() start_new_thread(read_queue, (e,), kwargs) atexit.register(termios_restore) try: while True: char = getchar() if char == "\x04": if not ctrl_d_pressed: queue.put(("eof", None)) ctrl_d_pressed = True else: queue.put(("user_input", char)) except KeyboardInterrupt: if user_quit: print "Ctrl+C pressed, exiting instantly!" queue.put(("quit", True)) lock.acquire() return | 6f11838644d31a19b4f99cee8543cbc6d4b9255e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/6f11838644d31a19b4f99cee8543cbc6d4b9255e/sip_subscribe_rls.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
9174,
12,
636,
4333,
4672,
2552,
729,
67,
27176,
16,
2176,
16,
2389,
16,
741,
67,
5129,
67,
84,
2924,
625,
6414,
67,
72,
67,
10906,
273,
1083,
741,
67,
5129,
67,
84,
2924,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
9174,
12,
636,
4333,
4672,
2552,
729,
67,
27176,
16,
2176,
16,
2389,
16,
741,
67,
5129,
67,
84,
2924,
625,
6414,
67,
72,
67,
10906,
273,
1083,
741,
67,
5129,
67,
84,
2924,
... |
return self._raw_body | return self.encode(self._body) | def get_body_encoded(self): """ This method is really a semi-private method used by the Queue.write method when writing the contents of the message to SQS. The RawMessage class does not encode the message in any way so this just calls get_body(). You probably shouldn't need to call this method in the normal course of events. """ return self._raw_body | 0e5dc35e899e8dc3f566cb050f31b0a3bd570a66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/0e5dc35e899e8dc3f566cb050f31b0a3bd570a66/message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
3432,
67,
10787,
12,
2890,
4672,
3536,
1220,
707,
353,
8654,
279,
23161,
17,
1152,
707,
1399,
635,
326,
7530,
18,
2626,
707,
1347,
7410,
326,
2939,
434,
326,
883,
358,
29052,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3432,
67,
10787,
12,
2890,
4672,
3536,
1220,
707,
353,
8654,
279,
23161,
17,
1152,
707,
1399,
635,
326,
7530,
18,
2626,
707,
1347,
7410,
326,
2939,
434,
326,
883,
358,
29052,
... |
def __get_tree_rec(self, node): """ Traverse the tree """ if node.id not in self.visited: if node.parent == None or node.parent in self.visited: self.visited.append(node.id) ret_dict = {} ret_dict[node] = [] if hasattr(node, 'children'): ret_dict[node] = map(self.__get_tree_rec, node.children) return ret_dict | def get_node_children(self, parent = None): """ return child nodes for parent ordered by weight """ return self.utSortObjsListByAttr([x for x in self.get_tree_nodes() if parent == x.parent ], 'weight', 0) | dd87cc19a8e86cac6256d5aace906b4d19a764ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/dd87cc19a8e86cac6256d5aace906b4d19a764ad/RefTree.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2159,
67,
5906,
12,
2890,
16,
982,
273,
599,
4672,
3536,
327,
1151,
2199,
364,
982,
5901,
635,
3119,
3536,
327,
365,
18,
322,
4416,
2675,
21576,
858,
3843,
3816,
92,
364,
619,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2159,
67,
5906,
12,
2890,
16,
982,
273,
599,
4672,
3536,
327,
1151,
2199,
364,
982,
5901,
635,
3119,
3536,
327,
365,
18,
322,
4416,
2675,
21576,
858,
3843,
3816,
92,
364,
619,... | |
knownempties=["rfc", "declaremodule", "appendix", | knownempties=["appendix", | def main(): if len(sys.argv) == 2: ifp = open(sys.argv[1]) ofp = sys.stdout elif len(sys.argv) == 3: ifp = open(sys.argv[1]) ofp = open(sys.argv[2], "w") else: usage() sys.exit(2) convert(ifp, ofp, { # entries are name # -> ([list of attribute names], first_is_optional, empty) "cfuncdesc": (["type", "name", ("args",)], 0, 0), "chapter": ([("title",)], 0, 0), "chapter*": ([("title",)], 0, 0), "classdesc": (["name", ("constructor-args",)], 0, 0), "ctypedesc": (["name"], 0, 0), "cvardesc": (["type", "name"], 0, 0), "datadesc": (["name"], 0, 0), "declaremodule": (["id", "type", "name"], 1, 1), "deprecated": (["release"], 0, 1), "documentclass": (["classname"], 0, 1), "excdesc": (["name"], 0, 0), "funcdesc": (["name", ("args",)], 0, 0), "funcdescni": (["name", ("args",)], 0, 0), "indexii": (["ie1", "ie2"], 0, 1), "indexiii": (["ie1", "ie2", "ie3"], 0, 1), "indexiv": (["ie1", "ie2", "ie3", "ie4"], 0, 1), "input": (["source"], 0, 1), "item": ([("leader",)], 1, 0), "label": (["id"], 0, 1), "manpage": (["name", "section"], 0, 1), "memberdesc": (["class", "name"], 1, 0), "methoddesc": (["class", "name", ("args",)], 1, 0), "methoddescni": (["class", "name", ("args",)], 1, 0), "opcodedesc": (["name", "var"], 0, 0), "par": ([], 0, 1), "rfc": (["number"], 0, 1), "section": ([("title",)], 0, 0), "seemodule": (["ref", "name"], 1, 0), "tableii": (["colspec", "style", "head1", "head2"], 0, 0), "tableiii": (["colspec", "style", "head1", "head2", "head3"], 0, 0), "tableiv": (["colspec", "style", "head1", "head2", "head3", "head4"], 0, 0), "versionadded": (["version"], 0, 1), "versionchanged": (["version"], 0, 1), # "ABC": "ABC", "ASCII": "ASCII", "C": "C", "Cpp": "Cpp", "EOF": "EOF", "e": "backslash", "ldots": "ldots", "NULL": "NULL", "POSIX": "POSIX", "UNIX": "Unix", # # Things that will actually be going away! # "fi": ([], 0, 1), "ifhtml": ([], 0, 1), "makeindex": ([], 0, 1), "makemodindex": ([], 0, 1), "maketitle": ([], 0, 1), "noindent": ([], 0, 1), "tableofcontents": ([], 0, 1), }, discards=["fi", "ifhtml", "makeindex", "makemodindex", "maketitle", "noindent", "tableofcontents"], autoclosing=["chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph", ], knownempties=["rfc", "declaremodule", "appendix", "maketitle", "makeindex", "makemodindex", "localmoduletable", "manpage", "input"]) | fd9c2ca53cfbd9d2df1c1c71382345041d3849ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fd9c2ca53cfbd9d2df1c1c71382345041d3849ae/latex2esis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
562,
12,
9499,
18,
19485,
13,
422,
576,
30,
309,
84,
273,
1696,
12,
9499,
18,
19485,
63,
21,
5717,
434,
84,
273,
2589,
18,
10283,
1327,
562,
12,
9499,
18,
19485,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
562,
12,
9499,
18,
19485,
13,
422,
576,
30,
309,
84,
273,
1696,
12,
9499,
18,
19485,
63,
21,
5717,
434,
84,
273,
2589,
18,
10283,
1327,
562,
12,
9499,
18,
19485,
13... |
res = csc.__rmul__(other) return res | return csc.__rmul__(other) | def __rmul__(self, other): csc = self.tocsc() res = csc.__rmul__(other) return res | bdabf856b614694a8ef20c73a7d82bda3a7cf386 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/bdabf856b614694a8ef20c73a7d82bda3a7cf386/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
8864,
332,
972,
12,
2890,
16,
1308,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
327,
276,
1017,
16186,
8864,
332,
972,
12,
3011,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
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,
8864,
332,
972,
12,
2890,
16,
1308,
4672,
276,
1017,
273,
365,
18,
1391,
1017,
1435,
327,
276,
1017,
16186,
8864,
332,
972,
12,
3011,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
if shortSite in checksite: goodsites.remove(checksite) allsites=goodsites | if shortSite not in checksite and checksite not in goodsites: goodsites.append(checksite) if len(goodsites)>0: allsites=goodsites | def master_prepare(self,app,appmasterconfig): if app.siteroot: os.environ["SITEROOT"]=app.siteroot os.environ["CMTSITE"]=app.cmtsite | 743c430d4d849adf419051b152ad68d22ae6068e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/743c430d4d849adf419051b152ad68d22ae6068e/AthenaMCLCGRTHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4171,
67,
9366,
12,
2890,
16,
2910,
16,
2910,
7525,
1425,
4672,
309,
595,
18,
87,
25958,
30,
1140,
18,
28684,
9614,
55,
11844,
51,
1974,
11929,
33,
2910,
18,
87,
25958,
1140,
18,
28684... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4171,
67,
9366,
12,
2890,
16,
2910,
16,
2910,
7525,
1425,
4672,
309,
595,
18,
87,
25958,
30,
1140,
18,
28684,
9614,
55,
11844,
51,
1974,
11929,
33,
2910,
18,
87,
25958,
1140,
18,
28684... |
except RuntimeError: | except RuntimeError, msg: print msg | def gap_reset_workspace(max_workspace_size=None): r""" Call this to completely reset the GAP workspace, which is used by default when SAGE first starts GAP. The first time you start GAP from SAGE, it saves the startup state of GAP in the file \begin{verbatim} $HOME/.sage/gap-workspace \end{verbatim} This is useful, since then subsequent startup of GAP is at least 10 times as fast. Unfortunately, if you install any new code for GAP, it won't be noticed unless you explicitly load it, e.g., with gap.load_package("my_package") The packages sonata, guava, factint, gapdoc, grape, design, toric, and laguna are loaded in all cases before the workspace is saved, if they are available. """ if os.path.exists(WORKSPACE): os.unlink(WORKSPACE) g = Gap(use_workspace_cache=False, max_workspace_size=None) for pkg in ['sonata', 'guava', 'factint', \ 'gapdoc', 'grape', 'design', \ 'toric', 'laguna']: try: g.load_package(pkg, verbose=True) except RuntimeError: pass # end for g.eval('SaveWorkspace("%s");'%WORKSPACE) | f8d00d084acfb79976867acfb140b6fc95a59e58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/f8d00d084acfb79976867acfb140b6fc95a59e58/gap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9300,
67,
6208,
67,
14915,
12,
1896,
67,
14915,
67,
1467,
33,
7036,
4672,
436,
8395,
3049,
333,
358,
14416,
2715,
326,
611,
2203,
6003,
16,
1492,
353,
1399,
635,
805,
1347,
348,
2833,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9300,
67,
6208,
67,
14915,
12,
1896,
67,
14915,
67,
1467,
33,
7036,
4672,
436,
8395,
3049,
333,
358,
14416,
2715,
326,
611,
2203,
6003,
16,
1492,
353,
1399,
635,
805,
1347,
348,
2833,
... |
compute(matrix, lattice, phi_start, phi_width, start, end) | compute(matrix, lattice, wavelength, phi_start, phi_width, start, end) | def compute(matrix, lattice, wavelength, phi_start, phi_width, start, end): '''Compute the relative dot products (e.g. cos(p)) between the direct beam in the xia2 frame (0, 0, 1) and the primative unit cell axes in real space.''' a, b, c = mosflm_a_matrix_to_real_space(wavelength, lattice, matrix) _a = math.sqrt(dot(a, a)) _b = math.sqrt(dot(b, b)) _c = math.sqrt(dot(c, c)) for j in range(start, end + 1): phi = phi_start + (j - start + 0.5) * phi_width rot = rot_x(phi) aX = matvecmul(rot, a)[2] / _a bX = matvecmul(rot, b)[2] / _b cX = matvecmul(rot, c)[2] / _c print '%.2f %.3f %.3f %.3f' % (phi, aX, bX, cX) | 59f5b911e2098d689b3ae60f96db5a3749f5c6fa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3290/59f5b911e2098d689b3ae60f96db5a3749f5c6fa/amatrix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
12,
5667,
16,
16690,
16,
21410,
16,
7706,
67,
1937,
16,
7706,
67,
2819,
16,
787,
16,
679,
4672,
9163,
7018,
326,
3632,
3928,
10406,
261,
73,
18,
75,
18,
4987,
12,
84,
3719,
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,
3671,
12,
5667,
16,
16690,
16,
21410,
16,
7706,
67,
1937,
16,
7706,
67,
2819,
16,
787,
16,
679,
4672,
9163,
7018,
326,
3632,
3928,
10406,
261,
73,
18,
75,
18,
4987,
12,
84,
3719,
308... |
Sub(quality, "standardError").text = "0.170000" Sub(quality, "secondaryAzimuthalGap").text = "343.00000" | Sub(quality, "standardError").text = '%s' % self.threeDlocEventStdErr Sub(quality, "secondaryAzimuthalGap").text = '%s' % self.threeDlocEventAzimGap | def threeDLoc2XML(self): """ Returns output of 3dloc as xml file """ xml = Element("event") Sub(Sub(xml, "event_id"), "value").text = self.xmlEventID Sub(Sub(xml, "event_type"), "value").text = "manual" # we save P picks on Z-component and S picks on N-component # XXX standard values for unset keys!!!???!!!??? for i in range(len(self.streams)): if self.dicts[i].has_key('P'): pick = Sub(xml, "pick") wave = Sub(pick, "waveform") wave.set("networkCode", self.streams[i][0].stats.network) wave.set("stationCode", self.streams[i][0].stats.station) wave.set("channelCode", self.streams[i][0].stats.channel) wave.set("locationCode", "") date = Sub(pick, "time") # prepare time of pick picktime = self.streams[i][0].stats.starttime picktime += (self.dicts[i]['P'] / self.streams[i][0].stats.sampling_rate) Sub(date, "value").text = (picktime.isoformat() + '.%06i' % picktime.microsecond) if self.dicts[i].has_key('PErr1') and self.dicts[i].has_key('PErr2'): temp = float(self.dicts[i].has_key('PErr2') - self.dicts[i].has_key('PErr1')) temp /= self.streams[i][0].stats.sampling_rate Sub(date, "uncertainty").text = str(temp) else: Sub(date, "uncertainty") Sub(pick, "phaseHint").text = "P" if self.dicts[i].has_key('POnset'): if self.dicts[i]['POnset'] == 'impulsive': Sub(pick, "onset").text = 'impulsive' elif self.dicts[i]['POnset'] == 'emergent': Sub(pick, "onset").text = 'emergent' else: Sub(pick, "onset") if self.dicts[i].has_key('PPol'): if self.dicts[i]['PPol'] == 'Up' or self.dicts[i]['PPol'] == 'PoorUp': Sub(pick, "polarity").text = 'positive' elif self.dicts[i]['PPol'] == 'Down' or self.dicts[i]['PPol'] == 'PoorDown': Sub(pick, "polarity").text = 'negative' else: Sub(pick, "polarity") if self.dicts[i].has_key('PWeight'): Sub(pick, "weight").text = '%i' % self.dicts[i]['PWeight'] else: Sub(pick, "weight") Sub(Sub(pick, "min_amp"), "value").text = "0.00000" #XXX what is min_amp??? Sub(pick, "phase_compu").text = "IPU0" Sub(Sub(pick, "phase_res"), "value").text = "0.17000" Sub(Sub(pick, "phase_weight"), "value").text = "1.00000" Sub(Sub(pick, "phase_delay"), "value").text = "0.00000" Sub(Sub(pick, "azimuth"), "value").text = "1.922043" Sub(Sub(pick, "incident"), "value").text = "96.00000" Sub(Sub(pick, "epi_dist"), "value").text = "44.938843" Sub(Sub(pick, "hyp_dist"), "value").text = "45.30929" | 58ecfe19bef44aacd9e7b0124f02593f5139b455 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/58ecfe19bef44aacd9e7b0124f02593f5139b455/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8925,
40,
1333,
22,
4201,
12,
2890,
4672,
3536,
2860,
876,
434,
890,
72,
1829,
487,
2025,
585,
3536,
2025,
273,
225,
3010,
2932,
2575,
7923,
2592,
12,
1676,
12,
2902,
16,
315,
2575,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8925,
40,
1333,
22,
4201,
12,
2890,
4672,
3536,
2860,
876,
434,
890,
72,
1829,
487,
2025,
585,
3536,
2025,
273,
225,
3010,
2932,
2575,
7923,
2592,
12,
1676,
12,
2902,
16,
315,
2575,
67... |
pid,status = os.waitpid(self.pid, os.WNOHANG) | os.waitpid(self.pid, os.WNOHANG) | def is_running(self): if not self.pid: return False try: pid,status = os.waitpid(self.pid, os.WNOHANG) except OSError, value: print "Hatari PID %d had exited in the meanwhile:\n\t%s" % (self.pid, value) self.pid = 0 return False return True | d5af29786f36313ce7c47a3b5fe963033faa2dd7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/d5af29786f36313ce7c47a3b5fe963033faa2dd7/hatari-console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
8704,
12,
2890,
4672,
309,
486,
365,
18,
6610,
30,
327,
1083,
775,
30,
1140,
18,
7048,
6610,
12,
2890,
18,
6610,
16,
1140,
18,
59,
3417,
44,
3388,
13,
1335,
10002,
16,
460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
8704,
12,
2890,
4672,
309,
486,
365,
18,
6610,
30,
327,
1083,
775,
30,
1140,
18,
7048,
6610,
12,
2890,
18,
6610,
16,
1140,
18,
59,
3417,
44,
3388,
13,
1335,
10002,
16,
460,
... |
runs.append((p, n)) | runsappend((p, n)) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: # XXX: could append to charmap tail return charset # cannot compress except IndexError: # character set contains unicode characters return _optimize_unicode(charset, fixup) # compress character map i = p = n = 0 runs = [] for c in charmap: if c: if n == 0: p = i n = n + 1 elif n: runs.append((p, n)) n = 0 i = i + 1 if n: runs.append((p, n)) if len(runs) <= 2: # use literal/range for p, n in runs: if n == 1: out.append((LITERAL, p)) else: out.append((RANGE, (p, p+n-1))) if len(out) < len(charset): return out else: # use bitmap data = _mk_bitmap(charmap) out.append((CHARSET, data)) return out return charset | 3f8fdffe72485d69e9e31bdeb4796c1cca750eba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3f8fdffe72485d69e9e31bdeb4796c1cca750eba/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29155,
67,
9999,
12,
9999,
16,
2917,
416,
4672,
468,
2713,
30,
10979,
3351,
444,
596,
273,
5378,
1149,
1458,
273,
306,
8381,
5772,
5034,
775,
30,
364,
1061,
16,
1712,
316,
4856,
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,
29155,
67,
9999,
12,
9999,
16,
2917,
416,
4672,
468,
2713,
30,
10979,
3351,
444,
596,
273,
5378,
1149,
1458,
273,
306,
8381,
5772,
5034,
775,
30,
364,
1061,
16,
1712,
316,
4856,
3... |
_cfunc_refs[tmpval1] = c_cb | def fl_set_browser_vscroll_callback(ob, py_cb, data): """ fl_set_browser_vscroll_callback(ob, py_cb, data) """ c_cb = FL_BROWSER_SCROLL_CALLBACK(py_cb) _fl_set_browser_vscroll_callback(ob, c_cb, data) _cfunc_refs[tmpval1] = c_cb | 8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
11213,
67,
90,
12033,
67,
3394,
12,
947,
16,
2395,
67,
7358,
16,
501,
4672,
3536,
1183,
67,
542,
67,
11213,
67,
90,
12033,
67,
3394,
12,
947,
16,
2395,
67,
7358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
11213,
67,
90,
12033,
67,
3394,
12,
947,
16,
2395,
67,
7358,
16,
501,
4672,
3536,
1183,
67,
542,
67,
11213,
67,
90,
12033,
67,
3394,
12,
947,
16,
2395,
67,
7358,
... | |
sockaddr_size = _c.socklen_t() | sockaddr_size = _c.socklen_t(_c.sockaddr_size) GIL = space.threadlocals.getGIL() if GIL is not None: GIL.release() | def recvfrom(self, space, buffersize, flags=0): """recvfrom(buffersize[, flags]) -> (data, address info) | 7b67dabdf03037393e0e3ae3e0cfeb89a39efd3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/7b67dabdf03037393e0e3ae3e0cfeb89a39efd3b/interp_socket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
2080,
12,
2890,
16,
3476,
16,
9664,
554,
16,
2943,
33,
20,
4672,
3536,
18334,
2080,
12,
28101,
554,
63,
16,
2943,
5717,
317,
261,
892,
16,
1758,
1123,
13,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10665,
2080,
12,
2890,
16,
3476,
16,
9664,
554,
16,
2943,
33,
20,
4672,
3536,
18334,
2080,
12,
28101,
554,
63,
16,
2943,
5717,
317,
261,
892,
16,
1758,
1123,
13,
2,
-100,
-100,
-100,
... |
(home_dirs()+"/romain/followupbackgrounds/omega/VSR1b/background/background_937800015_947260815.cache",935798415,999999999,"V1") | (home_dirs()+"/romain/followupbackgrounds/omega/VSR2b/background/background_937800015_947260815.cache",935798415,999999999,"V1") | def figure_out_cache(time,ifo): cacheList=( (home_dirs()+"/romain/followupbackgrounds/omega/S5/background/background_815155213_875232014.cache",815155213,875232014,"H1H2L1"), (home_dirs()+"/romain/followupbackgrounds/omega/S6a/background/background_931035296_935798415.cache",931035296,935798415,"H1L1"), (home_dirs()+"/romain/followupbackgrounds/omega/S6b/background/background_937800015_944587815.cache",935798415,999999999,"H1L1"), (home_dirs()+"/romain/followupbackgrounds/omega/VSR1b/background/background_937800015_947260815.cache",935798415,999999999,"V1") ) foundCache = "" for cacheFile,start,stop,ifos in cacheList: if ((start<=time) and (time<stop) and ifo in ifos): foundCache = cacheFile break if 'phy.syr.edu' in get_hostname(): foundCache = foundCache.replace("romain","rgouaty") if foundCache == "": print ifo, time, " not found in method stfu_pipe.figure_out_cache" else: if not os.path.isfile(foundCache): print "file " + foundCache + " not found" foundCache = "" return foundCache | b726adecb7be59dfbc873941cdbe5900132f4046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b726adecb7be59dfbc873941cdbe5900132f4046/stfu_pipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7837,
67,
659,
67,
2493,
12,
957,
16,
20299,
4672,
225,
1247,
682,
28657,
261,
8712,
67,
8291,
1435,
9078,
19,
520,
530,
19,
14641,
416,
9342,
87,
19,
362,
11061,
19,
55,
25,
19,
934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7837,
67,
659,
67,
2493,
12,
957,
16,
20299,
4672,
225,
1247,
682,
28657,
261,
8712,
67,
8291,
1435,
9078,
19,
520,
530,
19,
14641,
416,
9342,
87,
19,
362,
11061,
19,
55,
25,
19,
934... |
code_and_country = os.path.join(DIALOGS_DIR, lcode, 'DIALOGS') code_only = os.path.join(DIALOGS_DIR, lcode.split("_")[0], 'DIALOGS') | code_and_country = os.path.join(LANG_DIR, lcode, 'DIALOGS') code_only = os.path.join(LANG_DIR, lcode.split("_")[0], 'DIALOGS') | def _rebuild_syspath_for_dialogs(self): """Add to sys.path the directories of the translated dialogs. | 3c9b08866824b373224f674b4e8e5c8d6bf436c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9857/3c9b08866824b373224f674b4e8e5c8d6bf436c5/i18n.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
266,
3510,
67,
9499,
803,
67,
1884,
67,
25909,
14072,
12,
2890,
4672,
3536,
986,
358,
2589,
18,
803,
326,
6402,
434,
326,
9955,
7609,
14072,
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,
0,
0,
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,
266,
3510,
67,
9499,
803,
67,
1884,
67,
25909,
14072,
12,
2890,
4672,
3536,
986,
358,
2589,
18,
803,
326,
6402,
434,
326,
9955,
7609,
14072,
18,
2,
-100,
-100,
-100,
-100,
-100,
-... |
query = self.RUNS[self.run] % self.date.strftime("%Y-%m-%d"), self.dataset | query = self.RUNS[self.run] % self.date.strftime("%Y-%m-%d") | def refresh(self): """ Query the dataset again to update the result """ query = self.RUNS[self.run] % self.date.strftime("%Y-%m-%d"), self.dataset if self.extraQuery: query += ";" + self.extraQuery.strip(";") cmd = ["arki-query", "--summary", "--report=mdstats", query] print "REFRESH", " ".join(cmd) proc = Popen(cmd, stdout=PIPE) pipe = proc.stdout self._result = dict() steps = set(self.steps) for line in pipe: line = line.strip() count, mdtype, mddef = line.split(None,2) if mdtype != "timerange:": continue if not mddef in steps: continue self._result[mddef] = count res = proc.wait() if res != 0: raise MonitorError, _("arki-query returned error ") + str(res) | a7a3bbbd422b3c965f3fbba335bf7befaf9a9f63 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1526/a7a3bbbd422b3c965f3fbba335bf7befaf9a9f63/monitor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
4672,
3536,
2770,
326,
3709,
3382,
358,
1089,
326,
563,
3536,
843,
273,
365,
18,
15238,
55,
63,
2890,
18,
2681,
65,
738,
365,
18,
712,
18,
701,
9982,
27188,
61,
6456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4460,
12,
2890,
4672,
3536,
2770,
326,
3709,
3382,
358,
1089,
326,
563,
3536,
843,
273,
365,
18,
15238,
55,
63,
2890,
18,
2681,
65,
738,
365,
18,
712,
18,
701,
9982,
27188,
61,
6456,
... |
filename = self.findFileInDir(u"%s Season %d.%s" % (cfile['file_seriesname'], season_num, ext), self.config['posterdir']) | filename = self.findFileInDir(u"%s Season %d.%s" % (sanitiseFileName(cfile['file_seriesname']), season_num, ext), self.config['posterdir']) | def processMythTvMetaData(self): '''Check each video file in the mythvideo directories download graphics files and meta data then update MythTV data base meta data with any new information. ''' # If there were directories specified move them and update the MythTV db meta data accordingly if self.config['video_dir']: if len(self.config['video_dir']) % 2 == 0: validFiles = self._moveVideoFiles(self.config['video_dir']) else: sys.stderr.write(u"\n! Error: When specifying target (file or directory) to move to a destination (directory) they must always be in pairs (target and destination directory).\nYou specified an uneven number of variables (%d) for target and destination pairs.\nVariable count (%s)\n" % (len(self.config['video_dir']), self.config['video_dir'])) sys.exit(False) | f132146d19febfbd3e15736f0f51f9e3d1f72607 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/f132146d19febfbd3e15736f0f51f9e3d1f72607/jamu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12062,
451,
56,
90,
6998,
12,
2890,
4672,
9163,
1564,
1517,
6191,
585,
316,
326,
3399,
451,
9115,
6402,
4224,
17313,
1390,
471,
2191,
501,
1508,
1089,
8005,
451,
15579,
501,
1026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
12062,
451,
56,
90,
6998,
12,
2890,
4672,
9163,
1564,
1517,
6191,
585,
316,
326,
3399,
451,
9115,
6402,
4224,
17313,
1390,
471,
2191,
501,
1508,
1089,
8005,
451,
15579,
501,
1026,
... |
""" | """ | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return: New arch of view. """ res = super(stock_return_picking, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) record_id = context and context.get('active_id', False) active_model = context.get('active_model') if active_model != 'stock.picking': return res if record_id: pick_obj = self.pool.get('stock.picking') pick = pick_obj.browse(cr, uid, record_id) return_history = {} res['fields'].clear() arch_lst=['<?xml version="1.0"?>', '<form string="%s">' % _('Return lines'), '<label string="%s" colspan="4"/>' % _('Provide the quantities of the returned products.')] for m in pick.move_lines: return_history[m.id] = 0 for rec in m.move_history_ids2: return_history[m.id] += rec.product_qty quantity = m.product_qty if m.state=='done' and quantity > return_history[m.id]: arch_lst.append('<field name="return%s"/>\n<newline/>' % (m.id,)) res['fields']['return%s' % m.id]={'string':m.name, 'type':'float', 'required':True} res.setdefault('returns', []).append(m.id) arch_lst.append('<field name="invoice_state"/>\n<newline/>') res['fields']['invoice_state']={'string':_('Invoicing'), 'type':'selection','required':True, 'selection':[('2binvoiced', _('To be refunded/invoiced')), ('none', _('No invoicing'))]} arch_lst.append('<group col="2" colspan="4">') arch_lst.append('<button icon="gtk-cancel" special="cancel" string="Cancel" />') arch_lst.append('<button name="create_returns" string="Return" colspan="1" type="object" icon="gtk-apply" />') arch_lst.append('</group>') arch_lst.append('</form>') res['arch'] = '\n'.join(arch_lst) return res | efa0acb9cd92500502f3689f3efb3b43430de046 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/efa0acb9cd92500502f3689f3efb3b43430de046/stock_return_picking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1466,
67,
1945,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1476,
67,
350,
33,
7036,
16,
1476,
67,
723,
2218,
687,
2187,
819,
33,
7036,
16,
12748,
33,
8381,
16,
27539,
33,
8381,
4672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1466,
67,
1945,
67,
588,
12,
2890,
16,
4422,
16,
4555,
16,
1476,
67,
350,
33,
7036,
16,
1476,
67,
723,
2218,
687,
2187,
819,
33,
7036,
16,
12748,
33,
8381,
16,
27539,
33,
8381,
4672,... |
return S_OK(fileName) def graph(self,data,fname=False,*args,**kw): | return S_OK( fileName ) def graph( self, data, fname = False, *args, **kw ): | def getPlotToFile( self, plotName, fileName ): """ Get the prefabricated plot from the service and store it in a file """ transferClient = self.__getTransferClient() try: destFile = file( fileName, "wb" ) except Exception, e: return S_ERROR( "Can't open file %s for writing: %s" % ( fileName, str(e) ) ) retVal = transferClient.receiveFile( destFile, plotName ) if not retVal[ 'OK' ]: return retVal destFile.close() return S_OK(fileName) | b29a492313d58334c8d949840590cb63407c88cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b29a492313d58334c8d949840590cb63407c88cf/PlottingClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9774,
352,
15450,
12,
365,
16,
3207,
461,
16,
3968,
262,
30,
3536,
968,
326,
11307,
12159,
690,
3207,
628,
326,
1156,
471,
1707,
518,
316,
279,
585,
3536,
7412,
1227,
273,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9774,
352,
15450,
12,
365,
16,
3207,
461,
16,
3968,
262,
30,
3536,
968,
326,
11307,
12159,
690,
3207,
628,
326,
1156,
471,
1707,
518,
316,
279,
585,
3536,
7412,
1227,
273,
365,
16186,
... |
@return: The DOM representation of an epytext description of this variable's type. @rtype: L{xml.dom.minidom.Element} | @return: A description of this variable's type @rtype: L{markup.ParsedDocstring} | def type(self): """ @return: The DOM representation of an epytext description of this variable's type. @rtype: L{xml.dom.minidom.Element} """ return self._type | d0164ceec6b7c656820c9cc53370c59eb64d4605 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d0164ceec6b7c656820c9cc53370c59eb64d4605/objdoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
618,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
2477,
434,
333,
2190,
1807,
618,
632,
86,
723,
30,
511,
95,
15056,
18,
11257,
1759,
1080,
97,
3536,
327,
365,
6315,
723,
225,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
618,
12,
2890,
4672,
3536,
632,
2463,
30,
432,
2477,
434,
333,
2190,
1807,
618,
632,
86,
723,
30,
511,
95,
15056,
18,
11257,
1759,
1080,
97,
3536,
327,
365,
6315,
723,
225,
2,
-100,
... |
(self["filename"].value, self["compressed_size"].display) | (self["filename"].display, self["compressed_size"].display) | def createDescription(self): return "File entry: %s (%s)" % \ (self["filename"].value, self["compressed_size"].display) | 9be6b66d3e7ceacca1ad4a124689b228fec9523a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/9be6b66d3e7ceacca1ad4a124689b228fec9523a/rar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3291,
12,
2890,
4672,
327,
315,
812,
1241,
30,
738,
87,
6142,
87,
2225,
738,
521,
261,
2890,
9614,
3459,
6,
8009,
1132,
16,
365,
9614,
15385,
67,
1467,
6,
8009,
5417,
13,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
3291,
12,
2890,
4672,
327,
315,
812,
1241,
30,
738,
87,
6142,
87,
2225,
738,
521,
261,
2890,
9614,
3459,
6,
8009,
1132,
16,
365,
9614,
15385,
67,
1467,
6,
8009,
5417,
13,
2,
-10... |
self.actions = {"info" : "Register this system as a consumer", | self.actions = {"info" : "lookup information for a package", | def __init__(self): usage = "usage: %prog package [OPTIONS]" shortdesc = "package specific actions to pulp server." desc = "" | 421893b94534c259e18008cbb4a59ac0ab135691 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/421893b94534c259e18008cbb4a59ac0ab135691/core_package.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
4084,
273,
315,
9167,
30,
738,
14654,
2181,
306,
12422,
4279,
3025,
5569,
273,
315,
5610,
2923,
4209,
358,
293,
14290,
1438,
1199,
3044,
273,
1408,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
4084,
273,
315,
9167,
30,
738,
14654,
2181,
306,
12422,
4279,
3025,
5569,
273,
315,
5610,
2923,
4209,
358,
293,
14290,
1438,
1199,
3044,
273,
1408,
2,
-1... |
if event.y<40 and Audio.gcom2.nspecial==0: | if event.y<40 and Audio.gcom2.nspecial==0 and mode.get()<>'ISCAT': | def dtdf_change(event): if mode.get()[:4]=='JTMS': t="%.1f" % (event.x*30.0/500.0,) lab6.configure(text=t,bg='green') else: if event.y<40 and Audio.gcom2.nspecial==0: lab1.configure(text='Time (s)',bg="#33FFFF") #light blue | 39767653f983b3f73d03591d1d9213e6a16dd4dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2394/39767653f983b3f73d03591d1d9213e6a16dd4dd/wsjt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3681,
2180,
67,
3427,
12,
2575,
4672,
309,
1965,
18,
588,
1435,
10531,
24,
65,
18920,
46,
56,
3537,
4278,
268,
11613,
18,
21,
74,
6,
738,
261,
2575,
18,
92,
14,
5082,
18,
20,
19,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3681,
2180,
67,
3427,
12,
2575,
4672,
309,
1965,
18,
588,
1435,
10531,
24,
65,
18920,
46,
56,
3537,
4278,
268,
11613,
18,
21,
74,
6,
738,
261,
2575,
18,
92,
14,
5082,
18,
20,
19,
1... |
raise SMTPRecipientsRefused(string.join( map(lambda x:"%s: %s" % (x[0], x[1][1]), senderrs.items()), '; ')) code=self.data(msg) if code <>250 : | raise SMTPRecipientsRefused(senderrs) (code,resp)=self.data(msg) if code <> 250: | def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction. | 296e14301a7aa23a5ee2bfaa1210af54e594cbbf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/296e14301a7aa23a5ee2bfaa1210af54e594cbbf/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
4408,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
23305,
16,
1234,
16,
4791,
67,
2116,
22850,
6487,
4519,
337,
67,
2116,
33,
8526,
4672,
3536,
2503,
1296,
11199,
392,
7278,
4791,
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,
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,
1366,
4408,
12,
2890,
16,
628,
67,
4793,
16,
358,
67,
23305,
16,
1234,
16,
4791,
67,
2116,
22850,
6487,
4519,
337,
67,
2116,
33,
8526,
4672,
3536,
2503,
1296,
11199,
392,
7278,
4791,
2... |
try: return self._decomp except AttributeError: pass | def decomposition(self): r""" Returns the Dirichlet groups of prime power modulus corresponding to primes dividing modulus. | 80bb64cda04307dbe55314d6e4fce85c5aab0086 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/80bb64cda04307dbe55314d6e4fce85c5aab0086/dirichlet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26288,
12,
2890,
4672,
436,
8395,
2860,
326,
8446,
1354,
1810,
3252,
434,
17014,
7212,
24770,
4656,
358,
846,
4485,
3739,
10415,
24770,
18,
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,
0,
0,
0,
0,
0,
0,
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,
26288,
12,
2890,
4672,
436,
8395,
2860,
326,
8446,
1354,
1810,
3252,
434,
17014,
7212,
24770,
4656,
358,
846,
4485,
3739,
10415,
24770,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
def startSimulation( self, a ) : self.theSession.theSimulator.initialize() self.theRunningFlag = 1 self.theSession.printMessage( "Start\n" ) self.theTimer = gtk.timeout_add(self.theUpdateInterval, self.updateByTimeOut, 0) self.theLoggerWindow.update() self.theSession.run() self.removeTimeOut() | def startSimulation( self, obj ) : try: self.theRunningFlag = 1 self.theSession.theSimulator.initialize() self.theSession.printMessage( "Start\n" ) self.theTimer = gtk.timeout_add(self.theUpdateInterval, self.updateByTimeOut, 0) self.theLoggerWindow.update() self.theSession.run() self.removeTimeOut() except: self.theRunningFlag = 0 import sys import traceback aErrorMessage = traceback.format_exception(sys.exc_type,sys.exc_value,sys.exc_traceback) self.theMessageWindow.printMessage(aErrorMessage) else: pass | def startSimulation( self, a ) : | e573789f2b94316412ecd7aa8c3fcc447f03df55 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/e573789f2b94316412ecd7aa8c3fcc447f03df55/MainWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
18419,
12,
365,
16,
279,
262,
294,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
18419,
12,
365,
16,
279,
262,
294,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
fv.tableCell(p.channel.title, 'class="'+status+'" colspan="1"') fv.tableCell(p.title, 'class="'+status+'" colspan="1"') fv.tableCell(p.subtitle, 'class="'+status+'" colspan="1"') | fv.tableCell(Unicode(p.channel.title), 'class="'+status+'" colspan="1"') fv.tableCell(Unicode(p.title), 'class="'+status+'" colspan="1"') fv.tableCell(Unicode(p.subtitle), 'class="'+status+'" colspan="1"') | def render(self, request): fv = HTMLResource() form = request.query by_chan = None | 6e9999d77f147ea8439a9178f8c0d80da05e2583 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6e9999d77f147ea8439a9178f8c0d80da05e2583/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
590,
4672,
10097,
273,
3982,
1420,
1435,
646,
273,
590,
18,
2271,
635,
67,
7472,
273,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
590,
4672,
10097,
273,
3982,
1420,
1435,
646,
273,
590,
18,
2271,
635,
67,
7472,
273,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Evaluate the L-series of this elliptic curve at points in CC | Evaluate the modular form of this elliptic curve at points in CC | def eval_modular_form(self, points, prec): """ Evaluate the L-series of this elliptic curve at points in CC INPUT: - ``points`` - a list of points in the half-plane of convergence - ``prec`` - precision OUTPUT: A list of values L(E,s) for s in points .. note:: | 56a4b20440053ac3ba5d05f3c67b246bd3ed4693 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/56a4b20440053ac3ba5d05f3c67b246bd3ed4693/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
67,
1711,
2490,
67,
687,
12,
2890,
16,
3143,
16,
13382,
4672,
3536,
18176,
326,
681,
2490,
646,
434,
333,
415,
549,
21507,
8882,
622,
3143,
316,
16525,
225,
12943,
30,
282,
300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5302,
67,
1711,
2490,
67,
687,
12,
2890,
16,
3143,
16,
13382,
4672,
3536,
18176,
326,
681,
2490,
646,
434,
333,
415,
549,
21507,
8882,
622,
3143,
316,
16525,
225,
12943,
30,
282,
300,
... |
raise IOError, "Error reading file ", segxmlfile | raise IOError, "Error reading file %s" % segxmlfile | def update_segment_lists(self, timeoffset): """ Function to download the latest segment lists. @param timeoffset: The offset in time for downloading those segments """ | 220a011764b979db0735a926a9c357f113032bd5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/220a011764b979db0735a926a9c357f113032bd5/pylal_exttrig_llutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9273,
67,
9772,
12,
2890,
16,
813,
3348,
4672,
3536,
4284,
358,
4224,
326,
4891,
3267,
6035,
18,
632,
891,
813,
3348,
30,
1021,
1384,
316,
813,
364,
23742,
5348,
5155,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
9273,
67,
9772,
12,
2890,
16,
813,
3348,
4672,
3536,
4284,
358,
4224,
326,
4891,
3267,
6035,
18,
632,
891,
813,
3348,
30,
1021,
1384,
316,
813,
364,
23742,
5348,
5155,
3536,
... |
patch = os.path.basename(url) file = os.path.join(tempfile.gettempdir(), patch) urllib.urlretrieve(url, file) __import_file(patch, file, options) | patch = os.path.basename(urllib.unquote(url)) filename = os.path.join(tempfile.gettempdir(), patch) urllib.urlretrieve(url, filename) __import_file(filename, options) | def __import_url(url, options): """Import a patch from a URL """ import urllib import tempfile if not url: parser.error('URL argument required') patch = os.path.basename(url) file = os.path.join(tempfile.gettempdir(), patch) urllib.urlretrieve(url, file) __import_file(patch, file, options) | fd1c0cfca390f57dd37024b677de9b707916a8d5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/fd1c0cfca390f57dd37024b677de9b707916a8d5/imprt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5666,
67,
718,
12,
718,
16,
702,
4672,
3536,
5010,
279,
4729,
628,
279,
1976,
3536,
1930,
11527,
1930,
13275,
225,
309,
486,
880,
30,
2082,
18,
1636,
2668,
1785,
1237,
1931,
6134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5666,
67,
718,
12,
718,
16,
702,
4672,
3536,
5010,
279,
4729,
628,
279,
1976,
3536,
1930,
11527,
1930,
13275,
225,
309,
486,
880,
30,
2082,
18,
1636,
2668,
1785,
1237,
1931,
6134,
... |
and n.ns().getContent()!=value.ns().getContent()) | and n.ns().getContent()!=value.ns().getContent()): | def __init__(self,name,value,rfc2425parameters={}): if self.name.upper()!="TEL": raise RuntimeError,"VCardTel handles only 'TEL' type" if isinstance(value,libxml2.xmlNone): number=None self.type=[] for n in value.get_children(): if n.type!='element': continue if (n.ns() and value.ns() and n.ns().getContent()!=value.ns().getContent()) continue if n.name=='NUMBER': self.number=unicode(n.getContent(),"utf-8","replace") elif n.name in ("HOME","WORK","VOICE","FAX","PAGER","MSG", "CELL","VIDEO","BBS","MODEM","ISDN","PCS", "PREF") self.type.append(n.name.lower()) if self.type==[]: self.type=["voice"] else: t=rfc2425parameters.get("type") if t: self.type=t.split(",") else: self.type=["voice"] self.number=value | 9f926fea99081b163ba5fe9e0140265ee4648f78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/9f926fea99081b163ba5fe9e0140265ee4648f78/vcard.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
529,
16,
1132,
16,
16784,
3247,
2947,
3977,
12938,
4672,
309,
365,
18,
529,
18,
5797,
1435,
5,
1546,
1448,
48,
6877,
1002,
7265,
10837,
58,
6415,
56,
292... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
529,
16,
1132,
16,
16784,
3247,
2947,
3977,
12938,
4672,
309,
365,
18,
529,
18,
5797,
1435,
5,
1546,
1448,
48,
6877,
1002,
7265,
10837,
58,
6415,
56,
292... |
gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) | gLogger.error( errStr, "%s %s" % ( diracSE, res['Message'] ) ) | def __resolveBestReplicas(self,sourceSE,lfnReplicas,catalogueSize): ########################################################### # Determine the best replicas (remove banned sources, invalid storage elements and file with the wrong size) configStr = '/Resources/StorageElements/BannedSource' bannedSources = gConfig.getValue(configStr,[]) gLogger.info("ReplicaManager.__resolveBestReplicas: Obtained current banned sources.") replicaPreference = [] for diracSE,pfn in lfnReplicas.items(): if sourceSE and diracSE != sourceSE: gLogger.info("ReplicaManager.__resolveBestReplicas: %s replica not requested." % diracSE) elif diracSE in bannedSources: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is currently banned as a source." % diracSE) else: gLogger.info("ReplicaManager.__resolveBestReplicas: %s is available for use." % diracSE) storageElement = StorageElement(diracSE) res = storageElement.isValid() if not res['OK']: errStr = "ReplicaManager.__resolveBestReplicas: The storage element is not currently valid." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: if storageElement.getRemoteProtocols()['Value']: gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source pfns for remote protocols.") res = storageElement.getPfnForProtocol(pfn,self.thirdPartyProtocols) if res['OK']: sourcePfn = res['Value'] gLogger.verbose("ReplicaManager.__resolveBestReplicas: Attempting to get source file size.") res = storageElement.getFileSize(sourcePfn) if res['OK']: if res['Value']['Successful'].has_key(sourcePfn): sourceFileSize = res['Value']['Successful'][sourcePfn] gLogger.info("ReplicaManager.__resolveBestReplicas: Source file size determined to be %s." % sourceFileSize) if catalogueSize == sourceFileSize: fileTuple = (diracSE,sourcePfn) replicaPreference.append(fileTuple) else: errStr = "ReplicaManager.__resolveBestReplicas: Catalogue size and physical file size mismatch." gLogger.error(errStr,"%s %s" % (diracSE,sourcePfn)) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Value']['Failed'][sourcePfn])) else: errStr = "ReplicaManager.__resolveBestReplicas: Completely failed to get physical file size." gLogger.error(errStr,"%s %s: %s" % (sourcePfn,diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Failed to get PFN for replication for StorageElement." gLogger.error(errStr,"%s %s" % (diracSE,res['Message'])) else: errStr = "ReplicaManager.__resolveBestReplicas: Source Storage Element has no remote protocols." gLogger.info(errStr,diracSE) if not replicaPreference: errStr = "ReplicaManager.__resolveBestReplicas: Failed to find any valid source Storage Elements." gLogger.error(errStr) return S_ERROR(errStr) else: return S_OK(replicaPreference) | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10828,
14173,
17248,
12,
2890,
16,
3168,
1090,
16,
80,
4293,
17248,
16,
7199,
344,
1225,
4672,
19709,
5516,
3228,
1189,
468,
10229,
326,
3796,
21545,
261,
4479,
324,
10041,
5550,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
10828,
14173,
17248,
12,
2890,
16,
3168,
1090,
16,
80,
4293,
17248,
16,
7199,
344,
1225,
4672,
19709,
5516,
3228,
1189,
468,
10229,
326,
3796,
21545,
261,
4479,
324,
10041,
5550,
16,... |
func.AddCmdArg(CmdArg('data_size', 'uint32')) | func.AddCmdArg(Argument('data_size', 'uint32')) | def InitFunction(self, func): """Overrriden from TypeHandler.""" func.AddCmdArg(CmdArg('data_size', 'uint32')) | 3975916c448229deb7fa73586d80d6aebe8671fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/3975916c448229deb7fa73586d80d6aebe8671fa/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
2083,
12,
2890,
16,
1326,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
1326,
18,
986,
5931,
4117,
12,
5931,
4117,
2668,
892,
67,
1467,
2187,
296,
11890,
1578,
26112,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4378,
2083,
12,
2890,
16,
1326,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
1326,
18,
986,
5931,
4117,
12,
5931,
4117,
2668,
892,
67,
1467,
2187,
296,
11890,
1578,
26112,
2,
-1... |
'should be 1 or 2: %r' % (len(tokens), optionstring)) | 'should be 1 or 2: "%s"' % (len(tokens), optionstring)) | def parse_option_marker(self, match): """ Return a list of `node.option` and `node.option_argument` objects, parsed from an option marker match. | 1dacb1eda37578279f664cded06f9ce279e461c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/1dacb1eda37578279f664cded06f9ce279e461c3/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3482,
67,
11145,
12,
2890,
16,
845,
4672,
3536,
2000,
279,
666,
434,
1375,
2159,
18,
3482,
68,
471,
1375,
2159,
18,
3482,
67,
3446,
68,
2184,
16,
2707,
628,
392,
1456,
5373,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3482,
67,
11145,
12,
2890,
16,
845,
4672,
3536,
2000,
279,
666,
434,
1375,
2159,
18,
3482,
68,
471,
1375,
2159,
18,
3482,
67,
3446,
68,
2184,
16,
2707,
628,
392,
1456,
5373,
... |
@arg mode: One of "w", "r" for write, read. "w" assumes that the | @arg mode: One of "w", "r" for write, read. "w" assumes that the | def __init__(self, filename=None, mode="r", mpi_comm=None, capture_warnings=True): """Initialize this log manager instance. | 26f8d8d9c4b3c67dbaf4f4dece66623b40a7f065 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12871/26f8d8d9c4b3c67dbaf4f4dece66623b40a7f065/log.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1544,
33,
7036,
16,
1965,
1546,
86,
3113,
6749,
77,
67,
5702,
33,
7036,
16,
7477,
67,
12103,
33,
5510,
4672,
3536,
7520,
333,
613,
3301,
791,
18,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1544,
33,
7036,
16,
1965,
1546,
86,
3113,
6749,
77,
67,
5702,
33,
7036,
16,
7477,
67,
12103,
33,
5510,
4672,
3536,
7520,
333,
613,
3301,
791,
18,
2,
-1... |
self.myException = ParseException("",0,self.errmsg,self) | def __init__( self, other, include=False, ignore=None ): super( SkipTo, self ).__init__( other ) if ignore is not None: self.expr = self.expr.copy() self.expr.ignore(ignore) self.mayReturnEmpty = True self.mayIndexError = False self.includeMatch = include self.asList = False self.errmsg = "No match found for "+_ustr(self.expr) self.myException = ParseException("",0,self.errmsg,self) | bb0e6c1d8894ec4cade5f95640e793eeb8be8f10 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3693/bb0e6c1d8894ec4cade5f95640e793eeb8be8f10/pyparsing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
1308,
16,
2341,
33,
8381,
16,
2305,
33,
7036,
262,
30,
2240,
12,
6611,
774,
16,
365,
262,
16186,
2738,
972,
12,
1308,
262,
309,
2305,
353,
486,
599,
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,
1001,
2738,
972,
12,
365,
16,
1308,
16,
2341,
33,
8381,
16,
2305,
33,
7036,
262,
30,
2240,
12,
6611,
774,
16,
365,
262,
16186,
2738,
972,
12,
1308,
262,
309,
2305,
353,
486,
599,
30,... | |
exts.append( Extension('syslog', ['syslogmodule.c']) ) | if platform not in ['mac']: exts.append( Extension('syslog', ['syslogmodule.c']) ) | def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 73aa1fff85c7c6ff940ace1a5de8a895e24e0132 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/73aa1fff85c7c6ff940ace1a5de8a895e24e0132/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5966,
67,
6400,
12,
2890,
4672,
468,
7693,
716,
342,
13640,
19,
3729,
353,
3712,
1399,
527,
67,
1214,
67,
869,
67,
1098,
12,
2890,
18,
9576,
18,
12083,
67,
8291,
16,
1173,
13640,
19,
... |
xyz = map( lambda x: x - math.floor( x ), self ) | def f( x ): x = x - math.floor( x ) if x > 0.999: x = 0 return x xyz = map( f, self ) | def z2o( self ): """ Coorect all vector coordinates to be in [0,1) interval """ xyz = map( lambda x: x - math.floor( x ), self ) return Vec( *xyz ) | a73fca6c0bb1784c9cb742d8d33636e61dc8dd61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11755/a73fca6c0bb1784c9cb742d8d33636e61dc8dd61/vec_z2o.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
998,
22,
83,
12,
365,
262,
30,
3536,
7695,
479,
299,
777,
3806,
5513,
358,
506,
316,
306,
20,
16,
21,
13,
3673,
3536,
1652,
284,
12,
619,
262,
30,
619,
273,
619,
300,
4233,
18,
74,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
998,
22,
83,
12,
365,
262,
30,
3536,
7695,
479,
299,
777,
3806,
5513,
358,
506,
316,
306,
20,
16,
21,
13,
3673,
3536,
1652,
284,
12,
619,
262,
30,
619,
273,
619,
300,
4233,
18,
74,... |
spec = None, mon = 'Monitor', load = None): | spec = None, mon = 'Monitor'): | def __init__(self, filenames = None, darkfilenames = None, norm = None, format = 'SPE', spec = None, mon = 'Monitor', load = None): """Initialize the class | 8862dcf26a4225de67d49c677cfa7010b7a8e0ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8436/8862dcf26a4225de67d49c677cfa7010b7a8e0ce/transformations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9066,
273,
599,
16,
23433,
19875,
273,
599,
16,
4651,
273,
599,
16,
740,
273,
296,
23810,
2187,
857,
273,
599,
16,
6921,
273,
296,
7187,
11,
4672,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9066,
273,
599,
16,
23433,
19875,
273,
599,
16,
4651,
273,
599,
16,
740,
273,
296,
23810,
2187,
857,
273,
599,
16,
6921,
273,
296,
7187,
11,
4672,
3536,
... |
r""" Tetrahedral (or pyramidal) numbers: ${n+2} \choose 3 = n(n+1)(n+2)/6$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000292;a Tetrahedral (or pyramidal) numbers: C(n+2,3) = n(n+1)(n+2)/6. sage: a(0) 0 sage: a(2) 4 sage: a(11) 286 sage: a.list(12) [0, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286] AUTHOR: -- Jaap Spies (2007-01-26) """ def __init__(self): | def __init__(self): r""" Tetrahedral (or pyramidal) numbers: ${n+2} \choose 3 = n(n+1)(n+2)/6$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000292;a Tetrahedral (or pyramidal) numbers: C(n+2,3) = n(n+1)(n+2)/6. sage: a(0) 0 sage: a(2) 4 sage: a(11) 286 sage: a.list(12) [0, 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, 286] AUTHOR: -- Jaap Spies (2007-01-26) """ | def _eval(self, n): return arith.binomial(n, int(calculus.floor(n//2))) | 69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
419,
483,
18,
4757,
11496,
12,
82,
16,
509,
12,
12780,
407,
18,
74,
5807,
12,
82,
759,
22,
20349,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
419,
483,
18,
4757,
11496,
12,
82,
16,
509,
12,
12780,
407,
18,
74,
5807,
12,
82,
759,
22,
20349,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.winConfOption = 'filedialog' self.loadDims() | def __init__(self, parent, message='Choose a file', defaultDir='.', defaultFile='', wildcard='', style=wxOPEN, pos=wxDefaultPosition): self.htmlBackCol = wxColour(192, 192, 192) self.htmlBackCol = wxSystemSettings_GetSystemColour(wxSYS_COLOUR_BTNFACE) self.filterOpts = ['Boa files', 'Internal files', 'Image files', 'All files'] | 2d64d49b99aa8c5c52c88b719394e5fabcd92cf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2d64d49b99aa8c5c52c88b719394e5fabcd92cf4/FileDlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
883,
2218,
24529,
279,
585,
2187,
805,
1621,
2218,
1093,
16,
805,
812,
2218,
2187,
8531,
2218,
2187,
2154,
33,
27226,
11437,
16,
949,
33,
27226,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
982,
16,
883,
2218,
24529,
279,
585,
2187,
805,
1621,
2218,
1093,
16,
805,
812,
2218,
2187,
8531,
2218,
2187,
2154,
33,
27226,
11437,
16,
949,
33,
27226,
... | |
'de': u'Bot: [[%s:%s]] ist ein ausgezeichneter Artikel', 'cs': u'Bot: Nejlepší článek: [[%s:%s]]', | 'fa': u' ربات: [[%s:%s]] یک مقاله برگزیدهاست', | def LINKS(site,name, ignore=[]): p=wikipedia.Page(site, name) links=p.linkedPages() for n in links[:]: t=n.titleWithoutNamespace() if t[0] in u"/#" or t in ignore: links.remove(n) links.sort() return links | 3e1ba3cfdef60ecb29c20449b00342c87340bac2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/3e1ba3cfdef60ecb29c20449b00342c87340bac2/featured.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
22926,
55,
12,
4256,
16,
529,
16,
2305,
33,
8526,
4672,
293,
33,
11999,
13744,
18,
1964,
12,
4256,
16,
508,
13,
4716,
33,
84,
18,
17738,
5716,
1435,
364,
290,
316,
4716,
10531,
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,
22926,
55,
12,
4256,
16,
529,
16,
2305,
33,
8526,
4672,
293,
33,
11999,
13744,
18,
1964,
12,
4256,
16,
508,
13,
4716,
33,
84,
18,
17738,
5716,
1435,
364,
290,
316,
4716,
10531,
14542,
... |
("script", self.startTagScript), (("base", "link", "meta", "style", "title"), | (("script", "style"), self.startTagScriptStyle), (("base", "link", "meta", "title"), | def __init__(self, parser, tree): Phase.__init__(self, parser, tree) self.startTagHandler = utils.MethodDispatcher([ ("html", self.startTagHtml), ("script", self.startTagScript), (("base", "link", "meta", "style", "title"), self.startTagFromHead), ("body", self.startTagBody), (("address", "blockquote", "center", "dir", "div", "dl", "fieldset", "listing", "menu", "ol", "p", "pre", "ul"), self.startTagCloseP), ("form", self.startTagForm), (("li", "dd", "dt"), self.startTagListItem), ("plaintext",self.startTagPlaintext), (headingElements, self.startTagHeading), ("a", self.startTagA), (("b", "big", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u"),self.startTagFormatting), ("button", self.startTagButton), (("marquee", "object"), self.startTagMarqueeObject), ("xmp", self.startTagXmp), ("table", self.startTagTable), (("area", "basefont", "bgsound", "br", "embed", "img", "param", "spacer", "wbr"), self.startTagVoidFormatting), ("hr", self.startTagHr), ("image", self.startTagImage), ("input", self.startTagInput), ("isindex", self.startTagIsIndex), ("textarea", self.startTagTextarea), (("iframe", "noembed", "noframes", "noscript"), self.startTagCdata), ("select", self.startTagSelect), (("caption", "col", "colgroup", "frame", "frameset", "head", "option", "optgroup", "tbody", "td", "tfoot", "th", "thead", "tr"), self.startTagMisplaced), (("event-source", "section", "nav", "article", "aside", "header", "footer", "datagrid", "command"), self.startTagNew) ]) self.startTagHandler.default = self.startTagOther | 65129d67d56aa6c17aaf8bf2b4047b4567f7a473 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9368/65129d67d56aa6c17aaf8bf2b4047b4567f7a473/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2082,
16,
2151,
4672,
19459,
16186,
2738,
972,
12,
2890,
16,
2082,
16,
2151,
13,
365,
18,
1937,
1805,
1503,
273,
2990,
18,
1305,
6681,
3816,
7566,
2620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2082,
16,
2151,
4672,
19459,
16186,
2738,
972,
12,
2890,
16,
2082,
16,
2151,
13,
365,
18,
1937,
1805,
1503,
273,
2990,
18,
1305,
6681,
3816,
7566,
2620,
... |
item_num = int(base_y * self.num_cols + base_x) if item_num >= 0 and item_num - self.num_rows <= len(self._items): | num = (self._cell0[1] + cols) * self.num_cols + (self._cell0[0] + rows) if num >= 0 and num < len(self._items): | def scroll(self, (rows, cols), secs): """ Scroll by cells rows and cols """ while True: # check if it possible to go there base_x = float(self._x0 + rows * self._col_size) / self.cell_size[0] base_y = float(self._y0 + cols * self._row_size) / self.cell_size[1] if self._orientation == Grid.HORIZONTAL: item_num = int(base_x * self.num_rows + base_y) if self._orientation == Grid.VERTICAL: item_num = int(base_y * self.num_cols + base_x) # TODO: check this calculation if item_num >= 0 and item_num - self.num_rows <= len(self._items): break # remove one cell in scroll, start with rows and use cols if # there are no rows to scroll anymore if rows: rows -= (rows / abs(rows)) else: cols -= (cols / abs(cols)) if rows: start = self._x0 if self._row_animation and self._row_animation.is_playing(): start -= self._row_animation.stop() self._x0 += rows * self._col_size self._row_animation = ScrollBehaviour(self, start, self._x0, secs, 0) if cols: start = self._y0 if self._col_animation and self._col_animation.is_playing(): start -= self._col_animation.stop() self._y0 += cols * self._row_size self._col_animation = ScrollBehaviour(self, start, self._y0, secs, 1) | 7b14a2b208acc2ce1dd643af75f0c785a0bc8172 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11702/7b14a2b208acc2ce1dd643af75f0c785a0bc8172/grid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5532,
12,
2890,
16,
261,
3870,
16,
5347,
3631,
18043,
4672,
3536,
23134,
635,
5983,
2595,
471,
5347,
3536,
1323,
1053,
30,
468,
866,
309,
518,
3323,
358,
1960,
1915,
1026,
67,
92,
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,
5532,
12,
2890,
16,
261,
3870,
16,
5347,
3631,
18043,
4672,
3536,
23134,
635,
5983,
2595,
471,
5347,
3536,
1323,
1053,
30,
468,
866,
309,
518,
3323,
358,
1960,
1915,
1026,
67,
92,
273,
... |
path = os.path.join(self.root, self.objectTemplate % pathId) | path = os.path.join(self.root, self.objectTemplate % dataId) | def map_object(self, dataId): dataId = self._transformId(dataId) path = os.path.join(self.root, self.objectTemplate % pathId) return ButlerLocation( "lsst.ap.cluster.PersistableSourceClusterVector", "PersistableSourceClusterVector", "BoostStorage", path) | 209bcaea32d013708c144d447accca48662e924b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6517/209bcaea32d013708c144d447accca48662e924b/lsstSimMapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
1612,
12,
2890,
16,
501,
548,
4672,
501,
548,
273,
365,
6315,
6547,
548,
12,
892,
548,
13,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3085,
16,
365,
18,
1612,
2283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
852,
67,
1612,
12,
2890,
16,
501,
548,
4672,
501,
548,
273,
365,
6315,
6547,
548,
12,
892,
548,
13,
589,
273,
1140,
18,
803,
18,
5701,
12,
2890,
18,
3085,
16,
365,
18,
1612,
2283,
... |
len('\n ') + 1024 + len('...(truncated)')) | 1024 + len('...(truncated)')) | def test_truncation(self): 'Verify that very long output is truncated' gdb_repr, gdb_output = self.get_gdb_repr('print range(1000)') self.assertEquals(gdb_repr, "\n [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, " "14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, " "27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, " "40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, " "53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, " "66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, " "79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, " "92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, " "104, 105, 106, 107, 108, 109, 110, 111, 112, 113, " "114, 115, 116, 117, 118, 119, 120, 121, 122, 123, " "124, 125, 126, 127, 128, 129, 130, 131, 132, 133, " "134, 135, 136, 137, 138, 139, 140, 141, 142, 143, " "144, 145, 146, 147, 148, 149, 150, 151, 152, 153, " "154, 155, 156, 157, 158, 159, 160, 161, 162, 163, " "164, 165, 166, 167, 168, 169, 170, 171, 172, 173, " "174, 175, 176, 177, 178, 179, 180, 181, 182, 183, " "184, 185, 186, 187, 188, 189, 190, 191, 192, 193, " "194, 195, 196, 197, 198, 199, 200, 201, 202, 203, " "204, 205, 206, 207, 208, 209, 210, 211, 212, 213, " "214, 215, 216, 217, 218, 219, 220, 221, 222, 223, " "224, 225, 226...(truncated)") self.assertEquals(len(gdb_repr), len('\n ') + 1024 + len('...(truncated)')) | 0c080097088217e350225bed9843dc64204febe7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/0c080097088217e350225bed9843dc64204febe7/test_gdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
23558,
367,
12,
2890,
4672,
296,
8097,
716,
8572,
1525,
876,
353,
15282,
11,
314,
1966,
67,
12715,
16,
314,
1966,
67,
2844,
273,
365,
18,
588,
67,
75,
1966,
67,
12715,
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,
1842,
67,
23558,
367,
12,
2890,
4672,
296,
8097,
716,
8572,
1525,
876,
353,
15282,
11,
314,
1966,
67,
12715,
16,
314,
1966,
67,
2844,
273,
365,
18,
588,
67,
75,
1966,
67,
12715,
2668,
... |
self.skin = Skin(core, os.path.join("skins", name)) | self.skin = Skin(self._core, os.path.join("skins", name)) | def setSkin(self, name): self.skin = Skin(core, os.path.join("skins", name)) | a246a25a04865a8d084a0ac84ac963f1f1e76b38 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/206/a246a25a04865a8d084a0ac84ac963f1f1e76b38/skins.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
26827,
12,
2890,
16,
508,
4672,
365,
18,
7771,
267,
273,
10362,
267,
12,
3644,
16,
1140,
18,
803,
18,
5701,
2932,
7771,
2679,
3113,
508,
3719,
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,
26827,
12,
2890,
16,
508,
4672,
365,
18,
7771,
267,
273,
10362,
267,
12,
3644,
16,
1140,
18,
803,
18,
5701,
2932,
7771,
2679,
3113,
508,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-10... |
s,o=exec_command('python -c "import sys,os;sys.stderr.write(os.name)"') | s,o=exec_command('python -c "import sys,os;sys.stderr.write(os.name)"',**kws) | def test_posix(): s,o=exec_command("echo Hello") assert s==0 and o=='Hello',(s,o) s,o=exec_command('echo $AAA') assert s==0 and o=='',(s,o) s,o=exec_command('echo "$AAA"',AAA='Tere') assert s==0 and o=='Tere',(s,o) s,o=exec_command('echo "$AAA"') assert s==0 and o=='',(s,o) os.environ['BBB'] = 'Hi' s,o=exec_command('echo "$BBB"') assert s==0 and o=='Hi',(s,o) s,o=exec_command('echo "$BBB"',BBB='Hey') assert s==0 and o=='Hey',(s,o) s,o=exec_command('echo "$BBB"') assert s==0 and o=='Hi',(s,o) s,o=exec_command('this_is_not_a_command') assert s!=0 and o!='',(s,o) s,o=exec_command('echo path=$PATH') assert s==0 and o!='',(s,o) s,o=exec_command('python -c "import sys,os;sys.stderr.write(os.name)"') assert s==0 and o=='posix',(s,o) s,o=exec_command('python -c "raise \'Ignore me.\'"') assert s==1 and o,(s,o) s,o=exec_command('python -c "import sys;sys.stderr.write(\'0\');sys.stderr.write(\'1\');sys.stderr.write(\'2\')"') assert s==0 and o=='012',(s,o) s,o=exec_command('python -c "import sys;sys.exit(15)"') assert s==15 and o=='',(s,o) s,o=exec_command('python -c "print \'Heipa\'"') assert s==0 and o=='Heipa',(s,o) print 'ok' | 59c6f7c8809104ffcc97e2083529ae4111b41755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/59c6f7c8809104ffcc97e2083529ae4111b41755/exec_command.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
24463,
13332,
272,
16,
83,
33,
4177,
67,
3076,
2932,
12946,
20889,
7923,
1815,
272,
631,
20,
471,
320,
18920,
18601,
2187,
12,
87,
16,
83,
13,
225,
272,
16,
83,
33,
4177,
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,
1842,
67,
24463,
13332,
272,
16,
83,
33,
4177,
67,
3076,
2932,
12946,
20889,
7923,
1815,
272,
631,
20,
471,
320,
18920,
18601,
2187,
12,
87,
16,
83,
13,
225,
272,
16,
83,
33,
4177,
6... |
def __getattr__(self, attr): if attr == "parent": ret = libxml2mod.parent(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "properties": ret = libxml2mod.properties(self._o) if ret == None: return None return xmlAttr(_obj=ret) elif attr == "children": ret = libxml2mod.children(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "last": ret = libxml2mod.last(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "next": ret = libxml2mod.next(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "prev": ret = libxml2mod.prev(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "content": return libxml2mod.xmlNodeGetContent(self._o) elif attr == "name": return libxml2mod.name(self._o) elif attr == "type": return libxml2mod.type(self._o) elif attr == "doc": ret = libxml2mod.doc(self._o) if ret == None: if self.type == "document_xml" or self.type == "document_html": return xmlDoc(_obj=self._o) else: return None return xmlDoc(_obj=ret) raise AttributeError,attr | def __getattr__(self, attr): if attr == "parent": ret = libxml2mod.parent(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "properties": ret = libxml2mod.properties(self._o) if ret == None: return None return xmlAttr(_obj=ret) elif attr == "children": ret = libxml2mod.children(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "last": ret = libxml2mod.last(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "next": ret = libxml2mod.next(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "prev": ret = libxml2mod.prev(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "content": return libxml2mod.xmlNodeGetContent(self._o) elif attr == "name": return libxml2mod.name(self._o) elif attr == "type": return libxml2mod.type(self._o) elif attr == "doc": ret = libxml2mod.doc(self._o) if ret == None: if self.type == "document_xml" or self.type == "document_html": return xmlDoc(_obj=self._o) else: return None return xmlDoc(_obj=ret) raise AttributeError,attr | def __getattr__(self, attr): if attr == "parent": ret = libxml2mod.parent(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "properties": ret = libxml2mod.properties(self._o) if ret == None: return None return xmlAttr(_obj=ret) elif attr == "children": ret = libxml2mod.children(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "last": ret = libxml2mod.last(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "next": ret = libxml2mod.next(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "prev": ret = libxml2mod.prev(self._o) if ret == None: return None return xmlNode(_obj=ret) elif attr == "content": return libxml2mod.xmlNodeGetContent(self._o) elif attr == "name": return libxml2mod.name(self._o) elif attr == "type": return libxml2mod.type(self._o) elif attr == "doc": ret = libxml2mod.doc(self._o) if ret == None: if self.type == "document_xml" or self.type == "document_html": return xmlDoc(_obj=self._o) else: return None return xmlDoc(_obj=ret) raise AttributeError,attr else: | 1d75c8a822dbe6608e646cdbbeb174a3a4ab49c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/1d75c8a822dbe6608e646cdbbeb174a3a4ab49c0/libxml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
309,
1604,
422,
315,
2938,
6877,
325,
273,
16394,
22,
1711,
18,
2938,
12,
2890,
6315,
83,
13,
309,
325,
422,
599,
30,
327,
599,
327,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
1604,
4672,
309,
1604,
422,
315,
2938,
6877,
325,
273,
16394,
22,
1711,
18,
2938,
12,
2890,
6315,
83,
13,
309,
325,
422,
599,
30,
327,
599,
327,
2... |
return ip1 == ip2 | return result[ 'Value' ] | def __isSameHost(self,hostCN,hostConn): """ Guess if it is the same host or not """ hostCN_m = hostCN.replace('host/','') if hostCN_m == hostConn: return True try: ip1 = gethostbyname(hostCN_m) ip2 = gethostbyname(hostConn) except Exception,x: return False return ip1 == ip2 | 81ff31576d2080209ded20b22fb2233a3640a6dd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/81ff31576d2080209ded20b22fb2233a3640a6dd/SocketInfo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
291,
8650,
2594,
12,
2890,
16,
2564,
12821,
16,
2564,
3543,
4672,
3536,
30282,
309,
518,
353,
326,
1967,
1479,
578,
486,
3536,
1479,
12821,
67,
81,
273,
1479,
12821,
18,
2079,
2668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
291,
8650,
2594,
12,
2890,
16,
2564,
12821,
16,
2564,
3543,
4672,
3536,
30282,
309,
518,
353,
326,
1967,
1479,
578,
486,
3536,
1479,
12821,
67,
81,
273,
1479,
12821,
18,
2079,
2668... |
from distutils.util import get_platform s = "build/lib.%s-%.3s" % (get_platform(), sys.version) | s = "build/lib.%s-%.3s" % ("linux-i686", sys.version) | def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir) | d0fde69005334475dceb309dc0e850a4f2314317 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d0fde69005334475dceb309dc0e850a4f2314317/site.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
803,
30857,
4481,
4672,
1577,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
5701,
30857,
4481,
3719,
327,
1577,
16,
1140,
18,
803,
18,
7959,
3593,
12,
1214,
13,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1221,
803,
30857,
4481,
4672,
1577,
273,
1140,
18,
803,
18,
5113,
803,
12,
538,
18,
803,
18,
5701,
30857,
4481,
3719,
327,
1577,
16,
1140,
18,
803,
18,
7959,
3593,
12,
1214,
13,
225,
... |
self._color = color | self._set_color(color) | def color(self, *args): if not args: raise Error, "no color arguments" if len(args) == 1: color = args[0] if type(color) == type(""): # Test the color first try: id = self._canvas.create_line(0, 0, 0, 0, fill=color) except Tkinter.TclError: raise Error, "bad color string: %s" % `color` self._color = color return try: r, g, b = color except: raise Error, "bad color sequence: %s" % `color` else: try: r, g, b = args except: raise Error, "bad color arguments: %s" % `args` assert 0 <= r <= 1 assert 0 <= g <= 1 assert 0 <= b <= 1 x = 255.0 y = 0.5 self._color = "#%02x%02x%02x" % (int(r*x+y), int(g*x+y), int(b*x+y)) | 3c7a25a4d9ea07f2aa8e4b70fecd84e33de82c2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3c7a25a4d9ea07f2aa8e4b70fecd84e33de82c2e/turtle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2036,
12,
2890,
16,
380,
1968,
4672,
309,
486,
833,
30,
1002,
1068,
16,
315,
2135,
2036,
1775,
6,
309,
562,
12,
1968,
13,
422,
404,
30,
2036,
273,
833,
63,
20,
65,
309,
618,
12,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2036,
12,
2890,
16,
380,
1968,
4672,
309,
486,
833,
30,
1002,
1068,
16,
315,
2135,
2036,
1775,
6,
309,
562,
12,
1968,
13,
422,
404,
30,
2036,
273,
833,
63,
20,
65,
309,
618,
12,
32... |
cty.c_int, [cty.POINTER(FL_FORM), cty.c_void_p], | cty.c_int, [cty.POINTER(FL_FORM), cty.c_void_p], | def fl_set_fselector_title(s): _fl_set_form_title(fl_get_fselector_form(), s) | 9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
74,
9663,
67,
2649,
12,
87,
4672,
389,
2242,
67,
542,
67,
687,
67,
2649,
12,
2242,
67,
588,
67,
74,
9663,
67,
687,
9334,
272,
13,
282,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1183,
67,
542,
67,
74,
9663,
67,
2649,
12,
87,
4672,
389,
2242,
67,
542,
67,
687,
67,
2649,
12,
2242,
67,
588,
67,
74,
9663,
67,
687,
9334,
272,
13,
282,
2,
-100,
-100,
-100,
-100,... |
self.flag_command(self.session.set_logging) | self.flag_command(self.session.set_logging, line) | def do_logging(self, line): self.flag_command(self.session.set_logging) | b63f7e5eedde6cab8e9062d011061919ab8dd9d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12352/b63f7e5eedde6cab8e9062d011061919ab8dd9d7/linksys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
11167,
12,
2890,
16,
980,
4672,
365,
18,
6420,
67,
3076,
12,
2890,
18,
3184,
18,
542,
67,
11167,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
11167,
12,
2890,
16,
980,
4672,
365,
18,
6420,
67,
3076,
12,
2890,
18,
3184,
18,
542,
67,
11167,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
g = G(p2) | g = self.parse(state) res = 1 | def legal(self,state,mode="quiet"): r""" Returns 1 (true) if the dictionary \code{state} (in the same format as returned by the faces method) represents a legal position (or state) of the Rubik's cube. Returns 0 (false) otherwise. | 21b1bfb9c6cbd0850c3e2b3eba251adb5d7f39b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/21b1bfb9c6cbd0850c3e2b3eba251adb5d7f39b1/cubegroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19286,
12,
2890,
16,
2019,
16,
3188,
1546,
20380,
6,
4672,
436,
8395,
2860,
404,
261,
3767,
13,
309,
326,
3880,
521,
710,
95,
2019,
97,
261,
267,
326,
1967,
740,
487,
2106,
635,
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,
19286,
12,
2890,
16,
2019,
16,
3188,
1546,
20380,
6,
4672,
436,
8395,
2860,
404,
261,
3767,
13,
309,
326,
3880,
521,
710,
95,
2019,
97,
261,
267,
326,
1967,
740,
487,
2106,
635,
326,
... |
def _limit_latex_(*args): | def _limit_latex_(self, f, x, a): | def _limit_latex_(*args): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f(x) = function('f',x) sage: _limit_latex_(f(x), x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' AUTHORS: - Golam Mortuza Hossain (2009-06-15) """ # Read f,x,a from arguments f = args[0] x = args[1] a = args[2] return "\\lim_{%s \\to %s}\\, %s"%(latex(x), latex(a), latex(f)) | acf862616c491eaa6eff0382681451ce96478191 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/acf862616c491eaa6eff0382681451ce96478191/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
12,
2890,
16,
284,
16,
619,
16,
279,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
12,
2890,
16,
284,
16,
619,
16,
279,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,... |
).where(or_(and_(PersonPackageListingAcl.acl.in_( | ).where(or_(PersonPackageListingAcl.acl.in_( | def notify(self, name=None, version=None, eol=False): '''List of usernames that should be notified of changes to a package. | 23a17e1b10886c51ee9b26eeeb66ca54b1a98217 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/23a17e1b10886c51ee9b26eeeb66ca54b1a98217/listqueries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
12,
2890,
16,
508,
33,
7036,
16,
1177,
33,
7036,
16,
14775,
33,
8381,
4672,
9163,
682,
434,
27675,
716,
1410,
506,
18791,
434,
3478,
358,
279,
2181,
18,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
12,
2890,
16,
508,
33,
7036,
16,
1177,
33,
7036,
16,
14775,
33,
8381,
4672,
9163,
682,
434,
27675,
716,
1410,
506,
18791,
434,
3478,
358,
279,
2181,
18,
2,
-100,
-100,
-100,
-100... |
query = """SELECT t.shape_id, st.shape_dist_traveled, st.stop_id | query = """SELECT t.shape_id, st.shape_dist_traveled, st.stop_id, st.stop_sequence | def shape_between(self, trip_id, stop1, stop2): query = """SELECT t.shape_id, st.shape_dist_traveled, st.stop_id FROM trips t JOIN stop_times st ON st.trip_id = t.trip_id WHERE t.trip_id = %s and (st.stop_id = '%s' or st.stop_id = '%s') ORDER BY shape_dist_traveled""" % (trip_id, stop1, stop2) # BUG: if there is a loop the logic breaks... distances = [] shape_id = None for x in self.execute( query ): if not shape_id: shape_id = x[0] distances.append(x[1]) if not shape_id: return None t_min = distances[0] t_max = distances[1] shape = [] last = None total_traveled = 0 for pt in self.shape(shape_id): dist_traveled = pt[2] if dist_traveled > t_min and dist_traveled < t_max: if len(shape) == 0 and total_traveled != 0 and t_min != 0 and dist_traveled - total_traveled != 0: # interpolate first node: percent_along = (dist_traveled - t_min) / (dist_traveled - total_traveled) shape.append((last[0] + (pt[0] - last[0])*percent_along, last[1] + (pt[1] - last[1])*percent_along)) else: shape.append(last) last = (pt[0],pt[1]) elif dist_traveled > t_max: # calculate the differnce and interpolate percent_along = (dist_traveled - t_max) / (dist_traveled - total_traveled) shape.append((last[0] + (pt[0] - last[0])*percent_along, last[1] + (pt[1] - last[1])*percent_along)) return shape else: last = (pt[0],pt[1]) total_traveled = dist_traveled return shape | 5fe7d4cce11c36905229ba9086586ea38efd8506 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10974/5fe7d4cce11c36905229ba9086586ea38efd8506/gtfsdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2179,
67,
15019,
12,
2890,
16,
20654,
67,
350,
16,
2132,
21,
16,
2132,
22,
4672,
843,
273,
3536,
4803,
268,
18,
4867,
67,
350,
16,
384,
18,
4867,
67,
4413,
67,
313,
7882,
329,
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,
2179,
67,
15019,
12,
2890,
16,
20654,
67,
350,
16,
2132,
21,
16,
2132,
22,
4672,
843,
273,
3536,
4803,
268,
18,
4867,
67,
350,
16,
384,
18,
4867,
67,
4413,
67,
313,
7882,
329,
16,
... |
p -- integer (default: 0); if nonzero, compute the p-new subspace. | p -- integer (default: 0); if nonzero, compute the $p$-new subspace. | def dimension_new_cusp_forms_H(G,k, p=0): """ Return the dimension of the space of new (or $p$-new) weight $k$ cusp forms for $G$. INPUT: G -- group of the form Gamma_H(N) k -- an integer at least 2 (the weight) p -- integer (default: 0); if nonzero, compute the p-new subspace. OUTPUT: Integer EXAMPLES: sage: from sage.modular.dims import * sage: dimension_new_cusp_forms_H(GammaH(33,[2]), 2) 3 """ N = G.level() if p==0 or N%p!=0: return sum([dimension_cusp_forms_H(H,k) * mumu(N // H.level()) \ for H in G.divisor_subgroups()]) else: return dimension_cusp_forms_H(G,k) - \ 2*dimension_new_cusp_forms_H(G.restrict(N//p),k) | 248019f740827c6c514f1cd94eb6bd825f071218 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/248019f740827c6c514f1cd94eb6bd825f071218/dims.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4968,
67,
2704,
67,
71,
407,
84,
67,
9741,
67,
44,
12,
43,
16,
79,
16,
293,
33,
20,
4672,
3536,
2000,
326,
4968,
434,
326,
3476,
434,
394,
261,
280,
271,
84,
8,
17,
2704,
13,
311... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4968,
67,
2704,
67,
71,
407,
84,
67,
9741,
67,
44,
12,
43,
16,
79,
16,
293,
33,
20,
4672,
3536,
2000,
326,
4968,
434,
326,
3476,
434,
394,
261,
280,
271,
84,
8,
17,
2704,
13,
311... |
def _eval_line(self, line, reformat=True, allow_use_file=False, wait_for_prompt=True): | def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): | def _eval_line(self, line, reformat=True, allow_use_file=False, wait_for_prompt=True): if len(line) == 0: return '' line = line.rstrip() if line[-1] != '$' and line[-1] != ';': line += ';' | 27b52778f34947a11ed11c466f5d54d57304fd47 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/27b52778f34947a11ed11c466f5d54d57304fd47/maxima.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
67,
1369,
12,
2890,
16,
980,
16,
1699,
67,
1202,
67,
768,
33,
8381,
16,
2529,
67,
1884,
67,
13325,
33,
5510,
16,
283,
2139,
33,
5510,
16,
555,
67,
1893,
33,
5510,
4672,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
67,
1369,
12,
2890,
16,
980,
16,
1699,
67,
1202,
67,
768,
33,
8381,
16,
2529,
67,
1884,
67,
13325,
33,
5510,
16,
283,
2139,
33,
5510,
16,
555,
67,
1893,
33,
5510,
4672,
... |
res = self._getConnectionTransID(connection,transName) | res = self._getConnectionTransID(connection,transID) | def addTaskForTransformation(self,transID,lfns=[],se='Unknown',connection=False): """ Create a new task with the supplied files for a transformation. """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] # Be sure the all the supplied LFNs are known to the database for the supplied transformation if lfns: res = self.getTransformationFiles(condDict={'TransformationID':transID,'LFN':lfns},connection=connection) if not res['OK']: return res foundLfns = [] allAvailable = True for fileDict in res['Value']: lfn = fileDict['LFN'] foundLfns.append(lfn) if fileDict['Status'] != 'Unused': allAvailable = False gLogger.error("Supplied file not in Unused status but %s" % fileDict['Status'],lfn) for lfn in lfns: if not lfn in foundLfns: allAvailable = False gLogger.error("Supplied file not found for transformation" % lfn) if not allAvailable: return S_ERROR("Not all supplied files available in the transformation database") | 39c6b546da13f5d63f59cfede057b4dbecefb609 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/39c6b546da13f5d63f59cfede057b4dbecefb609/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
2174,
1290,
15292,
12,
2890,
16,
2338,
734,
16,
20850,
2387,
22850,
6487,
307,
2218,
4874,
2187,
4071,
33,
8381,
4672,
3536,
1788,
279,
394,
1562,
598,
326,
4580,
1390,
364,
279,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2174,
1290,
15292,
12,
2890,
16,
2338,
734,
16,
20850,
2387,
22850,
6487,
307,
2218,
4874,
2187,
4071,
33,
8381,
4672,
3536,
1788,
279,
394,
1562,
598,
326,
4580,
1390,
364,
279,
86... |
if getBody == False: info = grabURL(url, "HEAD", start, etag, modified, findHTTPAuth) if info == None: info = grabURL (url, "GET", start, etag, modified, findHTTPAuth) else: info = grabURL(url, "GET", start, etag, modified, findHTTPAuth) if info: info["body"] = info["file-handle"].read() eventloop.addIdle (callback, (info,) + args, kwargs) | info = None try: if getBody == False: info = grabURL(url, "HEAD", start, etag, modified, findHTTPAuth) if info == None: info = grabURL (url, "GET", start, etag, modified, findHTTPAuth) else: info = grabURL(url, "GET", start, etag, modified, findHTTPAuth) if info: info["body"] = info["file-handle"].read() finally: eventloop.addIdle (callback, (info,) + args, kwargs) | def _grabURLThread(callback, url, start, etag, modified, findHTTPAuth, getBody, args, kwargs): if getBody == False: info = grabURL(url, "HEAD", start, etag, modified, findHTTPAuth) if info == None: info = grabURL (url, "GET", start, etag, modified, findHTTPAuth) else: info = grabURL(url, "GET", start, etag, modified, findHTTPAuth) if info: info["body"] = info["file-handle"].read() eventloop.addIdle (callback, (info,) + args, kwargs) | 67b3d1da0deabe8c36af33301688d7cfc37ba2f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/67b3d1da0deabe8c36af33301688d7cfc37ba2f7/download_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2752,
70,
1785,
3830,
12,
3394,
16,
880,
16,
787,
16,
13655,
16,
4358,
16,
1104,
3693,
1730,
16,
7587,
16,
833,
16,
1205,
4672,
1123,
273,
599,
775,
30,
309,
7587,
422,
1083,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2752,
70,
1785,
3830,
12,
3394,
16,
880,
16,
787,
16,
13655,
16,
4358,
16,
1104,
3693,
1730,
16,
7587,
16,
833,
16,
1205,
4672,
1123,
273,
599,
775,
30,
309,
7587,
422,
1083,
30... |
if len(wordsizes) == 0: wordsizes = set([32, 64]) | if len(wordsizes) == 0: wordsizes = get_wordsizes() | def main(): global wordsizes, pagesizes, dangerous, paranoid_pool_check, system_default_hpage_size testsets = set() env_override = {"QUIET_TEST": "1", "HUGETLBFS_MOUNTS": "", "HUGETLB_ELFMAP": None, "HUGETLB_MORECORE": None} env_defaults = {"HUGETLB_VERBOSE": "0"} dangerous = 0 paranoid_pool_check = False try: opts, args = getopt.getopt(sys.argv[1:], "vVfdt:b:p:c") except getopt.GetoptError, err: print str(err) sys.exit(1) for opt, arg in opts: if opt == "-v": env_override["QUIET_TEST"] = None env_defaults["HUGETLB_VERBOSE"] = "2" elif opt == "-V": env_defaults["HUGETLB_VERBOSE"] = "99" elif opt == "-f": dangerous = 1 elif opt == "-t": for t in arg.split(): testsets.add(t) elif opt == "-b": for b in arg.split(): wordsizes.add(int(b)) elif opt == "-p": for p in arg.split(): pagesizes.add(int(p)) elif opt == '-c': paranoid_pool_check = True else: assert False, "unhandled option" if len(testsets) == 0: testsets = set(["func", "stress"]) if len(wordsizes) == 0: wordsizes = set([32, 64]) if len(pagesizes) == 0: pagesizes = get_pagesizes() if len(pagesizes) == 0: print "Unable to find available page sizes, are you sure hugetlbfs" print "is mounted and there are available huge pages?" return 1 setup_env(env_override, env_defaults) init_results() (rc, system_default_hpage_size) = hpage_size() if rc != 0: print "Unable to find system default hugepage size." print "Is hugepage supported included in this kernel?" return 1 check_hugetlbfs_path() if "func" in testsets: functional_tests() if "stress" in testsets: stress_tests() results_summary() | 30c9d6c77246225e28fe3282cab92b554b5f8bb2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3715/30c9d6c77246225e28fe3282cab92b554b5f8bb2/run_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
4511,
3128,
16,
4689,
3128,
16,
27308,
1481,
16,
779,
304,
839,
67,
6011,
67,
1893,
16,
2619,
67,
1886,
67,
76,
2433,
67,
1467,
1842,
4424,
273,
444,
1435,
1550,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2552,
4511,
3128,
16,
4689,
3128,
16,
27308,
1481,
16,
779,
304,
839,
67,
6011,
67,
1893,
16,
2619,
67,
1886,
67,
76,
2433,
67,
1467,
1842,
4424,
273,
444,
1435,
1550,
67,... |
while pos < length - 1: | while pos < self.length - 1: | def comment (self, item, after=False): length = len(self.tokens) | bd9ed2c17d104bb179792ba3d49e42faf3be4343 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/bd9ed2c17d104bb179792ba3d49e42faf3be4343/treegenerator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2879,
261,
2890,
16,
761,
16,
1839,
33,
8381,
4672,
769,
273,
562,
12,
2890,
18,
7860,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
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,
2879,
261,
2890,
16,
761,
16,
1839,
33,
8381,
4672,
769,
273,
562,
12,
2890,
18,
7860,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
/usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py | /usr/bin/time --format=%e -o test_profile/time.log .../release/RunChandler --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py | def runStartupPerfTests(options, timer, largeData=False, repeat=3, logger=log): """ Run startup time tests. >>> options = parseOptions() >>> checkOptions(options) >>> options.dryrun = True >>> options.verbose = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + Startup /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', repeat=1) Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + Startup /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 False >>> runStartupPerfTests(options, '/usr/bin/time', largeData=True) Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --restore=.../test_profile/__repository__.001 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + Startup_with_large_calendar /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 False >>> options.tbox = True >>> runStartupPerfTests(options, '/usr/bin/time') Creating repository for startup time tests /.../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/quit.py --create - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + Startup /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /usr/bin/time --format=%e -o .../test_profile/time.log .../release/RunChandler... --catch=tests --profileDir=.../test_profile --parcelPath=.../tools/QATestScripts/DataFiles --scriptFile=tools/QATestScripts/Performance/end.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + <BLANKLINE> Startup [#TINDERBOX# Status = PASSED] OSAF_QA: Startup | ... | 0.00 #TINDERBOX# Testname = Startup #TINDERBOX# Status = PASSED #TINDERBOX# Time elapsed = 0.00 (seconds) - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False """ # Create test repo if options.verbose: log('Creating repository for startup time tests') cmd = [ options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'quit.py') ] if not largeData: cmd += ['--create'] timeout = 180 name = 'Startup' else: cmd += ['--restore=%s' % os.path.join(options.profileDir, '__repository__.001')] timeout = 600 name = 'Startup_with_large_calendar' if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=timeout, logger=logger) if result != 0: log('***Error exit code=%d, creating %s repository' % (result, name)) failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) # Time startup values = [] timeLog = os.path.join(options.profileDir, 'time.log') if not options.dryrun: if os.path.isfile(timeLog): os.remove(timeLog) cmd = [ timer, r'--format=%e', '-o', timeLog, options.runchandler['release'], '--catch=tests', '--profileDir=%s' % options.profileDir, '--parcelPath=%s' % options.parcelPath, '--scriptFile=%s' % os.path.join('tools', 'QATestScripts', 'Performance', 'end.py') ] log(name.ljust(30), newline=' ') for _ in range(repeat): if options.verbose: log(' '.join(cmd)) if options.dryrun: result = 0 else: result = build_lib.runCommand(cmd, timeout=180, logger=logger) if result == 0: if options.dryrun: line = '0.0' else: line = open(timeLog).readline()[:-1] try: value = float(line) except ValueError, e: log('| %s' % str(e)) failedTests.append(name) return True log(('%02.2f' % value).rjust(5), newline=' ') values.append(value) else: log('| failed') failedTests.append(name) return True if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) else: values.sort() value = values[repeat/2] if not options.tbox: log('| %02.2f'.rjust(10) % value) else: revision = getattr(build_lib.loadModuleFromFile(os.path.join(options.chandlerHome, 'version.py'), 'vmodule'), 'revision', '') log('') log('%s [#TINDERBOX# Status = PASSED]' % name) log('OSAF_QA: %s | %s | %02.2f' % (name, revision, value)) log('#TINDERBOX# Testname = %s' % name) log('#TINDERBOX# Status = PASSED') log('#TINDERBOX# Time elapsed = %02.2f (seconds)' % value) if options.dryrun: log('- + ' * 15) else: logger('- + ' * 15) return False | 58706c198c72ae85bd163dd339d4081bdd26b7be /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/58706c198c72ae85bd163dd339d4081bdd26b7be/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
22178,
22016,
14650,
12,
2116,
16,
5441,
16,
7876,
751,
33,
8381,
16,
7666,
33,
23,
16,
1194,
33,
1330,
4672,
3536,
1939,
11850,
813,
7434,
18,
225,
4080,
702,
273,
1109,
1320,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22178,
22016,
14650,
12,
2116,
16,
5441,
16,
7876,
751,
33,
8381,
16,
7666,
33,
23,
16,
1194,
33,
1330,
4672,
3536,
1939,
11850,
813,
7434,
18,
225,
4080,
702,
273,
1109,
1320,
1... |
ch2 = wx.colheader.ColumnHeader( self, 1002, (80, 90), (270, colHeight), 0 ) ch2.AppendItem( "Juan", wx.colheader.COLUMNHEADER_JUST_Left, 90, 1, 1, 1 ) ch2.AppendItem( "Valdz", wx.colheader.COLUMNHEADER_JUST_Center, 90, 0, 1, 1 ) ch2.AppendItem( "coffee guy", wx.colheader.COLUMNHEADER_JUST_Right, 90, 0, 1, 1 ) | ch2 = wx.colheader.ColumnHeader( self, cntlID, (80, 90), (270, colHeight), 0 ) coffeeNames = [ "Juan", "Valdz", "coffee guy" ] for i, v in enumerate( coffeeNames ): ch2.AppendItem( v, wx.colheader.COLUMNHEADER_JUST_Left + i, 90, 0, 1, 1 ) ch2.SetSelectedItemIndex( 0 ) | def __init__( self, parent, log ): wx.Panel.__init__( self, parent, -1, style=wx.NO_FULL_REPAINT_ON_RESIZE ) self.log = log | 97785f3f33dd20f2b36619b4084b435cbedc5e2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/97785f3f33dd20f2b36619b4084b435cbedc5e2e/ColumnHeader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
613,
262,
30,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
300,
21,
16,
2154,
33,
27226,
18,
3417,
67,
18111,
67,
862,
4066,
3217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
982,
16,
613,
262,
30,
7075,
18,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
300,
21,
16,
2154,
33,
27226,
18,
3417,
67,
18111,
67,
862,
4066,
3217,
... |
self.gPodder.destroy() | def new(self): if gpodder.interface == gpodder.MAEMO: # Maemo-specific changes to the UI global scalable_dir scalable_dir = scalable_dir.replace('.svg', '.png') self.app = hildon.Program() gtk.set_application_name('gPodder') self.window = hildon.Window() self.window.connect('delete-event', self.on_gPodder_delete_event) self.window.connect('window-state-event', self.window_state_event) self.window.connect('key-press-event', self.on_key_press) # Give toolbar to the hildon window self.toolbar.parent.remove(self.toolbar) self.toolbar.set_style(gtk.TOOLBAR_ICONS) self.window.add_toolbar(self.toolbar) self.app.add_window(self.window) self.vMain.reparent(self.window) self.gPodder.destroy() self.gPodder = self.window | 05308b2e2f4b704c934c9ea6811c7d7cdeb4134a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/05308b2e2f4b704c934c9ea6811c7d7cdeb4134a/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
4672,
309,
4178,
369,
765,
18,
5831,
422,
4178,
369,
765,
18,
5535,
3375,
51,
30,
468,
490,
69,
351,
83,
17,
12524,
3478,
358,
326,
6484,
2552,
8292,
429,
67,
1214,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
394,
12,
2890,
4672,
309,
4178,
369,
765,
18,
5831,
422,
4178,
369,
765,
18,
5535,
3375,
51,
30,
468,
490,
69,
351,
83,
17,
12524,
3478,
358,
326,
6484,
2552,
8292,
429,
67,
1214,
82... | |
def __init__(self, parent, inspector, model, compPal, companionClass, dataView): | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): | def __init__(self, parent, inspector, model, compPal, companionClass, dataView): args = self.setupArgs(model.main, model.mainConstr.params, ['parent', 'id'], parent, companionClass, model.specialAttrs) if model.modelIdentifier == 'Dialog': style = wxRESIZE_BORDER | wxCAPTION | wxSYSTEM_MENU else: style = wxDEFAULT_FRAME_STYLE wxFrame.__init__(self, parent, -1, args.get('title', ''), args.get('pos', wxPyDefaultPosition), args.get('size', wxPyDefaultSize), style=style) InspectableObjectView.__init__(self, inspector, model, compPal) | 1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/1b381dc89a6f0969a6f082aa071d7cd58eb3cc3f/Designer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
22700,
16,
938,
16,
1161,
14320,
16,
1161,
304,
285,
797,
16,
501,
1767,
4672,
833,
273,
365,
18,
8401,
2615,
12,
2284,
18,
5254,
16,
938,
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,
1001,
2738,
972,
12,
2890,
16,
982,
16,
22700,
16,
938,
16,
1161,
14320,
16,
1161,
304,
285,
797,
16,
501,
1767,
4672,
833,
273,
365,
18,
8401,
2615,
12,
2284,
18,
5254,
16,
938,
18,... |
self.interface = dbus.Interface(dbus.SessionBus().get_object('org.gajim.dbus', '/org/gajim/dbus/RemoteObject'), 'org.gajim.dbus.RemoteInterface') | self.interface = dbus.Interface(dbus.SessionBus().get_object('org.gajim.dbus', '/org/gajim/dbus/RemoteObject'), 'org.gajim.dbus.RemoteInterface') self.current = '' | def __init__(self): try: self.accounts = config.get('plugins', self.c_accounts).split() except: self.accounts = [] config.set('plugins', self.c_accounts, join(self.accounts)) | d57aa4a777cfcfe18cb9cedff8cf760d5ec3651c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/d57aa4a777cfcfe18cb9cedff8cf760d5ec3651c/gajim_status.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
775,
30,
365,
18,
13739,
273,
642,
18,
588,
2668,
8057,
2187,
365,
18,
71,
67,
13739,
2934,
4939,
1435,
1335,
30,
365,
18,
13739,
273,
5378,
642,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
775,
30,
365,
18,
13739,
273,
642,
18,
588,
2668,
8057,
2187,
365,
18,
71,
67,
13739,
2934,
4939,
1435,
1335,
30,
365,
18,
13739,
273,
5378,
642,
18,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.