rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if isinstance(i, int) and isinstance(j, int): | if isintlike(i) and isintlike(j): | def __setitem__(self, key, value): try: assert len(key) == 2 except (AssertionError, TypeError): raise TypeError, "index must be a pair of integers, slices, or" \ " sequences" i, j = key | 1b4d620ba0b6a4971bb8e328ef4ed29cb29759a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/1b4d620ba0b6a4971bb8e328ef4ed29cb29759a7/sparse.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
775,
30,
1815,
562,
12,
856,
13,
422,
576,
1335,
261,
14979,
668,
16,
3580,
4672,
1002,
3580,
16,
315,
1615,
1297,
506,
279,
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,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1726,
972,
12,
2890,
16,
498,
16,
460,
4672,
775,
30,
1815,
562,
12,
856,
13,
422,
576,
1335,
261,
14979,
668,
16,
3580,
4672,
1002,
3580,
16,
315,
1615,
1297,
506,
279,
3... |
def _main(): | def _main(args): | def _main(): targets = [] # Enable deprecated warnings by default. SCons.Warnings._warningOut = _scons_internal_warning SCons.Warnings.enableWarningClass(SCons.Warnings.DeprecatedWarning) SCons.Warnings.enableWarningClass(SCons.Warnings.CorruptSConsignWarning) all_args = sys.argv[1:] try: all_args = string.split(os.environ['SCONSFLAGS']) + all_args except KeyError: # it's OK if there's no SCONSFLAGS pass parser = OptParser() global options, ssoptions options, args = parser.parse_args(all_args) ssoptions = SConscriptSettableOptions(options) if options.help_msg: def raisePrintHelp(text): raise PrintHelp, text SCons.Script.SConscript.HelpFunction = raisePrintHelp _set_globals(options) SCons.Node.implicit_cache = options.implicit_cache SCons.Node.implicit_deps_changed = options.implicit_deps_changed SCons.Node.implicit_deps_unchanged = options.implicit_deps_unchanged if options.warn: _setup_warn(options.warn) if options.noexec: SCons.SConf.dryrun = 1 SCons.Action.execute_actions = None CleanTask.execute = CleanTask.show if options.question: SCons.SConf.dryrun = 1 if options.no_progress or options.silent: display.set_mode(0) if options.silent: SCons.Action.print_actions = None if options.cache_disable: def disable(self): pass SCons.Node.FS.default_fs.CacheDir = disable if options.cache_force: SCons.Node.FS.default_fs.cache_force = 1 if options.cache_show: SCons.Node.FS.default_fs.cache_show = 1 if options.directory: cdir = _create_path(options.directory) try: os.chdir(cdir) except: sys.stderr.write("Could not change directory to %s\n" % cdir) xmit_args = [] for a in args: if '=' in a: xmit_args.append(a) else: targets.append(a) SCons.Script.SConscript._scons_add_args(xmit_args) target_top = None if options.climb_up: target_top = '.' # directory to prepend to targets script_dir = os.getcwd() # location of script while script_dir and not _SConstruct_exists(script_dir): script_dir, last_part = os.path.split(script_dir) if last_part: target_top = os.path.join(last_part, target_top) else: script_dir = '' if script_dir: display("scons: Entering directory `%s'" % script_dir) os.chdir(script_dir) else: raise SCons.Errors.UserError, "No SConstruct file found." SCons.Node.FS.default_fs.set_toplevel_dir(os.getcwd()) # Now that the top-level directory has been set, # we can initialize the default Environment. SCons.Defaults._default_env = SCons.Environment.Environment() scripts = [] if options.file: scripts.extend(options.file) if not scripts: sfile = _SConstruct_exists() if sfile: scripts.append(sfile) if options.help_msg: if not scripts: # There's no SConstruct, but they specified -h. # Give them the options usage now, before we fail # trying to read a non-existent SConstruct file. parser.print_help() sys.exit(0) SCons.Script.SConscript.print_help = 1 if not scripts: raise SCons.Errors.UserError, "No SConstruct file found." if scripts[0] == "-": d = SCons.Node.FS.default_fs.getcwd() else: d = SCons.Node.FS.default_fs.File(scripts[0]).dir SCons.Node.FS.default_fs.set_SConstruct_dir(d) class Unbuffered: def __init__(self, file): self.file = file def write(self, arg): self.file.write(arg) self.file.flush() def __getattr__(self, attr): return getattr(self.file, attr) sys.stdout = Unbuffered(sys.stdout) if options.include_dir: sys.path = options.include_dir + sys.path global repositories for rep in repositories: SCons.Node.FS.default_fs.Repository(rep) display("scons: Reading SConscript files ...") try: start_time = time.time() try: for script in scripts: SCons.Script.SConscript.SConscript(script) except SCons.Errors.StopError, e: # We had problems reading an SConscript file, such as it # couldn't be copied in to the BuildDir. Since we're just # reading SConscript files and haven't started building # things yet, stop regardless of whether they used -i or -k # or anything else, but don't say "Stop." on the message. global exit_status sys.stderr.write("scons: *** %s\n" % e) exit_status = 2 sys.exit(exit_status) global sconscript_time sconscript_time = time.time() - start_time except PrintHelp, text: display("scons: done reading SConscript files.") print text print "Use scons -H for help about command-line options." sys.exit(0) display("scons: done reading SConscript files.") SCons.Node.FS.default_fs.chdir(SCons.Node.FS.default_fs.Top) if options.help_msg: # They specified -h, but there was no Help() inside the # SConscript files. Give them the options usage. parser.print_help(sys.stdout) sys.exit(0) # Now that we've read the SConscripts we can set the options # that are SConscript settable: SCons.Node.implicit_cache = ssoptions.get('implicit_cache') lookup_top = None if targets: # They specified targets on the command line, so if they # used -u, -U or -D, we have to look up targets relative # to the top, but we build whatever they specified. if target_top: lookup_top = SCons.Node.FS.default_fs.Dir(target_top) target_top = None else: # There are no targets specified on the command line, # so if they used -u, -U or -D, we may have to restrict # what actually gets built. if target_top: if options.climb_up == 1: # -u, local directory and below target_top = SCons.Node.FS.default_fs.Dir(target_top) lookup_top = target_top elif options.climb_up == 2: # -D, all Default() targets target_top = None lookup_top = None elif options.climb_up == 3: # -U, local SConscript Default() targets target_top = SCons.Node.FS.default_fs.Dir(target_top) def check_dir(x, target_top=target_top): if hasattr(x, 'cwd') and not x.cwd is None: cwd = x.cwd.srcnode() return cwd == target_top else: # x doesn't have a cwd, so it's either not a target, # or not a file, so go ahead and keep it as a default # target and let the engine sort it out: return 1 default_targets = SCons.Script.SConscript.default_targets if default_targets is None: default_targets = [] else: default_targets = filter(check_dir, default_targets) SCons.Script.SConscript.default_targets = default_targets target_top = None lookup_top = None targets = SCons.Script.SConscript.default_targets if targets is None: targets = [SCons.Node.FS.default_fs.Dir('.')] if not targets: sys.stderr.write("scons: *** No targets specified and no Default() targets found. Stop.\n") sys.exit(2) def Entry(x, ltop=lookup_top, ttop=target_top): if isinstance(x, SCons.Node.Node): node = x else: node = SCons.Node.Alias.default_ans.lookup(x) if node is None: node = SCons.Node.FS.default_fs.Entry(x, directory = ltop, create = 1) if ttop and not node.is_under(ttop): if isinstance(node, SCons.Node.FS.Dir) and ttop.is_under(node): node = ttop else: node = None return node nodes = filter(lambda x: x is not None, map(Entry, targets)) calc = None task_class = BuildTask # default action is to build targets opening_message = "Building targets ..." closing_message = "done building targets." if options.question: task_class = QuestionTask try: if ssoptions.get('clean'): task_class = CleanTask class CleanCalculator: def bsig(self, node): return None def csig(self, node): return None def current(self, node, sig): return 0 def write(self): pass calc = CleanCalculator() opening_message = "Cleaning targets ..." closing_message = "done cleaning targets." except AttributeError: pass if not calc: SCons.Sig.default_calc = SCons.Sig.Calculator(module=sig_module, max_drift=ssoptions.get('max_drift')) calc = SCons.Sig.default_calc if options.random: def order(dependencies): """Randomize the dependencies.""" # This is cribbed from the implementation of # random.shuffle() in Python 2.X. d = dependencies for i in xrange(len(d)-1, 0, -1): j = int(random.random() * (i+1)) d[i], d[j] = d[j], d[i] return d else: def order(dependencies): """Leave the order of dependencies alone.""" return dependencies display("scons: " + opening_message) taskmaster = SCons.Taskmaster.Taskmaster(nodes, task_class, calc, order) jobs = SCons.Job.Jobs(ssoptions.get('num_jobs'), taskmaster) try: jobs.run() finally: display("scons: " + closing_message) if not options.noexec: SCons.Sig.write() | da3d9312c1b3791e0f56bef9dddc09c783c40443 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12817/da3d9312c1b3791e0f56bef9dddc09c783c40443/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
12,
1968,
4672,
5774,
273,
5378,
225,
468,
9677,
6849,
5599,
635,
805,
18,
20487,
18,
4312,
6315,
8551,
1182,
273,
389,
87,
8559,
67,
7236,
67,
8551,
20487,
18,
4312,
18,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
5254,
12,
1968,
4672,
5774,
273,
5378,
225,
468,
9677,
6849,
5599,
635,
805,
18,
20487,
18,
4312,
6315,
8551,
1182,
273,
389,
87,
8559,
67,
7236,
67,
8551,
20487,
18,
4312,
18,
75... |
countryname = code2name(value) | if value: countryname = code2name(value) else: countryname = "World" | def OnTooltip(self, widget, x, y, keyboard_mode, tooltip): try: (incorrectpath, column, cx, cy) = widget.get_path_at_pos(x, y) # the returned path is not correct since it calculates it pretending there's no header! (path, droppos) = widget.get_dest_row_at_pos(x, y) # the return path of this func is okay, but we also need to column name -_- except TypeError: # Either function returned None return False title = column.get_title() if (title != "Country"): return False model = widget.get_model() iter = model.get_iter(path) value = model.get_value(iter, 8) if not value.startswith('flag_'): tooltip.set_text(_("Unknown")) return True value = value[5:] countryname = code2name(value) if not countryname: if value: countryname = "Unknown (%s)" % (value) else: countryname = "World" tooltip.set_text(_(countryname)) return True | 4c837c14bdbf9ab5a3e03df3e7eb6208e6898099 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/4c837c14bdbf9ab5a3e03df3e7eb6208e6898099/chatrooms.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
22444,
12,
2890,
16,
3604,
16,
619,
16,
677,
16,
16263,
67,
3188,
16,
11915,
4672,
775,
30,
261,
267,
6746,
803,
16,
1057,
16,
9494,
16,
6143,
13,
273,
3604,
18,
588,
67,
803,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
22444,
12,
2890,
16,
3604,
16,
619,
16,
677,
16,
16263,
67,
3188,
16,
11915,
4672,
775,
30,
261,
267,
6746,
803,
16,
1057,
16,
9494,
16,
6143,
13,
273,
3604,
18,
588,
67,
803,
... |
query="select file.location, element.li_name, substr(element.name, 0, 2) as etype, element.name, element.file_id, element.reference_file_id from element, file where element.file_id=file.id and element.type in ('ID','IM') and element.reference_file_id=? and etype in ("+nFilter+");" | query="select file.location, element.li_name, substr(element.name, 1, 2) as etype, element.name, element.file_id, element.reference_file_id from element, file where element.file_id=file.id and element.type in ('ID','IM') and element.reference_file_id=? and etype in ("+nFilter+");" | def queryDependancyUsed(productionId, fileId, filter): connection = sqlite3.connect(settings.SQLITE3_CONNECTIONURL) todo=[fileId] done=[] result = [] if filter=="all": query="select file.location, element.li_name, substr(element.name, 0, 2) as etype, element.name, element.file_id, element.reference_file_id from element, file where element.file_id=file.id and element.type in ('ID','IM') and element.reference_file_id=?;" else: f=[] for t in filter.split(","): f.append("'"+t+"'") nFilter = ",".join(f) query="select file.location, element.li_name, substr(element.name, 0, 2) as etype, element.name, element.file_id, element.reference_file_id from element, file where element.file_id=file.id and element.type in ('ID','IM') and element.reference_file_id=? and etype in ("+nFilter+");" while len(todo)!=0: item = todo.pop() if item not in done: done.append(item) for line in connection.execute(query, [item]).fetchall(): result.append(line) if line[4]!= None: todo.append(line[4]) connection.close() return result | fcf005804af38f0418292d95f06959889eeed301 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4259/fcf005804af38f0418292d95f06959889eeed301/indexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
4584,
12514,
6668,
12,
17273,
548,
16,
21223,
16,
1034,
4672,
1459,
273,
16184,
23,
18,
3612,
12,
4272,
18,
3997,
5398,
23,
67,
15461,
1785,
13,
10621,
22850,
768,
548,
65,
2731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
4584,
12514,
6668,
12,
17273,
548,
16,
21223,
16,
1034,
4672,
1459,
273,
16184,
23,
18,
3612,
12,
4272,
18,
3997,
5398,
23,
67,
15461,
1785,
13,
10621,
22850,
768,
548,
65,
2731,
... |
defines=['PYTHON'] | defines=[('PYTHON', None), ('JCC_VER', '"%s"' %(JCC_VER))] if shared: defines.append(('_jcc_shared', None)) if generics: defines.append(('_java_generics', None)) | def copytree(src, dst): _dst = os.path.join(modulePath, dst) if not os.path.exists(_dst): os.mkdir(_dst) for name in os.listdir(src): if name.startswith('.'): continue _src = os.path.join(src, name) if os.path.islink(_src): continue _dst = os.path.join(dst, name) if os.path.isdir(_src): copytree(_src, _dst) elif name.endswith('.h'): shutil.copy2(_src, os.path.join(modulePath, _dst)) package_data.append(_dst) | 61843d9a9cce183ba02715de415c209d69781d25 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6913/61843d9a9cce183ba02715de415c209d69781d25/python.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
3413,
12,
4816,
16,
3046,
4672,
389,
11057,
273,
1140,
18,
803,
18,
5701,
12,
2978,
743,
16,
3046,
13,
309,
486,
1140,
18,
803,
18,
1808,
24899,
11057,
4672,
1140,
18,
26686,
248... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
3413,
12,
4816,
16,
3046,
4672,
389,
11057,
273,
1140,
18,
803,
18,
5701,
12,
2978,
743,
16,
3046,
13,
309,
486,
1140,
18,
803,
18,
1808,
24899,
11057,
4672,
1140,
18,
26686,
248... |
""" propMgr.torqueDblSpinBox.setToolTip("Motor Torque") propMgr.initialSpeedDblSpinBox.setToolTip("Initial Speed") propMgr.finalSpeedDblSpinBox.setToolTip("Final Speed") propMgr.dampersCheckBox.setToolTip("Turn Motor Dampers ON/OFF") propMgr.enableMinimizeCheckBox.setToolTip("Motor is Enabled During" \ " Minimizations") propMgr.motorLengthDblSpinBox.setToolTip("Set Motor Length") propMgr.motorRadiusDblSpinBox.setToolTip("Set Motor Radius") propMgr.spokeRadiusDblSpinBox.setToolTip("Set Spoke Radius") propMgr.colorPushButton.setToolTip("Change Color") propMgr.directionPushButton.setToolTip("Rotation Direction") | """ propMgr.torqueDblSpinBox.setToolTip("Motor Torque") propMgr.initialSpeedDblSpinBox.setToolTip("Initial Speed") propMgr.finalSpeedDblSpinBox.setToolTip("Final Speed") propMgr.dampersCheckBox.setToolTip("Turn Motor Dampers ON/OFF") propMgr.enableMinimizeCheckBox.setToolTip("Motor is Enabled During" \ " Minimizations") propMgr.motorLengthDblSpinBox.setToolTip("Set Motor Length") propMgr.motorRadiusDblSpinBox.setToolTip("Set Motor Radius") propMgr.spokeRadiusDblSpinBox.setToolTip("Set Spoke Radius") propMgr.colorPushButton.setToolTip("Change Color") propMgr.directionPushButton.setToolTip("Rotation Direction") | def ToolTip_RotaryMotorPropertyManager(propMgr): """ "Tool Tip" text for widgets in the Rotary Motor Property Manager. """ propMgr.torqueDblSpinBox.setToolTip("Motor Torque") propMgr.initialSpeedDblSpinBox.setToolTip("Initial Speed") propMgr.finalSpeedDblSpinBox.setToolTip("Final Speed") propMgr.dampersCheckBox.setToolTip("Turn Motor Dampers ON/OFF") propMgr.enableMinimizeCheckBox.setToolTip("Motor is Enabled During" \ " Minimizations") propMgr.motorLengthDblSpinBox.setToolTip("Set Motor Length") propMgr.motorRadiusDblSpinBox.setToolTip("Set Motor Radius") propMgr.spokeRadiusDblSpinBox.setToolTip("Set Spoke Radius") propMgr.colorPushButton.setToolTip("Change Color") propMgr.directionPushButton.setToolTip("Rotation Direction") | 9c3c780e56c266de82da2a27442682db6ea4acab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/9c3c780e56c266de82da2a27442682db6ea4acab/ToolTipText_for_PropertyManagers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13288,
14189,
67,
8570,
814,
24749,
280,
1396,
1318,
12,
5986,
9455,
4672,
225,
3536,
315,
6364,
399,
625,
6,
977,
364,
10965,
316,
326,
15697,
814,
490,
352,
280,
4276,
8558,
18,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13288,
14189,
67,
8570,
814,
24749,
280,
1396,
1318,
12,
5986,
9455,
4672,
225,
3536,
315,
6364,
399,
625,
6,
977,
364,
10965,
316,
326,
15697,
814,
490,
352,
280,
4276,
8558,
18,
3536,
... |
sels = getElementsByTagName(self.domElement, XMI.PSEUDOSTATE, recursive=1) | sels = getElementsByTagName(self.domElement, XMI.PSEUDOSTATE, recursive=1) log.debug("Found %s pseudo states (like initial states).", len(sels)) | def buildStates(self): sels = getElementsByTagName(self.domElement, XMI.SIMPLESTATE, recursive=1) for sel in sels: state = XMIState(sel) self.addState(state) | 1a739b3ca3427e4a12eb2891f1d295cbfe5114b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/1a739b3ca3427e4a12eb2891f1d295cbfe5114b0/XMIParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
7629,
12,
2890,
4672,
357,
87,
273,
11034,
12,
2890,
18,
9859,
1046,
16,
1139,
7492,
18,
31669,
900,
7998,
16,
5904,
33,
21,
13,
364,
357,
316,
357,
87,
30,
919,
273,
1139,
749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1361,
7629,
12,
2890,
4672,
357,
87,
273,
11034,
12,
2890,
18,
9859,
1046,
16,
1139,
7492,
18,
31669,
900,
7998,
16,
5904,
33,
21,
13,
364,
357,
316,
357,
87,
30,
919,
273,
1139,
749... |
klass->tp_new(klass, args, NULL). Used by explain_pickle. | klass->tp_new(klass, args, NULL). Used by ``explain_pickle``. | def unpickle_newobj(klass, args): r""" Create a new object; this corresponds to the C code klass->tp_new(klass, args, NULL). Used by explain_pickle. EXAMPLES: sage: unpickle_newobj(tuple, ([1, 2, 3],)) (1, 2, 3) """ # We need to call klass->tp_new(klass, args, NULL). # This is almost but not quite the same as klass.__new__(klass, *args). # (I don't know exactly what the difference is, but when you try # to unpickle a Sequence, cPickle -- which uses the former -- works, # and pickle.py -- which uses the latter -- fails, with # TypeError: sage.structure.sage_object.SageObject.__new__(Sequence) is not safe, use list.__new__() # ) # It seems unlikely that you can implement this from pure-Python code -- # somewhat disturbingly, it actually is possible. This shows how. # (Using Cython would also work, of course; but this is cooler, and # probably simpler.) # This pickle is: load persistent object 0, load persistent object 1, # NEWOBJ, STOP. pickle = "P0\nP1\n\x81." pers = [klass, args] pers_load = lambda id: pers[int(id)] from cStringIO import StringIO import cPickle unp = cPickle.Unpickler(StringIO(pickle)) unp.persistent_load = pers_load return unp.load() | 3bed29c45c1270055cd235e22fd02f632971b39e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3bed29c45c1270055cd235e22fd02f632971b39e/explain_pickle.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
20847,
67,
2704,
2603,
12,
22626,
16,
833,
4672,
436,
8395,
1788,
279,
394,
733,
31,
333,
13955,
358,
326,
385,
981,
7352,
2122,
6834,
67,
2704,
12,
22626,
16,
833,
16,
3206,
2934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
20847,
67,
2704,
2603,
12,
22626,
16,
833,
4672,
436,
8395,
1788,
279,
394,
733,
31,
333,
13955,
358,
326,
385,
981,
7352,
2122,
6834,
67,
2704,
12,
22626,
16,
833,
16,
3206,
2934... |
my_stdin=file(redirectin, 'r') p = subprocess.Popen([cmd]+args, stdin=my_stdin, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) try: output = SuckOutputWithTimeout(p.stdout, timeout) except ReadTimeoutException: sys.stdout.write('%s[Error: Timed out executing program %s/%s'% (futuretest, localdir, execname)) if not onlyone: sys.stdout.write(' %s %s (%s %s) (%d-%d)'% (' '.join(globalExecopts), execopts, ' '.join(globalCompopts),compopts, compoptsnum, execoptsnum)) sys.stdout.write(']\n') kill_proc(p, killtimeout) continue | if useTimedExec: wholecmd = cmd+' '+' '.join(map(ShellEscape, args))+' < '+redirectin p = subprocess.Popen([timedexec, str(timeout), wholecmd], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) output = p.communicate()[0] status = p.returncode if status == 222: sys.stdout.write('%s[Error: Timed out executing program %s/%s'% (futuretest, localdir, execname)) if not onlyone: sys.stdout.write(' %s %s (%s %s) (%d-%d)'% (' '.join(globalExecopts), execopts, ' '.join(globalCompopts),compopts, compoptsnum, execoptsnum)) sys.stdout.write(']\n') continue | def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return | 97dd26e665e2ca235f4c8596da4b25c90663de32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/97dd26e665e2ca235f4c8596da4b25c90663de32/sub_test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
67,
9381,
12,
84,
16,
2021,
4672,
417,
273,
6652,
18,
52,
3190,
12,
3292,
16418,
2187,
701,
12,
84,
18,
6610,
13,
5717,
417,
18,
7048,
1435,
2037,
273,
813,
18,
957,
1435,
679,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8673,
67,
9381,
12,
84,
16,
2021,
4672,
417,
273,
6652,
18,
52,
3190,
12,
3292,
16418,
2187,
701,
12,
84,
18,
6610,
13,
5717,
417,
18,
7048,
1435,
2037,
273,
813,
18,
957,
1435,
679,... |
def start (self, flag=None): | def start(self, flag=None): | def start (self, flag=None): self.flag = flag threading.Thread.start(self) | cb62a4cb12d8f0f9904d111d93c76ea857434a52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/cb62a4cb12d8f0f9904d111d93c76ea857434a52/test_ssl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
16,
2982,
33,
7036,
4672,
365,
18,
6420,
273,
2982,
17254,
18,
3830,
18,
1937,
12,
2890,
13,
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,
1652,
787,
12,
2890,
16,
2982,
33,
7036,
4672,
365,
18,
6420,
273,
2982,
17254,
18,
3830,
18,
1937,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return False | return False | def _poolJobs(self, db_name, check=False): try: db, pool = pooler.get_db_and_pool(db_name) except: return False | 9174672fb432f24bc683fb83a1ffb1c9921a1012 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/9174672fb432f24bc683fb83a1ffb1c9921a1012/ir_cron.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
6011,
7276,
12,
2890,
16,
1319,
67,
529,
16,
866,
33,
8381,
4672,
775,
30,
1319,
16,
2845,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
1966,
67,
529,
13,
1335,
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,
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,
6011,
7276,
12,
2890,
16,
1319,
67,
529,
16,
866,
33,
8381,
4672,
775,
30,
1319,
16,
2845,
273,
2845,
264,
18,
588,
67,
1966,
67,
464,
67,
6011,
12,
1966,
67,
529,
13,
1335,
3... |
__contains__ = has_key | def __contains__(self, key): return self.has_key(key) | def has_key(self, key): try: value = self[key] except KeyError: return False return True | 66d3f09e20346de3661e86f482ad29aec2b684a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66d3f09e20346de3661e86f482ad29aec2b684a4/UserDict.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
856,
12,
2890,
16,
498,
4672,
775,
30,
460,
273,
365,
63,
856,
65,
1335,
4999,
30,
327,
1083,
327,
1053,
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,
711,
67,
856,
12,
2890,
16,
498,
4672,
775,
30,
460,
273,
365,
63,
856,
65,
1335,
4999,
30,
327,
1083,
327,
1053,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
query = {} | query = [] | def build_url(self, url=None, preserve=[], **kw): """ Builds and returns a new url from the one we are now. Preserves only the query parameters that start with any of the specified prefixes in the 'preserve' argument. The keywords argument is used to add or modify query parameters. """ if url is None: url = self.uri.path[-1] | bec8115126ab6888f08f64aed5b911f83af1f850 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/bec8115126ab6888f08f64aed5b911f83af1f850/Request.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
718,
12,
2890,
16,
880,
33,
7036,
16,
9420,
22850,
6487,
2826,
9987,
4672,
3536,
3998,
87,
471,
1135,
279,
394,
880,
628,
326,
1245,
732,
854,
2037,
18,
18346,
264,
3324,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
718,
12,
2890,
16,
880,
33,
7036,
16,
9420,
22850,
6487,
2826,
9987,
4672,
3536,
3998,
87,
471,
1135,
279,
394,
880,
628,
326,
1245,
732,
854,
2037,
18,
18346,
264,
3324,
133... |
def getDeserializer( self, identifier ): type_qname = self.type_qname; return "%(identifier)s = new %(type_qname)s(); %(identifier)s.deserialize( buf );" % locals() | def getDeserializer( self, identifier ): type_qname = self.type_qname; return "%(identifier)s = new %(type_qname)s(); %(identifier)s.deserialize( buf );" % locals() def getMemberDeserializers( self, members=None ): return "\n".join( [INDENT_SPACES * 2 + member_type_traits.getDeserializer( member.identifier ) for member, member_type_traits in self._getMemberTypeTraits( members )] ) def getMemberSerializers( self, members=None ): return "\n".join( [INDENT_SPACES * 2 + member_type_traits.getSerializer( member.identifier ) for member, member_type_traits in self._getMemberTypeTraits( members )] ) def getMemberSizes( self, members=None ): return "\n".join( [INDENT_SPACES * 2 + "my_size += " + member_type_traits.getSize( member.identifier ) + ";" for member, member_type_traits in self._getMemberTypeTraits( members )] ) | def getDeserializer( self, identifier ): type_qname = self.type_qname; return "%(identifier)s = new %(type_qname)s(); %(identifier)s.deserialize( buf );" % locals() | a13e3312e87896dc80e92179d58f5b4755689053 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7199/a13e3312e87896dc80e92179d58f5b4755689053/generate_xtreemfs_java.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
281,
31838,
12,
365,
16,
2756,
262,
30,
618,
67,
85,
529,
273,
365,
18,
723,
67,
85,
529,
31,
327,
22061,
5644,
13,
87,
273,
394,
8975,
723,
67,
85,
529,
13,
87,
5621,
8975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
281,
31838,
12,
365,
16,
2756,
262,
30,
618,
67,
85,
529,
273,
365,
18,
723,
67,
85,
529,
31,
327,
22061,
5644,
13,
87,
273,
394,
8975,
723,
67,
85,
529,
13,
87,
5621,
8975,
... |
print "\nThe registered VOs with no recent activity are:\n"+prettyList(emptyVO) | print "\nActive VOs with no recent activity are:\n"+prettyList(emptyVO) | def NonReportingSites( when = datetime.date.today(), output = "text", header = True): print "This report indicates which sites Gratia has heard from or have known activity\nsince %s (midnight UTC)\n" % ( DateToString(when,False) ) allSites = GetListOfOSGSites(); regVOs = GetListOfRegisteredVO('Active',when,datetime.date.today()) exceptionSites = ['AGLT2_CE_2','BNL-LCG2', 'BNL_LOCAL', 'BNL_OSG', 'BNL_PANDA', 'GLOW-CMS', 'UCSDT2-B', 'Purdue-Lear' ] allSites = [name for name in allSites if name not in exceptionSites] reportingVOs = GetLastReportingVOs(when) reportingSitesDate = GetSiteLastReportingDate(when,True) stoppedSitesDate = GetSiteLastReportingDate(when,False) activitySitesDate = GetSiteLastActivity(when); reportingSites = [] stoppedSites = [] dates = {} for data in reportingSitesDate: (name,lastreport) = data.split("\t") reportingSites.append(name) dates[name] = lastreport for data in stoppedSitesDate: (name,lastreport) = data.split("\t") dates[name] = lastreport stoppedSites.append(name); stoppedSites = [name for name in stoppedSites if name in allSites] missingSites = [name for name in allSites if name not in reportingSites and name not in stoppedSites] extraSites = [name for name in reportingSites if name not in allSites] knownExtras = [name for name in extraSites if name in exceptionSites] extraSites = [name for name in extraSites if name not in exceptionSites] #print allSites #print reportingSites #print missingSites #print extraSites print "As of "+DateToString(datetime.date.today(),False) +", there are "+prettyInt(len(allSites))+" registered OSG sites" n = len(reportingSites) ne = len(knownExtras); print prettyInt(n)+" sites reported (including "+prettyInt(ne)+" sanctioned non registered sites)\n" n = len(reportingSites)-len(extraSites)-len(knownExtras) print prettyInt(n)+" registered sites reported ("+niceNum(n*100/len(allSites),1)+"% of OSG Sites)" n = len(stoppedSites) print prettyInt(n)+" registered sites have stopped reporting ("+niceNum(n*100/len(allSites),1)+"% of OSG Sites)" n = len(missingSites); print prettyInt(n)+" registered sites have never reported ("+niceNum(n*100/len(allSites),1)+"% of OSG Sites)" print n = len(extraSites); print prettyInt(n)+" non-sanctioned non-registered sites reported (might indicate a discrepancy between OIM and Gratia)" n = len(knownExtras); print prettyInt(n)+" sanctioned non-registered sites reported" #print "\nThe reporting sites are:\n"+prettyList(reportingSites) #print "\nThe registered sites are:\n"+prettyList(allSites) print "\nThe sanctioned non registered sites are: \n"+prettyList(knownExtras) print "\nThe non registered sites are: \n"+prettyList(extraSites) #expectedNoActivity = ['sdss'] expectedNoActivity = GetListOfRegisteredVO('Disabled',when,datetime.date.today()) expectedNoActivity.extend(GetListOfRegisteredVO('Enabled',when,datetime.date.today())) emptyVO = [name for name in regVOs if name not in reportingVOs and name not in expectedNoActivity] nonregVO = [name for name in reportingVOs if name not in regVOs] print "\nThe registered VOs with no recent activity are:\n"+prettyList(emptyVO) print "\nThe following VOs are expected to have no activity:\n"+prettyList([name for name in expectedNoActivity if name not in reportingVOs]) print "\nThe non-registered VOs with recent activity are:\n"+prettyList(nonregVO) print "\nThe non reporting sites are: " # \n"+prettyList(missingSites) for name in missingSites: if len(name)>15: delim = "\t" else: delim = "\t\t" if not dates.has_key(name): print name+" :"+delim+"never reported or inactive" for data in stoppedSitesDate: (name,lastreport) = data.split("\t") if name in allSites: if len(name)>15: delim = "\t" else: delim = "\t\t" print name+":"+delim+lastreport print "\nThe sites with no (known) recent activity:" for data in activitySitesDate: (name,lastreport) = data.split("\t") if name in allSites: if len(name)>=14: delim = "\t" if len(name)>=7: delim = "\t\t" else: delim = "\t\t\t" print name+":"+delim+lastreport return missingSites | af03d402d6cfcc42f1869ad0a0204f10f1b5dc1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/af03d402d6cfcc42f1869ad0a0204f10f1b5dc1f/AccountingReports.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3858,
29285,
17055,
12,
1347,
273,
3314,
18,
712,
18,
30064,
9334,
876,
273,
315,
955,
3113,
1446,
273,
1053,
4672,
225,
1172,
315,
2503,
2605,
8527,
1492,
9180,
611,
17048,
1155,
711,
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,
3858,
29285,
17055,
12,
1347,
273,
3314,
18,
712,
18,
30064,
9334,
876,
273,
315,
955,
3113,
1446,
273,
1053,
4672,
225,
1172,
315,
2503,
2605,
8527,
1492,
9180,
611,
17048,
1155,
711,
3... |
self.cr.deleteObjectLocation(self, self.parentId, self.zoneId) | if self.cr: self.cr.deleteObjectLocation(self, self.parentId, self.zoneId) | def _deactivate(self): # after this is called, the object is no longer an active DistributedObject # and it may be placed in the cache self.__callbacks = {} self.cr.closeAutoInterests(self) self.setLocation(0,0) self.cr.deleteObjectLocation(self, self.parentId, self.zoneId) | 71a791763907322599f63d6a847c68140508013a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7242/71a791763907322599f63d6a847c68140508013a/DistributedObject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
323,
10014,
12,
2890,
4672,
468,
1839,
333,
353,
2566,
16,
326,
733,
353,
1158,
7144,
392,
2695,
27877,
921,
468,
471,
518,
2026,
506,
15235,
316,
326,
1247,
365,
16186,
13316,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
323,
10014,
12,
2890,
4672,
468,
1839,
333,
353,
2566,
16,
326,
733,
353,
1158,
7144,
392,
2695,
27877,
921,
468,
471,
518,
2026,
506,
15235,
316,
326,
1247,
365,
16186,
13316,
273,... |
'test_minimize_0008', 'test_heteroatom_organics_ADAM_NH2_Cs', 'test_heteroatom_organics_CH3AlHCH3', | def run(self): import sim lac = LengthAngleComparison(self.base + ".mmp") s = sim.Minimize(self.base + ".mmp") s.Temperature = 300 s.go() lac.compare(self.base + ".xyz", self.base + ".xyzcmp", LENGTH_TOLERANCE, ANGLE_TOLERANCE) | 3f4a171b835422313ecc0171dd0ab652a7f6a1bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/3f4a171b835422313ecc0171dd0ab652a7f6a1bc/tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
3142,
328,
1077,
273,
11311,
8467,
16059,
12,
2890,
18,
1969,
397,
3552,
81,
1291,
7923,
272,
273,
3142,
18,
2930,
10153,
12,
2890,
18,
1969,
397,
3552,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
1930,
3142,
328,
1077,
273,
11311,
8467,
16059,
12,
2890,
18,
1969,
397,
3552,
81,
1291,
7923,
272,
273,
3142,
18,
2930,
10153,
12,
2890,
18,
1969,
397,
3552,
81,
... | |
def accept (self): | def accept(self): | def accept (self): # XXX can return either an address pair or None try: conn, addr = self.socket.accept() return conn, addr except socket.error, why: if why[0] == EWOULDBLOCK: pass else: raise socket.error, why | 52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
12,
2890,
4672,
468,
11329,
848,
327,
3344,
392,
1758,
3082,
578,
599,
775,
30,
1487,
16,
3091,
273,
365,
18,
7814,
18,
9436,
1435,
327,
1487,
16,
3091,
1335,
2987,
18,
1636,
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,
2791,
12,
2890,
4672,
468,
11329,
848,
327,
3344,
392,
1758,
3082,
578,
599,
775,
30,
1487,
16,
3091,
273,
365,
18,
7814,
18,
9436,
1435,
327,
1487,
16,
3091,
1335,
2987,
18,
1636,
16,... |
[2, 1.414213562373095?, 1.414213562373095?, 0, 0, -1.414213562373095?, -1.414213562373095?, -2] | [2, 1.4142135623..., 1.4142135623..., 0, 0, -1.4142135623..., -1.4142135623..., -2] | def spectrum(self, laplacian=False): r""" Returns a list of the eigenvalues of the adjacency matrix. | 8af82b9d918feff44e56cda049c0e66557eeaad3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/8af82b9d918feff44e56cda049c0e66557eeaad3/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17970,
12,
2890,
16,
7125,
30538,
2779,
33,
8381,
4672,
436,
8395,
2860,
279,
666,
434,
326,
29831,
434,
326,
25220,
3148,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
17970,
12,
2890,
16,
7125,
30538,
2779,
33,
8381,
4672,
436,
8395,
2860,
279,
666,
434,
326,
29831,
434,
326,
25220,
3148,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
if x is X[0]: G.add(Line(x[0], y.y1, x[0]+xdepth, y.y1+ydepth,strokeColor=c,strokeWidth=0.6*xdelta)) | def F(x,i, slope=slope, y0=y0): return float((x-x0)*slope[i]+y0[i]) | 2cfb7e5e5e4c9badc584470f8cd6377ed8788e4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/2cfb7e5e5e4c9badc584470f8cd6377ed8788e4f/utils3d.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
478,
12,
92,
16,
77,
16,
17543,
33,
30320,
16,
677,
20,
33,
93,
20,
4672,
327,
1431,
12443,
92,
17,
92,
20,
17653,
30320,
63,
77,
3737,
93,
20,
63,
77,
5717,
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,
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,
478,
12,
92,
16,
77,
16,
17543,
33,
30320,
16,
677,
20,
33,
93,
20,
4672,
327,
1431,
12443,
92,
17,
92,
20,
17653,
30320,
63,
77,
3737,
93,
20,
63,
77,
5717,
2,
-100,
-100,
-100,
... | |
""" Check whether 'str' contains ANY of the chars in 'set' """ | """Check whether 'str' contains ANY of the chars in 'set'""" | def containsAny(str, set): """ Check whether 'str' contains ANY of the chars in 'set' """ return 1 in [c in str for c in set] | dc647ccf72ad71943ee83c7782be158430a05a7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dc647ccf72ad71943ee83c7782be158430a05a7e/pygettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1914,
2961,
12,
701,
16,
444,
4672,
3536,
1564,
2856,
296,
701,
11,
1914,
16743,
434,
326,
5230,
316,
296,
542,
11,
8395,
327,
404,
316,
306,
71,
316,
609,
364,
276,
316,
444,
65,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1914,
2961,
12,
701,
16,
444,
4672,
3536,
1564,
2856,
296,
701,
11,
1914,
16743,
434,
326,
5230,
316,
296,
542,
11,
8395,
327,
404,
316,
306,
71,
316,
609,
364,
276,
316,
444,
65,
28... |
((721, 731), (270, 280)), ((735, 735), (281, 281)), ((761, 765), (284, 288)), ((769, 769), (290, 290)), ((773, 773), (291, 291)), ((776, 794), (292, 296)), ((797, 802), (297, 302)), ((824, 828), (305, 308)), ((832, 832), (310, 310)), ((834, 845), (311, 313)), ((860, 864), (316, 316)), ((878, 882), (319, 320)), ((885, 894), (322, 322)), ((896, 905), (323, 323)), ((922, 926), (326, 328)), ((930, 931), (330, 331)), ((935, 944), (332, 341)), ((962, 966), (344, 349)), ((980, 984), (352, 352)), ((986, 988), (354, 357)), ((991, 991), (359, 359)), ((997, 1007), (361, 361)), ((1008, 1010), (362, 365)), ((1023, 1023), (366, 366)), ((1027, 1027), (367, 367)), ((1031, 1031), (368, 368)), ((1051, 1055), (371, 373)), ((1058, 1071), (375, 377)), ((1074, 1076), (378, 380)), ((1080, 1087), (381, 388)), ((1091, 1094), (389, 392)), ((1116, 1120), (395, 397)), ((1123, 1142), (399, 402)), ((1145, 1145), (403, 403)), ((1149, 1152), (404, 407)), ((1156, 1161), (408, 413)), ((1183, 1187), (416, 418)), ((1201, 1205), (421, 425)), ((1208, 1227), (427, 431)), ((1229, 1248), (432, 436)), ((1251, 1251), (437, 437)), ((1255, 1255), (438, 438)), ((1259, 1259), (439, 439)), ((1283, 1287), (442, 448)), ((1291, 1291), (450, 450)), ((1295, 1295), (451, 451)), ((1299, 1300), (452, 453)), ((1304, 1316), (454, 466)), ((1319, 1332), (467, 468)), ((1334, 1350), (469, 472)), ((1353, 1354), (473, 474)), ((1358, 1358), (475, 475)), ((1362, 1365), (476, 479)), ((1397, 1401), (482, 486)), ((1405, 1405), (488, 488)), ((1408, 1427), (489, 493)), ((1429, 1442), (494, 495)), ((1445, 1445), (496, 496)), ((1449, 1449), (497, 497)), ((1473, 1477), (500, 504)), ((1480, 1499), (506, 510)), ((1502, 1502), (511, 511)), ((1520, 1524), (514, 518)), ((1528, 1528), (520, 520)), ((1532, 1532), (521, 521)), ((1535, 1554), (522, 526)), ((1556, 1575), (527, 531)), ((1578, 1586), (532, 542)), ((1610, 1614), (545, 549)), ((1618, 1618), (552, 552)), ((1622, 1622), (553, 553)), ((1625, 1644), (554, 558)), ((1647, 1652), (559, 564)), ((1674, 1678), (567, 569)), ((1682, 1689), (571, 578)), ((1705, 1709), (581, 585)), ((1713, 1715), (587, 589)), ((1718, 1730), (590, 591)), ((1747, 1751), (594, 599)), ((1755, 1757), (601, 603)), ((1760, 1772), (604, 605)), ((1789, 1793), (608, 610)), ((1797, 1798), (612, 613)), ((1814, 1818), (616, 617)), ((1822, 1842), (619, 639)), ((1846, 1846), (640, 640)), ((1864, 1868), (643, 644)), ((1882, 1886), (647, 648)), ((1890, 1893), (650, 653)), ((1897, 1903), (654, 660)), ((1921, 1925), (663, 667)), ((1929, 1929), (669, 669)), ((1931, 1942), (670, 672)), ((1957, 1961), (675, 679)), ((1965, 1966), (681, 682)), ((1970, 1970), (683, 683)), ((1974, 1984), (684, 694)), ((1988, 1990), (695, 697)), ((2012, 2016), (700, 704)), ((2020, 2021), (706, 707)), ((2025, 2025), (708, 708)), ((2029, 2041), (709, 721)), ((2045, 2054), (722, 731)), ((2076, 2080), (734, 739)), ((2084, 2084), (741, 741)), ((2088, 2095), (742, 749)), ((2113, 2117), (752, 760)), | ((721, 729), (270, 278)), ((733, 733), (279, 279)), ((759, 763), (282, 286)), ((767, 767), (288, 288)), ((771, 771), (289, 289)), ((774, 792), (290, 294)), ((795, 800), (295, 300)), ((822, 826), (303, 306)), ((830, 830), (308, 308)), ((832, 843), (309, 311)), ((858, 862), (314, 314)), ((876, 880), (317, 318)), ((883, 892), (320, 320)), ((894, 903), (321, 321)), ((920, 924), (324, 326)), ((928, 929), (328, 329)), ((933, 942), (330, 339)), ((960, 964), (342, 347)), ((978, 982), (350, 350)), ((984, 986), (352, 355)), ((989, 989), (357, 357)), ((995, 1005), (359, 359)), ((1006, 1008), (360, 363)), ((1021, 1021), (364, 364)), ((1025, 1025), (365, 365)), ((1029, 1029), (366, 366)), ((1049, 1053), (369, 371)), ((1056, 1069), (373, 375)), ((1072, 1074), (376, 378)), ((1078, 1085), (379, 386)), ((1089, 1092), (387, 390)), ((1114, 1118), (393, 395)), ((1121, 1140), (397, 400)), ((1143, 1143), (401, 401)), ((1147, 1150), (402, 405)), ((1154, 1159), (406, 411)), ((1181, 1185), (414, 416)), ((1199, 1203), (419, 423)), ((1206, 1225), (425, 429)), ((1227, 1246), (430, 434)), ((1249, 1249), (435, 435)), ((1253, 1253), (436, 436)), ((1257, 1257), (437, 437)), ((1281, 1285), (440, 446)), ((1289, 1289), (448, 448)), ((1293, 1293), (449, 449)), ((1297, 1298), (450, 451)), ((1302, 1314), (452, 464)), ((1317, 1330), (465, 466)), ((1332, 1348), (467, 470)), ((1351, 1352), (471, 472)), ((1356, 1356), (473, 473)), ((1360, 1363), (474, 477)), ((1395, 1399), (480, 484)), ((1403, 1403), (486, 486)), ((1406, 1425), (487, 491)), ((1427, 1440), (492, 493)), ((1443, 1443), (494, 494)), ((1447, 1447), (495, 495)), ((1471, 1475), (498, 502)), ((1478, 1497), (504, 508)), ((1500, 1500), (509, 509)), ((1518, 1522), (512, 516)), ((1526, 1526), (518, 518)), ((1530, 1530), (519, 519)), ((1533, 1552), (520, 524)), ((1554, 1573), (525, 529)), ((1576, 1584), (530, 540)), ((1608, 1612), (543, 547)), ((1616, 1616), (550, 550)), ((1620, 1620), (551, 551)), ((1623, 1642), (552, 556)), ((1645, 1650), (557, 562)), ((1672, 1676), (565, 567)), ((1680, 1687), (569, 576)), ((1703, 1707), (579, 583)), ((1711, 1713), (585, 587)), ((1716, 1728), (588, 589)), ((1745, 1749), (592, 597)), ((1753, 1755), (599, 601)), ((1758, 1770), (602, 603)), ((1787, 1791), (606, 608)), ((1795, 1796), (610, 611)), ((1812, 1816), (614, 615)), ((1820, 1840), (617, 637)), ((1844, 1844), (638, 638)), ((1862, 1866), (641, 642)), ((1880, 1884), (645, 646)), ((1888, 1891), (648, 651)), ((1895, 1901), (652, 658)), ((1919, 1923), (661, 665)), ((1927, 1927), (667, 667)), ((1929, 1940), (668, 670)), ((1955, 1959), (673, 677)), ((1963, 1964), (679, 680)), ((1968, 1968), (681, 681)), ((1972, 1982), (682, 692)), ((1986, 1988), (693, 695)), ((2010, 2014), (698, 702)), ((2018, 2019), (704, 705)), ((2023, 2023), (706, 706)), ((2027, 2039), (707, 719)), ((2043, 2052), (720, 729)), ((2074, 2078), (732, 737)), ((2082, 2082), (739, 739)), ((2086, 2093), (740, 747)), ((2111, 2115), (750, 758)), | def populate(engine): This_rule_base = engine.get_create('compiler') bc_rule.bc_rule('file', This_rule_base, 'compile', file, None, (contexts.variable('generated_root_pkg'), contexts.variable('rb_name'), pattern.pattern_tuple((pattern.pattern_literal('file'), contexts.variable('parent'), pattern.pattern_tuple((contexts.variable('fc_rules'), contexts.variable('fc_extra_lines'),), None), pattern.pattern_tuple((contexts.variable('bc_rules'), contexts.variable('bc_extra_lines'), contexts.variable('plan_extra_lines'),), None),), None), contexts.variable('fc_lines'), contexts.variable('bc_lines'), contexts.variable('plan_lines'),), (), (contexts.variable('fc_head'), contexts.variable('bc_head'), contexts.variable('plan_head'), contexts.variable('rb_name'), contexts.variable('parent'), contexts.variable('decl_line'), contexts.variable('fc_rules'), contexts.variable('fc_fun_lines'), contexts.variable('fc_init_lines'), contexts.variable('bc_rules'), contexts.variable('bc_plan_lines'), contexts.variable('bc_bc_fun_lines'), contexts.variable('bc_bc_init_lines'), contexts.variable('fc_lines'), contexts.variable('plan_lines'), contexts.variable('bc_lines'),)) bc_rule.bc_rule('rule_decl', This_rule_base, 'rule_decl', rule_decl, None, (contexts.variable('rb_name'), pattern.pattern_literal(None), contexts.variable('decl_line'),), (), (contexts.variable('decl_line'),)) bc_rule.bc_rule('rule_decl_with_parent', This_rule_base, 'rule_decl', rule_decl_with_parent, None, (contexts.variable('rb_name'), pattern.pattern_tuple((pattern.pattern_literal('parent'), contexts.variable('parent'), contexts.variable('excluded_symbols'),), None), contexts.variable('decl_line'),), (), (contexts.variable('decl_line'),)) bc_rule.bc_rule('fc_rules', This_rule_base, 'fc_rules', fc_rules, None, (contexts.variable('fc_rules'), contexts.variable('fc_funs'), contexts.variable('fc_init'),), (), (contexts.variable('fc_rule'), contexts.variable('fc_fun_1'), contexts.variable('fc_init_1'), contexts.variable('fc_funs'), contexts.variable('fc_init'),)) bc_rule.bc_rule('fc_rule_', This_rule_base, 'fc_rule', fc_rule_, None, (pattern.pattern_tuple((pattern.pattern_literal('fc_rule'), contexts.variable('rule_name'), contexts.variable('fc_premises'), contexts.variable('assertions'),), None), contexts.variable('fc_fun'), contexts.variable('fc_init'),), (), (contexts.variable('rule_name'), pattern.pattern_literal(0), contexts.anonymous('_'), contexts.variable('fc_premises'), pattern.pattern_literal(None), pattern.pattern_literal(False), contexts.variable('prem_fn_head'), contexts.variable('prem_fn_tail'), contexts.variable('prem_decl_lines'), pattern.pattern_literal(()), contexts.variable('patterns_out1'), contexts.variable('assertions'), contexts.variable('asserts_fn_lines'), contexts.variable('patterns_out'), contexts.variable('fc_fun'), contexts.variable('fc_init'),)) bc_rule.bc_rule('fc_premises0', This_rule_base, 'fc_premises', fc_premises0, None, (contexts.anonymous('_'), contexts.variable('clause_num'), contexts.variable('clause_num'), pattern.pattern_literal(()), contexts.anonymous('_'), contexts.anonymous('_'), pattern.pattern_literal(()), pattern.pattern_literal(()), contexts.variable('decl_num_in'), contexts.variable('decl_num_in'), pattern.pattern_literal(()), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), ()) bc_rule.bc_rule('fc_premises1', This_rule_base, 'fc_premises', fc_premises1, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((contexts.variable('first_prem'),), contexts.variable('rest_prems')), contexts.variable('break_cond'), contexts.variable('multi_match'), pattern.pattern_tuple((contexts.variable('fn_head1'),), contexts.variable('fn_head2')), pattern.pattern_tuple((contexts.variable('fn_tail2'),), contexts.variable('fn_tail1')), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('first_prem'), contexts.variable('break_cond'), contexts.variable('multi_match'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out1'), contexts.variable('decl_lines1'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('next_clause_num'), contexts.variable('rest_prems'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('decl_num_out'), contexts.variable('decl_lines2'), contexts.variable('patterns_out'), contexts.variable('decl_lines'),)) bc_rule.bc_rule('fc_premise', This_rule_base, 'fc_premise', fc_premise, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_premise'), contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('arg_patterns'), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('break_cond'), contexts.variable('multi_match'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), (contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('start_lineno'), contexts.variable('end_lineno'), contexts.variable('multi_match'), contexts.variable('decl_num_in'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('next_clause_num'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'),)) bc_rule.bc_rule('gen_fc_for_false', This_rule_base, 'gen_fc_for', gen_fc_for_false, None, (contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('start_lineno'), contexts.variable('end_lineno'), pattern.pattern_literal(False), contexts.variable('decl_num'), contexts.variable('fn_head'),), (), (contexts.variable('fn_head'),)) bc_rule.bc_rule('gen_fc_for_true', This_rule_base, 'gen_fc_for', gen_fc_for_true, None, (contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('start_lineno'), contexts.variable('end_lineno'), pattern.pattern_literal(True), contexts.variable('decl_num'), contexts.variable('fn_head'),), (), (contexts.variable('fn_head'),)) bc_rule.bc_rule('fc_first', This_rule_base, 'fc_premise', fc_first, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_first'), contexts.variable('premises1'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), pattern.pattern_tuple((contexts.variable('init_worked'), contexts.variable('fn_head'), contexts.variable('set_worked'),), None), contexts.variable('fn_tail'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('break_cond'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('premises1'), pattern.pattern_literal(True), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('init_worked'), contexts.variable('set_worked'),)) bc_rule.bc_rule('fc_forall_None', This_rule_base, 'fc_premise', fc_forall_None, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_forall'), contexts.variable('premises1'), pattern.pattern_literal(None), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), pattern.pattern_literal(()), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('premises1'), pattern.pattern_literal(None), pattern.pattern_literal(True), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'),)) bc_rule.bc_rule('fc_forall_require', This_rule_base, 'fc_premise', fc_forall_require, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_forall'), contexts.variable('premises1'), contexts.variable('require'), contexts.variable('start_lineno'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('premises1'), pattern.pattern_literal(True), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out1'), contexts.variable('decl_lines1'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('next_clause_num'), contexts.variable('require'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('decl_num_out'), contexts.variable('decl_lines2'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('decl_lines'),)) bc_rule.bc_rule('fc_notany', This_rule_base, 'fc_premise', fc_notany, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('fc_notany'), contexts.variable('premises'), contexts.variable('start_lineno'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('premises'), pattern.pattern_literal(True), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('decl_num_in'), contexts.variable('decl_num_out'), contexts.variable('decl_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'),)) bc_rule.bc_rule('fc_python_premise', This_rule_base, 'fc_premise', fc_python_premise, None, (contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.anonymous('_'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_num_in'), contexts.variable('decl_num_in'), pattern.pattern_literal(()), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('next_clause_num'), contexts.variable('clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('assertions_0', This_rule_base, 'assertions', assertions_0, None, (pattern.pattern_literal(()), pattern.pattern_literal(()), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), ()) bc_rule.bc_rule('assertions_n', This_rule_base, 'assertions', assertions_n, None, (pattern.pattern_tuple((contexts.variable('first_assertion'),), contexts.variable('rest_assertions')), pattern.pattern_tuple((contexts.variable('fn_lines1'),), contexts.variable('fn_lines2')), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (contexts.variable('first_assertion'), contexts.variable('fn_lines1'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('rest_assertions'), contexts.variable('fn_lines2'), contexts.variable('patterns_out'),)) bc_rule.bc_rule('assertion', This_rule_base, 'assertion', assertion, None, (pattern.pattern_tuple((pattern.pattern_literal('assert'), contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('patterns'), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('fn_lines'), contexts.variable('patterns_in'), contexts.variable('patterns_out'),), (), (pattern.pattern_tuple((contexts.variable('pat_nums'), contexts.variable('patterns_out'),), None), contexts.variable('fn_lines'),)) bc_rule.bc_rule('python_assertion', This_rule_base, 'assertion', python_assertion, None, (pattern.pattern_tuple((pattern.pattern_literal('python_assertion'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), pattern.pattern_tuple((pattern.pattern_tuple((pattern.pattern_literal('STARTING_LINENO'), contexts.variable('start_lineno'),), None), contexts.variable('python_code'), pattern.pattern_tuple((pattern.pattern_literal('ENDING_LINENO'), contexts.variable('end_lineno'),), None),), None), contexts.variable('patterns_in'), contexts.variable('patterns_in'),), (), ()) bc_rule.bc_rule('bc_rules', This_rule_base, 'bc_rules', bc_rules, None, (contexts.variable('rb_name'), contexts.variable('bc_rules'), contexts.variable('bc_plan_lines'), contexts.variable('bc_bc_funs'), contexts.variable('bc_bc_init'),), (), (contexts.variable('bc_rule'), contexts.variable('rb_name'), contexts.variable('bc_plan1'), contexts.variable('bc_bc_fun1'), contexts.variable('bc_bc_init1'), contexts.variable('bc_plan_lines'), contexts.variable('bc_bc_funs'), contexts.variable('bc_bc_init'),)) bc_rule.bc_rule('bc_rule_', This_rule_base, 'bc_rule', bc_rule_, None, (contexts.variable('rb_name'), pattern.pattern_tuple((pattern.pattern_literal('bc_rule'), contexts.variable('name'), contexts.variable('goal'), contexts.variable('bc_premises'), contexts.variable('python_lines'), contexts.variable('plan_vars_needed'),), None), contexts.variable('plan_lines'), contexts.variable('bc_fun_lines'), contexts.variable('bc_init_lines'),), (), (contexts.variable('rb_name'), contexts.variable('name'), contexts.variable('bc_premises'), contexts.variable('plan_vars_needed'), contexts.variable('prem_plan_lines'), contexts.variable('prem_fn_head'), contexts.variable('prem_fn_tail'), contexts.variable('prem_decl_lines'), pattern.pattern_tuple((contexts.variable('plan_lines'), contexts.variable('goal_fn_head'), contexts.variable('goal_fn_tail'), contexts.variable('goal_decl_lines'),), None), contexts.variable('bc_fun_lines'), contexts.variable('bc_init_lines'),)) bc_rule.bc_rule('bc_premises', This_rule_base, 'bc_premises', bc_premises, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('bc_premises'), contexts.variable('plan_vars_needed'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('decl_lines'),), (), (contexts.variable('rb_name'), contexts.variable('rule_name'), pattern.pattern_literal(1), contexts.anonymous('_'), contexts.variable('bc_premises'), pattern.pattern_literal(None), pattern.pattern_literal(True), pattern.pattern_literal(()), contexts.variable('patterns'), contexts.variable('plan_vars_needed'), contexts.variable('plan_var_names'), contexts.variable('plan_lines1'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('pat_lines'), contexts.variable('decl_lines'), contexts.variable('plan_lines'),)) bc_rule.bc_rule('bc_premises1_0', This_rule_base, 'bc_premises1', bc_premises1_0, None, (contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('clause_num'), contexts.variable('clause_num'), pattern.pattern_literal(()), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns'), contexts.variable('patterns'), contexts.variable('plan_var_names'), contexts.variable('plan_var_names'), pattern.pattern_literal(()), pattern.pattern_literal(()), pattern.pattern_literal(()),), (), ()) bc_rule.bc_rule('bc_premises1_n', This_rule_base, 'bc_premises1', bc_premises1_n, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((contexts.variable('first_prem'),), contexts.variable('rest_prems')), contexts.variable('break_cond'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('first_prem'), contexts.variable('break_cond'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out1'), contexts.variable('plan_lines1'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('next_clause_num'), contexts.variable('rest_prems'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines2'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('bc_premise', This_rule_base, 'bc_premise', bc_premise, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_premise'), contexts.variable('required'), contexts.variable('kb_name'), contexts.variable('entity_name'), contexts.variable('arg_patterns'), contexts.variable('plan_spec'), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('break_cond'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('next_clause_num'), contexts.variable('kb_name2'), pattern.pattern_tuple((contexts.variable('pat_nums'), contexts.variable('patterns_out1'),), None), contexts.variable('fn_head1'), contexts.variable('required'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_literal(('POPINDENT', 'POPINDENT',)), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('plan_spec'), contexts.variable('allow_plan'), contexts.variable('patterns_out1'), contexts.variable('patterns_out'), contexts.variable('fn_head3'), contexts.variable('fn_tail3'), contexts.variable('plan_lines'), contexts.variable('plan_vars_needed'), pattern.pattern_tuple((contexts.anonymous('_'), contexts.variable('plan_var_names_out'),), None), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('bc_first', This_rule_base, 'bc_premise', bc_first, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_first'), contexts.variable('required'), contexts.variable('bc_premises'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), pattern.pattern_tuple((contexts.variable('init_worked'), contexts.variable('fn_head'), contexts.variable('set_worked'),), None), contexts.variable('fn_tail'),), (), (contexts.variable('break_cond'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('bc_premises'), contexts.variable('allow_plan'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('required'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('init_worked'), contexts.variable('set_worked'),)) bc_rule.bc_rule('bc_forall_None', This_rule_base, 'bc_premise', bc_forall_None, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_forall'), contexts.variable('bc_premises'), pattern.pattern_literal(None), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head'), pattern.pattern_literal(()),), (), (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('bc_premises'), pattern.pattern_literal(None), pattern.pattern_literal(False), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), contexts.variable('plan_lines'), contexts.variable('fn_head1'), contexts.variable('fn_tail'), contexts.variable('fn_head'),)) bc_rule.bc_rule('bc_forall_require', This_rule_base, 'bc_premise', bc_forall_require, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_forall'), contexts.variable('premises1'), contexts.variable('require'), contexts.variable('start_lineno'), contexts.anonymous('_'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out'), pattern.pattern_literal(()), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num1'), contexts.variable('premises1'), pattern.pattern_literal(False), contexts.variable('patterns_in'), contexts.variable('patterns_out1'), contexts.variable('plan_var_names_in'), contexts.variable('plan_var_names_out1'), pattern.pattern_literal(()), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('next_clause_num'), contexts.variable('require'), contexts.variable('patterns_out'), contexts.variable('plan_var_names_out'), contexts.variable('fn_head2'), contexts.variable('fn_tail2'), contexts.variable('fn_head'),)) bc_rule.bc_rule('bc_notany', This_rule_base, 'bc_premise', bc_notany, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), pattern.pattern_tuple((pattern.pattern_literal('bc_notany'), contexts.variable('bc_premises'), contexts.variable('start_lineno'),), None), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_in'), contexts.variable('plan_var_out'), pattern.pattern_literal(()), contexts.variable('fn_head'), pattern.pattern_literal(("POPINDENT",)),), (), (contexts.variable('break_true'), contexts.variable('break_false'), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('bc_premises'), pattern.pattern_literal(False), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_in'), contexts.variable('plan_var_out'), pattern.pattern_literal(()), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('fn_head'),)) bc_rule.bc_rule('no_plan', This_rule_base, 'gen_plan_lines', no_plan, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_literal(None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_in'), contexts.variable('fn_head'), pattern.pattern_literal(()), pattern.pattern_literal(()), pattern.pattern_literal(()),), (), (contexts.variable('fn_head'),)) bc_rule.bc_rule('as_plan', This_rule_base, 'gen_plan_lines', as_plan, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('as'), contexts.variable('pat_var_name'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'), pattern.pattern_literal(()), pattern.pattern_literal(()),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('pat_var_name'), contexts.variable('pat_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('plan_spec', This_rule_base, 'gen_plan_lines', plan_spec, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('plan_spec'), contexts.variable('step_num'), contexts.variable('plan_var_name'), contexts.variable('python_code'), contexts.variable('plan_vars_needed'), contexts.anonymous('_'), contexts.anonymous('_'),), None), pattern.pattern_literal(True), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'), pattern.pattern_tuple((pattern.pattern_tuple((contexts.variable('step_num'), contexts.variable('python_code'),), None),), None), contexts.variable('plan_vars_needed'),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('plan_var_name'), contexts.variable('pat_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('illegal_plan_spec', This_rule_base, 'gen_plan_lines', illegal_plan_spec, None, (contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), pattern.pattern_tuple((pattern.pattern_literal('plan_spec'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('lineno'), contexts.variable('lexpos'),), None), pattern.pattern_literal(False), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), (), (contexts.anonymous('_'),)) bc_rule.bc_rule('plan_bindings', This_rule_base, 'plan_bindings', plan_bindings, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('plan_var_name'), contexts.variable('pat_num'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('not_required', This_rule_base, 'add_required', not_required, None, (pattern.pattern_literal(False), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.variable('fn_head'), contexts.variable('fn_tail'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), ()) bc_rule.bc_rule('required', This_rule_base, 'add_required', required, None, (pattern.pattern_literal(True), contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('fn_head1'), contexts.variable('fn_tail1'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('bc_python_premise', This_rule_base, 'bc_premise', bc_python_premise, None, (contexts.variable('rb_name'), contexts.variable('rule_name'), contexts.variable('clause_num'), contexts.variable('next_clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('plan_var_names'), contexts.variable('plan_var_names'), pattern.pattern_literal(()), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (contexts.variable('next_clause_num'), contexts.variable('clause_num'), contexts.variable('python_premise'), contexts.variable('break_cond'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('python_eq', This_rule_base, 'python_premise', python_eq, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_eq'), contexts.variable('pattern'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('python_code2'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('python_in', This_rule_base, 'python_premise', python_in, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_in'), contexts.variable('pattern'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.variable('break_cond'), contexts.variable('patterns_in'), contexts.variable('patterns_out'), contexts.variable('fn_head'), contexts.variable('fn_tail'),), (), (pattern.pattern_tuple((contexts.variable('pat_num'), contexts.variable('patterns_out'),), None), contexts.variable('python_code2'), contexts.variable('fn_head'), contexts.variable('fn_tail'),)) bc_rule.bc_rule('python_check', This_rule_base, 'python_premise', python_check, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_check'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_in'), contexts.variable('fn_head'), pattern.pattern_literal(('POPINDENT',)),), (), (contexts.variable('python_code2'), contexts.variable('fn_head'),)) bc_rule.bc_rule('python_block', This_rule_base, 'python_premise', python_block, None, (contexts.variable('clause_num'), pattern.pattern_tuple((pattern.pattern_literal('python_block'), pattern.pattern_tuple((contexts.variable('python_code'), contexts.anonymous('_'), contexts.anonymous('_'), contexts.anonymous('_'),), None), contexts.variable('start_lineno'), contexts.variable('end_lineno'),), None), contexts.anonymous('_'), contexts.variable('patterns_in'), contexts.variable('patterns_in'), pattern.pattern_tuple((pattern.pattern_tuple((pattern.pattern_literal('STARTING_LINENO'), contexts.variable('start_lineno'),), None), contexts.variable('python_code'), pattern.pattern_tuple((pattern.pattern_literal('ENDING_LINENO'), contexts.variable('end_lineno'),), None),), None), pattern.pattern_literal(()),), (), ()) | e6992b6a694bb95da57aca1817805692e1f2cc64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14714/e6992b6a694bb95da57aca1817805692e1f2cc64/compiler_bc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
12,
8944,
4672,
1220,
67,
5345,
67,
1969,
273,
4073,
18,
588,
67,
2640,
2668,
9576,
6134,
225,
6533,
67,
5345,
18,
13459,
67,
5345,
2668,
768,
2187,
1220,
67,
5345,
67,
1969,
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,
6490,
12,
8944,
4672,
1220,
67,
5345,
67,
1969,
273,
4073,
18,
588,
67,
2640,
2668,
9576,
6134,
225,
6533,
67,
5345,
18,
13459,
67,
5345,
2668,
768,
2187,
1220,
67,
5345,
67,
1969,
16,... |
def to_networkx(tree, graphviz=False): | def to_networkx(tree): | def to_networkx(tree, graphviz=False): """Convert a Tree object to a networkx graph. The result is useful for plotting with pylab, matplotlib or pygraphviz, though the result is not quite a proper dendrogram for representing a phylogeny. Requires the networkx package. """ # TODO: solve the graphviz labeling issue # ENH: color non-terminal nodes white/transparent try: import networkx except ImportError: from Bio import MissingExternalDependencyError raise MissingExternalDependencyError( "The networkx library is not installed.") def get_label(node): """Get a unique hashable node value. Quirk: draw_graphviz doesn't honor the labels set in LabeledGraph, so str(node) must be unique for that engine. The regular nx.draw() doesn't have that problem. """ if not graphviz: return node label = str(node) if label == node.__class__.__name__: return '<%d>' % id(node) return label def add_node(graph, node): if graphviz: graph.add_node(get_label(node)) else: graph.add_node(node, get_label(node)) def add_edge(graph, node1, node2): n1, n2 = map(get_label, [node1, node2]) if node2.branch_length is not None: graph.add_edge(n1, n2, node2.branch_length) else: graph.add_edge(n1, n2) def build_subgraph(graph, top): """Walk down the Tree, building graphs, edges and nodes.""" for node in top.nodes: add_node(graph, node) add_edge(graph, top, node) build_subgraph(graph, node) if tree.rooted: G = networkx.LabeledDiGraph() else: G = networkx.LabeledGraph() add_node(G, tree.root) build_subgraph(G, tree.root) return G | 200aab0b152cd9254f2da25687ec90399abd1cbb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/200aab0b152cd9254f2da25687ec90399abd1cbb/Utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
5185,
92,
12,
3413,
4672,
3536,
2723,
279,
4902,
733,
358,
279,
2483,
92,
2667,
18,
225,
1021,
563,
353,
5301,
364,
20947,
598,
2395,
7411,
16,
13892,
578,
2395,
4660,
23167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
5185,
92,
12,
3413,
4672,
3536,
2723,
279,
4902,
733,
358,
279,
2483,
92,
2667,
18,
225,
1021,
563,
353,
5301,
364,
20947,
598,
2395,
7411,
16,
13892,
578,
2395,
4660,
23167,
... |
"""Return last modification time of file as an ISO 3307 style time (YYYYMMDDHHMMSS) as defined into RFC 3659. | """Return last modification time of file to the client as an ISO 3307 style timestamp (YYYYMMDDHHMMSS) as defined into RFC 3659. | def ftp_MDTM(self, line): """Return last modification time of file as an ISO 3307 style time (YYYYMMDDHHMMSS) as defined into RFC 3659. """ path = self.fs.translate(line) if not self.fs.isfile(path): self.respond("550 No such file.") return try: lmt = self.fs.getmtime(path) lmt = time.strftime("%Y%m%d%H%M%S", time.localtime(lmt)) self.respond("213 %s" %lmt) except OSError, err: self.respond ('550 %s.' %os.strerror(err.errno)) | e1763c9db15d5d6d781646fb0678f3c70d95867a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/e1763c9db15d5d6d781646fb0678f3c70d95867a/FTPServer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
6188,
22903,
12,
2890,
16,
980,
4672,
3536,
990,
1142,
11544,
813,
434,
585,
358,
326,
1004,
487,
392,
9351,
890,
5082,
27,
2154,
2858,
261,
26287,
8206,
5698,
17500,
8206,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13487,
67,
6188,
22903,
12,
2890,
16,
980,
4672,
3536,
990,
1142,
11544,
813,
434,
585,
358,
326,
1004,
487,
392,
9351,
890,
5082,
27,
2154,
2858,
261,
26287,
8206,
5698,
17500,
8206,
12... |
return reduce(Q.__and__, filters) | return reduce(getattr(self.Meta, 'default_operator', Q.__and__), filters) | def construct_search(field_name, first): if field_name.startswith('^'): if first: return "%s__istartswith" % field_name[1:] else: return "%s__icontains" % field_name[1:] elif field_name.startswith('='): return "%s__iexact" % field_name[1:] elif field_name.startswith('@'): if settings.DATABASE_ENGINE == 'mysql': return "%s__search" % field_name[1:] else: return "%s__icontains" % field_name[1:] else: return "%s__icontains" % field_name | 95c0967db70e2a9cbc1d878d315ad81208df9e52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10475/95c0967db70e2a9cbc1d878d315ad81208df9e52/simple_search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4872,
67,
3072,
12,
1518,
67,
529,
16,
1122,
4672,
309,
652,
67,
529,
18,
17514,
1918,
2668,
66,
11,
4672,
309,
1122,
30,
327,
2213,
87,
972,
376,
485,
87,
1918,
6,
738,
652,
67,
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,
4872,
67,
3072,
12,
1518,
67,
529,
16,
1122,
4672,
309,
652,
67,
529,
18,
17514,
1918,
2668,
66,
11,
4672,
309,
1122,
30,
327,
2213,
87,
972,
376,
485,
87,
1918,
6,
738,
652,
67,
5... |
sage: sr = mq.SR(10,1,2,4) sage: sr.vars('x',2) | sage: sr = mq.SR(10, 1, 2, 4) sage: sr.vars('x', 2) | def vars(self, name, round, rc=None, e=None): """ Return a list ofvariables in self. | cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4153,
12,
2890,
16,
508,
16,
3643,
16,
4519,
33,
7036,
16,
425,
33,
7036,
4672,
3536,
2000,
279,
666,
434,
7528,
316,
365,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4153,
12,
2890,
16,
508,
16,
3643,
16,
4519,
33,
7036,
16,
425,
33,
7036,
4672,
3536,
2000,
279,
666,
434,
7528,
316,
365,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
src = src.replace(u'\xa0', ' ') | src = src.replace(u'\uffff', ' ') | def append_text(src): fp, key, variant = self.font_properties(css) for pat, repl in self.__class__.ENTITY_RULES: src = pat.sub(repl, src) src = src.replace(u'\xa0', ' ')# nbsp is replaced with \xa0 by BeatifulSoup normal_font_size = int(fp['fontsize']) if variant == 'small-caps': dump = Span(fontsize=normal_font_size-30) temp = [] for c in src: if c.isupper(): if temp: dump.append(''.join(temp)) temp = [] dump.append(Span(c, fontsize=normal_font_size)) else: temp.append(c.upper()) src = dump if temp: src.append(''.join(temp)) if key in ['italic', 'bi']: already_italic = False for fonts in self.fonts.values(): it = fonts['italic'][1] if fonts.has_key('italic') else '' bi = fonts['bi'][1] if fonts.has_key('bi') else '' if fp['fontfacename'] in (it, bi): already_italic = True break if not already_italic: src = Italic(src) unneeded = [] for prop in fp: if fp[prop] == self.current_block.textStyle.attrs[prop]: unneeded.append(prop) for prop in unneeded: fp.pop(prop) attrs = {} if 'color' in css: attrs['textcolor'] = lrs_color(css['color']) attrs.update(fp) elem = Span(text=src, **attrs) if (attrs or force_span_use) else src if css.has_key('text-decoration'): dec = css['text-decoration'].lower() linepos = 'after' if dec == 'underline' else 'before' if dec == 'overline' else None if linepos is not None: elem = EmpLine(elem, lineposition=linepos) self.current_para.append(elem) | 59a1af6050e551db53c61d44e598edfa431e9890 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/59a1af6050e551db53c61d44e598edfa431e9890/convert_from.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
955,
12,
4816,
4672,
4253,
16,
498,
16,
5437,
273,
365,
18,
5776,
67,
4738,
12,
5212,
13,
364,
9670,
16,
6831,
316,
365,
16186,
1106,
25648,
11101,
67,
14920,
55,
30,
1705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
955,
12,
4816,
4672,
4253,
16,
498,
16,
5437,
273,
365,
18,
5776,
67,
4738,
12,
5212,
13,
364,
9670,
16,
6831,
316,
365,
16186,
1106,
25648,
11101,
67,
14920,
55,
30,
1705,
... |
subprocess.Popen(['hg', 'clone', root, 'a']).wait() subprocess.Popen(['hg', 'clone', root, 'b']).wait() | subprocess.Popen(['hg', 'clone', '..', 'a']).wait() subprocess.Popen(['hg', 'clone', '..', 'b']).wait() | def init_compare(): """Initializes the comparision feature.""" root = find_hg_root('.') print 'Initializing comparision feature' subprocess.Popen(['hg', 'clone', root, 'a']).wait() subprocess.Popen(['hg', 'clone', root, 'b']).wait() | f179a6c42949356e5c2cfa554f5e2c20fa780e55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14437/f179a6c42949356e5c2cfa554f5e2c20fa780e55/wzbench.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
9877,
13332,
3536,
9685,
326,
532,
1065,
1951,
2572,
12123,
1365,
273,
1104,
67,
26981,
67,
3085,
2668,
1093,
13,
1172,
296,
29782,
532,
1065,
1951,
2572,
11,
6652,
18,
52,
319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1208,
67,
9877,
13332,
3536,
9685,
326,
532,
1065,
1951,
2572,
12123,
1365,
273,
1104,
67,
26981,
67,
3085,
2668,
1093,
13,
1172,
296,
29782,
532,
1065,
1951,
2572,
11,
6652,
18,
52,
319... |
def _handle_long_word(self, chunks, cur_line, cur_len, width): | def _handle_long_word(self, reversed_chunks, cur_line, cur_len, width): | def _handle_long_word(self, chunks, cur_line, cur_len, width): """_handle_long_word(chunks : [string], cur_line : [string], cur_len : int, width : int) | d6b1aef33b7c7d40bfb1081d307451a71781d2bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6b1aef33b7c7d40bfb1081d307451a71781d2bc/textwrap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
5748,
67,
1095,
12,
2890,
16,
9553,
67,
14691,
16,
662,
67,
1369,
16,
662,
67,
1897,
16,
1835,
4672,
3536,
67,
4110,
67,
5748,
67,
1095,
12,
14691,
294,
306,
1080,
648... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
389,
4110,
67,
5748,
67,
1095,
12,
2890,
16,
9553,
67,
14691,
16,
662,
67,
1369,
16,
662,
67,
1897,
16,
1835,
4672,
3536,
67,
4110,
67,
5748,
67,
1095,
12,
14691,
294,
306,
1080,
648... |
tempdir = tempfile.gettempdir() | tempdir = os.path.normpath(tempfile.gettempdir()) | def get_temp_dir(extrapath=None): tempdir = tempfile.gettempdir() if not os.path.isdir(tempdir): raise EnvironmentError("Temp directory '%s' does not exist" % tempdir) if extrapath is not None: tempdir = os.path.join(tempdir, extrapath) # make sure there's no file with the same name as tempdir if os.path.isfile(tempdir): i = 1 while os.path.isfile('%s%d' % (tempdir, i)): i += 1 tempdir = '%s%d' % (tempdir, i) if not os.path.exists(tempdir): os.mkdir(tempdir) return tempdir | 1127c55338a551e888f4e801d14bc275e0b43cf4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/1127c55338a551e888f4e801d14bc275e0b43cf4/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
5814,
67,
1214,
12,
14523,
438,
421,
33,
7036,
4672,
23101,
273,
1140,
18,
803,
18,
7959,
803,
12,
5814,
768,
18,
588,
5814,
1214,
10756,
309,
486,
1140,
18,
803,
18,
291,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5814,
67,
1214,
12,
14523,
438,
421,
33,
7036,
4672,
23101,
273,
1140,
18,
803,
18,
7959,
803,
12,
5814,
768,
18,
588,
5814,
1214,
10756,
309,
486,
1140,
18,
803,
18,
291,
1... |
result = get_pydoc_text(pydoc_mod) expected_text = expected_text_pattern % inspect.getabsfile(pydoc_mod) | result, doc_loc = get_pydoc_text(pydoc_mod) expected_text = expected_text_pattern % \ (inspect.getabsfile(pydoc_mod), doc_loc) | def test_text_doc(self): result = get_pydoc_text(pydoc_mod) expected_text = expected_text_pattern % inspect.getabsfile(pydoc_mod) if result != expected_text: print_diffs(expected_text, result) self.fail("outputs are not equal, see diff above") | 6ec2b5f40afcf701d16a141f23f0a252b0a01b35 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/6ec2b5f40afcf701d16a141f23f0a252b0a01b35/test_pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
955,
67,
2434,
12,
2890,
4672,
563,
16,
997,
67,
1829,
273,
336,
67,
2074,
2434,
67,
955,
12,
2074,
2434,
67,
1711,
13,
2665,
67,
955,
273,
2665,
67,
955,
67,
4951,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
955,
67,
2434,
12,
2890,
4672,
563,
16,
997,
67,
1829,
273,
336,
67,
2074,
2434,
67,
955,
12,
2074,
2434,
67,
1711,
13,
2665,
67,
955,
273,
2665,
67,
955,
67,
4951,
738,
... |
x = offsetx - labellen[i] + lineskip | x = offsetx - labellen[i] | def Matrix(diss, hlabels=[], vlabels=[], sizing = [], margin = 10, hook = 10, block = None, line_size = 2.0, color_mode=0, sizing2 = [], canvas = None, multiplier = 1.0): # prevent divide-by-zero... if len(hlabels) < 2: return canvas ## ADJUST DIMENSIONS ### if canvas == None: tcanvas = piddlePIL.PILCanvas() else: tcanvas = canvas normal = piddle.Font(face="Courier") if len(vlabels) == 0: vlabels = hlabels # vertical labels... # compute the height lineskip = int(line_size*tcanvas.fontHeight(normal)+1) labellen = [tcanvas.stringWidth(s,font=normal) for s in hlabels] vlabellen = [tcanvas.stringWidth(s,font=normal) for s in vlabels] maxlabelx = max(labellen) maxlabely = max(vlabellen) width = int(1 + 2.0*margin + hook + maxlabelx + max(lineskip*(0.5+len(hlabels)) + tcanvas.fontHeight(normal),2*maxlabelx)) height = int(1 + 2.0*margin + hook + maxlabely + max(lineskip*(0.5+len(vlabels)) + tcanvas.fontHeight(normal),2*maxlabely)) if block == None: block = lineskip/2-1 if canvas == None: canvas = piddlePIL.PILCanvas(size=(width,height)) _colorize = colorpicker(color_mode) ### DRAWING ### offsetx = maxlabelx+margin offsety = maxlabely+margin halfline = canvas.fontAscent(normal)/2.0 for i in range(len(vlabels)): x2 = offsetx + lineskip/2 y2 = offsety + lineskip*(i+1) # vertical canvas.drawString(vlabels[i], y2+lineskip, x2+block-lineskip, angle=90,font=normal) # print names for i in range(len(hlabels)): # self.order identifies the label at a particular row x = offsetx - labellen[i] + lineskip y = offsety + lineskip*(i+1) canvas.drawString(hlabels[i], x, y,font=normal) for j in range(len(hlabels)): colo = _colorize(diss[i,j]) x = offsetx+hook+lineskip*(j+1)+block y = offsety+lineskip*(i+1)-halfline if len(sizing) == 0: ss = 1.0 else: ss = min(1,sizing[i][j]) ss *= multiplier canvas.drawRect(x-ss*block,y-ss*block,x+ss*block,y+ss*block,edgeColor=colo,fillColor=colo,edgeWidth=0.5) if len(sizing2) > 0: ss = sizing2[i][j] ss *= multiplier canvas.drawRect(x-ss*block,y-ss*block,x+ss*block,y+ss*block,edgeColor=piddle.black,fillColor=None,edgeWidth=0.5) canvas.flush() return canvas | 431e36b54d4a61a662472721242bd7d54a81c6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/431e36b54d4a61a662472721242bd7d54a81c6c0/orngDendrogram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7298,
12,
72,
1054,
16,
366,
5336,
22850,
6487,
331,
5336,
22850,
6487,
272,
6894,
273,
5378,
16,
7333,
273,
1728,
16,
3953,
273,
1728,
16,
1203,
273,
599,
16,
980,
67,
1467,
273,
576,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7298,
12,
72,
1054,
16,
366,
5336,
22850,
6487,
331,
5336,
22850,
6487,
272,
6894,
273,
5378,
16,
7333,
273,
1728,
16,
3953,
273,
1728,
16,
1203,
273,
599,
16,
980,
67,
1467,
273,
576,... |
result = self.__checkCurrentBatchSystem() if not result['OK']: return S_OK( 0.0 ) name = result['Value'] batchInstance = self.__getBatchSystemPlugin( name ) if not batchInstance['OK']: | if not self.batchPlugin: | def getScaledCPU( self ): """Returns the current CPU Time spend (according to batch system) scaled according to /LocalSite/CPUScalingFactor """ #Quit if no scale factor available if not self.scaleFactor: return S_OK( 0.0 ) | cce972369e9fc2f19a35f5f4b05fa38693b5c1cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/cce972369e9fc2f19a35f5f4b05fa38693b5c1cd/TimeLeft.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
12825,
15222,
12,
365,
262,
30,
3536,
1356,
326,
783,
12154,
2647,
17571,
261,
1077,
4643,
358,
2581,
2619,
13,
12304,
4888,
358,
342,
2042,
4956,
19,
4258,
3378,
4876,
6837,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1322,
12825,
15222,
12,
365,
262,
30,
3536,
1356,
326,
783,
12154,
2647,
17571,
261,
1077,
4643,
358,
2581,
2619,
13,
12304,
4888,
358,
342,
2042,
4956,
19,
4258,
3378,
4876,
6837,
3536,
... |
self.assertRaises(TypeError, bytearray, ["0"]) self.assertRaises(TypeError, bytearray, [0.0]) self.assertRaises(TypeError, bytearray, [None]) self.assertRaises(TypeError, bytearray, [C()]) | self.assertRaises(TypeError, self.type2test, ["0"]) self.assertRaises(TypeError, self.type2test, [0.0]) self.assertRaises(TypeError, self.type2test, [None]) self.assertRaises(TypeError, self.type2test, [C()]) | def test_constructor_type_errors(self): self.assertRaises(TypeError, bytearray, 0.0) class C: pass self.assertRaises(TypeError, bytearray, ["0"]) self.assertRaises(TypeError, bytearray, [0.0]) self.assertRaises(TypeError, bytearray, [None]) self.assertRaises(TypeError, bytearray, [C()]) | ee68bbafb3455a5d2d59063851393925977e8adc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/ee68bbafb3455a5d2d59063851393925977e8adc/test_bytes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
12316,
67,
723,
67,
4324,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
14552,
16,
374,
18,
20,
13,
667,
385,
30,
1342,
365,
18,
11231,
12649,
6141,
12,
19030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12316,
67,
723,
67,
4324,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
12,
19030,
16,
14552,
16,
374,
18,
20,
13,
667,
385,
30,
1342,
365,
18,
11231,
12649,
6141,
12,
19030,
... |
s = glob.glob(self.baseFilename + ".20*") if len(s) > self.backupCount: s.sort() os.remove(s[0]) | for s in self.getFilesToDelete(): os.remove(s) | def doRollover(self): """ do a rollover; in this case, a date/time stamp is appended to the filename when the rollover happens. However, you want the file to be named for the start of the interval, not the current time. If there is a backup count, then we have to get a list of matching filenames, sort them and remove the one with the oldest suffix. """ self.stream.close() # get the time that this sequence started at and make it a TimeTuple t = self.rolloverAt - self.interval timeTuple = time.localtime(t) dfn = self.baseFilename + "." + time.strftime(self.suffix, timeTuple) if os.path.exists(dfn): os.remove(dfn) os.rename(self.baseFilename, dfn) if self.backupCount > 0: # find the oldest log file and delete it s = glob.glob(self.baseFilename + ".20*") if len(s) > self.backupCount: s.sort() os.remove(s[0]) #print "%s -> %s" % (self.baseFilename, dfn) self.mode = 'w' self.stream = self._open() self.rolloverAt = self.rolloverAt + self.interval | 7018b6ee60adf62cbc72fb5dc100a60e9c89a2b0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/7018b6ee60adf62cbc72fb5dc100a60e9c89a2b0/handlers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
4984,
21896,
12,
2890,
4672,
3536,
741,
279,
10643,
21896,
31,
316,
333,
648,
16,
279,
1509,
19,
957,
14429,
353,
12317,
358,
326,
1544,
1347,
326,
10643,
21896,
10555,
18,
225,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4984,
21896,
12,
2890,
4672,
3536,
741,
279,
10643,
21896,
31,
316,
333,
648,
16,
279,
1509,
19,
957,
14429,
353,
12317,
358,
326,
1544,
1347,
326,
10643,
21896,
10555,
18,
225,
107... |
self.nb.add(panel, text='Localization') | self.nb.add(panel, text=_('Localization')) | def build_tab_localization(self): panel = TFrame(self.root, style='FlatFrame', borderwidth = 5) self.nb.add(panel, text='Localization') subpanel = TFrame(panel, style='RoundedFrame', borderwidth = 4) subpanel.grid(sticky=N+S+E+W) panel.rowconfigure(0, weight=1) panel.columnconfigure(0, weight=1) subpanel.rowconfigure(0, weight=1) subpanel.columnconfigure(0, weight=1) sb=TScrollbar(subpanel) sb.grid(row=0, column=1,sticky=N+S) text=Text(subpanel, bg='white',highlightthickness=0, wrap=NONE) text.grid(row=0, column=0,sticky=N+S+E+W) text['yscrollcommand'] = sb.set sb['command'] = text.yview txt=_('\nThe project is not localized yet.\n') txt+=_('We plan to provide localization resources for next version\n') txt+=_('So if you wish joining to sK1 team as a localizator, just contact us!') text['state']=NORMAL text.insert(END, txt) text['state']=DISABLED | 2b8b048bdb665238d4b4d6e0b982e9f1a00a2a3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/2b8b048bdb665238d4b4d6e0b982e9f1a00a2a3f/aboutdlg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
7032,
67,
3729,
1588,
12,
2890,
4672,
6594,
273,
399,
3219,
12,
2890,
18,
3085,
16,
2154,
2218,
16384,
3219,
2187,
5795,
2819,
273,
1381,
13,
365,
18,
6423,
18,
1289,
12,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
7032,
67,
3729,
1588,
12,
2890,
4672,
6594,
273,
399,
3219,
12,
2890,
18,
3085,
16,
2154,
2218,
16384,
3219,
2187,
5795,
2819,
273,
1381,
13,
365,
18,
6423,
18,
1289,
12,
139... |
logStatusMsg(u"utf encoding and quoting url failed, returning false", 1 ) | logStatusMsg(u"utf encoding and quoting url failed, returning false", 1) | def mechRetrievePage(url, txheaders=(('User-agent', _USER_AGENT),), ): u"""URL is the full path to the resource we are retrieve/Posting txheaders: sequence of tuples of header key, value to manually add to the request object """ global cj, opener urlNotEncoded = url txheadersEncoded = ( (x.encode('utf-8'), y.encode('utf-8') ) for x,y in txheaders ) time.sleep( getConfig()['global']['sleepTime'] ) url = encodeQuoteUrl( url, encoding='utf-8' ) if not url: logStatusMsg(u"utf encoding and quoting url failed, returning false", 1 ) return False cjR = cookieHandler() if cjR == 1: logStatusMsg(u"building and installing mechanize opener with cookiefile", 5) opener = mechanize.build_opener(mechanize.HTTPCookieProcessor(cj), mechanize.HTTPRefreshProcessor(), mechanize.HTTPRedirectHandler(), mechanize.HTTPEquivProcessor()) mechanize.install_opener(opener) elif cjR == 0: logStatusMsg(u"building and installing mechanize opener without cookiefile", 5) opener = mechanize.build_opener(mechanize.HTTPRefreshProcessor(), mechanize.HTTPRedirectHandler(), mechanize.HTTPEquivProcessor()) mechanize.install_opener(opener) cj = 1 logStatusMsg(u"grabbing page at url %s" % urlNotEncoded, 5) return mechanize.urlopen( mechanize.Request( url, headers=dict( txheadersEncoded ) ) ) | 633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1791,
343,
5767,
1964,
12,
718,
16,
2229,
2485,
28657,
2668,
1299,
17,
5629,
2187,
389,
4714,
67,
15005,
3631,
3631,
262,
30,
582,
8395,
1785,
353,
326,
1983,
589,
358,
326,
1058,
732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1791,
343,
5767,
1964,
12,
718,
16,
2229,
2485,
28657,
2668,
1299,
17,
5629,
2187,
389,
4714,
67,
15005,
3631,
3631,
262,
30,
582,
8395,
1785,
353,
326,
1983,
589,
358,
326,
1058,
732,
... |
self.item.a = decode_cdata(self.text["A"]) | self.item.a = self.text["A"] | def decode_cdata(s): return saxutils.unescape(s) | 6a18a0a9121db417b88896f5f7dc917fdfe73c04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1240/6a18a0a9121db417b88896f5f7dc917fdfe73c04/mnemosyne_core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
67,
71,
892,
12,
87,
4672,
327,
20319,
5471,
18,
318,
6939,
12,
87,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
67,
71,
892,
12,
87,
4672,
327,
20319,
5471,
18,
318,
6939,
12,
87,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
result = strip(split(line, '"""')[0]) else: result = None | line = strip(line) if line[:4] == 'r"""': line = line[1:] if line[:3] == '"""': line = line[3:] if line[-1:] == '\\': line = line[:-1] while not strip(line): line = file.readline() if not line: break result = strip(split(line, '"""')[0]) else: result = None | def synopsis(filename, cache={}): """Get the one-line summary out of a module file.""" mtime = os.stat(filename)[stat.ST_MTIME] lastupdate, result = cache.get(filename, (0, None)) # XXX what if ext is 'rb' type in imp_getsuffixes? if lastupdate < mtime: file = open(filename) line = file.readline() while line[:1] == '#' or strip(line) == '': line = file.readline() if not line: break if line[-2:] == '\\\n': line = line[:-2] + file.readline() line = strip(line) if line[:3] == '"""': line = line[3:] while strip(line) == '': line = file.readline() if not line: break result = strip(split(line, '"""')[0]) else: result = None file.close() cache[filename] = (mtime, result) return result | a2ebd065552d2e5c9c6624a04e40faa9148962e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a2ebd065552d2e5c9c6624a04e40faa9148962e9/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6194,
29522,
12,
3459,
16,
1247,
12938,
4672,
3536,
967,
326,
1245,
17,
1369,
4916,
596,
434,
279,
1605,
585,
12123,
13158,
273,
1140,
18,
5642,
12,
3459,
25146,
5642,
18,
882,
67,
49,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6194,
29522,
12,
3459,
16,
1247,
12938,
4672,
3536,
967,
326,
1245,
17,
1369,
4916,
596,
434,
279,
1605,
585,
12123,
13158,
273,
1140,
18,
5642,
12,
3459,
25146,
5642,
18,
882,
67,
49,
... |
c_D_eff_rms, c_eff_dist_theta, c_eff_dist_phi = convert_to_spherical_coord(c_ifo1.eff_distance, c_ifo2.eff_distance, c_ifo3.eff_distance) | t_D_eff_rms, t_eff_dist_theta, t_eff_dist_phi = convert_to_spherical_coord(t_ifo1.eff_distance, t_ifo2.eff_distance, t_ifo3.eff_distance) | def getTriggersWithinEpsilon(self, candidate, epsilon, epsilon_ball_type = "version2"): | 2134ace20a76c4e1b68338565c64a56ca1193337 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3592/2134ace20a76c4e1b68338565c64a56ca1193337/CoincInspiralUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15114,
18949,
29889,
10327,
12,
2890,
16,
5500,
16,
12263,
16,
12263,
67,
19067,
67,
723,
273,
315,
1589,
22,
6,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
15114,
18949,
29889,
10327,
12,
2890,
16,
5500,
16,
12263,
16,
12263,
67,
19067,
67,
723,
273,
315,
1589,
22,
6,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
sout = Utils.cmd_output([batfile, vcvars, target]) | sout = Utils.cmd_output(['cmd', '/E:on', '/V:on', '/C', batfile, vcvars, target]) | def get_msvc_version(conf, version, target, vcvars): batfile = os.path.join(conf.blddir, "waf-print-msvc.bat") f = open(batfile, 'w') f.write("""@echo off | ec4bfaec0f2ea9e6b7e203e2cbde2de37419f6cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7302/ec4bfaec0f2ea9e6b7e203e2cbde2de37419f6cd/msvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
959,
4227,
67,
1589,
12,
3923,
16,
1177,
16,
1018,
16,
12802,
4699,
4672,
27464,
768,
273,
1140,
18,
803,
18,
5701,
12,
3923,
18,
3083,
449,
481,
16,
315,
91,
1727,
17,
1188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
959,
4227,
67,
1589,
12,
3923,
16,
1177,
16,
1018,
16,
12802,
4699,
4672,
27464,
768,
273,
1140,
18,
803,
18,
5701,
12,
3923,
18,
3083,
449,
481,
16,
315,
91,
1727,
17,
1188... |
if len (parts) < 2: | if len(parts) < 2: | def create_namespace (self, path, description='', createParentIfNeeded=True, verbose=False): """Creates the namespace specified by path using the description given. | e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4937,
261,
2890,
16,
589,
16,
2477,
2218,
2187,
752,
3054,
18299,
33,
5510,
16,
3988,
33,
8381,
4672,
3536,
2729,
326,
1981,
1269,
635,
589,
1450,
326,
2477,
864,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
4937,
261,
2890,
16,
589,
16,
2477,
2218,
2187,
752,
3054,
18299,
33,
5510,
16,
3988,
33,
8381,
4672,
3536,
2729,
326,
1981,
1269,
635,
589,
1450,
326,
2477,
864,
18,
2,
-100,... |
(None, | ( | def testOffscreen(self): Player.loadSceneString(""" <?xml version="1.0"?> <scene id="testscene" width="160" height="120"> <image id="test1" href="rgb24-65x65.png" angle="0.4"/> </scene> """) self._loadEmpty() node = avg.ImageNode(href="scene:testscene", parent=Player.getRootNode()) self.start(None, (None, lambda: self.compareImage("testOffscreen1", False), lambda: node.unlink(), lambda: self.compareImage("testOffscreen2", False), lambda: Player.getRootNode().appendChild(node), lambda: self.compareImage("testOffscreen1", False) )) | db1a10546b5f6a758aeab43f5c1a69819798ce2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7300/db1a10546b5f6a758aeab43f5c1a69819798ce2b/PlayerTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
7210,
9252,
12,
2890,
4672,
19185,
18,
945,
14370,
780,
2932,
3660,
20958,
2902,
1177,
1546,
21,
18,
20,
6,
35,
34,
411,
23694,
612,
1546,
3813,
23694,
6,
1835,
1546,
16874,
6,
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,
1842,
7210,
9252,
12,
2890,
4672,
19185,
18,
945,
14370,
780,
2932,
3660,
20958,
2902,
1177,
1546,
21,
18,
20,
6,
35,
34,
411,
23694,
612,
1546,
3813,
23694,
6,
1835,
1546,
16874,
6,
2... |
tree = BuildFolderTreeMAPI(self.manager.message_store.session) | tree = BuildFolderTreeMAPI(self.manager.message_store.session, self.exclude_prop_ids) | def OnInitDialog (self): caption = "%s folder" % (self.select_desc_noun,) if not self.single_select: caption += "(s)" self.SetWindowText(caption) self.SetDlgItemText(IDC_BUTTON_SEARCHSUB, self.checkbox_text) if self.checkbox_state is None: self.GetDlgItem(IDC_BUTTON_SEARCHSUB).ShowWindow(win32con.SW_HIDE) else: self.GetDlgItem(IDC_BUTTON_SEARCHSUB).SetCheck(self.checkbox_state) self.list = self.GetDlgItem(win32ui.IDC_LIST1) | 2fa5a19d4431b0e9b150ee04cbf292d8b6127e0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/2fa5a19d4431b0e9b150ee04cbf292d8b6127e0d/FolderSelector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
2570,
6353,
261,
2890,
4672,
11006,
273,
2213,
87,
3009,
6,
738,
261,
2890,
18,
4025,
67,
5569,
67,
82,
465,
16,
13,
309,
486,
365,
18,
7526,
67,
4025,
30,
11006,
1011,
7751,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
2570,
6353,
261,
2890,
4672,
11006,
273,
2213,
87,
3009,
6,
738,
261,
2890,
18,
4025,
67,
5569,
67,
82,
465,
16,
13,
309,
486,
365,
18,
7526,
67,
4025,
30,
11006,
1011,
7751,
8... |
self.canvas = canvas.Canvas(out) | def render(self, out): self.canvas = canvas.Canvas(out) el = self.dom.documentElement.getElementsByTagName('docinit') if el: self.docinit(el) | 4160b63de7ca732ce2ad7f4dc47049ae073a97d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/4160b63de7ca732ce2ad7f4dc47049ae073a97d0/trml2pdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
596,
4672,
415,
273,
365,
18,
9859,
18,
5457,
1046,
18,
588,
3471,
10401,
2668,
2434,
2738,
6134,
309,
415,
30,
365,
18,
2434,
2738,
12,
292,
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,
1743,
12,
2890,
16,
596,
4672,
415,
273,
365,
18,
9859,
18,
5457,
1046,
18,
588,
3471,
10401,
2668,
2434,
2738,
6134,
309,
415,
30,
365,
18,
2434,
2738,
12,
292,
13,
2,
-100,
-100,
-... | |
ext = Extension(name="moduleTNC", sources=sources) | ext = Extension(dot_join(parent_package,package,'moduleTNC'), sources=sources) | def configuration(parent_package='',parent_path=None): package = 'optimize' config = default_config_dict(package,parent_package) local_path = get_path(__name__,parent_path) minpack = glob(os.path.join(local_path,'minpack','*.f')) config['fortran_libraries'].append(('minpack',{'sources':minpack})) sources = ['_minpackmodule.c'] sources = [os.path.join(local_path,x) for x in sources] ext = Extension(dot_join(parent_package,package,'_minpack'), sources, libraries = ['minpack']) config['ext_modules'].append(ext) rootfind = glob(os.path.join(local_path,'Zeros','*.c')) roothead = os.path.join(local_path,'zeros.h') config['libraries'].append(('rootfind',{'sources':rootfind, 'headers':roothead})) sources = ['zeros.c'] sources = [os.path.join(local_path,x) for x in sources] ext = Extension(dot_join(parent_package,package,'_zeros'), sources, libraries=['rootfind']) config['ext_modules'].append(ext) lapack = system_info.lapack_opt_info().get_info() sources = ['lbfgsb.pyf','routines.f'] sources = [os.path.join(local_path,'lbfgsb-0.9',x) for x in sources] ext = Extension(name="_lbfgsb",sources=sources, **lapack) config['ext_modules'].append(ext) sources = ['moduleTNC.c', 'tnc.c'] sources = [os.path.join(local_path,'tnc',x) for x in sources] ext = Extension(name="moduleTNC", sources=sources) config['ext_modules'].append(ext) return config | a2acd69529e1925ece31015eef16daa6b11d1262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/a2acd69529e1925ece31015eef16daa6b11d1262/setup_optimize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1664,
12,
2938,
67,
5610,
2218,
2187,
2938,
67,
803,
33,
7036,
4672,
2181,
273,
296,
29155,
11,
642,
273,
805,
67,
1425,
67,
1576,
12,
5610,
16,
2938,
67,
5610,
13,
1191,
67,
803,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1664,
12,
2938,
67,
5610,
2218,
2187,
2938,
67,
803,
33,
7036,
4672,
2181,
273,
296,
29155,
11,
642,
273,
805,
67,
1425,
67,
1576,
12,
5610,
16,
2938,
67,
5610,
13,
1191,
67,
803,
27... |
def __init__(data = None) | def __init__(data = None): | def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 590) else quickfix.CharField.__init__(self, 590, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
2156,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
9349,
13,
469,
9549,
904,
18,
2156,
974,
16186,
2738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
4672,
309,
501,
422,
599,
30,
9549,
904,
18,
2156,
974,
16186,
2738,
972,
12,
2890,
16,
1381,
9349,
13,
469,
9549,
904,
18,
2156,
974,
16186,
2738,
... |
if not isinstance(abc, _Abstract): | if not issubclass(abc, _Abstract): | def dash_R(the_module, test, indirect_test, huntrleaks): # This code is hackish and inelegant, but it seems to do the job. import copy_reg, _abcoll from abc import _Abstract if not hasattr(sys, 'gettotalrefcount'): raise Exception("Tracking reference leaks requires a debug build " "of Python") # Save current values for dash_R_cleanup() to restore. fs = warnings.filters[:] ps = copy_reg.dispatch_table.copy() pic = sys.path_importer_cache.copy() abcs = {} for abc in [getattr(_abcoll, a) for a in _abcoll.__all__]: if not isinstance(abc, _Abstract): continue for obj in abc.__subclasses__() + [abc]: abcs[obj] = obj._abc_registry.copy() if indirect_test: def run_the_test(): indirect_test() else: def run_the_test(): del sys.modules[the_module.__name__] exec('import ' + the_module.__name__) deltas = [] nwarmup, ntracked, fname = huntrleaks repcount = nwarmup + ntracked print("beginning", repcount, "repetitions", file=sys.stderr) print(("1234567890"*(repcount//10 + 1))[:repcount], file=sys.stderr) dash_R_cleanup(fs, ps, pic, abcs) for i in range(repcount): rc = sys.gettotalrefcount() run_the_test() sys.stderr.write('.') sys.stderr.flush() dash_R_cleanup(fs, ps, pic, abcs) if i >= nwarmup: deltas.append(sys.gettotalrefcount() - rc - 2) print(file=sys.stderr) if any(deltas): msg = '%s leaked %s references, sum=%s' % (test, deltas, sum(deltas)) print(msg, file=sys.stderr) refrep = open(fname, "a") print(msg, file=refrep) refrep.close() | 5dfe63809ac181887d7233f90ad32efb23f3d5f7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/5dfe63809ac181887d7233f90ad32efb23f3d5f7/regrtest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12558,
67,
54,
12,
5787,
67,
2978,
16,
1842,
16,
16807,
67,
3813,
16,
366,
318,
313,
298,
581,
87,
4672,
468,
1220,
981,
353,
11769,
1468,
471,
316,
13451,
970,
16,
1496,
518,
12001,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12558,
67,
54,
12,
5787,
67,
2978,
16,
1842,
16,
16807,
67,
3813,
16,
366,
318,
313,
298,
581,
87,
4672,
468,
1220,
981,
353,
11769,
1468,
471,
316,
13451,
970,
16,
1496,
518,
12001,
... |
sage: C.cliques_containing_node() | sage: C.cliques_containing_vertex() | def cliques_containing_node(self, nodes=None, cliques=None, with_labels=False): """ Returns the cliques containing each node, represented as a list of lists. (Returns a single list if only one input node). Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. (See examples below). INPUT: -- nodes - the nodes to inspect (default is entire graph) -- with_labels - (boolean) default False returns list as above True returns a dictionary keyed by node labels -- cliques - list of cliques (if already computed) EXAMPLES: sage: C = Graph('DJ{') sage: C.cliques_containing_node() [[[4, 0]], [[4, 1, 2, 3]], [[4, 1, 2, 3]], [[4, 1, 2, 3]], [[4, 1, 2, 3], [4, 0]]] sage: E = C.cliques() sage: E [[4, 1, 2, 3], [4, 0]] sage: C.cliques_containing_node(cliques=E) [[[4, 0]], [[4, 1, 2, 3]], [[4, 1, 2, 3]], [[4, 1, 2, 3]], [[4, 1, 2, 3], [4, 0]]] sage: F = graphs.Grid2dGraph(2,3) sage: F.cliques_containing_node(with_labels=True) {(0, 1): [[(0, 1), (0, 0)], [(0, 1), (0, 2)], [(0, 1), (1, 1)]], (1, 2): [[(1, 2), (0, 2)], [(1, 2), (1, 1)]], (0, 0): [[(0, 1), (0, 0)], [(1, 0), (0, 0)]], (1, 1): [[(0, 1), (1, 1)], [(1, 2), (1, 1)], [(1, 0), (1, 1)]], (1, 0): [[(1, 0), (0, 0)], [(1, 0), (1, 1)]], (0, 2): [[(0, 1), (0, 2)], [(1, 2), (0, 2)]]} sage: F.cliques_containing_node(nodes=[(0, 1), (1, 2)]) [[[(0, 1), (0, 0)], [(0, 1), (0, 2)], [(0, 1), (1, 1)]], [[(1, 2), (0, 2)], [(1, 2), (1, 1)]]] sage: D = DiGraph({0:[1,2,3], 1:[2], 3:[0,1]}) sage.: D.show(figsize=[2,2]) sage: D.cliques_containing_node() Traceback (most recent call last): ... TypeError: Function defined for undirected graphs only. See documentation. sage: D = D.to_undirected() sage.: D.show(figsize=[2,2]) sage: D.cliques_containing_node() [[[0, 1, 2], [0, 1, 3]], [[0, 1, 2], [0, 1, 3]], [[0, 1, 2]], [[0, 1, 3]]] """ if (self.is_directed()): raise TypeError('Function defined for undirected graphs only. See documentation.') else: import networkx.cliques return networkx.cliques.cliques_containing_node(self._nxg, nodes, cliques, with_labels) | e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e18c70bce8ce7ee3fa2314ee3c87879177e3b7a1/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
29896,
67,
1213,
3280,
67,
2159,
12,
2890,
16,
2199,
33,
7036,
16,
4942,
29896,
33,
7036,
16,
598,
67,
5336,
33,
8381,
4672,
3536,
2860,
326,
4942,
29896,
4191,
1517,
756,
16,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4942,
29896,
67,
1213,
3280,
67,
2159,
12,
2890,
16,
2199,
33,
7036,
16,
4942,
29896,
33,
7036,
16,
598,
67,
5336,
33,
8381,
4672,
3536,
2860,
326,
4942,
29896,
4191,
1517,
756,
16,
10... |
return peer['nqueries'] | return peer['num_queries'] | def get_peer_nqueries(self, permid): """ @param permid The permid of the sending peer. @return The number of remote query messages already received from this peer. """ peer = self.session.lm.peer_db.getPeer(permid) print >>sys.stderr,"CommonRequestPolicy: get_peer_nqueries: getPeer",`permid`,peer print >>sys.stderr,"CommonRequestPolicy: get_peer_nqueries: called by",currentThread().getName() if peer is None: return 0 else: return peer['nqueries'] | 8ef854025b20b3002d5f10b32847d6a809e08945 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9686/8ef854025b20b3002d5f10b32847d6a809e08945/RequestPolicy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
12210,
67,
82,
13748,
12,
2890,
16,
4641,
350,
4672,
3536,
632,
891,
4641,
350,
1021,
4641,
350,
434,
326,
5431,
4261,
18,
632,
2463,
1021,
1300,
434,
2632,
843,
2743,
1818,
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,
336,
67,
12210,
67,
82,
13748,
12,
2890,
16,
4641,
350,
4672,
3536,
632,
891,
4641,
350,
1021,
4641,
350,
434,
326,
5431,
4261,
18,
632,
2463,
1021,
1300,
434,
2632,
843,
2743,
1818,
5... |
self.assertEqual(len(list(product(*args))), n) | self.assertEqual(len(list(product(*args))), expected_len) | def test_product(self): for args, result in [ ([], []), # zero iterables ??? is this correct (['ab'], [('a',), ('b',)]), # one iterable ([range(2), range(3)], [(0,0), (0,1), (0,2), (1,0), (1,1), (1,2)]), # two iterables ([range(0), range(2), range(3)], []), # first iterable with zero length ([range(2), range(0), range(3)], []), # middle iterable with zero length ([range(2), range(3), range(0)], []), # last iterable with zero length ]: self.assertEqual(list(product(*args)), result) for r in range(4): self.assertEqual(list(product(*(args*r))), list(product(*args, **dict(repeat=r)))) self.assertEqual(len(list(product(*[range(7)]*6))), 7**6) self.assertRaises(TypeError, product, range(6), None) argtypes = ['', 'abc', '', xrange(0), xrange(4), dict(a=1, b=2, c=3), set('abcdefg'), range(11), tuple(range(13))] for i in range(100): args = [random.choice(argtypes) for j in range(random.randrange(5))] n = reduce(operator.mul, map(len, args), 1) if args else 0 self.assertEqual(len(list(product(*args))), n) args = map(iter, args) self.assertEqual(len(list(product(*args))), n) | 62cd2fdfe07f7e6642c8fb1a7e4c6622ac908918 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/62cd2fdfe07f7e6642c8fb1a7e4c6622ac908918/test_itertools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5896,
12,
2890,
4672,
364,
833,
16,
563,
316,
306,
23265,
6487,
5378,
3631,
15604,
468,
3634,
27447,
282,
5317,
35,
353,
333,
3434,
261,
3292,
378,
17337,
306,
2668,
69,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5896,
12,
2890,
4672,
364,
833,
16,
563,
316,
306,
23265,
6487,
5378,
3631,
15604,
468,
3634,
27447,
282,
5317,
35,
353,
333,
3434,
261,
3292,
378,
17337,
306,
2668,
69,
2187,
... |
return cmdfunc() | return checkargs() | def runcommand(ui, options, cmdfunc): if options['profile']: import hotshot, hotshot.stats prof = hotshot.Profile("hg.prof") try: try: return prof.runcall(cmdfunc) except: try: ui.warn(_('exception raised - generating ' 'profile anyway\n')) except: pass raise finally: prof.close() stats = hotshot.stats.load("hg.prof") stats.strip_dirs() stats.sort_stats('time', 'calls') stats.print_stats(40) elif options['lsprof']: try: from mercurial import lsprof except ImportError: raise util.Abort(_( 'lsprof not available - install from ' 'http://codespeak.net/svn/user/arigo/hack/misc/lsprof/')) p = lsprof.Profiler() p.enable(subcalls=True) try: return cmdfunc() finally: p.disable() stats = lsprof.Stats(p.getstats()) stats.sort() stats.pprint(top=10, file=sys.stderr, climit=5) else: return cmdfunc() | d4e12c8bf671faa40e58f80fc30d240bd6ff94c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/d4e12c8bf671faa40e58f80fc30d240bd6ff94c6/cmdutil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
551,
362,
889,
12,
4881,
16,
702,
16,
1797,
644,
4672,
309,
702,
3292,
5040,
3546,
30,
1930,
12811,
2415,
16,
12811,
2415,
18,
5296,
9214,
273,
12811,
2415,
18,
4029,
2932,
26981,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
551,
362,
889,
12,
4881,
16,
702,
16,
1797,
644,
4672,
309,
702,
3292,
5040,
3546,
30,
1930,
12811,
2415,
16,
12811,
2415,
18,
5296,
9214,
273,
12811,
2415,
18,
4029,
2932,
26981,
... |
context = aq_inner(self.context) | def items(self): context = aq_inner(self.context) ptool = self.tools.properties() hours_per_day = ptool.xm_properties.getProperty('hours_per_day') data = [] employees = self.get_employees() for userid in employees: empldict = {} memberinfo = self.tools.membership().getMemberInfo(userid) if memberinfo and memberinfo is not None: empldict['name'] = memberinfo['fullname'] or userid # For each month create a list employees in a dict with # percentages and a url to the month view. results = [] for m in self.months: begin = DateTime(m.year, m.month, 1) end = getEndOfMonth(m.year, m.month) bookingbrains = self.tools.catalog().searchResults( portal_type='Booking', getBookingDate={"query": [begin, end], "range": "minmax", "sort_on": "getBookingDate"}, Creator=userid, path=self.searchpath) # Hm, it does not look like sort_on is working so # we do it ourselves. bookingbrains = sorted(bookingbrains, key=booking_date) grouped = itertools.groupby(bookingbrains, booking_date) billable = [] for day, bookings in grouped: day_billable = 0.0 day_total = 0.0 for bb in bookings: day_total += bb.actual_time if bb.getBillable: day_billable += bb.actual_time if day_total > 0: # XXX If the employee worked 1 hour or # less we might want to assume it is just # an hour on Saturday or something and # ignore this day to avoid unnecessarily # influencing the billable percentage # negatively. billable.append(day_billable) days_worked = len(billable) if days_worked > 0: total = sum(billable) perc = 100 * (total / hours_per_day) / days_worked else: perc = 0.0 url = "%s/booking_month?memberid=%s&month=%r&year=%r" % ( self.site_url, userid, m.month, m.year) perc_dict = dict(percentage = fmt_perc_billable(perc), url = url) results.append(perc_dict) results.reverse() empldict['monthly_percentages'] = results data.append(empldict) | ac16e0056b0ed8c699ab789968617f56de56fc7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10431/ac16e0056b0ed8c699ab789968617f56de56fc7f/employees.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
12,
2890,
4672,
293,
6738,
273,
365,
18,
6642,
18,
4738,
1435,
7507,
67,
457,
67,
2881,
273,
293,
6738,
18,
92,
81,
67,
4738,
18,
588,
1396,
2668,
16814,
67,
457,
67,
2881,
613... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1516,
12,
2890,
4672,
293,
6738,
273,
365,
18,
6642,
18,
4738,
1435,
7507,
67,
457,
67,
2881,
273,
293,
6738,
18,
92,
81,
67,
4738,
18,
588,
1396,
2668,
16814,
67,
457,
67,
2881,
613... | |
sage: v.solution_dicts() [{x: -1.00000000000000*I, y: 1.00000000000000*I}, {x: 1.00000000000000*I, y: -1.00000000000000*I}] | sage: sol_dict = v.solution_dicts() sage: x_sols_from_dict = [d[x] for d in sol_dict] sage: x_sols_from_dict.sort(); x_sols_from_dict [-1.00000000000000*I, 1.00000000000000*I] | def variable_list(self): """ | 8dd49dedc42918b2eba4ed4aa238c8d3ec211a22 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8dd49dedc42918b2eba4ed4aa238c8d3ec211a22/phc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2190,
67,
1098,
12,
2890,
4672,
3536,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
2190,
67,
1098,
12,
2890,
4672,
3536,
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,
-10... |
return ClassPropEdit.getStyle(self) + [esDialog, esReadOnly] | return ClassPropEdit.getStyle(self) + [esDialog, esReadOnly, esRecreateProp] def getSubCompanion(self): from Companions.Companions import FontDTC return FontDTC | def getStyle(self): return ClassPropEdit.getStyle(self) + [esDialog, esReadOnly] | 43e4ab46eed5e41d2af40091522912ba9175fcc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/43e4ab46eed5e41d2af40091522912ba9175fcc3/PropertyEditors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14210,
12,
2890,
4672,
327,
1659,
4658,
4666,
18,
588,
2885,
12,
2890,
13,
397,
306,
281,
6353,
16,
5001,
12066,
65,
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,
0,
0,
0,
0,
0,
0,
0,
0,
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,
14210,
12,
2890,
4672,
327,
1659,
4658,
4666,
18,
588,
2885,
12,
2890,
13,
397,
306,
281,
6353,
16,
5001,
12066,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if self.isPlaying: | if self.isPlaying and self.stopOnDeselect: | def onDeselected(self, frame): if self.isPlaying: Controller.instance.playbackController.stop(False) | e2ba8c0b5ce2c0f8f3550e10956a6227dadbb6fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/e2ba8c0b5ce2c0f8f3550e10956a6227dadbb6fc/app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
6305,
292,
828,
12,
2890,
16,
2623,
4672,
309,
365,
18,
291,
11765,
310,
471,
365,
18,
5681,
1398,
6305,
13759,
30,
6629,
18,
1336,
18,
1601,
823,
2933,
18,
5681,
12,
8381,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
6305,
292,
828,
12,
2890,
16,
2623,
4672,
309,
365,
18,
291,
11765,
310,
471,
365,
18,
5681,
1398,
6305,
13759,
30,
6629,
18,
1336,
18,
1601,
823,
2933,
18,
5681,
12,
8381,
13,
... |
pixbuf = pixbuf.scale_simple(int(pixbuf.get_width()/x_rat), | pixbuf = pixbuf.scale_simple(int(pixbuf.get_width()/y_rat), | def __init__(self, title, filename): width = gtk.gdk.screen_width() / 2 height = gtk.gdk.screen_height() / 2 pixbuf = gtk.gdk.pixbuf_new_from_file(filename) | 64e0202ed7a35ef3afad4dcc9d8835ad53f8bec4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/64e0202ed7a35ef3afad4dcc9d8835ad53f8bec4/quodlibet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2077,
16,
1544,
4672,
1835,
273,
22718,
18,
75,
2883,
18,
9252,
67,
2819,
1435,
342,
576,
2072,
273,
22718,
18,
75,
2883,
18,
9252,
67,
4210,
1435,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2077,
16,
1544,
4672,
1835,
273,
22718,
18,
75,
2883,
18,
9252,
67,
2819,
1435,
342,
576,
2072,
273,
22718,
18,
75,
2883,
18,
9252,
67,
4210,
1435,
342,
... |
formats = list(iter(formats)) | def import_book_directory(self, dirpath, callback=None): dirpath = os.path.abspath(dirpath) formats = self.find_books_in_directory(dirpath, True) if not formats: return formats = list(iter(formats)) mi = metadata_from_formats(formats) if mi.title is None: return if self.has_book(mi): return [(mi, formats)] self.import_book(mi, formats) if callable(callback): callback(mi.title) | bdb0da92f8249216f8d9c9557c03fb77164932be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/bdb0da92f8249216f8d9c9557c03fb77164932be/database2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
3618,
67,
5149,
12,
2890,
16,
17803,
16,
1348,
33,
7036,
4672,
17803,
273,
1140,
18,
803,
18,
5113,
803,
12,
1214,
803,
13,
6449,
273,
365,
18,
4720,
67,
12567,
67,
267,
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,
1930,
67,
3618,
67,
5149,
12,
2890,
16,
17803,
16,
1348,
33,
7036,
4672,
17803,
273,
1140,
18,
803,
18,
5113,
803,
12,
1214,
803,
13,
6449,
273,
365,
18,
4720,
67,
12567,
67,
267,
67... | |
for cache_entry, parent in input_cache[:bucutjob.files_per_bucut]: | for parent in set(parent for cache_entry, parent in input_cache[:bucutjob.files_per_bucut]): | def make_bucut_fragment(dag, parents, tag, verbose = False): input_cache = collect_output_caches(parents) nodes = set() while input_cache: node = BucutNode(bucutjob) node.add_input_cache([cache_entry for (cache_entry, parent) in input_cache[:bucutjob.files_per_bucut]]) for cache_entry, parent in input_cache[:bucutjob.files_per_bucut]: node.add_parent(parent) del input_cache[:bucutjob.files_per_bucut] seg = cache_span(node.get_input_cache()) node.set_name("ligolw_bucut_%s_%d_%d" % (tag, int(seg[0]), int(abs(seg)))) node.add_macro("macrocomment", tag) dag.add_node(node) nodes.add(node) return nodes | 50c69909c4e1faeacd26be91c41f55b7e9f45214 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/50c69909c4e1faeacd26be91c41f55b7e9f45214/power.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
70,
89,
5150,
67,
11956,
12,
30204,
16,
6298,
16,
1047,
16,
3988,
273,
1083,
4672,
810,
67,
2493,
273,
3274,
67,
2844,
67,
17703,
281,
12,
12606,
13,
2199,
273,
444,
1435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
70,
89,
5150,
67,
11956,
12,
30204,
16,
6298,
16,
1047,
16,
3988,
273,
1083,
4672,
810,
67,
2493,
273,
3274,
67,
2844,
67,
17703,
281,
12,
12606,
13,
2199,
273,
444,
1435,
... |
1/x + 1/2 - (x/12) + x^2/24 - (19*x^3/720) | 1/x + 1/2 - x/12 + x^2/24 - (19*x^3/720) | def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$. | c01bc61bd25d9363f0356f86672ff77562a9b5da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c01bc61bd25d9363f0356f86672ff77562a9b5da/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
2890,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
331,
6740,
326,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
528,
80,
280,
12,
2890,
16,
331,
16,
279,
16,
290,
4672,
3536,
7784,
5708,
365,
316,
279,
15282,
399,
528,
80,
280,
578,
511,
8377,
547,
4166,
316,
326,
2190,
331,
6740,
326,
16... |
return defer.DeferredList(L, consumeErrors=True) | return defer.DeferredList(L) | def tearDown(self): L = [] for conn in self.cli, self.svr: if conn.transport is not None: # depend on amp's function connection-dropping behavior ccl = conn.connectionLost d = defer.Deferred().addBoth(ccl) conn.connectionLost = d.callback conn.transport.loseConnection() L.append(d) if self.serverPort is not None: L.append(self.serverPort.stopListening()) if self.clientConn is not None: self.clientConn.disconnect() return defer.DeferredList(L, consumeErrors=True) | 07cccc7ccff4206e949cb668b89cf9edc620f7a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/07cccc7ccff4206e949cb668b89cf9edc620f7a5/test_amp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
511,
273,
5378,
364,
1487,
316,
365,
18,
4857,
16,
365,
18,
5751,
86,
30,
309,
1487,
18,
13049,
353,
486,
599,
30,
468,
2447,
603,
16946,
1807,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
268,
2091,
4164,
12,
2890,
4672,
511,
273,
5378,
364,
1487,
316,
365,
18,
4857,
16,
365,
18,
5751,
86,
30,
309,
1487,
18,
13049,
353,
486,
599,
30,
468,
2447,
603,
16946,
1807,
445,
... |
The kurtosis of values along an axis, returning 0 where all values are equal. | The kurtosis of values along an axis. If all values are equal, return -3 for Fisher's definition and 0 for Pearson's definition. | def kurtosis(a, axis=0, fisher=True, bias=True): """Computes the kurtosis (Fisher or Pearson) of a dataset. Kurtosis is the fourth central moment divided by the square of the variance. If Fisher's definition is used, then 3.0 is subtracted from the result to give 0.0 for a normal distribution. If bias is False then the kurtosis is calculated using k statistics to eliminate bias comming from biased moment estimators Use kurtosistest() to see if result is close enough to normal. Parameters ---------- a : array axis : int or None fisher : bool If True, Fisher's definition is used (normal ==> 0.0). If False, Pearson's definition is used (normal ==> 3.0). bias : bool If False, then the calculations are corrected for statistical bias. Returns ------- The kurtosis of values along an axis, returning 0 where all values are equal. References ---------- [CRCProbStat2000] section 2.2.25 """ a, axis = _chk_asarray(a, axis) n = a.shape[axis] m2 = moment(a,2,axis) m4 = moment(a,4,axis) zero = (m2 == 0) vals = np.where(zero, 0, m4/ m2**2.0) if not bias: can_correct = (n > 3) & (m2 > 0) if can_correct.any(): m2 = np.extract(can_correct, m2) m4 = np.extract(can_correct, m4) nval = 1.0/(n-2)/(n-3)*((n*n-1.0)*m4/m2**2.0-3*(n-1)**2.0) np.place(vals, can_correct, nval+3.0) if fisher: return vals - 3 else: return vals | 3e4c1713075aaf12250d77acf9ddacabfa4bc7e6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/3e4c1713075aaf12250d77acf9ddacabfa4bc7e6/stats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
417,
295,
14627,
291,
12,
69,
16,
2654,
33,
20,
16,
284,
31721,
33,
5510,
16,
12005,
33,
5510,
4672,
3536,
10743,
326,
417,
295,
14627,
291,
261,
42,
31721,
578,
453,
2091,
816,
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,
417,
295,
14627,
291,
12,
69,
16,
2654,
33,
20,
16,
284,
31721,
33,
5510,
16,
12005,
33,
5510,
4672,
3536,
10743,
326,
417,
295,
14627,
291,
261,
42,
31721,
578,
453,
2091,
816,
13,
... |
for param in dConfigParamList: if(config.GetBool('want-%s-report' % (param,), 0)): doPrint = True break | dConfigParamList = [param for param in dConfigParamList \ if config.GetBool('want-%s-report' % (param,), 0)] doPrint = bool(dConfigParamList) pass | def decorator(f): return f | b3c75ef6790058aadf797b0280da9100f372364a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/b3c75ef6790058aadf797b0280da9100f372364a/PythonUtil.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7367,
12,
74,
4672,
327,
284,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7367,
12,
74,
4672,
327,
284,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
_children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', | _children['{%s}entry' % atom.ATOM_NAMESPACE] = ('entry', | def CalendarEventEntryLinkFromString(xml_string): return atom.CreateClassFromXMLString(CalendarEventEntryLink, xml_string) | b441c0ccc7da55ff31f704dc6779ec676da299f1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/b441c0ccc7da55ff31f704dc6779ec676da299f1/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5542,
1133,
1622,
2098,
9193,
12,
2902,
67,
1080,
4672,
327,
3179,
18,
1684,
797,
1265,
4201,
780,
12,
7335,
1133,
1622,
2098,
16,
2025,
67,
1080,
13,
282,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5542,
1133,
1622,
2098,
9193,
12,
2902,
67,
1080,
4672,
327,
3179,
18,
1684,
797,
1265,
4201,
780,
12,
7335,
1133,
1622,
2098,
16,
2025,
67,
1080,
13,
282,
2,
-100,
-100,
-100,
-100,
-... |
for pattern in ("*.conf", "*.xml", "*.txt", "*.sh"): | for pattern in extensions: | def copy_other_files(cmd, outputbase): for inputdir in [ "src/ZConfig/components/basic", "src/ZConfig/components/logger", "src/ZConfig/tests/input", "src/ZConfig/tests/library", "src/ZConfig/tests/library/thing", "src/ZConfig/tests/library/thing/extras", "src/ZConfig/tests/library/widget", "src/ZEO", "src/ZODB", "src/zdaemon", "src/zdaemon/tests", "src/zLOG", ]: inputdir = convert_path(inputdir) outputdir = os.path.join(outputbase, inputdir) if not os.path.exists(outputdir): dir_util.mkpath(outputdir) for pattern in ("*.conf", "*.xml", "*.txt", "*.sh"): for fn in glob.glob(os.path.join(inputdir, pattern)): cmd.copy_file(fn, os.path.join(outputbase, fn)) | 6d6128d31f86a5245aa9eec629d15dd78eff0bc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/6d6128d31f86a5245aa9eec629d15dd78eff0bc9/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
3011,
67,
2354,
12,
4172,
16,
876,
1969,
4672,
364,
810,
1214,
316,
306,
315,
4816,
19,
62,
809,
19,
8119,
19,
13240,
3113,
315,
4816,
19,
62,
809,
19,
8119,
19,
4901,
3113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1610,
67,
3011,
67,
2354,
12,
4172,
16,
876,
1969,
4672,
364,
810,
1214,
316,
306,
315,
4816,
19,
62,
809,
19,
8119,
19,
13240,
3113,
315,
4816,
19,
62,
809,
19,
8119,
19,
4901,
3113... |
gtk.about_dialog_set_url_hook(show_website, "http://arkadas.berlios.de") | gtk.about_dialog_set_url_hook(lambda d,l: browser_load(l, self)) aboutdialog.set_website("http://arkadas.berlios.de") | def show_website(dialog, blah, link): webbrowser.open_new(link) | 337e2628519817abde9df50dbed69c769add8439 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/337e2628519817abde9df50dbed69c769add8439/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
21868,
12,
12730,
16,
2811,
9795,
16,
1692,
4672,
3311,
11213,
18,
3190,
67,
2704,
12,
1232,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
67,
21868,
12,
12730,
16,
2811,
9795,
16,
1692,
4672,
3311,
11213,
18,
3190,
67,
2704,
12,
1232,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.logger.error( '_getFields: %s' % retDict['Message'] ) | self.logger.debug( '_getFields: %s' % retDict['Message'] ) | def _getFields( self, tableName, outFields = [], inFields = [], inValues = [], limit = 0, conn=False ): """ Select "outFields" from "tableName" with conditions lInFields = lInValues N records can match the condition return S_OK( tuple(Field,Value) ) if outFields = [] all fields in "tableName" are returned if inFields and inValues are [], no condition is imposed if limit is not 0, the given limit is set Strings inValues are properly scaped using the _escape_string method. """ self.logger.verbose( '_getFields:', 'selecting fields %s from table `%s`.' % ( str(outFields), tableName ) ) | dbbfc2e9691b79636765e7ead3e5df27861504bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/dbbfc2e9691b79636765e7ead3e5df27861504bc/MySQL.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
2314,
12,
365,
16,
4775,
16,
596,
2314,
273,
5378,
16,
316,
2314,
273,
5378,
16,
316,
1972,
273,
5378,
16,
1800,
273,
374,
16,
1487,
33,
8381,
262,
30,
3536,
6766,
315,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2314,
12,
365,
16,
4775,
16,
596,
2314,
273,
5378,
16,
316,
2314,
273,
5378,
16,
316,
1972,
273,
5378,
16,
1800,
273,
374,
16,
1487,
33,
8381,
262,
30,
3536,
6766,
315,
659... |
The 'quotetabs' flag indicates whether tabs should be quoted. """ | The 'quotetabs' flag indicates whether embedded tabs and spaces should be quoted. Note that line-ending tabs and spaces are always encoded, as per RFC 1521. """ def write(s, output=output, lineEnd='\n'): if s and s[-1:] in ' \t': output.write(s[:-1] + quote(s[-1]) + lineEnd) else: output.write(s + lineEnd) prevline = None linelen = 0 | def encode(input, output, quotetabs): """Read 'input', apply quoted-printable encoding, and write to 'output'. 'input' and 'output' are files with readline() and write() methods. The 'quotetabs' flag indicates whether tabs should be quoted. """ while 1: line = input.readline() if not line: break new = '' last = line[-1:] if last == '\n': line = line[:-1] else: last = '' prev = '' for c in line: if needsquoting(c, quotetabs): c = quote(c) if len(new) + len(c) >= MAXLINESIZE: output.write(new + ESCAPE + '\n') new = '' new = new + c prev = c if prev in (' ', '\t'): output.write(new + ESCAPE + '\n\n') else: output.write(new + '\n') | 53a09da638705a8ff2ab16da881324da670a0b96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/53a09da638705a8ff2ab16da881324da670a0b96/quopri.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2630,
16,
876,
16,
4914,
278,
5113,
4672,
3536,
1994,
296,
2630,
2187,
2230,
9298,
17,
1188,
429,
2688,
16,
471,
1045,
358,
296,
2844,
10332,
225,
296,
2630,
11,
471,
296,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2630,
16,
876,
16,
4914,
278,
5113,
4672,
3536,
1994,
296,
2630,
2187,
2230,
9298,
17,
1188,
429,
2688,
16,
471,
1045,
358,
296,
2844,
10332,
225,
296,
2630,
11,
471,
296,
28... |
rawAtom=PDBAtom(self.chainObj.getPdbID(), self.chainObj.getChainID() , counter, 'CA') | rawAtom=PDBAtom(self.chainObj.getPdbID(), self.chainObj.getChainID() , i+1, 'CA') | def findCAlphaPositionPossibilities(self): print 'in findCAlphaPositionPossibilities' self.possibleAtomsList = [] radius = float( self.CAdoubleSpinBox.value() ) #self.parentWidget()=>SequenceWidget, self.parentWidget().parentWidget() => SequenceDock skeletonViewer = self.parentWidget().parentWidget().app.viewers['skeleton'] meshRenderer = skeletonViewer.renderer atom = self.chainObj[ int( str(self.prevNum.text()) ) ].getAtom('CA') if not atom: self.possibilityNumSpinBox.setRange(0, 0) self.numPossibilities.setText('of ?') return atomPos = atom.getPosition() #print atomPos, radius #TODO: determine how to display possible atom locations if skeletonViewer.loaded: print "Number of intersections:", numIntersections = meshRenderer.intersectMeshAndSphere(atomPos, radius) print numIntersections if numIntersections == 0: print "No possibilities!" self.numPossibilities.setText('of 0') self.possibilityNumSpinBox.setRange(0, 0) return possiblePositionsList = [] for i in range(numIntersections): possiblePositionsList.append( meshRenderer.getIntersectionPoint(i) ) print 'Possible positions:', possiblePositionsList counter = 1 #100000 #shouldn't clash with actually placed atoms for i in range(len(possiblePositionsList)): pos = possiblePositionsList[i] x, y, z = (pos.x(), pos.y(), pos.z()) print '(%f, %f, %f)' % (x, y, z) rawAtom=PDBAtom(self.chainObj.getPdbID(), self.chainObj.getChainID() , counter, 'CA') rawAtom.setPosition(pos) rawAtom.setElement('C') rawAtom.setColor(0, 1, 0, 1) try: previousAtomPos = self.chainObj[int( str(self.prevNum.text()) )-1].getAtom('CA').getPosition() if ((pos.x() - previousAtomPos.x())**2 + (pos.y() - previousAtomPos.y())**2 + (pos.z() - previousAtomPos.z())**2) < 4: print 'one possible atom was too close to an existing atom' pass else: print 'we were able to get the previous atom position' self.possibleAtomsList.append(rawAtom) counter += 1 except KeyError: print 'could not get previous atom position' self.possibleAtomsList.append(rawAtom) counter += 1 | ca17ad546b24f59586930c5b4dcc74c6920bc51a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/ca17ad546b24f59586930c5b4dcc74c6920bc51a/SequenceView.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
39,
9690,
2555,
1616,
24074,
12,
2890,
4672,
1172,
296,
267,
1104,
39,
9690,
2555,
1616,
24074,
11,
365,
18,
12708,
14280,
682,
273,
5378,
5725,
273,
1431,
12,
365,
18,
39,
1871,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
39,
9690,
2555,
1616,
24074,
12,
2890,
4672,
1172,
296,
267,
1104,
39,
9690,
2555,
1616,
24074,
11,
365,
18,
12708,
14280,
682,
273,
5378,
5725,
273,
1431,
12,
365,
18,
39,
1871,
... |
dateString = "%s hours and %s minutes" % (hours, minutes) | dateString = _(u"$h hours and $m minutes", mapping={'h': hours, 'm': minutes}) | def _getNiceTimeDifference(self, baseTime): now = DateTime() days = int(round(now - DateTime(baseTime))) delta = timedelta(now - DateTime(baseTime)) days = delta.days hours = int(delta.seconds / 3600) minutes = (delta.seconds - (hours * 3600)) /60 | 7dcc4a930008ed9d745ecae9ac2ca37bc6529ed7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12235/7dcc4a930008ed9d745ecae9ac2ca37bc6529ed7/locking.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
50,
1812,
950,
16220,
12,
2890,
16,
1026,
950,
4672,
2037,
273,
3716,
1435,
4681,
273,
509,
12,
2260,
12,
3338,
300,
3716,
12,
1969,
950,
20349,
3622,
273,
10661,
12,
3338,
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,
588,
50,
1812,
950,
16220,
12,
2890,
16,
1026,
950,
4672,
2037,
273,
3716,
1435,
4681,
273,
509,
12,
2260,
12,
3338,
300,
3716,
12,
1969,
950,
20349,
3622,
273,
10661,
12,
3338,
3... |
self.__modify_list_subvariants(temp_list, name, dep_list, add_to_shortname) | self.__modify_list_subvariants(temp_list, name, dep_list, add_to_shortname) | def parse_variants(self, file, list, subvariants=False, prev_indent=-1): """ Read and parse lines from file like object until a line with an indent level lower than or equal to prev_indent is encountered. | c6515985d399263b59c47f2abad300af35e561ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/c6515985d399263b59c47f2abad300af35e561ed/kvm_config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
15886,
12,
2890,
16,
585,
16,
666,
16,
720,
15886,
33,
8381,
16,
2807,
67,
9355,
29711,
21,
4672,
3536,
2720,
471,
1109,
2362,
628,
585,
3007,
733,
3180,
279,
980,
598,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
67,
15886,
12,
2890,
16,
585,
16,
666,
16,
720,
15886,
33,
8381,
16,
2807,
67,
9355,
29711,
21,
4672,
3536,
2720,
471,
1109,
2362,
628,
585,
3007,
733,
3180,
279,
980,
598,
392,
... |
raise "\nERROR: Invalid Tree Item. " | raise Exception("\nERROR: Invalid Tree Item. ") | def Delete(self, item): """Delete an item.""" | e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
12,
2890,
16,
761,
4672,
3536,
2613,
392,
761,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2504,
12,
2890,
16,
761,
4672,
3536,
2613,
392,
761,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
print time.strftime("%d/%M/%Y",data) | def __format_date(self, value): if (len(value.split(".")) > 1): data = time.strptime(value, "%D.%M.%Y") elif(len(value.split("//")) > 1): data = time.strptime(value, "%D/%M/%Y") else: data = time.strptime(value, "%Y%M%d") print time.strftime("%d/%M/%Y",data) return time.strftime("%d/%M/%Y",data) | 7d25dcfb68f69196ad720fe53314f3f82c165a55 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10228/7d25dcfb68f69196ad720fe53314f3f82c165a55/dicom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2139,
67,
712,
12,
2890,
16,
460,
4672,
225,
309,
261,
1897,
12,
1132,
18,
4939,
2932,
1199,
3719,
405,
225,
404,
4672,
501,
273,
813,
18,
701,
10650,
12,
1132,
16,
2213,
40,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2139,
67,
712,
12,
2890,
16,
460,
4672,
225,
309,
261,
1897,
12,
1132,
18,
4939,
2932,
1199,
3719,
405,
225,
404,
4672,
501,
273,
813,
18,
701,
10650,
12,
1132,
16,
2213,
40,
7... | |
@unittest.skipIf(sys.flags.optimize >= 2, "Docstrings are omitted with -O2 and above") | def test_crlf_newlines(self): old_sep = os.linesep os.linesep = "\r\n" try: fn = os.path.join(TEST_DATA_DIR, "crlf.py") fixes = refactor.get_fixers_from_package("lib2to3.fixes") self.check_file_refactoring(fn, fixes) finally: os.linesep = old_sep | e3f5c6f72f3d10260fd80c0768bb8fffa9bd2df6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/e3f5c6f72f3d10260fd80c0768bb8fffa9bd2df6/test_refactor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
1321,
74,
67,
31276,
12,
2890,
4672,
1592,
67,
10814,
273,
1140,
18,
3548,
881,
1140,
18,
3548,
881,
273,
1548,
86,
64,
82,
6,
775,
30,
2295,
273,
1140,
18,
803,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
71,
1321,
74,
67,
31276,
12,
2890,
4672,
1592,
67,
10814,
273,
1140,
18,
3548,
881,
1140,
18,
3548,
881,
273,
1548,
86,
64,
82,
6,
775,
30,
2295,
273,
1140,
18,
803,
18,
... | |
self.__send(pack('!ii', 4, arg)) | self.__send(_pack('!ii', 4, arg)) | def funcall(self, oid, *args): """ Low-level call to PostgreSQL function, you must supply the oid of the function, and have the args supplied as ints or strings. | 15a18213714dad035ac4b8cb3da491223392d5b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1238/15a18213714dad035ac4b8cb3da491223392d5b1/bpgsql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
454,
12,
2890,
16,
7764,
16,
380,
1968,
4672,
3536,
23629,
17,
2815,
745,
358,
26447,
445,
16,
1846,
1297,
14467,
326,
7764,
434,
326,
445,
16,
471,
1240,
326,
833,
4580,
487,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1326,
454,
12,
2890,
16,
7764,
16,
380,
1968,
4672,
3536,
23629,
17,
2815,
745,
358,
26447,
445,
16,
1846,
1297,
14467,
326,
7764,
434,
326,
445,
16,
471,
1240,
326,
833,
4580,
487,
15... |
if self._code[-1][-3:]==' Td': L = string.split(self._code[-1]) if len(L)==3: del self._code[-1] else: self._code[-1] = string.join(L[:-4]) if dx<>0: self._code.append('%s 0 Td' % fp_str(dx)) | self.moveCursor(dx,0) | def setXPos(self, dx): """Moves to a point dx away from the start of the current line - NOT from the current point! So if you call it in mid-sentence, watch out.""" if self._code[-1][-3:]==' Td': L = string.split(self._code[-1]) if len(L)==3: del self._code[-1] else: self._code[-1] = string.join(L[:-4]) if dx<>0: self._code.append('%s 0 Td' % fp_str(dx)) | 7d264f97de02e09d9ed45dfbdc669bbebbfa2777 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/7d264f97de02e09d9ed45dfbdc669bbebbfa2777/textobject.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23733,
1616,
12,
2890,
16,
6633,
4672,
3536,
19297,
358,
279,
1634,
6633,
10804,
628,
326,
787,
434,
326,
783,
980,
300,
4269,
628,
326,
783,
1634,
5,
6155,
309,
1846,
745,
518,
316,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
23733,
1616,
12,
2890,
16,
6633,
4672,
3536,
19297,
358,
279,
1634,
6633,
10804,
628,
326,
787,
434,
326,
783,
980,
300,
4269,
628,
326,
783,
1634,
5,
6155,
309,
1846,
745,
518,
316,
7... |
x = self.nlp.x0[:] | x = nlp.x0[:] | def StartingPoint(self, **kwargs): """ Compute a strictly feasible initial primal-dual estimate (x,z). By default, x is taken as the starting point given in `nlp` and moved strictly into the bounds, and z is taken as the vector of ones. """ n = self.nlp.n Lvar = self.nlp.Lvar ; lB = self.lowerB Uvar = self.nlp.Uvar ; uB = self.upperB ; rB = self.rangeB bnd_rel = self.bound_rel_factor ; bnd_abs = self.bound_abs_factor | 9a6c4f472b4224b483cf355221f1a3acafaa6be3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/9a6c4f472b4224b483cf355221f1a3acafaa6be3/pdmerit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24591,
2148,
12,
2890,
16,
2826,
4333,
4672,
3536,
8155,
279,
23457,
1656,
30711,
2172,
846,
2840,
17,
72,
1462,
11108,
261,
92,
16,
94,
2934,
2525,
805,
16,
619,
353,
9830,
487,
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,
24591,
2148,
12,
2890,
16,
2826,
4333,
4672,
3536,
8155,
279,
23457,
1656,
30711,
2172,
846,
2840,
17,
72,
1462,
11108,
261,
92,
16,
94,
2934,
2525,
805,
16,
619,
353,
9830,
487,
326,
... |
detector = inject.cached_detector[inject.prefix_to_name[instrument]] gps = { "H1": date.LIGOTimeGPS(sim.h_peak_time, sim.h_peak_time_ns), "H2": date.LIGOTimeGPS(sim.h_peak_time, sim.h_peak_time_ns), "L1": date.LIGOTimeGPS(sim.l_peak_time, sim.l_peak_time_ns) }[instrument] | def hrss_in_instrument(sim, instrument): """ Given an injection and an instrument, compute and return the h_rss of the injection as should be observed in the instrument. That is, project the waveform onto the instrument, and return the root integrated strain squared. """ if sim.coordinates != "EQUATORIAL": raise ValueError, sim.coordinates detector = inject.cached_detector[inject.prefix_to_name[instrument]] gps = { "H1": date.LIGOTimeGPS(sim.h_peak_time, sim.h_peak_time_ns), "H2": date.LIGOTimeGPS(sim.h_peak_time, sim.h_peak_time_ns), "L1": date.LIGOTimeGPS(sim.l_peak_time, sim.l_peak_time_ns) }[instrument] fplus, fcross = inject.XLALComputeDetAMResponse( detector.response, sim.longitude, # ra sim.latitude, # dec sim.polarization, date.XLALGreenwichMeanSiderealTime(gps) ) return abs(fplus) * sim.hrss | 3d409cf35c8328e70fcc2b55484d332c6a79fbd5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/3d409cf35c8328e70fcc2b55484d332c6a79fbd5/SimBurstUtils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15407,
1049,
67,
267,
67,
22818,
12,
9812,
16,
10353,
4672,
3536,
16803,
392,
10380,
471,
392,
10353,
16,
3671,
471,
327,
326,
366,
67,
25151,
434,
326,
10380,
487,
1410,
506,
12117,
316... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15407,
1049,
67,
267,
67,
22818,
12,
9812,
16,
10353,
4672,
3536,
16803,
392,
10380,
471,
392,
10353,
16,
3671,
471,
327,
326,
366,
67,
25151,
434,
326,
10380,
487,
1410,
506,
12117,
316... | |
if hasattr(sys, "gettotalrefcount"): | if hasattr(set, "test_c_api"): | def test_weakref(self): s = self.thetype('gallahad') p = proxy(s) self.assertEqual(str(p), str(s)) s = None self.assertRaises(ReferenceError, str, p) | cc79ed095a01f1fefd8c4ceab4cf550f27b41cba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc79ed095a01f1fefd8c4ceab4cf550f27b41cba/test_set.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
26008,
1734,
12,
2890,
4672,
272,
273,
365,
18,
451,
5872,
2668,
75,
454,
9795,
361,
6134,
293,
273,
2889,
12,
87,
13,
365,
18,
11231,
5812,
12,
701,
12,
84,
3631,
609,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
26008,
1734,
12,
2890,
4672,
272,
273,
365,
18,
451,
5872,
2668,
75,
454,
9795,
361,
6134,
293,
273,
2889,
12,
87,
13,
365,
18,
11231,
5812,
12,
701,
12,
84,
3631,
609,
12,... |
AAJITTER = 1 Draw.Redraw() else: AAJITTER = 0 | AAJITTER.val = 1 Draw.Redraw() else: AAJITTER.val = 0 | def import_output(): global IM_HEIGHT, IM_WIDTH # Retrieve Blender's Scene ID values world = Blender.World.GetCurrent() horcol = world.getHor() horcol0, horcol1, horcol2 = horcol[0], horcol[1], horcol[2] IM_HEIGHT = SCENE.getRenderingContext().imageSizeY() IM_WIDTH = SCENE.getRenderingContext().imageSizeX() if SCENE.properties['SceneProp'] == "true": IM_WIDTH = SCENE.properties['ImageWidth'] IM_HEIGHT = SCENE.properties['ImageHeight'] MINAA.val = SCENE.properties['MinAA'] MAXAA.val = SCENE.properties['MaxAA'] AASAMPLES.val = SCENE.properties['Samples'] IMGFILTER.val = SCENE.properties['Filter'] DEPTH_DIFF.val = SCENE.properties['DepthDiff'] DEPTH_REFL.val = SCENE.properties['DepthRefl'] DEPTH_REFR.val = SCENE.properties['DepthRefr'] Draw.Redraw() if SCENE.properties['Jitter'] == "true": AAJITTER = 1 Draw.Redraw() else: AAJITTER = 0 Draw.Redraw() if SCENE.properties['Blender Background'] == "true": IMP_BCKGRD.val = 1 horcol0 = SCENE.properties['HorizonColR'] horcol1 = SCENE.properties['HorizonColG'] horcol2 = SCENE.properties['HorizonColB'] BACKGROUND.val = 0 Draw.Redraw() else: IMP_BCKGRD.val = 0 Draw.Redraw() if SCENE.properties['Script Background'] == "true": BACKGROUND.val = 1 BCKGRD.val = SCENE.properties['HorizonCol'][0], SCENE.properties['HorizonCol'][1], SCENE.properties['HorizonCol'][2] IMP_BCKGRD.val = 0 Draw.Redraw() else: BACKGROUND.val = 0 Draw.Redraw() BUCKETSIZE.val = SCENE.properties['Bucket Size'] BUCKETTYPE.val = SCENE.properties['Bucket Type'] if SCENE.properties['Reverse Bucket'] == "true": REVERSE.val = 1 Draw.Redraw() else: REVERSE.val = 0 Draw.Redraw() | 24ef0a8a6c93480616c59f7b879e4ebaadd3dfad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12400/24ef0a8a6c93480616c59f7b879e4ebaadd3dfad/sunflow_export.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1930,
67,
2844,
13332,
2552,
6246,
67,
14595,
16,
6246,
67,
10023,
468,
10708,
8069,
2345,
1807,
29347,
1599,
924,
9117,
273,
8069,
2345,
18,
18071,
18,
967,
3935,
1435,
29404,
1293,
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,
1930,
67,
2844,
13332,
2552,
6246,
67,
14595,
16,
6246,
67,
10023,
468,
10708,
8069,
2345,
1807,
29347,
1599,
924,
9117,
273,
8069,
2345,
18,
18071,
18,
967,
3935,
1435,
29404,
1293,
273,
... |
draft = review_request.get_draft(request.user) | def review_detail(request, review_request_id, template_name="reviews/review_detail.html"): """ Main view for review requests. This covers the review request information and all the reviews on it. """ review_request = get_object_or_404(ReviewRequest, pk=review_request_id) reviews = review_request.get_public_reviews() draft = review_request.get_draft(request.user) review = review_request.get_pending_review(request.user) if request.user.is_authenticated(): # If the review request is public and pending review and if the user # is logged in, mark that they've visited this review request. if review_request.public and review_request.status == "P": visited, visited_is_new = ReviewRequestVisit.objects.get_or_create( user=request.user, review_request=review_request) visited.timestamp = datetime.now() visited.save() # Unlike review above, this covers replies as well. review_timestamp = 0 if request.user.is_authenticated(): try: last_draft_review = Review.objects.filter( review_request=review_request, user=request.user, public=False).latest() review_timestamp = last_draft_review.timestamp except Review.DoesNotExist: pass # Find out if we can bail early. Generate an ETag for this. timestamps = [review_request.last_updated] draft = review_request.get_draft() if draft: timestamps.append(draft.last_updated) last_activity_time = get_latest_timestamp(timestamps) etag = "%s:%s:%s:%s" % (request.user, last_activity_time, review_timestamp, settings.AJAX_SERIAL) if etag_if_none_match(request, etag): return HttpResponseNotModified() repository = review_request.repository changedescs = review_request.changedescs.filter(public=True) entries = [] for temp_review in reviews: temp_review.ordered_comments = \ temp_review.comments.order_by('filediff', 'first_line') entries.append({ 'review': temp_review, 'timestamp': temp_review.timestamp, }) for changedesc in changedescs: fields_changed = [] for name, info in changedesc.fields_changed.items(): multiline = False if 'added' in info or 'removed' in info: change_type = 'add_remove' # We don't hard-code URLs in the bug info, since the # tracker may move, but we can do it here. if (name == "bugs_closed" and review_request.repository.bug_tracker): bug_url = review_request.repository.bug_tracker for field in info: for i, buginfo in enumerate(info[field]): try: full_bug_url = bug_url % buginfo[0] info[field][i] = (buginfo[0], full_bug_url) except TypeError: logging.warning("Invalid bugtracker url format") elif 'old' in info or 'new' in info: change_type = 'changed' multiline = (name == "description" or name == "testing_done") # Branch text is allowed to have entities, so mark it safe. if name == "branch": if 'old' in info: info['old'][0] = mark_safe(info['old'][0]) if 'new' in info: info['new'][0] = mark_safe(info['new'][0]) elif name == "screenshot_captions": change_type = 'screenshot_captions' else: # No clue what this is. Bail. continue fields_changed.append({ 'title': fields_changed_name_map.get(name, name), 'multiline': multiline, 'info': info, 'type': change_type, }) entries.append({ 'changeinfo': fields_changed, 'changedesc': changedesc, 'timestamp': changedesc.timestamp, }) entries.sort(key=lambda item: item['timestamp']) response = render_to_response(template_name, RequestContext(request, { 'draft': draft, 'review_request': review_request, 'review_request_details': draft or review_request, 'entries': entries, 'review': review, 'request': request, 'upload_diff_form': UploadDiffForm(repository), 'upload_screenshot_form': UploadScreenshotForm(), 'scmtool': repository.get_scmtool(), 'PRE_CREATION': PRE_CREATION, })) set_etag(response, etag) return response | 9db59d63d774b5ba88df0997c2be9def247577c7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/9db59d63d774b5ba88df0997c2be9def247577c7/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10725,
67,
8992,
12,
2293,
16,
10725,
67,
2293,
67,
350,
16,
1542,
67,
529,
1546,
266,
7061,
19,
16041,
67,
8992,
18,
2620,
6,
4672,
3536,
12740,
1476,
364,
10725,
3285,
18,
1220,
2555... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10725,
67,
8992,
12,
2293,
16,
10725,
67,
2293,
67,
350,
16,
1542,
67,
529,
1546,
266,
7061,
19,
16041,
67,
8992,
18,
2620,
6,
4672,
3536,
12740,
1476,
364,
10725,
3285,
18,
1220,
2555... | |
self.hook("precommit", throw=True, p1=xp1, p2=xp2) | self.hook("precommit", throw=True, parent1=xp1, parent2=xp2) | def commit(self, files=None, text="", user=None, date=None, match=util.always, force=False, wlock=None): commit = [] remove = [] changed = [] | c20fd66cfcc6337f479fe02f573682337d019dfc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/c20fd66cfcc6337f479fe02f573682337d019dfc/localrepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
12,
2890,
16,
1390,
33,
7036,
16,
977,
1546,
3113,
729,
33,
7036,
16,
1509,
33,
7036,
16,
845,
33,
1367,
18,
17737,
16,
2944,
33,
8381,
16,
341,
739,
33,
7036,
4672,
3294,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3294,
12,
2890,
16,
1390,
33,
7036,
16,
977,
1546,
3113,
729,
33,
7036,
16,
1509,
33,
7036,
16,
845,
33,
1367,
18,
17737,
16,
2944,
33,
8381,
16,
341,
739,
33,
7036,
4672,
3294,
273,... |
sage: sage.symbolic.units.convert(units.length.foot, None) 381/1250*meter sage: sage.symbolic.units.convert(units.mass.kilogram, units.mass.pound) 100000000/45359237*pound | sage: sage.symbolic.units.convert(units.length.foot, None) 381/1250*meter sage: sage.symbolic.units.convert(units.mass.kilogram, units.mass.pound) 100000000/45359237*pound | def convert(expr, target): """ Converts units between expr and target. If target is None then converts to SI base units. INPUT: - `expr` -- the symbolic expression converting from - `target` -- (default None) the symbolic expression converting to OUTPUT: - `symbolic expression` EXAMPLES:: sage: sage.symbolic.units.convert(units.length.foot, None) 381/1250*meter sage: sage.symbolic.units.convert(units.mass.kilogram, units.mass.pound) 100000000/45359237*pound Raises ValueError if expr and target are not convertible:: sage: sage.symbolic.units.convert(units.mass.kilogram, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units sage: sage.symbolic.units.convert(units.length.meter^2, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units Recognizes derived unit relationships to base units and other derived units:: sage: sage.symbolic.units.convert(units.length.foot/units.time.second^2, units.acceleration.galileo) 762/25*galileo sage: sage.symbolic.units.convert(units.mass.kilogram*units.length.meter/units.time.second^2, units.force.newton) newton sage: sage.symbolic.units.convert(units.length.foot^3, units.area.acre*units.length.inch) 1/3630*acre*inch sage: sage.symbolic.units.convert(units.charge.coulomb, units.current.ampere*units.time.second) ampere*second sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch) 1290320000000/8896443230521*pounds_per_square_inch For decimal answers multiply 1.0:: sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch)*1.0 0.145037737730209*pounds_per_square_inch """ base_target = target z = {} tz = {} for x in expr.variables(): if is_unit(x): if unit_to_type[str(x)] == 'temperature': return convert_temperature(expr, target) else: z[x] = base_units(x) expr = expr.subs(z) if target is None: return expr else: for y in base_target.variables(): if is_unit(y): tz[y] = base_units(y) base_target = base_target.subs(tz) coeff = (expr/base_target).expand() if len(coeff.variables()) != 0: raise ValueError, "Incompatible units" return coeff*target | ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
8638,
16,
1018,
4672,
3536,
20377,
4971,
3086,
3065,
471,
1018,
18,
971,
1018,
353,
599,
1508,
7759,
358,
5705,
1026,
4971,
18,
225,
12943,
30,
225,
300,
1375,
8638,
68,
1493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
12,
8638,
16,
1018,
4672,
3536,
20377,
4971,
3086,
3065,
471,
1018,
18,
971,
1018,
353,
599,
1508,
7759,
358,
5705,
1026,
4971,
18,
225,
12943,
30,
225,
300,
1375,
8638,
68,
1493,
... |
self._lock.acquire() try: fs, mount_path, delegate_path = self._delegate(path) if fs is self: raise UnsupportedError("make directory", msg="Can only makedir for mounted paths" ) return fs.makedir(delegate_path, recursive=recursive, allow_recreate=allow_recreate) finally: self._lock.release() | fs, mount_path, delegate_path = self._delegate(path) if fs is self: raise UnsupportedError("make directory", msg="Can only makedir for mounted paths" ) return fs.makedir(delegate_path, recursive=recursive, allow_recreate=allow_recreate) @synchronize | def makedir(self, path, recursive=False, allow_recreate=False): path = normpath(path) self._lock.acquire() try: fs, mount_path, delegate_path = self._delegate(path) if fs is self: raise UnsupportedError("make directory", msg="Can only makedir for mounted paths" ) return fs.makedir(delegate_path, recursive=recursive, allow_recreate=allow_recreate) finally: self._lock.release() | 55488646ab3bb52783488eb894e034bb2323f1b7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5578/55488646ab3bb52783488eb894e034bb2323f1b7/mountfs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11882,
481,
12,
2890,
16,
589,
16,
5904,
33,
8381,
16,
1699,
67,
266,
2640,
33,
8381,
4672,
589,
273,
20446,
12,
803,
13,
365,
6315,
739,
18,
1077,
1039,
1435,
775,
30,
2662,
16,
534... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11882,
481,
12,
2890,
16,
589,
16,
5904,
33,
8381,
16,
1699,
67,
266,
2640,
33,
8381,
4672,
589,
273,
20446,
12,
803,
13,
365,
6315,
739,
18,
1077,
1039,
1435,
775,
30,
2662,
16,
534... |
self.__panes[-1].inhibit() for pane in self.__panes: if (key in pane.tags or (key in PEOPLE and "~people" in pane.tags)): pane.set_selected_by_tag(key, values, True) else: pane.set_selected(None, True) self.__panes[-1].uninhibit() self.__panes[-1].get_selection().emit('changed') | filter_pane = self.__get_filter_pane(key) for pane in self.__panes: if pane is filter_pane: filter_pane.set_selected_by_tag(key, values, True) return pane.set_selected(None, True) | def filter(self, key, values): self.__panes[-1].inhibit() for pane in self.__panes: if (key in pane.tags or (key in PEOPLE and "~people" in pane.tags)): pane.set_selected_by_tag(key, values, True) else: pane.set_selected(None, True) self.__panes[-1].uninhibit() self.__panes[-1].get_selection().emit('changed') | 65c353a2f58dd189cd3918d5836dbf8ca05e5f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/65c353a2f58dd189cd3918d5836dbf8ca05e5f5f/paned.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
498,
16,
924,
4672,
365,
16186,
7355,
281,
18919,
21,
8009,
267,
31597,
1435,
364,
13618,
316,
365,
16186,
7355,
281,
30,
309,
261,
856,
316,
13618,
18,
4156,
578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
498,
16,
924,
4672,
365,
16186,
7355,
281,
18919,
21,
8009,
267,
31597,
1435,
364,
13618,
316,
365,
16186,
7355,
281,
30,
309,
261,
856,
316,
13618,
18,
4156,
578,
... |
address = options["billing_address"] | address = options.get("billing_address", {}) | def add_address(self, options={}): """add address details to the request parameters""" address = options["billing_address"] self.hosted_customer.Title = address.get("salutation", "Mr./Ms.") self.hosted_customer.Address = address["address1"] + address.get("address2", "") self.hosted_customer.Suburb = address.get("city") self.hosted_customer.State = address.get("state") self.hosted_customer.Company = address.get("company") self.hosted_customer.PostCode = address.get("zip") self.hosted_customer.Country = address.get("country") self.hosted_customer.Email = options.get("email") self.hosted_customer.Fax = address.get("fax") self.hosted_customer.Phone = address.get("phone") self.hosted_customer.Mobile = address.get("mobile") self.hosted_customer.CustomerRef = address.get("customer_ref") self.hosted_customer.JobDesc = address.get("job_desc") self.hosted_customer.Comments = address.get("comments") self.hosted_customer.URL = address.get("url") | 8f41a97062da3e101cd081fb43211e7f148ccd80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14713/8f41a97062da3e101cd081fb43211e7f148ccd80/eway_gateway.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2867,
12,
2890,
16,
702,
12938,
4672,
3536,
1289,
1758,
3189,
358,
326,
590,
1472,
8395,
1758,
273,
702,
18,
588,
2932,
16360,
67,
2867,
3113,
2618,
13,
365,
18,
2564,
329,
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,
527,
67,
2867,
12,
2890,
16,
702,
12938,
4672,
3536,
1289,
1758,
3189,
358,
326,
590,
1472,
8395,
1758,
273,
702,
18,
588,
2932,
16360,
67,
2867,
3113,
2618,
13,
365,
18,
2564,
329,
67... |
k = res.end(0) | i = res.end(0) | def parse_attributes(self, tag, k, j, attributes = None): rawdata = self.rawdata # Now parse the data between k and j into a tag and attrs attrdict = {} try: # convert attributes list to dictionary d = {} for a in attributes: d[a] = None attributes = d except TypeError: pass while k < j: res = attrfind.match(rawdata, k) if not res: break attrname, attrvalue = res.group('name', 'value') if attrvalue is None: self.syntax_error('no attribute value specified') attrvalue = attrname elif attrvalue[:1] == "'" == attrvalue[-1:] or \ attrvalue[:1] == '"' == attrvalue[-1:]: attrvalue = attrvalue[1:-1] else: self.syntax_error('attribute value not quoted') if attributes is not None and not attributes.has_key(attrname): self.syntax_error('unknown attribute %s of element %s' % (attrname, tag)) if attrdict.has_key(attrname): self.syntax_error('attribute specified twice') attrvalue = string.translate(attrvalue, attrtrans) attrdict[attrname] = self.translate_references(attrvalue) k = res.end(0) if attributes is not None: # fill in with default attributes for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val return attrdict, k | a410d6a227cd319b6aaccb60dced4660f1be0df3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a410d6a227cd319b6aaccb60dced4660f1be0df3/xmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4350,
12,
2890,
16,
1047,
16,
417,
16,
525,
16,
1677,
273,
599,
4672,
1831,
892,
273,
365,
18,
1899,
892,
468,
4494,
1109,
326,
501,
3086,
417,
471,
525,
1368,
279,
1047,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
4350,
12,
2890,
16,
1047,
16,
417,
16,
525,
16,
1677,
273,
599,
4672,
1831,
892,
273,
365,
18,
1899,
892,
468,
4494,
1109,
326,
501,
3086,
417,
471,
525,
1368,
279,
1047,
4... |
elif stderr == PIPE: | if errwrite is not None: pass elif stderr is None or stderr == PIPE: | def _get_handles(self, stdin, stdout, stderr): """Construct and return tupel with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: return (None, None, None, None, None, None) | b732b2764da09e90c96135a5fb4227035a7cd9f6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/b732b2764da09e90c96135a5fb4227035a7cd9f6/subprocess.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
24111,
12,
2890,
16,
8801,
16,
3909,
16,
4514,
4672,
3536,
7249,
471,
327,
15822,
292,
598,
1665,
2184,
30,
293,
22,
71,
896,
16,
293,
22,
71,
2626,
16,
276,
22,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
24111,
12,
2890,
16,
8801,
16,
3909,
16,
4514,
4672,
3536,
7249,
471,
327,
15822,
292,
598,
1665,
2184,
30,
293,
22,
71,
896,
16,
293,
22,
71,
2626,
16,
276,
22,
84,
... |
for f in self.all_deps(filename): | for f in self.all_deps(filename, ext_module): | def newest_dep(self, filename): """ Returns the most recently modified file that filename depends on, along with its timestamp. """ nfile = filename ntime = self.timestamp(filename) for f in self.all_deps(filename): if self.timestamp(f) > ntime: nfile = f ntime = self.timestamp(f) return nfile, ntime | 536ee3637d186777ce9be23a8cf8df01c2798a48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/536ee3637d186777ce9be23a8cf8df01c2798a48/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19824,
67,
15037,
12,
2890,
16,
1544,
4672,
3536,
2860,
326,
4486,
19907,
4358,
585,
716,
1544,
10935,
603,
16,
7563,
598,
2097,
2858,
18,
3536,
290,
768,
273,
1544,
290,
957,
273,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19824,
67,
15037,
12,
2890,
16,
1544,
4672,
3536,
2860,
326,
4486,
19907,
4358,
585,
716,
1544,
10935,
603,
16,
7563,
598,
2097,
2858,
18,
3536,
290,
768,
273,
1544,
290,
957,
273,
365,
... |
'money':STARTING_MONEY, 'last_income':0, 'last_profit':0, 'price':STARTING_PRICE | 'money': STARTING_MONEY, 'last_income': 0, 'last_profit': 0, 'price': STARTING_PRICE | def __init__(self): self.__day = 1 self.__resources = { 'money':STARTING_MONEY, 'last_income':0, 'last_profit':0, 'price':STARTING_PRICE } | 7bcda207bb0e5ed90b7cb81e09ad0cbac372efd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11269/7bcda207bb0e5ed90b7cb81e09ad0cbac372efd1/LemonadeMain.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
16186,
2881,
273,
404,
365,
16186,
4683,
273,
288,
296,
2586,
402,
4278,
10485,
1360,
67,
17667,
2602,
16,
296,
2722,
67,
267,
5624,
4278,
374,
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,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
16186,
2881,
273,
404,
365,
16186,
4683,
273,
288,
296,
2586,
402,
4278,
10485,
1360,
67,
17667,
2602,
16,
296,
2722,
67,
267,
5624,
4278,
374,
16,
... |
return self | return weakref.proxy(self) | def documentClass(self): self.dom = Dom.getDOMImplementation().createDocument(None,None,None) return self | 69f5832102a38e750ffcfb9b4bc3ce48380d29f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4487/69f5832102a38e750ffcfb9b4bc3ce48380d29f7/dom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1668,
797,
12,
2890,
4672,
365,
18,
9859,
273,
12965,
18,
588,
8168,
13621,
7675,
2640,
2519,
12,
7036,
16,
7036,
16,
7036,
13,
327,
365,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1668,
797,
12,
2890,
4672,
365,
18,
9859,
273,
12965,
18,
588,
8168,
13621,
7675,
2640,
2519,
12,
7036,
16,
7036,
16,
7036,
13,
327,
365,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
energy_free = float(line.split()[-2]) | if all: energy_free.append(float(line.split()[-2])) else: energy_free = float(line.split()[-2]) | def read_energy(self): [energy_free, energy_zero]=[0, 0] for line in open('OUTCAR', 'r'): # Free energy if line.startswith(' free energy toten'): energy_free = float(line.split()[-2]) # Extrapolated zero point energy if line.startswith(' energy without entropy'): energy_zero = float(line.split()[-1]) return [energy_free, energy_zero] | 0b7718cfcd62b8b3897a3d87119e5430f1056463 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1380/0b7718cfcd62b8b3897a3d87119e5430f1056463/vasp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
15358,
12,
2890,
4672,
306,
15358,
67,
9156,
16,
12929,
67,
7124,
65,
22850,
20,
16,
374,
65,
364,
980,
316,
1696,
2668,
5069,
39,
985,
2187,
296,
86,
11,
4672,
468,
15217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
15358,
12,
2890,
4672,
306,
15358,
67,
9156,
16,
12929,
67,
7124,
65,
22850,
20,
16,
374,
65,
364,
980,
316,
1696,
2668,
5069,
39,
985,
2187,
296,
86,
11,
4672,
468,
15217,
... |
res = [] for c in s: if c in safe: res.append(c) else: res.append('%%%02x' % ord(c)) | res = list(s) for i in range(len(res)): c = res[i] if c not in safe: res[i] = '%%%02x' % ord(c) | def quote(s, safe = '/'): safe = always_safe + safe res = [] for c in s: if c in safe: res.append(c) else: res.append('%%%02x' % ord(c)) return string.joinfields(res, '') | 810a3396d130eda7d3e2be08966b40949757598e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/810a3396d130eda7d3e2be08966b40949757598e/urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3862,
12,
87,
16,
4183,
273,
2023,
4672,
4183,
273,
3712,
67,
4626,
397,
4183,
400,
273,
666,
12,
87,
13,
364,
277,
316,
1048,
12,
1897,
12,
455,
3719,
30,
276,
273,
400,
63,
77,
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,
3862,
12,
87,
16,
4183,
273,
2023,
4672,
4183,
273,
3712,
67,
4626,
397,
4183,
400,
273,
666,
12,
87,
13,
364,
277,
316,
1048,
12,
1897,
12,
455,
3719,
30,
276,
273,
400,
63,
77,
6... |
errors = getattr(cherrypy.request, 'validation_errors', None) if errors: message = '\n'.join([u'%s: %s' % (param, msg) for param, msg in errors.items()]) return dict(exc='Invalid', message=message, tg_template='json') | message = '\n'.join([u'%s: %s' % (param, msg) for param, msg in errors.items()]) return dict(exc='Invalid', tg_flash=message, tg_template='json') | def save(self, number): return dict(success=True) | 1bf1cb76d0f29a6cebcde9b7d0fc3a60bacf835d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9952/1bf1cb76d0f29a6cebcde9b7d0fc3a60bacf835d/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1300,
4672,
327,
2065,
12,
4768,
33,
5510,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
12,
2890,
16,
1300,
4672,
327,
2065,
12,
4768,
33,
5510,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
'M': 'O_O_method'} | 'M': 'OO_O_method'} | def indent(st,spaces): indention = ' '*spaces indented = indention + string.replace(st,'\n','\n'+indention) # trim off any trailing spaces indented = re.sub(r' +$',r'',indented) return indented | 912beccc011bf60d61b61fa24021f6235dba0225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/912beccc011bf60d61b61fa24021f6235dba0225/generate_umath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3504,
12,
334,
16,
9554,
4672,
3504,
285,
273,
296,
14609,
9554,
23786,
273,
3504,
285,
397,
533,
18,
2079,
12,
334,
16,
8314,
82,
2187,
8314,
82,
11,
15,
728,
5054,
13,
468,
2209,
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,
3504,
12,
334,
16,
9554,
4672,
3504,
285,
273,
296,
14609,
9554,
23786,
273,
3504,
285,
397,
533,
18,
2079,
12,
334,
16,
8314,
82,
2187,
8314,
82,
11,
15,
728,
5054,
13,
468,
2209,
3... |
def readUnreadNeedsReplyState(read, needsReply): | def getCompareTuple(uuid): read, needsReply, triage, triageChanged = \ self.itsView.findValues(uuid, *self.findParams) | def compare(self, u1, u2): def readUnreadNeedsReplyState(read, needsReply): if not read: return 0 if needsReply: return 1 return 2 | 2c4fe39575fba09665f9cb68249e5e7be31eb7c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/2c4fe39575fba09665f9cb68249e5e7be31eb7c0/summaryblocks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2890,
16,
582,
21,
16,
582,
22,
4672,
1652,
336,
8583,
9038,
12,
7080,
4672,
855,
16,
4260,
7817,
16,
6882,
410,
16,
6882,
410,
5033,
273,
521,
365,
18,
1282,
1767,
18,
472... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3400,
12,
2890,
16,
582,
21,
16,
582,
22,
4672,
1652,
336,
8583,
9038,
12,
7080,
4672,
855,
16,
4260,
7817,
16,
6882,
410,
16,
6882,
410,
5033,
273,
521,
365,
18,
1282,
1767,
18,
472... |
title = u'&Critical', | title = _(u'&Critical'), | def makeVisibleHourMenuItems(parcel): """ Create the 'Visible Hours' submenu. Should look like: Automatic --------- 5 hours 6 hours | 043a08a77771b31713425ec3f48a9c0186570e1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/043a08a77771b31713425ec3f48a9c0186570e1d/menus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
6207,
13433,
4599,
3126,
12,
1065,
2183,
4672,
3536,
1788,
326,
296,
6207,
670,
4390,
11,
27539,
18,
9363,
2324,
3007,
30,
225,
11809,
4941,
300,
788,
1381,
7507,
1666,
7507,
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,
1221,
6207,
13433,
4599,
3126,
12,
1065,
2183,
4672,
3536,
1788,
326,
296,
6207,
670,
4390,
11,
27539,
18,
9363,
2324,
3007,
30,
225,
11809,
4941,
300,
788,
1381,
7507,
1666,
7507,
2,
-1... |
cfgpath = os.path.join(path, kSiteConfigName) | cfgpath = os.path.join(path, gSiteConfigName) | def dirContainsTestSuite(path): cfgpath = os.path.join(path, kSiteConfigName) if os.path.exists(cfgpath): return cfgpath cfgpath = os.path.join(path, kConfigName) if os.path.exists(cfgpath): return cfgpath | f7e1eed19e040275c772a98872a1d6cd450ccac6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11986/f7e1eed19e040275c772a98872a1d6cd450ccac6/lit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1577,
10846,
4709,
13587,
12,
803,
4672,
2776,
803,
273,
1140,
18,
803,
18,
5701,
12,
803,
16,
314,
4956,
809,
461,
13,
309,
1140,
18,
803,
18,
1808,
12,
7066,
803,
4672,
327,
2776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1577,
10846,
4709,
13587,
12,
803,
4672,
2776,
803,
273,
1140,
18,
803,
18,
5701,
12,
803,
16,
314,
4956,
809,
461,
13,
309,
1140,
18,
803,
18,
1808,
12,
7066,
803,
4672,
327,
2776,
... |
if sgname in self._sglist: continue sgctrl = ServerGroupController() sglist = sgctrl.filter(kwargs = { 'group': sgname }) self._sglist[sgname] = [ x.server for x in sglist[0].servers ] | sg = sgctrl.filter(kwargs = { 'group': sgname }).all()[0] if sg not in self._sglist: self._sglist.append(sg) | def buildgroups(self, *kargs, **kwargs): self._sglist = {} memblist = self._memblist | 1c1e9e1ca36fe71836877330a2bfc0be17966021 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13094/1c1e9e1ca36fe71836877330a2bfc0be17966021/profile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4650,
12,
2890,
16,
380,
79,
1968,
16,
2826,
4333,
4672,
365,
6315,
1055,
1098,
273,
2618,
1663,
70,
1098,
273,
365,
6315,
3917,
70,
1098,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
4650,
12,
2890,
16,
380,
79,
1968,
16,
2826,
4333,
4672,
365,
6315,
1055,
1098,
273,
2618,
1663,
70,
1098,
273,
365,
6315,
3917,
70,
1098,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
((nan, 1.), (nan, nan), ''), | ((nan, 1.), (nan, nan), 'invalid-optional'), | def test_casinh(self): for p, v, e in [ ((0., 0), (0, 0), ''), ((1., inf), (inf, pi/2), 'XXX'), # now: (inf, nan) ((1., nan), (nan, nan), ''), ((inf, 1.), (inf, 0.), 'XXX'), # now: (inf, nan) ((inf, inf), (inf, pi/4), 'XXX'), # now: (nan, nan) ((inf, nan), (nan, nan), 'XXX'), # now: (nan, nan) ((nan, 0.), (nan, 0.), 'XXX'), # now: (nan, nan) ((nan, 1.), (nan, nan), ''), ((nan, inf), (+-inf, nan), 'XXX'), # now: (nan, nan) ((nan, nan), (nan, nan), ''), ]: yield self._check, np.arcsinh, p, v, e | ecf30dc2d1e500c5654ca8624aad15de84c01b6c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14925/ecf30dc2d1e500c5654ca8624aad15de84c01b6c/test_umath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
6349,
267,
76,
12,
2890,
4672,
364,
293,
16,
331,
16,
425,
316,
306,
14015,
20,
12990,
374,
3631,
261,
20,
16,
374,
3631,
875,
3631,
14015,
21,
12990,
8286,
3631,
261,
10625,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6349,
267,
76,
12,
2890,
4672,
364,
293,
16,
331,
16,
425,
316,
306,
14015,
20,
12990,
374,
3631,
261,
20,
16,
374,
3631,
875,
3631,
14015,
21,
12990,
8286,
3631,
261,
10625,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.