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 not _task_params['runtime_limit'][0][0] <= time.time() <= _task_params['runtime_limit'][0][1]: new_runtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(_task_params['runtime_limit'][1][0]))
if not _task_params['runtime_limit'][0][0] <= time_now <= _task_params['runtime_limit'][0][1]: if time_now <= _task_params['runtime_limit'][0][0]: new_runtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(_task_params['runtime_limit'][0][0])) else: new_runtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(_task_params['runtime_limit'][1][0]))
def _task_run(task_run_fnc): """Runs the task by fetching arguments from the BibSched task queue. This is what BibSched will be invoking via daemon call. The task prints Fibonacci numbers for up to NUM on the stdout, and some messages on stderr. @param task_run_fnc will be called as the main core function. Must return False in case of errors. Return True in case of success and False in case of failure.""" ## We prepare the pid file inside /prefix/var/run/taskname_id.pid check_running_process_user() try: pidfile_name = os.path.join(CFG_PREFIX, 'var', 'run', 'bibsched_task_%d.pid' % _task_params['task_id']) pidfile = open(pidfile_name, 'w') pidfile.write(str(os.getpid())) pidfile.close() except OSError: register_exception(alert_admin=True) task_update_status("ERROR") return False ## Setting up the logging system logger = logging.getLogger() stderr_logger = logging.handlers.RotatingFileHandler(os.path.join(CFG_LOGDIR, 'bibsched_task_%d.err' % _task_params['task_id']), 'a', 1*1024*1024, 10) stdout_logger = logging.handlers.RotatingFileHandler(os.path.join(CFG_LOGDIR, 'bibsched_task_%d.log' % _task_params['task_id']), 'a', 1*1024*1024, 10) formatter = logging.Formatter('%(asctime)s --> %(message)s', '%Y-%m-%d %H:%M:%S') stderr_logger.setFormatter(formatter) stdout_logger.setFormatter(formatter) logger.addHandler(stderr_logger) logger.addHandler(stdout_logger) logger.setLevel(logging.INFO) ## check task status: task_status = task_read_status() if task_status not in ("WAITING", "SCHEDULED"): write_message("Error: The task #%d is %s. I expected WAITING or SCHEDULED." % (_task_params['task_id'], task_status), sys.stderr) return False if _task_params['runtime_limit'] is not None: if not _task_params['runtime_limit'][0][0] <= time.time() <= _task_params['runtime_limit'][0][1]: new_runtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(_task_params['runtime_limit'][1][0])) progress = run_sql("SELECT progress FROM schTASK WHERE id=%s", (_task_params['task_id'], )) if progress: progress = progress[0][0] else: progress = '' g = re.match(r'Postponed \d+ time\(s\)', progress) if g: postponed_times = int(g.group(1)) else: postponed_times = 0 run_sql("UPDATE schTASK SET runtime=%s, status='WAITING', progress=%s WHERE id=%s", (new_runtime, 'Postponed %d time(s)' % (postponed_times + 1), _task_params['task_id'])) write_message("Task #%d postponed because outside of runtime limit" % _task_params['task_id']) return True ## initialize signal handler: _task_params['signal_request'] = None signal.signal(signal.SIGUSR1, _task_sig_sleep) signal.signal(signal.SIGUSR2, signal.SIG_IGN) signal.signal(signal.SIGTSTP, _task_sig_ctrlz) signal.signal(signal.SIGTERM, _task_sig_stop) signal.signal(signal.SIGQUIT, _task_sig_stop) signal.signal(signal.SIGABRT, _task_sig_suicide) signal.signal(signal.SIGCONT, _task_sig_wakeup) signal.signal(signal.SIGINT, _task_sig_ctrlc) ## we can run the task now: write_message("Task #%d started." % _task_params['task_id']) task_update_status("RUNNING") ## run the task: _task_params['task_starting_time'] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) sleeptime = _task_params['sleeptime'] try: try: if callable(task_run_fnc) and task_run_fnc(): task_update_status("DONE") else: task_update_status("DONE WITH ERRORS") except SystemExit: pass except: register_exception(alert_admin=True) task_update_status("ERROR") finally: task_status = task_read_status() if sleeptime: new_runtime = get_datetime(sleeptime) ## The task is a daemon. We resubmit it if task_status == 'DONE': ## It has finished in a good way. We recycle the database row run_sql("UPDATE schTASK SET runtime=%s, status='WAITING', progress='' WHERE id=%s", (new_runtime, _task_params['task_id'])) write_message("Task #%d finished and resubmitted." % _task_params['task_id']) else: ## We keep the bad result and we resubmit with another id. #res = run_sql('SELECT proc,user,sleeptime,arguments,priority FROM schTASK WHERE id=%s', (_task_params['task_id'], )) #proc, user, sleeptime, arguments, priority = res[0] #run_sql("""INSERT INTO schTASK (proc,user, #runtime,sleeptime,status,arguments,priority) #VALUES (%s,%s,%s,%s,'WAITING',%s, %s)""", #(proc, user, new_runtime, sleeptime, arguments, priority)) write_message("Task #%d finished but not resubmitted. [%s]" % (_task_params['task_id'], task_status)) else: ## we are done: write_message("Task #%d finished. [%s]" % (_task_params['task_id'], task_status)) ## Removing the pid os.remove(pidfile_name) try: # Let's signal bibsched that we have finished. from invenio.bibsched import pidfile os.kill(int(open(pidfile).read()), signal.SIGUSR2) except: pass return True
92a10ceacbe6a0d9a34829dde32f4db4c490d7e4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/92a10ceacbe6a0d9a34829dde32f4db4c490d7e4/bibtask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4146, 67, 2681, 12, 4146, 67, 2681, 67, 4293, 71, 4672, 3536, 9361, 326, 1562, 635, 16191, 1775, 628, 326, 605, 495, 55, 2049, 1562, 2389, 18, 1220, 353, 4121, 605, 495, 55, 2049,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4146, 67, 2681, 12, 4146, 67, 2681, 67, 4293, 71, 4672, 3536, 9361, 326, 1562, 635, 16191, 1775, 628, 326, 605, 495, 55, 2049, 1562, 2389, 18, 1220, 353, 4121, 605, 495, 55, 2049,...
model.run(args) return
return model return None
def run(self, args = ''): # find app module for name, Model in self.moduleModels.items(): if Model.modelIdentifier in Controllers.appModelIdReg: filepath = self.moduleFilename(name) if self.editor.modules.has_key(filepath): model = self.editor.modules[filepath].model else: model = Model('', filepath, '', self.editor, 0, {}) model.run(args) return
c1e79d1de1efdc4c5892eb9551c9859c50112a88 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/c1e79d1de1efdc4c5892eb9551c9859c50112a88/LinkAppSupport.plug-in.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 833, 273, 875, 4672, 468, 1104, 595, 1605, 364, 508, 16, 3164, 316, 365, 18, 2978, 8430, 18, 3319, 13332, 309, 3164, 18, 2284, 3004, 316, 1816, 7484, 18, 2910, 1488...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 833, 273, 875, 4672, 468, 1104, 595, 1605, 364, 508, 16, 3164, 316, 365, 18, 2978, 8430, 18, 3319, 13332, 309, 3164, 18, 2284, 3004, 316, 1816, 7484, 18, 2910, 1488...
varnames.append(name[1][1])
src = DottedName(src, name[1][1]) var_proxies[name[1][1]] = ValueDocProxy(src)
def process_import(self, cmd, names, pseudo_docstring): """ The statement handler for import statements. This handler adds a C{VariableDoc} to the parent C{APIDoc} for each name that is created by importing. These C{VariableDoc}s have empty C{ValueDoc}s, and are marked as imported (i.e., C{L{is_imported<VariableDoc.is_imported>}=True}).
1fb4c317bfd16a777415b4874c4c8db19e81beff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/1fb4c317bfd16a777415b4874c4c8db19e81beff/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 5666, 12, 2890, 16, 1797, 16, 1257, 16, 12454, 67, 24675, 4672, 3536, 1021, 3021, 1838, 364, 1930, 6317, 18, 225, 1220, 1838, 4831, 279, 385, 95, 3092, 1759, 97, 358, 326, 98...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 5666, 12, 2890, 16, 1797, 16, 1257, 16, 12454, 67, 24675, 4672, 3536, 1021, 3021, 1838, 364, 1930, 6317, 18, 225, 1220, 1838, 4831, 279, 385, 95, 3092, 1759, 97, 358, 326, 98...
for (i,c) in enumerate(self.classifiers.values()):
for (i,c) in enumerate(self.predictors.values()):
def setTable(self): """defines the attribute/predictions table and paints its contents""" if self.data==None: return
63e34d56e155a4f1aba288f36a71868771294735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/63e34d56e155a4f1aba288f36a71868771294735/OWPredictions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30146, 12, 2890, 4672, 3536, 536, 1465, 326, 1566, 19, 25499, 1014, 471, 12574, 87, 2097, 2939, 8395, 309, 365, 18, 892, 631, 7036, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 30146, 12, 2890, 4672, 3536, 536, 1465, 326, 1566, 19, 25499, 1014, 471, 12574, 87, 2097, 2939, 8395, 309, 365, 18, 892, 631, 7036, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, ...
except: pass
except: container = None if container and container.is_routine(): if _is_parameter_for(name, container, docmap): return container else: container = container.cls() or container.module()
def findUID(name, container=None, docmap=None): """ Attempt to find the UID for the object that can be accessed with the name C{name} from the module C{module}. @param name: The name used to identify the object. @type name: C{string} @param container: The UID of the class or module containing the object. If no container is specified, then L{__builtin__} is used. @type container: L{UID} or C{None} @param docmap: A documentation map, which is used to check if C{name} is the name of a module variable, class variable, or instance variable. @type docmap: L{objdoc.DocMap} @return: The UID for the object that can be accessed with the name C{name} from the module C{module}; or C{None} if no object was found. @rtype: L{UID} or C{None} """ if name == '': return None name = re.sub(r'\(.*\)$', '', name) if container and not (container.is_module() or container.is_class()): raise ValueError('Bad container %r' % container) if container is None: try: container = make_uid(sys.modules['__builtin__']) except: pass # Is it the short name for a member of the containing class? if container and container.is_class(): if _is_variable_in(name, container, docmap): val = None # it may not be a real object return make_uid(val, container, name) elif container.value().__dict__.has_key(name): cls = container.value() obj = cls.__dict__[name] if type(obj) is _FunctionType: return make_uid(new.instancemethod(obj, None, cls), container, name) else: return make_uid(obj, container, name) else: container = container.module() if container: components = name.split('.') module = container.value() # Is it a variable in the containing module? if _is_variable_in(name, container, docmap): val = None # it may not be a real object return make_uid(val, container, name) # Is it an object in the containing module? try: obj = module for component in components: obj_parent = obj obj_name = component try: obj = obj.__dict__[component] except: raise KeyError() try: return make_uid(obj, make_uid(obj_parent), obj_name) except: pass except KeyError: pass if container: container_name = container.name() else: container_name = '' # Is it a module name? The module name may be relative to the # containing module, or any of its ancestors. modcomponents = container_name.split('.') for i in range(len(modcomponents)-1, -1, -1): try: modname = '.'.join(modcomponents[:i]+[name]) return(make_uid(import_module(modname))) except: pass # Is it an object in a module? The module part of the name may be # relative to the containing module, or any of its ancestors. modcomponents = container_name.split('.') components = name.split('.') for i in range(len(modcomponents)-1, -1, -1): for j in range(len(components)-1, 0, -1): try: modname = '.'.join(modcomponents[:i]+components[:j]) objname = '.'.join(components[j:]) mod = import_module(modname) if _is_variable_in(name, make_uid(mod), docmap): val = None # it may not be a real object return make_uid(val, container, name) obj = getattr(import_module(modname), objname) return make_uid(obj, make_uid(mod), objname) except: pass # Is it an field of a class in a module? The module part of the # name may be relative to the containing module, or any of its # ancestors. modcomponents = container_name.split('.') components = name.split('.') for i in range(len(modcomponents)-1, -1, -1): for j in range(len(components)-1, 0, -1): try: modname = '.'.join(modcomponents[:i]+components[:j]) objname = '.'.join(components[j:-1]) fieldname = components[-1] mod = import_module(modname) if _is_variable_in(name, make_uid(mod), docmap): val = None # it may not be a real object return make_uid(val, container, name) obj = getattr(import_module(modname), objname) field = getattr(obj, fieldname) return make_uid(field, make_uid(obj), fieldname) except: pass # If the name starts with 'self.', then try leaving that off. if name.startswith('self.'): return findUID(name[5:], container, docmap) ## Is it a parameter of a function/method? If so, return the UID ## of the function/method. #if '.' in name and docmap: # components = name.split('.') # parent = '.'.join(components[:-1]) # param = components[-1] # parent = findUID(parent, container, docmap) # if parent is not None and parent.is_routine(): # if _is_parameter_for(param, parent, docmap): # return parent # We couldn't find it; return None. return None
0596e6332ca662453597e9705a371aee36995219 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/0596e6332ca662453597e9705a371aee36995219/uid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3060, 12, 529, 16, 1478, 33, 7036, 16, 997, 1458, 33, 7036, 4672, 3536, 12864, 358, 1104, 326, 10034, 364, 326, 733, 716, 848, 506, 15539, 598, 326, 508, 385, 95, 529, 97, 628, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3060, 12, 529, 16, 1478, 33, 7036, 16, 997, 1458, 33, 7036, 4672, 3536, 12864, 358, 1104, 326, 10034, 364, 326, 733, 716, 848, 506, 15539, 598, 326, 508, 385, 95, 529, 97, 628, ...
else: pass
self.theRunningFlag = 0
def startSimulation( self, obj ) :
addb904a55036e7f8202bd5f773d8c610fb9fd3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/addb904a55036e7f8202bd5f773d8c610fb9fd3a/MainWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 18419, 12, 365, 16, 1081, 262, 294, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 18419, 12, 365, 16, 1081, 262, 294, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
i = int(n) while not i < 0: P = [ 0 for _ in range(n+1) ]; P[i] = 1 m = ZZ(0) pts.append(self(P)) iters = [ iter(R) for _ in range(i) ] j = 0 while j < i: try: aj = ZZ(iters[j].next()) m = m.gcd(aj) P[j] = aj for ai in Q: P[i] = ai if m.gcd(ai) == 1: pts.append(self(P)) j = 0 m = ZZ(0) except StopIteration: iters[j] = iter(R) iters[j].next() P[j] = 0 j += 1 i -= 1
i=n while i > 0: P = [ 0 for _ in range(n+1) ] for ai in R: P[i]=ai for tup in S[i-1]: if gcd([ai]+tup,True)==1: for j in range(i): P[j]=tup[j] pts.append(self(P)) i-=1 P = [ 0 for _ in range(n+1) ]; P[0]=1 pts.append(self(P))
def rational_points(self, bound=0): r""" Returns the projective points $(x_0:\cdots:x_n)$ over $\Q$ with $|x_i| \leq$ bound.
62d8469c1685fef8729002894309ffe9493c4410 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62d8469c1685fef8729002894309ffe9493c4410/projective_space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 8371, 67, 4139, 12, 2890, 16, 2489, 33, 20, 4672, 436, 8395, 2860, 326, 1984, 688, 3143, 27488, 92, 67, 20, 5581, 4315, 6968, 30, 92, 67, 82, 21877, 1879, 271, 64, 53, 8, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 436, 8371, 67, 4139, 12, 2890, 16, 2489, 33, 20, 4672, 436, 8395, 2860, 326, 1984, 688, 3143, 27488, 92, 67, 20, 5581, 4315, 6968, 30, 92, 67, 82, 21877, 1879, 271, 64, 53, 8, 598, ...
setattr(rec, m, string.rstrip(attr))
setattr(rec, m, attr.rstrip())
def _clean_record(self, rec): # Remove trailing newlines members = ['description', 'gene_name', 'organism', 'organelle'] for m in members: attr = getattr(rec, m) setattr(rec, m, string.rstrip(attr)) for ref in rec.references: self._clean_references(ref)
ade8039411341728bf4bd4dc20b4f5d9433c8f82 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/ade8039411341728bf4bd4dc20b4f5d9433c8f82/SProt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6200, 67, 3366, 12, 2890, 16, 1950, 4672, 468, 3581, 7341, 19181, 4833, 273, 10228, 3384, 2187, 296, 11857, 67, 529, 2187, 296, 22543, 6228, 2187, 296, 22543, 292, 298, 3546, 364, 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, 6200, 67, 3366, 12, 2890, 16, 1950, 4672, 468, 3581, 7341, 19181, 4833, 273, 10228, 3384, 2187, 296, 11857, 67, 529, 2187, 296, 22543, 6228, 2187, 296, 22543, 292, 298, 3546, 364, 3...
reg = self.addPermission(name="Register Web", description="User may register through the web") reg = self.addPermission(name="Register Email", description="User may register through the email")
def __init__(self, db): ''' Initialise the permission and role classes, and add in the base roles (for admin user). ''' self.db = weakref.proxy(db) # use a weak ref to avoid circularity
da9e988092f2322a93ac99e4a65e8ef4727c789d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/da9e988092f2322a93ac99e4a65e8ef4727c789d/security.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 4672, 9163, 31739, 326, 4132, 471, 2478, 3318, 16, 471, 527, 316, 326, 1026, 4900, 261, 1884, 3981, 729, 2934, 9163, 365, 18, 1966, 273, 16046, 1734,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 1319, 4672, 9163, 31739, 326, 4132, 471, 2478, 3318, 16, 471, 527, 316, 326, 1026, 4900, 261, 1884, 3981, 729, 2934, 9163, 365, 18, 1966, 273, 16046, 1734,...
version = struct.unpack('!L', data[:4])[0]
version ,= struct.unpack('!L', data[:4])
def packet_INIT(self, data): version = struct.unpack('!L', data[:4])[0] self.version = min(list(self.versions) + [version]) data = data[4:] ext = {} while data: ext_name, data = getNS(data) ext_data, data = getNS(data) ext[ext_name] = ext_data our_ext = self.client.gotVersion(version, ext) our_ext_data = "" for (k,v) in our_ext.items(): our_ext_data += NS(k) + NS(v) self.sendPacket(FXP_VERSION, struct.pack('!L', self.version) + \ our_ext_data)
aef8d7424b2a725faf6ca18b071ce67e27dc3850 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/aef8d7424b2a725faf6ca18b071ce67e27dc3850/filetransfer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4414, 67, 12919, 12, 2890, 16, 501, 4672, 1177, 269, 33, 1958, 18, 17309, 2668, 5, 48, 2187, 501, 10531, 24, 5717, 365, 18, 1589, 273, 1131, 12, 1098, 12, 2890, 18, 10169, 13, 397, 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, 4414, 67, 12919, 12, 2890, 16, 501, 4672, 1177, 269, 33, 1958, 18, 17309, 2668, 5, 48, 2187, 501, 10531, 24, 5717, 365, 18, 1589, 273, 1131, 12, 1098, 12, 2890, 18, 10169, 13, 397, 3...
_cs_matrix.__pow__(self, other, self.colind, other.colind, csrelmulcsr, csr_matrix)
""" Element-by-element power (unless other is a scalar, in which case return the matrix power.) """ if isscalarlike(other): new = self.copy() new.data = new.data ** other new.dtype = new.data.dtype new.ftype = _transtabl[new.dtype.char] return new elif isspmatrix(other): other = other.tocsr() if (other.shape != self.shape): raise ValueError, "inconsistent shapes" indptr, colind, data = csrelmulcsr(self.shape[0], other.shape[1], \ self.indptr, self.colind, \ self.data, other.indptr, \ other.colind, other.data) return csr_matrix((data, colind, indptr), (self.shape[0], other.shape[1])) else: raise TypeError, "unsupported type for sparse matrix power"
def __pow__(self, other): _cs_matrix.__pow__(self, other, self.colind, other.colind, csrelmulcsr, csr_matrix)
68509c21665a282972955c9c541c98c796ab1d7d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/68509c21665a282972955c9c541c98c796ab1d7d/sparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 23509, 972, 12, 2890, 16, 1308, 4672, 389, 2143, 67, 5667, 16186, 23509, 972, 12, 2890, 16, 1308, 16, 365, 18, 1293, 728, 16, 1308, 18, 1293, 728, 16, 2873, 2878, 16411, 21653, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 23509, 972, 12, 2890, 16, 1308, 4672, 389, 2143, 67, 5667, 16186, 23509, 972, 12, 2890, 16, 1308, 16, 365, 18, 1293, 728, 16, 1308, 18, 1293, 728, 16, 2873, 2878, 16411, 21653, 1...
if db.access2('SELECT count(ct_pk) FROM copyright;') != 1:
if db.access2('SELECT ct_pk FROM copyright LIMIT 1') != 1:
def table_check(db): if db.access2('SELECT count(ct_pk) FROM copyright;') != 1: error = db.errmsg() if error == 'relation "copyright" does not exist': print >> sys.stderr, 'WARNING: Could not find copyright table. Will try to setup automatically. If you continue to have trouble try using %s --setup-database' % sys.argv[0] return setup_database() print >> sys.stderr, 'ERROR: Could not select table copyright. Database said: "%s"' % error return -1 return 0
3a67b5bbc0d925156402d50a5a6399de470b9690 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6959/3a67b5bbc0d925156402d50a5a6399de470b9690/copyright.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1014, 67, 1893, 12, 1966, 4672, 309, 1319, 18, 3860, 22, 2668, 4803, 5691, 67, 5465, 4571, 22245, 13319, 404, 6134, 480, 404, 30, 555, 273, 1319, 18, 24409, 1435, 309, 555, 422, 296, 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, 1014, 67, 1893, 12, 1966, 4672, 309, 1319, 18, 3860, 22, 2668, 4803, 5691, 67, 5465, 4571, 22245, 13319, 404, 6134, 480, 404, 30, 555, 273, 1319, 18, 24409, 1435, 309, 555, 422, 296, 5...
print f, print ''
print '\t\t', f
def guess_include_path(env, conf, name, subdir): print " Guessing", name, "include path...", if env['platform'] == 'windows': path = [os.path.join(os.path.join(env['mingwlibsdir'], 'include'), subdir)] path += [os.path.abspath(os.path.join(os.path.join(env['mingwlibsdir'], 'include'), subdir))] # Everything lives in mingwlibs anyway... if os.environ.has_key('MINGDIR'): path += [os.path.join(os.path.join(os.environ['MINGDIR'], 'include'), subdir)] elif env['platform'] == 'darwin': path = [os.path.join('/opt/local/include', subdir)] elif env['platform'] == 'freebsd': path = [os.path.join('/usr/local/include', subdir)] else: path = [os.path.join('/usr/include', subdir)] env.AppendUnique(CPPPATH = path) for f in path: print f, print ''
d404bf1b13def335704c1f1c91c3c6a12e8f1783 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1030/d404bf1b13def335704c1f1c91c3c6a12e8f1783/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 6702, 67, 803, 12, 3074, 16, 2195, 16, 508, 16, 16921, 4672, 1172, 315, 225, 30282, 310, 3113, 508, 16, 315, 6702, 589, 7070, 16, 309, 1550, 3292, 9898, 3546, 422, 296, 13226...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 6702, 67, 803, 12, 3074, 16, 2195, 16, 508, 16, 16921, 4672, 1172, 315, 225, 30282, 310, 3113, 508, 16, 315, 6702, 589, 7070, 16, 309, 1550, 3292, 9898, 3546, 422, 296, 13226...
explanation = """A comma seperated list of subdirectories to be generated
explanation = """A comma separated list of subdirectories to be generated
def getCategoryElements(self, category): tagnames = self._registry[category].keys() tagnames.sort() return tagnames
b9a5983552b57f4fc7f0bb6483b6206fb74796dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11941/b9a5983552b57f4fc7f0bb6483b6206fb74796dd/TaggedValueSupport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19110, 3471, 12, 2890, 16, 3150, 4672, 1047, 1973, 273, 365, 6315, 9893, 63, 4743, 8009, 2452, 1435, 1047, 1973, 18, 3804, 1435, 327, 1047, 1973, 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, 0, 0, 0, 0, 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, 19110, 3471, 12, 2890, 16, 3150, 4672, 1047, 1973, 273, 365, 6315, 9893, 63, 4743, 8009, 2452, 1435, 1047, 1973, 18, 3804, 1435, 327, 1047, 1973, 2, -100, -100, -100, -100, -100, -100, -...
logging.getLogger('schema').info("Table '%s': column '%s': XXX" % (self._table, k))
self.__schema.debug("Table '%s': column '%s': XXX", self._table, k)
f_pg_def = res[0]
a73711cb180c536a45540480eccaf5c3f0aa8ad3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a73711cb180c536a45540480eccaf5c3f0aa8ad3/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 67, 8365, 67, 536, 273, 400, 63, 20, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 284, 67, 8365, 67, 536, 273, 400, 63, 20, 65, 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,...
desc = description.encode('utf-8')
desc = description
def addTicket(self, id, time, changetime, component, severity, priority, owner, reporter, cc, version, milestone, status, resolution, summary, description, keywords, customfields): c = self.db().cursor()
3c880bacc20a99c1c09f23abe68ea43a4bd475ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/3c880bacc20a99c1c09f23abe68ea43a4bd475ab/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 13614, 12, 2890, 16, 612, 16, 813, 16, 9435, 2374, 16, 1794, 16, 11426, 16, 4394, 16, 3410, 16, 11528, 16, 4946, 16, 1177, 16, 28664, 16, 1267, 16, 7861, 16, 4916, 16, 2477, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 13614, 12, 2890, 16, 612, 16, 813, 16, 9435, 2374, 16, 1794, 16, 11426, 16, 4394, 16, 3410, 16, 11528, 16, 4946, 16, 1177, 16, 28664, 16, 1267, 16, 7861, 16, 4916, 16, 2477, 16,...
ret = []
def __str__(self, wrapwidth=78): """ Common string representation of the POEntry and MOEntry objects. """ if self.obsolete: delflag = '#~ ' else: delflag = '' # write the msgid ret = [] ret += self._str_field("msgid", delflag, "", self.msgid) # write the msgid_plural if any if self.msgid_plural: ret += self._str_field("msgid_plural", delflag, "", self.msgid_plural) if self.msgstr_plural: # write the msgstr_plural if any msgstrs = self.msgstr_plural keys = list(msgstrs) keys.sort() for index in keys: msgstr = msgstrs[index] plural_index = '[%s]' % index ret += self._str_field("msgstr", delflag, plural_index, msgstr) else: # otherwise write the msgstr ret += self._str_field("msgstr", delflag, "", self.msgstr) ret.append('') return '\n'.join(ret)
1a50e4e6d502de00c1a8fb36e256bb434663da20 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9209/1a50e4e6d502de00c1a8fb36e256bb434663da20/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 5658, 533, 4335, 434, 326, 13803, 1622, 471, 16070, 1622, 2184, 18, 3536, 309, 365, 18, 10992, 19513, 30, 1464, 6420, 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, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 5658, 533, 4335, 434, 326, 13803, 1622, 471, 16070, 1622, 2184, 18, 3536, 309, 365, 18, 10992, 19513, 30, 1464, 6420, 273,...
sys.path = ".."
sys.path = os.getcwd()
def mergeArrays(a1, a2): a3 = [] for item in a1: a3.append(item) for item in a2: a3.append(item) return a3
d37620766061489b262d12501c46388fbc049f35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2589/d37620766061489b262d12501c46388fbc049f35/readcfg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12726, 12, 69, 21, 16, 279, 22, 4672, 279, 23, 273, 5378, 364, 761, 316, 279, 21, 30, 279, 23, 18, 6923, 12, 1726, 13, 225, 364, 761, 316, 279, 22, 30, 279, 23, 18, 6923, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12726, 12, 69, 21, 16, 279, 22, 4672, 279, 23, 273, 5378, 364, 761, 316, 279, 21, 30, 279, 23, 18, 6923, 12, 1726, 13, 225, 364, 761, 316, 279, 22, 30, 279, 23, 18, 6923, 1...
if (imObj.state == imObj.StReady) and self.winfo_ismapped():
if (imObj.state == imObj.StReady) and self.gim.winfo_ismapped():
def showImage(self, imObj): """Display an image. """ # expire current image if not in history (this should never happen) if (self.dispImObj != None) and (self.dispImObj.imageName not in self.imObjDict): sys.stderr.write("GuideWdg warning: expiring display image that was not in history") self.dispImObj.expire() #print "showImage(imObj=%s)" % (imObj,) fitsIm = imObj.getFITSObj() if fitsIm: self.statusBar.setMsg("", RO.Constants.sevNormal) imArr = fitsIm[0].data imHdr = fitsIm[0].header expTime = imHdr.get("EXPTIME") binFac = imHdr.get("BINX") else: if imObj.didFail(): sev = RO.Constants.sevNormal else: if (imObj.state == imObj.StReady) and self.winfo_ismapped(): # image not downloaded earlier because guide window was hidden at the time # get it now imObj.fetchFile() sev = RO.Constants.sevNormal self.gim.showMsg(imObj.getStateStr(), sev) imArr = None expTime = None binFac = None # display new data self.gim.showArr(imArr) self.dispImObj = imObj self.imNameWdg.set(imObj.imageName) self.imNameWdg.xview("end") self.expTimeWdg.set(expTime) self.expTimeWdg.setDefault(expTime) self.binFacWdg.set(binFac) self.binFacWdg.setDefault(binFac) self.threshWdg.setDefault(imObj.defThresh) self.radMultWdg.setDefault(imObj.defRadMult) if imObj.currThresh != None: self.threshWdg.set(imObj.currThresh) else: self.threshWdg.restoreDefault() if imObj.currRadMult != None: self.radMultWdg.set(imObj.currRadMult) else: self.radMultWdg.restoreDefault() self.enableHistButtons() if imArr != None: # add existing annotations, if any and show selection # (for now just display them, # but eventually have a control that can show/hide them, # and -- as the first step -- set the visibility of the tags appropriately) for cmdChar, starDataList in imObj.starDataDict.iteritems(): for starData in starDataList: tag, color = _TypeTagColorDict[cmdChar] self.gim.addAnnotation( GImDisp.ann_Circle, imPos = starData[2:4], rad = starData[6], isImSize = True, tags = tag, outline = color, ) self.showSelection()
3840494bc0492f518ca35b58e6fb1e00be7f32ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/3840494bc0492f518ca35b58e6fb1e00be7f32ab/GuideWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 2040, 12, 2890, 16, 709, 2675, 4672, 3536, 4236, 392, 1316, 18, 3536, 468, 6930, 783, 1316, 309, 486, 316, 4927, 261, 2211, 1410, 5903, 5865, 13, 309, 261, 2890, 18, 25453, 1170, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 2040, 12, 2890, 16, 709, 2675, 4672, 3536, 4236, 392, 1316, 18, 3536, 468, 6930, 783, 1316, 309, 486, 316, 4927, 261, 2211, 1410, 5903, 5865, 13, 309, 261, 2890, 18, 25453, 1170, ...
notification_center.post_notification('ChatStreamDidSendMessage', self, TimestampedNotificationData(message=chunk))
if notify_progress and success_report == 'yes' and failure_report != 'no': self.sent_messages.add(message_id) notification_center.post_notification('ChatStreamDidSendMessage', self, TimestampedNotificationData(message=chunk))
def _message_queue_handler(self): notification_center = NotificationCenter() while True: message_id, message, content_type, failure_report, success_report = self.message_queue.wait() if self.msrp_session is None: # should we generate ChatStreamDidNotDeliver per each message in the queue here? break chunk = self.msrp_session.make_message(message, content_type=content_type, message_id=message_id) if failure_report is not None: chunk.add_header(FailureReportHeader(failure_report)) if success_report is not None: chunk.add_header(SuccessReportHeader(success_report)) try: self.msrp_session.send_chunk(chunk, response_cb=lambda response: self._on_transaction_response(message_id, response)) except Exception, e: ndata = TimestampedNotificationData(context='sending', failure=Failure(), reason=str(e)) notification_center.post_notification('MediaStreamDidFail', self, ndata) break else: notification_center.post_notification('ChatStreamDidSendMessage', self, TimestampedNotificationData(message=chunk))
9af8782291be49027e8e214e88214b4559557759 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/9af8782291be49027e8e214e88214b4559557759/msrp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2150, 67, 4000, 67, 4176, 12, 2890, 4672, 3851, 67, 5693, 273, 8050, 8449, 1435, 1323, 1053, 30, 883, 67, 350, 16, 883, 16, 913, 67, 723, 16, 5166, 67, 6006, 16, 2216, 67, 6006,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2150, 67, 4000, 67, 4176, 12, 2890, 4672, 3851, 67, 5693, 273, 8050, 8449, 1435, 1323, 1053, 30, 883, 67, 350, 16, 883, 16, 913, 67, 723, 16, 5166, 67, 6006, 16, 2216, 67, 6006,...
return 'select %s from %s where %s;' % (join(fldnames, ','), join(tables, ','), cond)
q = 'select %s from %s' % (join(fldnames, ','), join(tables, ',')) if cond: q = q + ' where ' + cond return q + ';'
def asSQL(fields, tables, keys, joins, condextra = ''): """format query as SQL. rougly: select fields from tables where keyJoins and condextra details: tables is a list of table names fields is a list of lists of fieldnames, one list per table keys is a dictionary that maps tables to given primary key fields and keyJoins is a list of lists... the bottom half of a matrix... keyJoins[i][j] is None or the name of a field in table i to join with the primary key of table j. condextra is an SQL expression """ fldnames = [] for ti in range(len(tables)): for f in fields[ti]: fldnames.append("%s.%s" % (tables[ti], f)) cond = '' for i in range(len(tables)): for j in range(i): if joins[i][j]: jexpr = "%s.%s = %s.%s" % (tables[i], joins[i][j], tables[j], keys[tables[j]]) if cond: cond = cond + ' AND ' cond = cond + jexpr if condextra: if cond: cond = cond + ' AND ' + condextra else: cond = condextra #@@bug: empty cond is possible return 'select %s from %s where %s;' % (join(fldnames, ','), join(tables, ','), cond)
ffc36aa980f75c47090eff21080addd3e6f12dcd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/ffc36aa980f75c47090eff21080addd3e6f12dcd/dbview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 3997, 12, 2821, 16, 4606, 16, 1311, 16, 13471, 16, 356, 561, 2033, 273, 875, 4672, 3536, 2139, 843, 487, 3063, 18, 225, 721, 637, 715, 30, 2027, 1466, 628, 4606, 1625, 498, 21108,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 3997, 12, 2821, 16, 4606, 16, 1311, 16, 13471, 16, 356, 561, 2033, 273, 875, 4672, 3536, 2139, 843, 487, 3063, 18, 225, 721, 637, 715, 30, 2027, 1466, 628, 4606, 1625, 498, 21108,...
echo "/usr/share/panda3d" > $RPM_BUILD_ROOT/usr/lib/PYTHONV/site-packages/panda3d.pth
echo "/usr/share/panda3d" > $RPM_BUILD_ROOT/usr/lib/$PYTHONV/site-packages/panda3d.pth
def printUsage(): sys.exit("usage: maketarball [version]")
436ae20d95e5984ad6e1c983024fc0d697d1fb0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/436ae20d95e5984ad6e1c983024fc0d697d1fb0b/maketarball.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 5357, 13332, 2589, 18, 8593, 2932, 9167, 30, 29796, 278, 23846, 306, 1589, 4279, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 5357, 13332, 2589, 18, 8593, 2932, 9167, 30, 29796, 278, 23846, 306, 1589, 4279, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if self.msg_box and self.msg_box.isVisible(): self.msg_box.close() msg_box = QtGui.QMessageBox(self.parent()) self.msg_box = msg_box
def showMessageBox(self, s): s = str(s).strip() msgs = s.split('\n') if self.msg_box and self.msg_box.isVisible(): self.msg_box.close() msg_box = QtGui.QMessageBox(self.parent()) self.msg_box = msg_box if msgs[0] == "INFO": msg_box.setIcon(QtGui.QMessageBox.Information) msg_box.setWindowTitle("Information") elif msgs[0] == "WARNING": msg_box.setIcon(QtGui.QMessageBox.Warning) msg_box.setWindowTitle("Warning") elif msgs[0] == "CRITICAL": msg_box.setIcon(QtGui.QMessageBox.Critical) msg_box.setWindowTitle("Critical error") msg_box.setText(msgs[3]) text = "Time: %s\n Location: %s\n Message:\n%s" % \ (msgs[1], msgs[2], '\n'.join(msgs[3:])) msg_box.setInformativeText('\n'.join(msgs[4:])) msg_box.setStandardButtons(QtGui.QMessageBox.Ok) msg_box.setDefaultButton(QtGui.QMessageBox.Ok) msg_box.setDetailedText(text) msg_box.show()
037568dc5960fe0f55f627faf210c87f5ee28788 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/037568dc5960fe0f55f627faf210c87f5ee28788/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 27647, 12, 2890, 16, 272, 4672, 272, 273, 609, 12, 87, 2934, 6406, 1435, 8733, 273, 272, 18, 4939, 2668, 64, 82, 6134, 309, 8733, 63, 20, 65, 422, 315, 5923, 6877, 1234, 67, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 27647, 12, 2890, 16, 272, 4672, 272, 273, 609, 12, 87, 2934, 6406, 1435, 8733, 273, 272, 18, 4939, 2668, 64, 82, 6134, 309, 8733, 63, 20, 65, 422, 315, 5923, 6877, 1234, 67, 21...
ld t1, ds, [scale, index, base], disp
ld t1, ds, [0, t0, t7], disp
def macroop SBB_P_I
edaaf1ebf1461b20c0bfa06472d5188a975e47c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/edaaf1ebf1461b20c0bfa06472d5188a975e47c7/add_and_subtract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 348, 9676, 67, 52, 67, 45, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 348, 9676, 67, 52, 67, 45, 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, ...
f.write(" return xpc_qsThrowMethodFailed(" "cx, rv, vp);\n") else: if isGetter: thisval = '*vp' else: thisval = '*tvr.addr()' f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " + "JSVAL_TO_OBJECT(%s), id);\n" % thisval)
if isGetter: thisval = '*vp' else: thisval = '*tvr.addr()' f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " + "JSVAL_TO_OBJECT(%s), id);\n" % thisval) else: if isMethod or isGetter: f.write(" NS_ASSERTION(xpc_qsSameResult(debug_result, result),\n" " \"Got the wrong answer from the custom " "method call!\");\n") f.write("
def pfail(msg): raise UserError( member.iface.name + '.' + member.name + ": " "parameter " + param.name + ": " + msg)
8896184edbd95bdc709171e1892d30700ae56acd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/8896184edbd95bdc709171e1892d30700ae56acd/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 6870, 12, 3576, 4672, 1002, 2177, 668, 12, 3140, 18, 31479, 18, 529, 397, 2611, 397, 3140, 18, 529, 397, 6398, 315, 315, 6775, 315, 397, 579, 18, 529, 397, 6398, 315, 397, 1234, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 6870, 12, 3576, 4672, 1002, 2177, 668, 12, 3140, 18, 31479, 18, 529, 397, 2611, 397, 3140, 18, 529, 397, 6398, 315, 315, 6775, 315, 397, 579, 18, 529, 397, 6398, 315, 397, 1234, ...
s.send('exit')
s.send('exit \0')
def close(self): s.send('exit') s.close()
2c08272f70137ab264e2522f23535b6805965cfd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13081/2c08272f70137ab264e2522f23535b6805965cfd/BaseX.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 272, 18, 4661, 2668, 8593, 521, 20, 6134, 272, 18, 4412, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 1746, 12, 2890, 4672, 272, 18, 4661, 2668, 8593, 521, 20, 6134, 272, 18, 4412, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
chef.set_width(dose_step) chef.set_max(dose_max) chef.set_labin('DOSE')
if min(all_doses) < max(all_doses): chef.set_width(dose_step) chef.set_max(dose_max) chef.set_labin('DOSE') else: chef.set_labin('BATCH')
def _scale(self): '''Perform all of the operations required to deliver the scaled data.'''
f9a5fed59de515ef9561fdfc31772332f6fa6dd2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3290/f9a5fed59de515ef9561fdfc31772332f6fa6dd2/CCP4ScalerImplementation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 12, 2890, 4672, 9163, 4990, 777, 434, 326, 5295, 1931, 358, 11795, 326, 12304, 501, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5864, 12, 2890, 4672, 9163, 4990, 777, 434, 326, 5295, 1931, 358, 11795, 326, 12304, 501, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"time=",
"runtime=",
def _task_build_params( task_name, argv, description="", help_specific_usage="", version=__revision__, specific_params=("", []), task_submit_elaborate_specific_parameter_fnc=None, task_submit_check_options_fnc=None): """ Build the BibTask params. @param argv a list of string as in sys.argv @param description is the generic description printed in the usage page; @param help_specific_usage is the specific parameter help @param task_submit_elaborate_specific_parameter_fnc will be called passing a key and a value, for parsing specific cli parameters. Must return True if it has recognized the parameter. Must eventually update the options with bibtask_set_option; @param task_submit_check_options must check the validity of options (via bibtask_get_option) once all the options where parsed; """ global _task_params, _options _options = {} if task_name in CFG_BIBTASK_DEFAULT_TASK_SETTINGS: _options.update(CFG_BIBTASK_DEFAULT_TASK_SETTINGS[task_name]) # set user-defined options: try: (short_params, long_params) = specific_params opts, args = getopt.gnu_getopt(argv[1:], "hVv:u:s:t:P:N:L:" + short_params, [ "help", "version", "verbose=", "user=", "sleep=", "time=", "priority=", "task-specific-name=", "runtime-limit=", "profile=" ] + long_params) except getopt.GetoptError, err: _usage(1, err, help_specific_usage=help_specific_usage, description=description) try: for opt in opts: if opt[0] in ("-h", "--help"): _usage(0, help_specific_usage=help_specific_usage, description=description) elif opt[0] in ("-V", "--version"): print _task_params["version"] sys.exit(0) elif opt[0] in ("-u", "--user"): _task_params["user"] = opt[1] elif opt[0] in ("-v", "--verbose"): _task_params["verbose"] = int(opt[1]) elif opt[0] in ("-s", "--sleeptime"): if task_name not in CFG_TASK_IS_NOT_A_DEAMON: get_datetime(opt[1]) # see if it is a valid shift _task_params["sleeptime"] = opt[1] elif opt[0] in ("-t", "--runtime"): _task_params["runtime"] = get_datetime(opt[1]) elif opt[0] in ("-P", "--priority"): _task_params["priority"] = int(opt[1]) elif opt[0] in ("-N", "--task-specific-name"): _task_params["task_specific_name"] = opt[1] elif opt[0] in ("-L", "--runtime-limit"): _task_params["runtime_limit"] = parse_runtime_limit(opt[1]) elif opt[0] in ("--profile", ): _task_params["profile"] += opt[1].split(',') elif not callable(task_submit_elaborate_specific_parameter_fnc) or \ not task_submit_elaborate_specific_parameter_fnc(opt[0], opt[1], opts, args): _usage(1, help_specific_usage=help_specific_usage, description=description) except StandardError, e: _usage(e, help_specific_usage=help_specific_usage, description=description) if callable(task_submit_check_options_fnc): if not task_submit_check_options_fnc(): _usage(1, help_specific_usage=help_specific_usage, description=description)
83bf104f28b02316d29d8cf6f2faa75ad4726d30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/83bf104f28b02316d29d8cf6f2faa75ad4726d30/bibtask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4146, 67, 3510, 67, 2010, 12, 1562, 67, 529, 16, 5261, 16, 2477, 1546, 3113, 2809, 67, 12524, 67, 9167, 1546, 3113, 1177, 33, 972, 13057, 972, 16, 2923, 67, 2010, 33, 2932, 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, 389, 4146, 67, 3510, 67, 2010, 12, 1562, 67, 529, 16, 5261, 16, 2477, 1546, 3113, 2809, 67, 12524, 67, 9167, 1546, 3113, 1177, 33, 972, 13057, 972, 16, 2923, 67, 2010, 33, 2932, 3113, ...
args += [(self._rec_name, operator, name)]
args = ['AND', args, (self._rec_name, operator, name)]
def name_search(self, cursor, user, name='', args=None, operator='ilike', context=None, limit=None): ''' Return a list of ids where the name and the args clause matches. args is a clause like in the function search. operator is the operator used to compare the name. limit can be used to limit the number of id. ''' if args is None: args = [] args = args[:] if name: args += [(self._rec_name, operator, name)] ids = self.search(cursor, user, args, limit=limit, context=context) res = self.name_get(cursor, user, ids, context=context) return res
6e6f0c708c3402e1dd1f4380cc0b1a1c90d76c14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/6e6f0c708c3402e1dd1f4380cc0b1a1c90d76c14/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 67, 3072, 12, 2890, 16, 3347, 16, 729, 16, 508, 2218, 2187, 833, 33, 7036, 16, 3726, 2218, 330, 2547, 2187, 819, 33, 7036, 16, 1800, 33, 7036, 4672, 9163, 2000, 279, 666, 434, 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, 508, 67, 3072, 12, 2890, 16, 3347, 16, 729, 16, 508, 2218, 2187, 833, 33, 7036, 16, 3726, 2218, 330, 2547, 2187, 819, 33, 7036, 16, 1800, 33, 7036, 4672, 9163, 2000, 279, 666, 434, 3...
'account_collected_id': acc_template_ref[value['account_collected_id']], 'account_paid_id': acc_template_ref[value['account_paid_id']],
'account_collected_id': acc_template_ref.get(value['account_collected_id'], False), 'account_paid_id': acc_template_ref.get(value['account_paid_id'], False),
def execute(self, cr, uid, ids, context=None): obj_multi = self.browse(cr, uid, ids[0]) obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_position_template = self.pool.get('account.fiscal.position.template') obj_fiscal_position = self.pool.get('account.fiscal.position') obj_data = self.pool.get('ir.model.data') analytic_journal_obj = self.pool.get('account.analytic.journal') obj_tax_code = self.pool.get('account.tax.code') # Creating Account obj_acc_root = obj_multi.chart_template_id.account_root_id tax_code_root_id = obj_multi.chart_template_id.tax_code_root_id.id company_id = obj_multi.company_id.id
516084383be8708a61735a8517eed3455b114b64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/516084383be8708a61735a8517eed3455b114b64/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1081, 67, 7027, 273, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 63, 20, 5717, 1081, 67, 8981, 273, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 1081, 67, 7027, 273, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 63, 20, 5717, 1081, 67, 8981, 273, 365, 18, ...
uidmap = None gidmap = None
uidmap = IdMap() gidmap = IdMap()
def main(): try: opts, args = getopt.gnu_getopt(sys.argv[1:], 'u:g:sh', ['uid-map=', 'gid-map=', 'simulate']) except getopt.GetoptError, e: usage(e) simulate = False uidmap = None gidmap = None for opt, val in opts: if opt in ('-u', '--uid-map'): uidmap = val elif opt in ('-g', '--gid-map'): gidmap = val elif opt in ('-s', '--simulate'): simulate = True else: usage() if len(args) < 1: usage() delta = args[0] paths = args[1:] print `(uidmap, gidmap, delta, paths, simulate)` def parse_map(line): return dict([ map(int, val.split(',', 1)) for val in line.split(':') ]) if uidmap: uidmap = parse_map(uidmap) if gidmap: gidmap = parse_map(gidmap) changes = parse_delta(delta) for method, args in fixstat(changes, uidmap, gidmap): print method.__name__ + `args`
067630b302b95c01c1ec298b5af3b8975494e224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10616/067630b302b95c01c1ec298b5af3b8975494e224/cmd_fixstat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 1600, 89, 67, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 89, 30, 75, 30, 674, 2187, 10228, 1911, 17, 1458, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 1600, 89, 67, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 89, 30, 75, 30, 674, 2187, 10228, 1911, 17, 1458, 33, ...
if next >= end:
if inc > 0 and next >= end: break elif inc < 0 and next <= end:
def frange(start, end=None, inc=None): "A range function, that does accept float increments..." if end == None: end = start + 0.0 start = 0.0 if inc == None: inc = 1.0 L = [] while 1: next = start + len(L) * inc if next >= end: break L.append(next) return L
a7d05f7263c8438dfde86d357c67c4c452428b8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/a7d05f7263c8438dfde86d357c67c4c452428b8f/grids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 284, 3676, 12, 1937, 16, 679, 33, 7036, 16, 7290, 33, 7036, 4672, 315, 37, 1048, 445, 16, 716, 1552, 2791, 1431, 17071, 7070, 225, 309, 679, 422, 599, 30, 679, 273, 787, 397, 374, 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, 284, 3676, 12, 1937, 16, 679, 33, 7036, 16, 7290, 33, 7036, 4672, 315, 37, 1048, 445, 16, 716, 1552, 2791, 1431, 17071, 7070, 225, 309, 679, 422, 599, 30, 679, 273, 787, 397, 374, 18...
lines.append('greceptor: ' + msg)
lines.append('greceptor: %s' % msg)
def warning(self, msg, showtraceback=True): """Logs a warning to syslog. Usually after an exception was thrown."""
4f5a05463ae16755de49e905de263a47a6eb4f5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7066/4f5a05463ae16755de49e905de263a47a6eb4f5e/greceptor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3436, 12, 2890, 16, 1234, 16, 2405, 21696, 33, 5510, 4672, 3536, 7777, 279, 3436, 358, 16718, 18, 29785, 1839, 392, 1520, 1703, 6718, 12123, 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, 0, 0, 0, 0, 0, 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, 3436, 12, 2890, 16, 1234, 16, 2405, 21696, 33, 5510, 4672, 3536, 7777, 279, 3436, 358, 16718, 18, 29785, 1839, 392, 1520, 1703, 6718, 12123, 2, -100, -100, -100, -100, -100, -100, -100, ...
print tooltip
def __init__(self, gst_pad, elt_adapter): AbstractAdapter.__init__(self, gst_pad, elt_adapter)
64788769fa60cde89df32f4b6adc27ba7b971326 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9548/64788769fa60cde89df32f4b6adc27ba7b971326/PadAdapter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 334, 67, 6982, 16, 11572, 67, 10204, 4672, 4115, 4216, 16186, 2738, 972, 12, 2890, 16, 314, 334, 67, 6982, 16, 11572, 67, 10204, 13, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 314, 334, 67, 6982, 16, 11572, 67, 10204, 4672, 4115, 4216, 16186, 2738, 972, 12, 2890, 16, 314, 334, 67, 6982, 16, 11572, 67, 10204, 13, 2, -100, -100, ...
self.thePile.get_focus().set_focus(self.focusloc[1])
if self.wlessLB is not self.no_wlan: self.thePile.get_focus().set_focus(self.focusloc[1]) else: self.thePile.set_focus(self.wiredCB)
def update_netlist(self,state=None, x=None, force_check=False,firstrun=False): if not firstrun: self.update_focusloc() """ Updates the overall network list.""" if not state: state, x = daemon.GetConnectionStatus() if force_check or self.prev_state != state: wiredL,wlessL = gen_network_list() #self.wiredCB = urwid.Filler(ComboBox(wiredL,self.frame,ui,3, # use_enter=False)) self.wiredCB.get_body().set_list(wiredL) self.wiredCB.get_body().build_combobox(self.frame,ui,3) if len(wlessL) != 0: self.wlessLB = urwid.ListBox(wlessL) #self.wlessLB.body = urwid.SimpleListWalker(wlessL) else: self.wlessLB = self.no_wlan #self.wlessLB.body = urwid.SimpleListWalker([self.no_wlan]) if daemon.GetAlwaysShowWiredInterface() or wired.CheckPluggedIn(): #if daemon.GetAlwaysShowWiredInterface(): self.thePile = urwid.Pile([('fixed',1,self.wiredH), ('fixed',1,self.wiredCB), ('fixed',1,self.wlessH), self.wlessLB] ) #self.focusloc = (self.thePile.get_focus(), # self.thePile.get_focus().get_focus()[1]) self.thePile.set_focus(self.focusloc[0]) if self.focusloc[0] == self.WIRED_IDX: self.thePile.get_focus().get_body().set_focus(self.focusloc[1]) else: self.thePile.get_focus().set_focus(self.focusloc[1]) else: self.thePile = urwid.Pile([('fixed',1,self.wlessH),self.wlessLB] ) self.frame.body = self.thePile if self.focusloc[0] == self.wlessLB: self.wlessLB.set_focus(self.focusloc[1]) #self.always_show_wired = not self.always_show_wired self.prev_state = state
b78b4c8d3bc27b35a33b53c3d42bb4f77863a8eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/353/b78b4c8d3bc27b35a33b53c3d42bb4f77863a8eb/wicd-curses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2758, 1098, 12, 2890, 16, 2019, 33, 7036, 16, 619, 33, 7036, 16, 2944, 67, 1893, 33, 8381, 16, 74, 481, 701, 318, 33, 8381, 4672, 309, 486, 284, 481, 701, 318, 30, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2758, 1098, 12, 2890, 16, 2019, 33, 7036, 16, 619, 33, 7036, 16, 2944, 67, 1893, 33, 8381, 16, 74, 481, 701, 318, 33, 8381, 4672, 309, 486, 284, 481, 701, 318, 30, 365, 1...
"""This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) tb = Tickbox0() tb.x = 170 tb.y = 530 tb.demo() D.add(tb) D.add(shapes.String(tb.x+(tb.size/2),(tb.y-(1.2*labelFontSize)), tb.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) yn = YesNo0() yn.x = 320 yn.y = 530 yn.demo() D.add(yn) tempstring = yn.__class__.__name__ + '*' D.add(shapes.String(yn.x+(tb.size/2),(yn.y-(1.2*labelFontSize)), tempstring, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) D.add(shapes.String(130,6, "(The 'YesNo' widget returns a tickbox if testvalue=1, and a crossbox if testvalue=0)", fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize*0.75)) ss = StopSign0() ss.x = 20 ss.y = 400 ss.demo() D.add(ss) D.add(shapes.String(ss.x+(ss.size/2), ss.y-(1.2*labelFontSize), ss.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ne = NoEntry0() ne.x = 170 ne.y = 400 ne.demo() D.add(ne) D.add(shapes.String(ne.x+(ne.size/2),(ne.y-(1.2*labelFontSize)), ne.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) sf = SmileyFace0() sf.x = 320 sf.y = 400 sf.demo() D.add(sf) D.add(shapes.String(sf.x+(sf.size/2),(sf.y-(1.2*labelFontSize)), sf.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ds = DangerSign0() ds.x = 20 ds.y = 270 ds.demo() D.add(ds) D.add(shapes.String(ds.x+(ds.size/2),(ds.y-(1.2*labelFontSize)), ds.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) na = NotAllowed0() na.x = 170 na.y = 270 na.demo() D.add(na) D.add(shapes.String(na.x+(na.size/2),(na.y-(1.2*labelFontSize)), na.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ns = NoSmoking0() ns.x = 320 ns.y = 270 ns.demo() D.add(ns) D.add(shapes.String(ns.x+(ns.size/2),(ns.y-(1.2*labelFontSize)), ns.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) a1 = ArrowOne0() a1.x = 20 a1.y = 140 a1.demo() D.add(a1) D.add(shapes.String(a1.x+(a1.size/2),(a1.y-(1.2*labelFontSize)), a1.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) a2 = ArrowTwo0() a2.x = 170 a2.y = 140 a2.demo() D.add(a2) D.add(shapes.String(a2.x+(a2.size/2),(a2.y-(1.2*labelFontSize)), a2.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) fd = FloppyDisk0() fd.x = 320 fd.y = 140 fd.demo() D.add(fd) D.add(shapes.String(fd.x+(fd.size/2),(fd.y-(1.2*labelFontSize)), fd.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) renderPDF.drawToFile(D, 'signsandsymbols.pdf', 'signsandsymbols.py') print 'wrote file: signsandsymbols.pdf'
"""This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) tb = Tickbox0() tb.x = 170 tb.y = 530 tb.demo() D.add(tb) D.add(shapes.String(tb.x+(tb.size/2),(tb.y-(1.2*labelFontSize)), tb.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) yn = YesNo0() yn.x = 320 yn.y = 530 yn.demo() D.add(yn) tempstring = yn.__class__.__name__ + '*' D.add(shapes.String(yn.x+(tb.size/2),(yn.y-(1.2*labelFontSize)), tempstring, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) D.add(shapes.String(130,6, "(The 'YesNo' widget returns a tickbox if testvalue=1, and a crossbox if testvalue=0)", fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize*0.75)) ss = StopSign0() ss.x = 20 ss.y = 400 ss.demo() D.add(ss) D.add(shapes.String(ss.x+(ss.size/2), ss.y-(1.2*labelFontSize), ss.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ne = NoEntry0() ne.x = 170 ne.y = 400 ne.demo() D.add(ne) D.add(shapes.String(ne.x+(ne.size/2),(ne.y-(1.2*labelFontSize)), ne.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) sf = SmileyFace0() sf.x = 320 sf.y = 400 sf.demo() D.add(sf) D.add(shapes.String(sf.x+(sf.size/2),(sf.y-(1.2*labelFontSize)), sf.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ds = DangerSign0() ds.x = 20 ds.y = 270 ds.demo() D.add(ds) D.add(shapes.String(ds.x+(ds.size/2),(ds.y-(1.2*labelFontSize)), ds.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) na = NotAllowed0() na.x = 170 na.y = 270 na.demo() D.add(na) D.add(shapes.String(na.x+(na.size/2),(na.y-(1.2*labelFontSize)), na.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ns = NoSmoking0() ns.x = 320 ns.y = 270 ns.demo() D.add(ns) D.add(shapes.String(ns.x+(ns.size/2),(ns.y-(1.2*labelFontSize)), ns.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) a1 = ArrowOne0() a1.x = 20 a1.y = 140 a1.demo() D.add(a1) D.add(shapes.String(a1.x+(a1.size/2),(a1.y-(1.2*labelFontSize)), a1.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) a2 = ArrowTwo0() a2.x = 170 a2.y = 140 a2.demo() D.add(a2) D.add(shapes.String(a2.x+(a2.size/2),(a2.y-(1.2*labelFontSize)), a2.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) fd = FloppyDisk0() fd.x = 320 fd.y = 140 fd.demo() D.add(fd) D.add(shapes.String(fd.x+(fd.size/2),(fd.y-(1.2*labelFontSize)), fd.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) renderPDF.drawToFile(D, 'signsandsymbols.pdf', 'signsandsymbols.py') print 'wrote file: signsandsymbols.pdf'
def test(): """This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) tb = Tickbox0() tb.x = 170 tb.y = 530 tb.demo() D.add(tb) D.add(shapes.String(tb.x+(tb.size/2),(tb.y-(1.2*labelFontSize)), tb.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) yn = YesNo0() yn.x = 320 yn.y = 530 yn.demo() D.add(yn) tempstring = yn.__class__.__name__ + '*' D.add(shapes.String(yn.x+(tb.size/2),(yn.y-(1.2*labelFontSize)), tempstring, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) D.add(shapes.String(130,6, "(The 'YesNo' widget returns a tickbox if testvalue=1, and a crossbox if testvalue=0)", fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize*0.75)) ss = StopSign0() ss.x = 20 ss.y = 400 ss.demo() D.add(ss) D.add(shapes.String(ss.x+(ss.size/2), ss.y-(1.2*labelFontSize), ss.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ne = NoEntry0() ne.x = 170 ne.y = 400 ne.demo() D.add(ne) D.add(shapes.String(ne.x+(ne.size/2),(ne.y-(1.2*labelFontSize)), ne.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) sf = SmileyFace0() sf.x = 320 sf.y = 400 sf.demo() D.add(sf) D.add(shapes.String(sf.x+(sf.size/2),(sf.y-(1.2*labelFontSize)), sf.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ds = DangerSign0() ds.x = 20 ds.y = 270 ds.demo() D.add(ds) D.add(shapes.String(ds.x+(ds.size/2),(ds.y-(1.2*labelFontSize)), ds.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) na = NotAllowed0() na.x = 170 na.y = 270 na.demo() D.add(na) D.add(shapes.String(na.x+(na.size/2),(na.y-(1.2*labelFontSize)), na.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) ns = NoSmoking0() ns.x = 320 ns.y = 270 ns.demo() D.add(ns) D.add(shapes.String(ns.x+(ns.size/2),(ns.y-(1.2*labelFontSize)), ns.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) a1 = ArrowOne0() a1.x = 20 a1.y = 140 a1.demo() D.add(a1) D.add(shapes.String(a1.x+(a1.size/2),(a1.y-(1.2*labelFontSize)), a1.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) a2 = ArrowTwo0() a2.x = 170 a2.y = 140 a2.demo() D.add(a2) D.add(shapes.String(a2.x+(a2.size/2),(a2.y-(1.2*labelFontSize)), a2.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) fd = FloppyDisk0() fd.x = 320 fd.y = 140 fd.demo() D.add(fd) D.add(shapes.String(fd.x+(fd.size/2),(fd.y-(1.2*labelFontSize)), fd.__class__.__name__, fillColor=colors.black, textAnchor='middle', fontSize=labelFontSize)) renderPDF.drawToFile(D, 'signsandsymbols.pdf', 'signsandsymbols.py') print 'wrote file: signsandsymbols.pdf'
c27976c5171e645ff5be68e37e0b9fb2951cab57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/c27976c5171e645ff5be68e37e0b9fb2951cab57/signsandsymbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 3536, 2503, 445, 15505, 279, 8169, 598, 10991, 434, 777, 326, 21588, 471, 7963, 628, 333, 585, 18, 3536, 1433, 22688, 273, 1728, 463, 273, 14736, 18, 26885, 12, 24, 3361, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 13332, 3536, 2503, 445, 15505, 279, 8169, 598, 10991, 434, 777, 326, 21588, 471, 7963, 628, 333, 585, 18, 3536, 1433, 22688, 273, 1728, 463, 273, 14736, 18, 26885, 12, 24, 3361, 16...
raise exc.ArgumentError("Ambiguous literal: %r. Use the 'text()' function " "to indicate a SQL expression literal, or 'literal()' to indicate a bound value." % element)
raise exc.ArgumentError("Ambiguous literal: %r. Use the 'text()' " "function to indicate a SQL expression " "literal, or 'literal()' to indicate a " "bound value." % element)
def _no_literals(element): if hasattr(element, '__clause_element__'): return element.__clause_element__() elif not isinstance(element, Visitable): raise exc.ArgumentError("Ambiguous literal: %r. Use the 'text()' function " "to indicate a SQL expression literal, or 'literal()' to indicate a bound value." % element) else: return element
0b93f88d2c199737f8d1202bb95240fed122b531 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/0b93f88d2c199737f8d1202bb95240fed122b531/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2135, 67, 80, 11235, 12, 2956, 4672, 309, 3859, 12, 2956, 16, 4940, 18128, 67, 2956, 7250, 4672, 327, 930, 16186, 18128, 67, 2956, 972, 1435, 1327, 486, 1549, 12, 2956, 16, 8077, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2135, 67, 80, 11235, 12, 2956, 4672, 309, 3859, 12, 2956, 16, 4940, 18128, 67, 2956, 7250, 4672, 327, 930, 16186, 18128, 67, 2956, 972, 1435, 1327, 486, 1549, 12, 2956, 16, 8077, ...
if self.tools_path == None: logging.error('Lcov converter tool not found') return False self.tools_path = self.tools_path.rstrip('\\') convert_command = ('%s -sym_path=%s -src_root=%s %s' % (os.path.join(self.tools_path, 'coverage_analyzer.exe'), sym_path, src_root, coverage_file)) (retcode, output) = proc.RunCommandFull(convert_command, collect_output=True) if output != 0: logging.error('Conversion to LCOV failed. Exiting.') sys.exit(1) lcov_file = coverage_file + '.lcov' logging.info('Conversion to lcov complete') shutil.copy(lcov_file, upload_path)
lcov_file = os.path.join(upload_path, 'chrome_win32_%s.lcov' % (self.revision)) lcov = open(lcov_file, 'w') for coverage_file in list_coverage: if self.tools_path == None: logging.error('Lcov converter tool not found') return False self.tools_path = self.tools_path.rstrip('\\') convert_command = ('%s -sym_path=%s -src_root=%s %s' % (os.path.join(self.tools_path, 'coverage_analyzer.exe'), sym_path, src_root, coverage_file)) (retcode, output) = proc.RunCommandFull(convert_command, collect_output=True) if output != 0: logging.error('Conversion to LCOV failed. Exiting.') sys.exit(1) tmp_lcov_file = coverage_file + '.lcov' logging.info('Conversion to lcov complete for %s' % (coverage_file)) logging.info('Consolidating LCOV file: %s' % (tmp_lcov_file)) tmp_lcov = open(tmp_lcov_file, 'r') lcov.write(tmp_lcov.read()) tmp_lcov.close() lcov.close()
def Upload(self, coverage_file, upload_path, sym_path=None, src_root=None): """Upload the results to the dashboard.
cb5ba75cf843f2c74de2f7116b0c7ad99b95596b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9392/cb5ba75cf843f2c74de2f7116b0c7ad99b95596b/coverage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9414, 12, 2890, 16, 11196, 67, 768, 16, 3617, 67, 803, 16, 5382, 67, 803, 33, 7036, 16, 1705, 67, 3085, 33, 7036, 4672, 3536, 4777, 326, 1686, 358, 326, 11825, 18, 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, 9414, 12, 2890, 16, 11196, 67, 768, 16, 3617, 67, 803, 16, 5382, 67, 803, 33, 7036, 16, 1705, 67, 3085, 33, 7036, 4672, 3536, 4777, 326, 1686, 358, 326, 11825, 18, 2, -100, -100, -10...
if 'time_limit' in params.keys(): self.time_limit = params['time_limit']
if 'search_time_limit' in params.keys(): self.time_limit = params['search_time_limit']
def __init__(self, params): '''To instantiate a search engine'''
3c2af39a980fb33fcef83e24d20b25e616677192 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8417/3c2af39a980fb33fcef83e24d20b25e616677192/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 859, 4672, 9163, 774, 10275, 279, 1623, 4073, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 859, 4672, 9163, 774, 10275, 279, 1623, 4073, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
os.path.join("bin", "distrib_fu_qscan_results.py"), os.path.join("bin", "submit_remote_scan.py"), os.path.join("bin", "exttrig_likelihood_pipe"), os.path.join("bin", "fup_triggers.py"),
os.path.join("bin", "distrib_fu_qscan_results.py"), os.path.join("bin", "submit_remote_scan.py"), os.path.join("bin", "exttrig_likelihood_pipe"), os.path.join("bin", "fup_triggers.py"),
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass
9bc7a21754a055893f9725e274fb0239122cbca8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/9bc7a21754a055893f9725e274fb0239122cbca8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 468, 1206, 326, 6635, 4374, 729, 1550, 8873, 364, 2728, 316, 8247, 2074, 80, 287, 17, 1355, 17, 3074, 18, 674, 3113, 315, 2074, 80, 287, 17, 1355, 17, 3074, 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, 1086, 12, 2890, 4672, 468, 1206, 326, 6635, 4374, 729, 1550, 8873, 364, 2728, 316, 8247, 2074, 80, 287, 17, 1355, 17, 3074, 18, 674, 3113, 315, 2074, 80, 287, 17, 1355, 17, 3074, 18, ...
return count
return len(vessel_list)
def mark_expired_vessels_as_dirty(): """ <Purpose> Change all vessel records in the database whose acquisitions have expired to be marked as dirty in the database (that is, to indicate they need to be cleaned up by the backend). <Arguments> None <Exceptions> None <Side Effects> All expired vessels (past expiration and acquired by users) in the database are marked as dirty as well as marked as not acquired by users. Additionally, all vessel user access map entries for each of these vessels have been removed. <Returns> The number of expired vessels marked as dirty. """ # We want to mark as dirty all vessels past their expiration date that are # currently acquired by users. queryset = Vessel.objects.filter(date_expires__lte=datetime.now()) queryset = queryset.exclude(acquired_by_user=None) count = queryset.count() if count > 0: queryset.update(is_dirty=True, acquired_by_user=None) # Remove all vessel user access records for each of these vessels. for vessel in list(queryset): VesselUserAccessMap.objects.filter(vessel=vessel).delete() # Return the number of vessels that just expired. return count
59e724611d1979270fcc00dcb1f1d750d34672e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/59e724611d1979270fcc00dcb1f1d750d34672e5/maindb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2267, 67, 15820, 67, 90, 403, 10558, 67, 345, 67, 18013, 13332, 3536, 411, 10262, 4150, 34, 7576, 777, 331, 403, 292, 3853, 316, 326, 2063, 8272, 1721, 16608, 5029, 1240, 7708, 358, 506,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2267, 67, 15820, 67, 90, 403, 10558, 67, 345, 67, 18013, 13332, 3536, 411, 10262, 4150, 34, 7576, 777, 331, 403, 292, 3853, 316, 326, 2063, 8272, 1721, 16608, 5029, 1240, 7708, 358, 506,...
editor.run()
response = editor.run() if response == gtk.RESPONSE_APPLY: paths = self.client_taskman.get_list(GROUP_DEFAULT, defs.LAUNCHERS_LIST) paths.append(vfile.props.path) self.client_taskman.set_list(GROUP_DEFAULT, defs.LAUNCHERS_LIST, paths)
def add(self, button): selection = self.treeview_launchers.get_selection() (model, iter) = selection.get_selected() vfile = self.create_unique_launcher_file() editor = LauncherEditorDialog(vfile, None) editor.show_all() editor.run()
69696c90519a68afcbb7ef7e62fff77a33c0b02d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/69696c90519a68afcbb7ef7e62fff77a33c0b02d/awnClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 3568, 4672, 4421, 273, 365, 18, 3413, 1945, 67, 20738, 414, 18, 588, 67, 10705, 1435, 261, 2284, 16, 1400, 13, 273, 4421, 18, 588, 67, 8109, 1435, 331, 768, 273, 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, 527, 12, 2890, 16, 3568, 4672, 4421, 273, 365, 18, 3413, 1945, 67, 20738, 414, 18, 588, 67, 10705, 1435, 261, 2284, 16, 1400, 13, 273, 4421, 18, 588, 67, 8109, 1435, 331, 768, 273, 3...
tasks_list_unwrapped = reduce(lambda x,y: x+y , tasks_list_normalized) task_objects_list,list_ids_list,taskseries_ids_list = \ self.unziplist(tasks_list_unwrapped)
tasks_list_unwrapped = [] task_objects_list = [] list_ids_list = [] taskseries_ids_list = [] if len(tasks_list_normalized)>0: tasks_list_unwrapped = reduce(lambda x,y: x+y , tasks_list_normalized) task_objects_list,list_ids_list,taskseries_ids_list = \ self.unziplist(tasks_list_unwrapped)
def get_list_of_taskseries (x): currentlist = self.rtm.tasks.getList\ (filter='status:incomplete',list_id=x).tasks if hasattr (currentlist, 'list'): return currentlist.list else: return []
46f14a572d95faa13dff7a26fcfb7b2df63698bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/46f14a572d95faa13dff7a26fcfb7b2df63698bd/syncengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1098, 67, 792, 67, 4146, 10222, 261, 92, 4672, 783, 1098, 273, 365, 18, 3797, 81, 18, 9416, 18, 588, 682, 64, 261, 2188, 2218, 2327, 30, 17624, 2187, 1098, 67, 350, 33, 92, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1098, 67, 792, 67, 4146, 10222, 261, 92, 4672, 783, 1098, 273, 365, 18, 3797, 81, 18, 9416, 18, 588, 682, 64, 261, 2188, 2218, 2327, 30, 17624, 2187, 1098, 67, 350, 33, 92, ...
self._expect_expr(self._display_prompt) pre_out = self._before() self._expect_expr() out = self._before()
assert line_echo.strip() == line.strip() self._expect_expr(self._display_prompt) out = self._before()
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: We check that errors are correctly checked:: sage: maxima._eval_line('1+1;') '2' sage: maxima.eval('sage0: x == x;') Traceback (most recent call last): ... TypeError: error evaluating "sage0: x == x;":... """ if len(line) == 0: return '' line = line.rstrip() if line[-1] != '$' and line[-1] != ';': line += ';'
ee335d2a4ec9692f34eed2c12089bf86c01fd8aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ee335d2a4ec9692f34eed2c12089bf86c01fd8aa/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 12, 2890, 16, 980, 16, 1699, 67, 1202, 67, 768, 33, 8381, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 283, 2139, 33, 5510, 16, 555, 67, 1893, 33, 5510, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 12, 2890, 16, 980, 16, 1699, 67, 1202, 67, 768, 33, 8381, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 283, 2139, 33, 5510, 16, 555, 67, 1893, 33, 5510, 4672, ...
ulicon = convert_to_int(icon) ulmask = convert_to_int(mask)
ulicon = convert_to_Pixmap(icon) ulmask = convert_to_Pixmap(mask)
def fl_set_form_icon(pForm, icon, mask): """ fl_set_form_icon(pForm, icon, mask) """ _fl_set_form_icon = cfuncproto( load_so_libforms(), "fl_set_form_icon", \ None, [cty.POINTER(FL_FORM), Pixmap, Pixmap], \ """void fl_set_form_icon(FL_FORM * form, Pixmap p, Pixmap m) """) ulicon = convert_to_int(icon) ulmask = convert_to_int(mask) keep_elem_refs(pForm, icon, mask, ulicon, ulmask) _fl_set_form_icon(pForm, ulicon, ulmask)
bd6cf497d94f877a33a2bba90b9d74b9e4c950cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/bd6cf497d94f877a33a2bba90b9d74b9e4c950cb/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 3950, 12, 84, 1204, 16, 4126, 16, 3066, 4672, 3536, 1183, 67, 542, 67, 687, 67, 3950, 12, 84, 1204, 16, 4126, 16, 3066, 13, 3536, 225, 389, 2242, 67, 54...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 3950, 12, 84, 1204, 16, 4126, 16, 3066, 4672, 3536, 1183, 67, 542, 67, 687, 67, 3950, 12, 84, 1204, 16, 4126, 16, 3066, 13, 3536, 225, 389, 2242, 67, 54...
self.body.append('\\subparagraph{%s\label{%s}}\n' % (s1, s2))
self.body.append('\\subparagraph{%s\\label{%s}}\n' % (s1, s2))
def visit_title(self, node): #self.pdebug('%% [(visit_title) section_level: %d node: "%s"]\n' % \ # (self.section_level, node.astext().lower())) if self.section_level == 0: self.title_before_section = 1 if self.seealso: self.body.append('\\end{seealso}\n') self.seealso = 0 if node.astext().lower() == 'see also': self.body.append('\\begin{seealso}\n') self.seealso = 1 raise nodes.SkipNode else: if self.section_level == 0: # It's the document title before any section. self.title = self.encode(node.astext()) else: # It's a title for a section in-side the document. self.body.append('\n\n') self.body.append('%' + '_' * 75) self.body.append('\n\n') s1 = self.encode(node.astext()) s2 = self.string_to_label(node.astext()) if (self.section_level == 1): self.body.append('\\section{%s\label{%s}}\n' % (s1, s2)) elif (self.section_level == 2): self.body.append('\\subsection{%s\label{%s}}\n' % (s1, s2)) elif (self.section_level == 3): self.body.append('\\subsubsection{%s\label{%s}}\n' % (s1, s2)) elif (self.section_level == 4): self.body.append('\\paragraph{%s\label{%s}}\n' % (s1, s2)) else: self.body.append('\\subparagraph{%s\label{%s}}\n' % (s1, s2)) raise nodes.SkipNode
ed688792a0f4c20b7802333819981a0ad813078d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/ed688792a0f4c20b7802333819981a0ad813078d/python_latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2649, 12, 2890, 16, 756, 4672, 468, 2890, 18, 84, 4148, 2668, 11438, 306, 12, 11658, 67, 2649, 13, 2442, 67, 2815, 30, 738, 72, 225, 756, 30, 2213, 87, 11929, 64, 82, 11, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2649, 12, 2890, 16, 756, 4672, 468, 2890, 18, 84, 4148, 2668, 11438, 306, 12, 11658, 67, 2649, 13, 2442, 67, 2815, 30, 738, 72, 225, 756, 30, 2213, 87, 11929, 64, 82, 11, ...
self.bsel.close()
self.bsel.close(True)
def addSubserviceToBouquet(self, dest): serviceHandler = eServiceCenter.getInstance() list = dest and serviceHandler.list(dest) mutableList = dest and list and list.startEdit() if mutableList: if not mutableList.addService(self.selectedSubservice[1]): mutableList.flushChanges() # do some voodoo to check if the subservice is added to the # current selected bouquet in channellist cur_root = self.servicelist.getRoot(); str1 = cur_root.toString() str2 = dest.toString() pos1 = str1.find("FROM BOUQUET") pos2 = str2.find("FROM BOUQUET") if pos1 != -1 and pos2 != -1 and str1[pos1:] == str2[pos2:]: self.servicelist.setMode() if self.bsel: self.bsel.close() else: del self.selectedSubservice
f855bd5291c74d34668cdbb77e9c89c80f4a5dc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/f855bd5291c74d34668cdbb77e9c89c80f4a5dc9/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25716, 3278, 774, 38, 1395, 28357, 12, 2890, 16, 1570, 4672, 1156, 1503, 273, 425, 1179, 8449, 18, 588, 1442, 1435, 666, 273, 1570, 471, 1156, 1503, 18, 1098, 12, 10488, 13, 16074, 682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25716, 3278, 774, 38, 1395, 28357, 12, 2890, 16, 1570, 4672, 1156, 1503, 273, 425, 1179, 8449, 18, 588, 1442, 1435, 666, 273, 1570, 471, 1156, 1503, 18, 1098, 12, 10488, 13, 16074, 682, ...
src_bandnum=clayer.get_data(src).get_band_number()
src_bandnum = clayer.get_data(src).get_band_number()
def export_cb(self,*args): ipfile=self.frame_dict['Files'].get('Input') opfile=self.frame_dict['Files'].get('Output') if os.path.isfile(opfile): resp=GtkExtra.message_box('Confirmation',opfile + ' exists. Overwrite?',('Yes','No')) if resp == 'No': return elif len(opfile) == 0: gvutils.error('No output filename entered!') return
18bebfddf000a5af98d1ab83e4246e700756e2a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11090/18bebfddf000a5af98d1ab83e4246e700756e2a4/Tool_Export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7358, 12, 2890, 16, 14, 1968, 4672, 2359, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29489, 588, 2668, 1210, 6134, 1061, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 7358, 12, 2890, 16, 14, 1968, 4672, 2359, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29489, 588, 2668, 1210, 6134, 1061, 768, 33, 2890, 18, 3789, 67, 1576, 3292, 2697, 29...
def todict(self, proj1=None, proj2=None): if proj1 and proj2:
def to_dict(self, key_selector=None, element_selector=None): if key_selector and element_selector:
def todict(self, proj1=None, proj2=None): if proj1 and proj2: return self \ .select(lambda item: (proj1(item), proj2(item))) \ .todict() elif proj1: return self \ .select(lambda item: (item, proj1(item))) \ .todict() else: return dict(self)
f134b825431ac82f3dbba76e7a945a0e195d27cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14315/f134b825431ac82f3dbba76e7a945a0e195d27cf/pyquery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1576, 12, 2890, 16, 498, 67, 9663, 33, 7036, 16, 930, 67, 9663, 33, 7036, 4672, 309, 498, 67, 9663, 471, 930, 67, 9663, 30, 327, 365, 521, 263, 4025, 12, 14661, 761, 30, 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, 358, 67, 1576, 12, 2890, 16, 498, 67, 9663, 33, 7036, 16, 930, 67, 9663, 33, 7036, 4672, 309, 498, 67, 9663, 471, 930, 67, 9663, 30, 327, 365, 521, 263, 4025, 12, 14661, 761, 30, 2...
wordWithSpace = word + ' ' dc.DrawText(wordWithSpace, x, y)
thisLine += word + u' '
def DrawWrappedText(dc, text, rect, measurements=None): """ Simple wordwrap - draws the text into the current DC returns the height of the text that was written measurements is a FontMeasurements object as returned by Styles.getMeasurements() """ if measurements is None: measurements = Styles.getMeasurements(dc.GetFont()) lineHeight = measurements.height spaceWidth = measurements.spaceWidth (rectX, rectY, rectWidth, rectHeight) = rect y = rectY rectRight = rectX + rectWidth rectBottom = rectY + rectHeight assert rectHeight >= lineHeight, "Don't have enough room to write anything (have %d, need %d)" % (rectHeight, lineHeight) for line in text.splitlines(): x = rectX for word in line.split(): width, ignored = dc.GetTextExtent(word) # if we wrapped but we still can't fit the word, # just truncate it if (width > rectWidth and x == rectX): DrawClippedText(dc, word, x, y, rectWidth, width) y += lineHeight continue # see if we want to jump to the next line if (x + width > rectRight): y += lineHeight x = rectX # if we're out of vertical space, just return if (y + lineHeight > rectBottom): return y - rectY # total height availableWidth = rectRight - x if width > availableWidth: DrawClippedText(dc, word, x, y, availableWidth, width) x += width # x is now past rectRight, so this will force a wrap else: wordWithSpace = word + ' ' dc.DrawText(wordWithSpace, x, y) x += width + spaceWidth y += lineHeight return y - rectY # total height
be08871ad8b07767baeb0291eec62bcd7b993458 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/be08871ad8b07767baeb0291eec62bcd7b993458/DrawingUtilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 17665, 1528, 12, 7201, 16, 977, 16, 4917, 16, 16725, 33, 7036, 4672, 3536, 4477, 2076, 4113, 300, 30013, 326, 977, 1368, 326, 783, 21533, 225, 1135, 326, 2072, 434, 326, 977, 716,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 17665, 1528, 12, 7201, 16, 977, 16, 4917, 16, 16725, 33, 7036, 4672, 3536, 4477, 2076, 4113, 300, 30013, 326, 977, 1368, 326, 783, 21533, 225, 1135, 326, 2072, 434, 326, 977, 716,...
execfile(ffi_configfile, globals(), fficonfig) ffi_srcdir = os.path.join(fficonfig['ffi_srcdir'], 'src')
exec open(ffi_configfile) in fficonfig
def configure_ctypes(self, ext): if not self.use_system_libffi: if sys.platform == 'darwin': return self.configure_ctypes_darwin(ext)
30b66794c2de92a60eab83003627eed662225224 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/30b66794c2de92a60eab83003627eed662225224/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 299, 989, 12, 2890, 16, 1110, 4672, 309, 486, 365, 18, 1202, 67, 4299, 67, 2941, 1403, 77, 30, 309, 2589, 18, 9898, 422, 296, 28076, 4278, 327, 365, 18, 14895, 67, 299, 989...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 299, 989, 12, 2890, 16, 1110, 4672, 309, 486, 365, 18, 1202, 67, 4299, 67, 2941, 1403, 77, 30, 309, 2589, 18, 9898, 422, 296, 28076, 4278, 327, 365, 18, 14895, 67, 299, 989...
def get_download_path(name):
def get_download_path(fullname): name = os.path.basename(fullname) assert name, 'Invalid file name %s' % fullname
def get_download_path(name): path = os.path.join(GeneralConfig.file_transfers_directory, name) if os.path.exists(path): all = [int(x[len(path)+1:]) for x in glob.glob(path + '.*')] if not all: return path + '.1' else: return path + '.' + str(max(all)+1) return path
9ccb77e98959b6527b4cd72cd6f7f5d9fe0093dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/9ccb77e98959b6527b4cd72cd6f7f5d9fe0093dc/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7813, 67, 803, 12, 21885, 4672, 508, 273, 1140, 18, 803, 18, 13909, 12, 21885, 13, 1815, 508, 16, 296, 1941, 585, 508, 738, 87, 11, 738, 13321, 589, 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, 336, 67, 7813, 67, 803, 12, 21885, 4672, 508, 273, 1140, 18, 803, 18, 13909, 12, 21885, 13, 1815, 508, 16, 296, 1941, 585, 508, 738, 87, 11, 738, 13321, 589, 273, 1140, 18, 803, 18, ...
try: return power_series_ring.PowerSeriesRing(Zmod(other))(self) except TypeError: raise ZeroDivisionError raise NotImplementedError, "Mod on power series ring not defined."
return power_series_ring.PowerSeriesRing(IntegerModRing(other), self.variable())(self) raise NotImplementedError, "Mod on power series ring elements not defined except modulo an integer."
def __mod__(self, other): if isinstance(other,(int,Integer,long)): try: return power_series_ring.PowerSeriesRing(Zmod(other))(self) except TypeError: raise ZeroDivisionError raise NotImplementedError, "Mod on power series ring not defined."
3e01aeaeebc367aa076e0c8ca472900f744c7cae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3e01aeaeebc367aa076e0c8ca472900f744c7cae/power_series_ring_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1711, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 12, 474, 16, 4522, 16, 5748, 3719, 30, 327, 7212, 67, 10222, 67, 8022, 18, 13788, 6485, 10369, 12, 4522, 1739, 10369...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1711, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 12, 474, 16, 4522, 16, 5748, 3719, 30, 327, 7212, 67, 10222, 67, 8022, 18, 13788, 6485, 10369, 12, 4522, 1739, 10369...
initialize_geometry(res_dict, sidechain_angle_list, 'angle') initialize_geometry(res_dict, sidechain_length_list, 'length')
def parseWithBioPython(file, props, chains_filter=None): """ Parse values from file that can be parsed using BioPython library @return a dict containing the properties that were processed """ chains = props['chains'] decompressedFile = None tmp = './tmp' pdb = './pdb' try: #create tmp workspace if os.path.exists(tmp): ownTempDir = False else: ownTempDir = True os.mkdir(tmp) #prep and open file decompressedFile = uncompress(file, pdb, tmp) if not decompressedFile: print 'ERROR: file not decompressed' else: structure = Bio.PDB.PDBParser().get_structure('pdbname', decompressedFile) # dssp can't do multiple models. if we ever need to, we'll have to # iterate through them dssp = Bio.PDB.DSSP(model=structure[0], pdb_file=decompressedFile, dssp='dsspcmbi') for chain in structure[0]: chain_id = chain.get_id() # only process selected chains if chains_filter and not chain_id in chains_filter: print 'Skipping Chain: %s' % chain_id continue # construct structure for saving chain if not chain_id in props['chains']: residues = {} props['chains'][chain_id] = residues print 'PROCESSING CHAIN [%s]' % chain, len(chain) newID = 0 #iterate residues res_old_id = None oldN = None oldCA = None oldC = None for res in chain: try: newID += 1 terminal = False hetflag, res_id, icode = res.get_id() #print hetflag, res_id, icode """ Exclude water residues Exclude any Residues that are missing _ANY_ of the mainchain atoms. Any atom could be missing """ all_mainchain = res.has_id('N') and res.has_id('CA') and res.has_id('C') and res.has_id('O') if hetflag != ' ' or not all_mainchain: raise InvalidResidueException('HetCode or Missing Atom') """ Create dictionary structure and initialize all values. All Values are required. Values that are not filled in will retain the NO_VALUE value. Store residue properties using OLD_ID as the key to ensure it is unique. We're including residues from all chains in the same dictionary and chainindex may have duplicates. """ old_id = res_id if icode == ' ' else '%s%s' % (res_id, icode) try: res_dict = residues[old_id] except KeyError: # residue didn't exist yet res_dict = {} residues[old_id] = res_dict res_dict['oldID'] = old_id length_list = ['L1', 'L2', 'L3', 'L4', 'L5', 'L6', 'L7','bg','bs','bm'] angles_list = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7'] dihedral_list = ['psi', 'ome', 'phi', 'zeta','chi1','chi2','chi3','chi4'] #sidechain_angle and length lists are defined in sidechain.py, to save space. initialize_geometry(res_dict, length_list, 'length') initialize_geometry(res_dict, angles_list, 'angle') initialize_geometry(res_dict, dihedral_list, 'angle') initialize_geometry(res_dict, sidechain_angle_list, 'angle') initialize_geometry(res_dict, sidechain_length_list, 'length') """ Get Properties from DSSP and other per residue properties """ chain = res.get_parent().get_id() try: residue_dssp, secondary_structure, accessibility, relative_accessibility = dssp[(chain, (hetflag, res_id, icode)) ] except KeyError, e: import sys, traceback t, v, tb = sys.exc_info() traceback.print_tb(tb, limit=10, file=sys.stdout) raise InvalidResidueException('KeyError in DSSP') res_dict['chain_id'] = chain res_dict['ss'] = secondary_structure res_dict['aa'] = AA3to1[res.resname] res_dict['h_bond_energy'] = 0.00 """ Get Vectors for mainchain atoms and calculate geometric angles, dihedral angles, and lengths between them. """ N = res['N'].get_vector() CA = res['CA'].get_vector() C = res['C'].get_vector() CB = res['CB'].get_vector() if res.has_id('CB') else None O = res['O'].get_vector() if oldC: # determine if there are missing residues by calculating # the distance between the current residue and previous # residue. If the L1 distance is greater than 2.5 it # cannot possibly be the correct order of residues. L1 = calc_distance(oldC,N) if L1 < 2.5: # properties that span residues residues[res_old_id]['a6'] = calc_angle(oldCA,oldC,N) residues[res_old_id]['a7'] = calc_angle(oldO,oldC,N) residues[res_old_id]['psi'] = calc_dihedral(oldN,oldCA,oldC,N) residues[res_old_id]['ome'] = calc_dihedral(oldCA,oldC,N,CA) residues[res_old_id]['next'] = newID res_dict['prev'] = residues[res_old_id]['chainIndex'] res_dict['a1'] = calc_angle(oldC,N,CA) res_dict['phi'] = calc_dihedral(oldC,N,CA,C) res_dict['L1'] = L1 terminal = False if terminal: # break in the chain, # 1) add terminal flags to both ends of the break so # the break can quickly be found. # 2) skip a number in the new style index. This allows # the break to be visible without checking the # terminal flag newID += 1 res_dict['terminal_flag'] = True residues[res_old_id]['terminal_flag'] = True # newID cannot be set until after we determine if it is terminal res_dict['chainIndex'] = newID res_dict['L2'] = calc_distance(N,CA) res_dict['L4'] = calc_distance(CA,C) res_dict['L5'] = calc_distance(C,O) res_dict['a3'] = calc_angle(N,CA,C) res_dict['a5'] = calc_angle(CA,C,O) if CB: res_dict['a2'] = calc_angle(N,CA,CB) res_dict['a4'] = calc_angle(CB,CA,C) res_dict['L3'] = calc_distance(CA,CB) res_dict['zeta'] = calc_dihedral(CA, N, C, CB) """ Calculate Bg - bfactor of the 4th atom in Chi1. """ try: atom_name = CHI_MAP[res.resname][0][3] res_dict['bg'] = res[atom_name].get_bfactor() except KeyError: # not all residues have chi pass """ Other B Averages Bm - Average of bfactors in main chain. Bm - Average of bfactors in side chain. """ main_chain = [] side_chain = [] for a in res.child_list: if a.name in ('N', 'CA', 'C', 'O','OXT'): main_chain.append(a.get_bfactor()) elif a.name in ('H'): continue else: side_chain.append(a.get_bfactor()) if main_chain != []: res_dict['bm'] = sum(main_chain)/len(main_chain) if side_chain != []: res_dict['bs'] = sum(side_chain)/len(side_chain) """ Calculate CHI values. The mappings for per peptide chi's are stored in a separate file and a function is used to calculate the chi based based on the peptide of this residue and the lists of atoms in the chi mappings. """ calc_chi(res, res_dict) """ Reset for next pass. We save some relationships which span two atoms. """ res_old_id = old_id oldN = N oldCA = CA oldC = C oldO = O except InvalidResidueException, e: # something has gone wrong in the current residue # indicating that it should be excluded from processing # log a warning print 'WARNING: Invalid residue - protein:%s chain:%s residue: %s exception: %s' % (file, chain_id, res.get_id(), e) if oldC: residues[res_old_id]['terminal_flag'] = True newID += 1 oldN = None oldCA = None oldC = None if residues.has_key(res_id): del residues[res_id] print 'Processed %s residues' % len(residues) finally: #clean up any files in tmp directory no matter what if decompressedFile and os.path.exists(decompressedFile): os.remove(decompressedFile) if ownTempDir and os.path.exists(tmp): os.removedirs(tmp) return props
00777b831a990177de327735023515352dc803bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6163/00777b831a990177de327735023515352dc803bf/ProcessPDBTask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1190, 38, 1594, 15774, 12, 768, 16, 3458, 16, 13070, 67, 2188, 33, 7036, 4672, 3536, 2884, 924, 628, 585, 716, 848, 506, 2707, 1450, 21209, 15774, 5313, 632, 2463, 279, 2065, 4191,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1190, 38, 1594, 15774, 12, 768, 16, 3458, 16, 13070, 67, 2188, 33, 7036, 4672, 3536, 2884, 924, 628, 585, 716, 848, 506, 2707, 1450, 21209, 15774, 5313, 632, 2463, 279, 2065, 4191,...
apply_expression(e, f, f)
apply_expression(e, f, f, mode)
def Edit(target, source, env): # we don't use target and source as usual : we may apply several times this # builder on the same source/target (or the source may be the target), # that's not possible for scons files, expr, mode = EditArgs(target, source, env) for f in files: for e in expr: apply_expression(e, f, f) assert len(target) == 1 for t in target: utils.write_marker(env, t) return None
e32368bbf3747345779d01939cccbe5ec3cf4f3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8002/e32368bbf3747345779d01939cccbe5ec3cf4f3e/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15328, 12, 3299, 16, 1084, 16, 1550, 4672, 468, 732, 2727, 1404, 999, 1018, 471, 1084, 487, 25669, 294, 732, 2026, 2230, 11392, 4124, 333, 468, 2089, 603, 326, 1967, 1084, 19, 3299, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15328, 12, 3299, 16, 1084, 16, 1550, 4672, 468, 732, 2727, 1404, 999, 1018, 471, 1084, 487, 25669, 294, 732, 2026, 2230, 11392, 4124, 333, 468, 2089, 603, 326, 1967, 1084, 19, 3299, 261,...
if self.exif_date:
if self.reliable_date:
def has_exif_date(self): if not self.__date_probed: self.info()
9579e648e4ad1b612154d0158eb22191dd83872c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4663/9579e648e4ad1b612154d0158eb22191dd83872c/sourcetree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 338, 430, 67, 712, 12, 2890, 4672, 309, 486, 365, 16186, 712, 67, 685, 2992, 30, 365, 18, 1376, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 338, 430, 67, 712, 12, 2890, 4672, 309, 486, 365, 16186, 712, 67, 685, 2992, 30, 365, 18, 1376, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
class CustomProxy: def __init__(self, proto, func=None, proxy_addr=None): self.proto = proto self.func = func self.addr = proxy_addr def handle(self, req): if self.func and self.func(req): return 1 def get_proxy(self): return self.addr class CustomProxyHandler(BaseHandler): handler_order = 100 def __init__(self, *proxies): self.proxies = {} def proxy_open(self, req): proto = req.get_type() try: proxies = self.proxies[proto] except KeyError: return None for p in proxies: if p.handle(req): req.set_proxy(p.get_proxy()) return self.parent.open(req) return None def do_proxy(self, p, req): return self.parent.open(req) def add_proxy(self, cpo): if cpo.proto in self.proxies: self.proxies[cpo.proto].append(cpo) else: self.proxies[cpo.proto] = [cpo]
def proxy_open(self, req, proxy, type): orig_type = req.get_type() proxy_type, user, password, hostport = _parse_proxy(proxy) if proxy_type is None: proxy_type = orig_type if user and password: user_pass = '%s:%s' % (unquote(user), unquote(password)) creds = base64.encodestring(user_pass).strip() req.add_header('Proxy-authorization', 'Basic ' + creds) hostport = unquote(hostport) req.set_proxy(hostport, proxy_type) if orig_type == proxy_type: # let other handlers take care of it return None else: # need to start over, because the other handlers don't # grok the proxy's URL type # e.g. if we have a constructor arg proxies like so: # {'http': 'ftp://proxy.example.com'}, we may end up turning # a request for http://acme.example.com/a into one for # ftp://proxy.example.com/a return self.parent.open(req)
9fb66b34b801b6185a2fa5b4a589bdf293b94d24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9fb66b34b801b6185a2fa5b4a589bdf293b94d24/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 2889, 67, 723, 16, 729, 16, 2201, 16, 27143, 273, 389, 2670, 67, 5656, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 2889, 67, 723, 16, 729, 16, 2201, 16, 27143, 273, 389, 2670, 67, 5656, ...
x = numpy.arange(1001, dtype = "float64") / 500.5 - 1
def make_windows(n, kaiser_beta, creighton_beta, tukey_beta, gauss_beta): return { "rectangle": XLALCreateRectangularREAL8Window(n), "Hann": XLALCreateHannREAL8Window(n), "Welch": XLALCreateWelchREAL8Window(n), "Bartlett": XLALCreateBartlettREAL8Window(n), "Parzen": XLALCreateParzenREAL8Window(n), "Papoulis": XLALCreatePapoulisREAL8Window(n), "Hamming": XLALCreateHammingREAL8Window(n), "Kaiser": XLALCreateKaiserREAL8Window(n, kaiser_beta), "Creighton": XLALCreateCreightonREAL8Window(n, creighton_beta), "Tukey": XLALCreateTukeyREAL8Window(n, tukey_beta), "Gauss": XLALCreateGaussREAL8Window(n, gauss_beta) }
b4fc2e428e69ea60a92a96143bda0c9eef046628 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/b4fc2e428e69ea60a92a96143bda0c9eef046628/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 13226, 12, 82, 16, 22258, 15914, 67, 5758, 16, 1519, 750, 265, 67, 5758, 16, 28325, 856, 67, 5758, 16, 314, 10325, 67, 5758, 4672, 327, 288, 315, 2607, 4341, 6877, 1139, 48, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 13226, 12, 82, 16, 22258, 15914, 67, 5758, 16, 1519, 750, 265, 67, 5758, 16, 28325, 856, 67, 5758, 16, 314, 10325, 67, 5758, 4672, 327, 288, 315, 2607, 4341, 6877, 1139, 48, ...
sage: a.minpoly(algorithm='numeric', bits=100, degree=10)
sage: a.minpoly(algorithm='numerical', bits=100, degree=10)
def minpoly(self, var='x', algorithm=None, bits=None, degree=None, epsilon=0): """ Return the minimal polynomial of self, if possible.
9287cb77a1a5c2660d227810d2aabf02995b015a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/9287cb77a1a5c2660d227810d2aabf02995b015a/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1131, 16353, 12, 2890, 16, 569, 2218, 92, 2187, 4886, 33, 7036, 16, 4125, 33, 7036, 16, 10782, 33, 7036, 16, 12263, 33, 20, 4672, 3536, 2000, 326, 16745, 16991, 434, 365, 16, 309, 3323...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1131, 16353, 12, 2890, 16, 569, 2218, 92, 2187, 4886, 33, 7036, 16, 4125, 33, 7036, 16, 10782, 33, 7036, 16, 12263, 33, 20, 4672, 3536, 2000, 326, 16745, 16991, 434, 365, 16, 309, 3323...
root.set_handler('tests/empty', TextFile()) database.save_changes() self.assertEqual(vfs.is_file('tests/empty'), True)
self.assertRaises(RuntimeError, root.set_handler, 'tests/empty', TextFile())
def test_empty_folder(self): """Empty folders do not exist. """ database = self.database root = self.root # Setup root.set_handler('tests/empty/sub/toto.txt', TextFile()) database.save_changes() root.del_handler('tests/empty/sub/toto.txt') database.save_changes() self.assertEqual(vfs.exists('tests/empty'), True) # Test root.set_handler('tests/empty', TextFile()) database.save_changes() self.assertEqual(vfs.is_file('tests/empty'), True)
c8e183991183f86de8f9b179e29886eee36e05fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/c8e183991183f86de8f9b179e29886eee36e05fb/test_handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5531, 67, 5609, 12, 2890, 4672, 3536, 1921, 9907, 741, 486, 1005, 18, 3536, 2063, 273, 365, 18, 6231, 1365, 273, 365, 18, 3085, 468, 10939, 1365, 18, 542, 67, 4176, 2668, 163...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5531, 67, 5609, 12, 2890, 4672, 3536, 1921, 9907, 741, 486, 1005, 18, 3536, 2063, 273, 365, 18, 6231, 1365, 273, 365, 18, 3085, 468, 10939, 1365, 18, 542, 67, 4176, 2668, 163...
u[n] = []
if n in u: u[n].append('(i.e. entirely)') else: u[n] = 'entirely'
def main(path): system = System() system.pendingmodules[path] = None while system.pendingmodules: path, d = system.pendingmodules.popitem() print '\r', len(system.pendingmodules), path, ' ', sys.stdout.flush() if not path.startswith('pypy.') or path == 'pypy._cache': continue process_module(path, system) # strip out non-pypy imports for name, mod in system.modules.iteritems(): for n in mod._imports.copy(): if not n.startswith('pypy.') or n == 'pypy._cache': del mod._imports[n] # record importer information
556afaa8338794ae05a09d34c94c7ac15051f0dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/556afaa8338794ae05a09d34c94c7ac15051f0dd/importfun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 803, 4672, 2619, 273, 2332, 1435, 2619, 18, 9561, 6400, 63, 803, 65, 273, 599, 1323, 2619, 18, 9561, 6400, 30, 589, 16, 302, 273, 2619, 18, 9561, 6400, 18, 5120, 1726, 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, 2774, 12, 803, 4672, 2619, 273, 2332, 1435, 2619, 18, 9561, 6400, 63, 803, 65, 273, 599, 1323, 2619, 18, 9561, 6400, 30, 589, 16, 302, 273, 2619, 18, 9561, 6400, 18, 5120, 1726, 1435, ...
if len(a) == 3 and a.startswith('/F') or a == '/doc' or a[-1] == ':':
if len(a) == 3 and a.startswith('/F') and a[2] >= 'a' and a[2] <= 'z' or a == '/doc' or a[-1] == ':':
def exec_command_msvc(self, *k, **kw): "instead of quoting all the paths and keep using the shell, we can just join the options msvc is interested in" if self.env['CC_NAME'] == 'msvc': if isinstance(k[0], list): lst = [] carry = '' for a in k[0]: if len(a) == 3 and a.startswith('/F') or a == '/doc' or a[-1] == ':': carry = a else: lst.append(carry + a) carry = '' k = [lst] env = dict(os.environ) env.update(PATH = ';'.join(self.env['PATH'])) kw['env'] = env ret = self.generator.bld.exec_command(*k, **kw) if ret: return ret if getattr(self, 'do_manifest', None): ret = exec_mf(self) return ret
f1ab52f522e4ae17d789101cbb3329162ec5cb89 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7302/f1ab52f522e4ae17d789101cbb3329162ec5cb89/msvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 67, 3076, 67, 959, 4227, 12, 2890, 16, 380, 79, 16, 2826, 9987, 4672, 315, 8591, 684, 434, 29911, 777, 326, 2953, 471, 3455, 1450, 326, 5972, 16, 732, 848, 2537, 1233, 326, 702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1196, 67, 3076, 67, 959, 4227, 12, 2890, 16, 380, 79, 16, 2826, 9987, 4672, 315, 8591, 684, 434, 29911, 777, 326, 2953, 471, 3455, 1450, 326, 5972, 16, 732, 848, 2537, 1233, 326, 702, ...
def load(self, row):
def load_row(self, row):
def load(self, row): self.code = trim(row[0]) self.section_code = trim(row[1]) self.sort_order = safeint(row[2]) self.template_code = trim(row[3]) self.data = trim(row[4]).split() self.only_registered = tf2bool(row[5]) self.only_admin = tf2bool(row[6]) self.only_sysadmin = tf2bool(row[7]) sql = "SELECT lang, title, menu_name, page FROM page_i18n WHERE page_code=" + wsq(self.code) cursor = db.select(sql) while (1): row = cursor.fetchone() if row==None: break lang = row[0] self.title[lang] = trim(row[1]) self.menu_name[lang] = trim(row[2]) self.page[lang] = trim(row[3]) if self.menu_name[lang]=='': self.menu_name[lang] = self.title[lang]
076b15b1c97d57e9f42e83a3568b1d2350396f3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/076b15b1c97d57e9f42e83a3568b1d2350396f3e/WebLayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 492, 12, 2890, 16, 1027, 4672, 365, 18, 710, 5411, 273, 2209, 12, 492, 63, 20, 5717, 365, 18, 3464, 67, 710, 202, 273, 2209, 12, 492, 63, 21, 5717, 365, 18, 3804, 67, 101...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 492, 12, 2890, 16, 1027, 4672, 365, 18, 710, 5411, 273, 2209, 12, 492, 63, 20, 5717, 365, 18, 3464, 67, 710, 202, 273, 2209, 12, 492, 63, 21, 5717, 365, 18, 3804, 67, 101...
if s[-4:] == '
if s[-4:] == u'
def str2XML(self, line): """return a valid XML string""" try: s = unicode(line, config.LOCALE) while s[-1] == ' ': s = s[:-1] if s[:4] == '&#34': s = s[5:] if s[-4:] == '#34;': s = s[:-5] # replace all & to &amp; ... s = s.replace("&", "&amp;")
e4e4639f6ea3e57e463f291a7c76a06466bdd9d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e4e4639f6ea3e57e463f291a7c76a06466bdd9d8/fxdimdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 22, 4201, 12, 2890, 16, 980, 4672, 3536, 2463, 279, 923, 3167, 533, 8395, 775, 30, 272, 273, 5252, 12, 1369, 16, 642, 18, 25368, 13, 1323, 272, 18919, 21, 65, 422, 296, 4290, 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, 609, 22, 4201, 12, 2890, 16, 980, 4672, 3536, 2463, 279, 923, 3167, 533, 8395, 775, 30, 272, 273, 5252, 12, 1369, 16, 642, 18, 25368, 13, 1323, 272, 18919, 21, 65, 422, 296, 4290, 27...
if type(name) is not StringType:
if not isinstance(name, StringTypes):
def mkpath (name, mode=0777, verbose=0, dry_run=0): """Create a directory and any missing ancestor directories. If the directory already exists (or if 'name' is the empty string, which means the current directory, which of course exists), then do nothing. Raise DistutilsFileError if unable to create some directory along the way (eg. some sub-path exists, but is a file rather than a directory). If 'verbose' is true, print a one-line summary of each mkdir to stdout. Return the list of directories actually created.""" global _path_created # Detect a common bug -- name is None if type(name) is not StringType: raise DistutilsInternalError, \ "mkpath: 'name' must be a string (got %r)" % (name,) # XXX what's the better way to handle verbosity? print as we create # each directory in the path (the current behaviour), or only announce # the creation of the whole path? (quite easy to do the latter since # we're not using a recursive algorithm) name = os.path.normpath(name) created_dirs = [] if os.path.isdir(name) or name == '': return created_dirs if _path_created.get(os.path.abspath(name)): return created_dirs (head, tail) = os.path.split(name) tails = [tail] # stack of lone dirs to create while head and tail and not os.path.isdir(head): #print "splitting '%s': " % head, (head, tail) = os.path.split(head) #print "to ('%s','%s')" % (head, tail) tails.insert(0, tail) # push next higher dir onto stack #print "stack of tails:", tails # now 'head' contains the deepest directory that already exists # (that is, the child of 'head' in 'name' is the highest directory # that does *not* exist) for d in tails: #print "head = %s, d = %s: " % (head, d), head = os.path.join(head, d) abs_head = os.path.abspath(head) if _path_created.get(abs_head): continue log.info("creating %s", head) if not dry_run: try: os.mkdir(head) created_dirs.append(head) except OSError, exc: raise DistutilsFileError, \ "could not create '%s': %s" % (head, exc[-1]) _path_created[abs_head] = 1 return created_dirs
0a5d4a20e7b2b758c974766cc3ac02af5a342483 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/0a5d4a20e7b2b758c974766cc3ac02af5a342483/dir_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 803, 261, 529, 16, 1965, 33, 20, 14509, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 4672, 3536, 1684, 279, 1867, 471, 1281, 3315, 9731, 6402, 18, 225, 971, 326, 1867, 1818, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 803, 261, 529, 16, 1965, 33, 20, 14509, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 4672, 3536, 1684, 279, 1867, 471, 1281, 3315, 9731, 6402, 18, 225, 971, 326, 1867, 1818, ...
for line in files:
for line in lines:
def __init__(self, user_id): self._id = user_id self.id = property(self.get_id) self.name = property(self.get_name, self.set_name) self.ip = property(self.get_ip, self.set_ip) # TODO kill this? try: file = open(self.users_file) lines = file.readlines() except IOError, e: logging.critical("There was an error opening the users file (%s). The " "error is: %s." % (User.users_file, e)) file.close() ids = [] for line in files: entry = line.split(':') if len(entry) != 2: logging.error("There is an invalid entry in the users file: %s. " "Skipping this entry." % line) ids.append(entry[0]) if self._id not in ids: raise InvalidUserIdError()
feaeaa92c068a38b62d763b0747751948256dbfa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2803/feaeaa92c068a38b62d763b0747751948256dbfa/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 729, 67, 350, 4672, 365, 6315, 350, 273, 729, 67, 350, 365, 18, 350, 273, 1272, 12, 2890, 18, 588, 67, 350, 13, 365, 18, 529, 273, 1272, 12, 2890, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 729, 67, 350, 4672, 365, 6315, 350, 273, 729, 67, 350, 365, 18, 350, 273, 1272, 12, 2890, 18, 588, 67, 350, 13, 365, 18, 529, 273, 1272, 12, 2890, 18...
self.scan_modules()
self.scan_modules()
def __init__(self, devide_app): """Initialise module manager by fishing .py devide modules from all pertinent directories. """
d491b4a0d5b35dabd227311bbf24bff568bd81c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4494/d491b4a0d5b35dabd227311bbf24bff568bd81c3/module_manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 443, 6768, 67, 2910, 4672, 3536, 4435, 784, 1605, 3301, 635, 284, 1468, 310, 263, 2074, 443, 6768, 4381, 628, 777, 24445, 28736, 6402, 18, 3536, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 443, 6768, 67, 2910, 4672, 3536, 4435, 784, 1605, 3301, 635, 284, 1468, 310, 263, 2074, 443, 6768, 4381, 628, 777, 24445, 28736, 6402, 18, 3536, 2, -100, ...
students.append(student.user.email().lower())
students.append(student.user.email())
def get_students(self): coach_email = self.user.email() query = db.GqlQuery("SELECT * FROM UserData WHERE coaches = :1", coach_email) students = [] for student in query: students.append(student.user.email().lower()) if coach_email.lower() != coach_email: students_set = set(students) query = db.GqlQuery("SELECT * FROM UserData WHERE coaches = :1", coach_email.lower()) for student in query: student_email = student.user.email().lower() if student_email not in students_set: students.append(student_email) return students
bb319a189ee73fd3550b475fd106f77e08e5f166 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/bb319a189ee73fd3550b475fd106f77e08e5f166/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 16120, 4877, 12, 2890, 4672, 1825, 497, 67, 3652, 273, 365, 18, 1355, 18, 3652, 1435, 843, 273, 1319, 18, 43, 1217, 1138, 2932, 4803, 380, 4571, 31109, 4852, 1825, 497, 281, 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, 336, 67, 16120, 4877, 12, 2890, 4672, 1825, 497, 67, 3652, 273, 365, 18, 1355, 18, 3652, 1435, 843, 273, 1319, 18, 43, 1217, 1138, 2932, 4803, 380, 4571, 31109, 4852, 1825, 497, 281, 2...
if not os.path.exists(self.__dir): os.makedirs(self.__dir)
def initialize(self, force=False): """ Create and initialize this darcs repository if you have not already done so. """ if force or not os.path.exists('%s/_darcs'%self.__dir): if not os.path.exists(self.__dir): os.makedirs(self.__dir) print "Creating a new darcs repository! %s"%self.__name self.get()
024b7fc9cd4f298e452d87ac3a581c268788e508 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/024b7fc9cd4f298e452d87ac3a581c268788e508/darcs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 2944, 33, 8381, 4672, 3536, 1788, 471, 4046, 333, 302, 297, 2143, 3352, 309, 1846, 1240, 486, 1818, 2731, 1427, 18, 3536, 309, 2944, 578, 486, 1140, 18, 803, 18, 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, 4046, 12, 2890, 16, 2944, 33, 8381, 4672, 3536, 1788, 471, 4046, 333, 302, 297, 2143, 3352, 309, 1846, 1240, 486, 1818, 2731, 1427, 18, 3536, 309, 2944, 578, 486, 1140, 18, 803, 18, 18...
last_y = y
last_y = last_y - dy
def setp(self, **kwargs): if 'axshape' in kwargs: shape = kwargs['axshape'] _check_type(shape, 'axshape', (tuple,list)) _check_size(shape, 'axshape', 2) _check_type(shape[0], 'm', int) _check_type(shape[1], 'n', int) self._prop['axshape'] = shape dx = 1./shape[1]; dy = 1./shape[0] last_x = 0; last_y = 0 viewport_coords = [] for y in seq(dy,1,dy): for x in seq(dx,1,dx): viewport_coords.append((last_x,last_y,x,y)) last_x = x last_x = 0 last_y = y
242b5fbbbf40f77e515903fdf659bbd51389ed9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4727/242b5fbbbf40f77e515903fdf659bbd51389ed9c/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 84, 12, 2890, 16, 2826, 4333, 4672, 309, 296, 651, 4867, 11, 316, 1205, 30, 2179, 273, 1205, 3292, 651, 4867, 3546, 389, 1893, 67, 723, 12, 4867, 16, 296, 651, 4867, 2187, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 84, 12, 2890, 16, 2826, 4333, 4672, 309, 296, 651, 4867, 11, 316, 1205, 30, 2179, 273, 1205, 3292, 651, 4867, 3546, 389, 1893, 67, 723, 12, 4867, 16, 296, 651, 4867, 2187, 261, ...
l.append('%s=%s' % (urllib.quote(k), urllib.quote(str(v))))
if v: l.append('%s=%s' % (urllib.quote(k), urllib.quote(str(v))))
def get_all_keys(self, headers=None, **params): """ A lower-level method for listing contents of a bucket. This closely models the actual S3 API and requires you to manually handle the paging of results. For a higher-level method that handles the details of paging for you, you can use the list method. @type maxkeys: int @param maxkeys: The maximum number of keys to retrieve @type prefix: string @param prefix: The prefix of the keys you want to retrieve @type marker: string @param marker: The "marker" of where you are in the result set @type delimiter: string @param delimiter: "If this optional, Unicode string parameter is included with your request, then keys that contain the same string between the prefix and the first occurrence of the delimiter will be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response."
b145efccc1a0cb351177519dd822d7638fd5cd1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/b145efccc1a0cb351177519dd822d7638fd5cd1c/bucket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 67, 2452, 12, 2890, 16, 1607, 33, 7036, 16, 2826, 2010, 4672, 3536, 432, 2612, 17, 2815, 707, 364, 11591, 2939, 434, 279, 2783, 18, 225, 1220, 1219, 1786, 93, 3679, 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, 336, 67, 454, 67, 2452, 12, 2890, 16, 1607, 33, 7036, 16, 2826, 2010, 4672, 3536, 432, 2612, 17, 2815, 707, 364, 11591, 2939, 434, 279, 2783, 18, 225, 1220, 1219, 1786, 93, 3679, 326, ...
if type(attrname) is type(""):
if type(attrname) is StringType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _comment_rx.match(line) if m: text = m.group(1) if text: self.write("(COMMENT\n- %s \n)COMMENT\n-\\n\n" % encode(text)) line = line[m.end():] continue m = _begin_env_rx.match(line) if m: # re-write to use the macro handler line = r"\%s %s" % (m.group(1), line[m.end():]) continue m = _end_env_rx.match(line) if m: # end of environment envname = m.group(1) if envname == "document": # special magic for n in stack[1:]: if n not in self.autoclosing: raise LaTeXFormatError( "open element on stack: " + `n`) # should be more careful, but this is easier to code: stack = [] self.write(")document\n") elif stack and envname == stack[-1]: self.write(")%s\n" % envname) del stack[-1] popping(envname, "a", len(stack) + depth) else: self.err_write("stack: %s\n" % `stack`) raise LaTeXFormatError( "environment close for %s doesn't match" % envname) line = line[m.end():] continue m = _begin_macro_rx.match(line) if m: # start of macro macroname = m.group(1) if macroname == "verbatim": # really magic case! pos = string.find(line, "\\end{verbatim}") text = line[m.end(1):pos] self.write("(verbatim\n") self.write("-%s\n" % encode(text)) self.write(")verbatim\n") line = line[pos + len("\\end{verbatim}"):] continue numbered = 1 opened = 0 if macroname[-1] == "*": macroname = macroname[:-1] numbered = 0 if macroname in self.autoclosing and macroname in stack: while stack[-1] != macroname: top = stack.pop() if top and top not in self.discards: self.write(")%s\n-\\n\n" % top) popping(top, "b", len(stack) + depth) if macroname not in self.discards: self.write("-\\n\n)%s\n-\\n\n" % macroname) popping(macroname, "c", len(stack) + depth - 1) del stack[-1] # if macroname in self.discards: self.push_output(StringIO.StringIO()) else: self.push_output(self.ofp) # params, optional, empty, environ = self.start_macro(macroname) if not numbered: self.write("Anumbered TOKEN no\n") # rip off the macroname if params: if optional and len(params) == 1: line = line[m.end():] else: line = line[m.end(1):] elif empty: line = line[m.end(1):] else: line = line[m.end():] # # Very ugly special case to deal with \item[]. The catch # is that this needs to occur outside the for loop that # handles attribute parsing so we can 'continue' the outer # loop. # if optional and type(params[0]) is type(()): # the attribute name isn't used in this special case pushing(macroname, "a", depth + len(stack)) stack.append(macroname) self.write("(%s\n" % macroname) m = _start_optional_rx.match(line) if m: self.line = line[m.end():] line = self.subconvert("]", depth + len(stack)) line = "}" + line continue # handle attribute mappings here: for attrname in params: if optional: optional = 0 if type(attrname) is type(""): m = _optional_rx.match(line) if m: line = line[m.end():] self.write("A%s TOKEN %s\n" % (attrname, encode(m.group(1)))) elif type(attrname) is type(()): # This is a sub-element; but don't place the # element we found on the stack (\section-like) pushing(macroname, "b", len(stack) + depth) stack.append(macroname) self.write("(%s\n" % macroname) macroname = attrname[0] m = _start_group_rx.match(line) if m: line = line[m.end():] elif type(attrname) is type([]): # A normal subelement: <macroname><attrname>...</>... attrname = attrname[0] if not opened: opened = 1 self.write("(%s\n" % macroname) pushing(macroname, "c", len(stack) + depth) self.write("(%s\n" % attrname) pushing(attrname, "sub-elem", len(stack) + depth + 1) self.line = skip_white(line)[1:] line = self.subconvert("}", len(stack) + depth + 1)[1:] dbgmsg("subconvert() ==> " + `line[:20]`) popping(attrname, "sub-elem", len(stack) + depth + 1) self.write(")%s\n" % attrname) else: m = _parameter_rx.match(line) if not m: raise LaTeXFormatError( "could not extract parameter %s for %s: %s" % (attrname, macroname, `line[:100]`)) value = m.group(1) if _token_rx.match(value): dtype = "TOKEN" else: dtype = "CDATA" self.write("A%s %s %s\n" % (attrname, dtype, encode(value))) line = line[m.end():] if params and type(params[-1]) is type('') \ and (not empty) and not environ: # attempt to strip off next '{' m = _start_group_rx.match(line) if not m: raise LaTeXFormatError( "non-empty element '%s' has no content: %s" % (macroname, line[:12])) line = line[m.end():] if not opened: self.write("(%s\n" % macroname) pushing(macroname, "d", len(stack) + depth) if empty: line = "}" + line stack.append(macroname) self.pop_output() continue if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line[1:] return self.line if line[0] == "}": # end of macro or group macroname = stack[-1] conversion = self.table.get(macroname) if macroname \ and macroname not in self.discards \ and type(conversion) is not type(""): # otherwise, it was just a bare group self.write(")%s\n" % stack[-1]) popping(macroname, "d", len(stack) + depth - 1) del stack[-1] line = line[1:] continue if line[0] == "{": pushing("", "e", len(stack) + depth) stack.append("") line = line[1:] continue if line[0] == "\\" and line[1] in ESCAPED_CHARS: self.write("-%s\n" % encode(line[1])) line = line[2:] continue if line[:2] == r"\\": self.write("(BREAK\n)BREAK\n") line = line[2:] continue m = _text_rx.match(line) if m: text = encode(m.group()) self.write("-%s\n" % text) line = line[m.end():] continue # special case because of \item[] if line[0] == "]": self.write("-]\n") line = line[1:] continue # avoid infinite loops extra = "" if len(line) > 100: extra = "..." raise LaTeXFormatError("could not identify markup: %s%s" % (`line[:100]`, extra)) while stack and stack[-1] in self.autoclosing: self.write("-\\n\n") self.write(")%s\n" % stack[-1]) popping(stack.pop(), "e", len(stack) + depth - 1) if stack: raise LaTeXFormatError("elements remain on stack: " + string.join(stack, ", ")) # otherwise we just ran out of input here...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
We do not fold withing a UTF-8 character:
We do not fold within a UTF-8 character:
def from_string(st, strict=False): "Parses the parameter format from ical text format" try: # parse into strings result = Parameters() for param in q_split(st, ';'): key, val = q_split(param, '=') validate_token(key) param_values = [v for v in q_split(val, ',')] # Property parameter values that are not in quoted # strings are case insensitive. vals = [] for v in param_values: if v.startswith('"') and v.endswith('"'): v = v.strip('"') validate_param_value(v, quoted=True) vals.append(v) else: validate_param_value(v, quoted=False) if strict: vals.append(v.upper()) else: vals.append(v) if not vals: result[key] = val else: if len(vals) == 1: result[key] = vals[0] else: result[key] = vals return result except: raise ValueError, 'Not a valid parameter string'
3df403f7792593266e5613b275216aa700e9a3fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12413/3df403f7792593266e5613b275216aa700e9a3fd/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 1080, 12, 334, 16, 5490, 33, 8381, 4672, 315, 6656, 326, 1569, 740, 628, 277, 771, 977, 740, 6, 775, 30, 468, 1109, 1368, 2064, 563, 273, 7012, 1435, 364, 579, 316, 1043, 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, 628, 67, 1080, 12, 334, 16, 5490, 33, 8381, 4672, 315, 6656, 326, 1569, 740, 628, 277, 771, 977, 740, 6, 775, 30, 468, 1109, 1368, 2064, 563, 273, 7012, 1435, 364, 579, 316, 1043, 67...
if alg=="scipy":
if algorithm=="scipy":
def spherical_bessel_Y(n,var, alg="maxima"): r""" Returns the spherical Bessel function of the second kind for integers n > -1. Reference: A&S 10.1.9 page 437 and A&S 10.1.15 page 439. EXAMPLES: sage: x = PolynomialRing(QQ, 'x').gen() sage: spherical_bessel_Y(2,x) -(3*sin(x)/x - (1 - 24/(8*x^2))*cos(x))/x """ if alg=="scipy": import scipy.special ans = str(scipy.special.sph_yn(int(n),float(var))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans) _init() return meval("spherical_bessel_y(%s,%s)"%(ZZ(n),var))
6634f9ab85d7944da6788aaab93ffaa3f22ce5ac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/6634f9ab85d7944da6788aaab93ffaa3f22ce5ac/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 21570, 67, 70, 403, 292, 67, 61, 12, 82, 16, 1401, 16, 11989, 1546, 1896, 13888, 6, 4672, 436, 8395, 2860, 326, 272, 21570, 605, 403, 292, 445, 434, 326, 2205, 3846, 364, 12321, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 21570, 67, 70, 403, 292, 67, 61, 12, 82, 16, 1401, 16, 11989, 1546, 1896, 13888, 6, 4672, 436, 8395, 2860, 326, 272, 21570, 605, 403, 292, 445, 434, 326, 2205, 3846, 364, 12321, ...
self['maxLogLength'] = 100
def __init__(self): dict.__init__(self) self['verbose'] = 3 self['downloadDir'] = os.getcwd() self['runOnce'] = False self['maxSize'] = None self['minSize'] = None self['log'] = 0 self['logFile'] = u'downloads.log' self['saveFile'] = u'savedstate.dat' self['scanMins'] = 15 self['lockPort'] = 8023 self['cookieFile'] = None self['workingDir'] = os.path.expanduser( os.path.join('~', '.rssdler') ) self['daemonInfo'] = u'daemon.info' self['rssFeed'] = False self['rssDescription'] = u"Some RSS Description" self['rssFilename'] = u'rssdownloadfeed.xml' self['rssLength'] = 20 self['rssLink'] = u'somelink.com/%s' % self['rssFilename'] self['rssTitle'] = u"some RSS Title" self['urllib'] = False self['cookieType'] = 'MozillaCookieJar' self['sleepTime'] = 0 self['noClobber'] = True self['umask'] = 63 #0077 self['maxLogLength'] = 100
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, 1001, 2738, 972, 12, 2890, 4672, 2065, 16186, 2738, 972, 12, 2890, 13, 365, 3292, 11369, 3546, 273, 890, 365, 3292, 7813, 1621, 3546, 273, 1140, 18, 588, 11089, 1435, 365, 3292, 2681, 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, 1001, 2738, 972, 12, 2890, 4672, 2065, 16186, 2738, 972, 12, 2890, 13, 365, 3292, 11369, 3546, 273, 890, 365, 3292, 7813, 1621, 3546, 273, 1140, 18, 588, 11089, 1435, 365, 3292, 2681, 12...
return (-1, res, 'Line ' + str(counter) +' : ' + warning, '')
return (-1, res, 'Line ' + str(counter) +' : ' + '!\n'.join(warning), '')
fields_def = self.fields_get(cr, uid, context=context)
30b2fc5bd2ddbaf44cd90f006b166de084029bfc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/30b2fc5bd2ddbaf44cd90f006b166de084029bfc/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 18, 2821, 67, 588, 12, 3353, 16, 4555, 16, 819, 33, 2472, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1466, 67, 536, 273, 365, 18, 2821, 67, 588, 12, 3353, 16, 4555, 16, 819, 33, 2472, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
except playlist.ObjectNotFoundError:
except database.ObjectNotFoundError:
def remove_id(self, item_id, signal_change=True): """Remove an item from the playlist.""" try: self.MapClass.remove_item_id(self.id, item_id) except playlist.ObjectNotFoundError: # if the item isn't in the playlist, then we move along # because there's nothing to change. return folder = self.get_folder() if folder is not None: folder.remove_id(item_id) if signal_change: item = models.Item.get_by_id(item_id) item.signal_change(needsSave=False)
0309135734c9b88e94946154ded0fd30cb480983 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/0309135734c9b88e94946154ded0fd30cb480983/playlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 350, 12, 2890, 16, 761, 67, 350, 16, 4277, 67, 3427, 33, 5510, 4672, 3536, 3288, 392, 761, 628, 326, 16428, 12123, 775, 30, 365, 18, 863, 797, 18, 4479, 67, 1726, 67, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 350, 12, 2890, 16, 761, 67, 350, 16, 4277, 67, 3427, 33, 5510, 4672, 3536, 3288, 392, 761, 628, 326, 16428, 12123, 775, 30, 365, 18, 863, 797, 18, 4479, 67, 1726, 67, 350, ...
raise ValueError("unexpected frequency") locs = N.asarray(locs) (vmin, vmax) = locs[[0,-1]]
raise ValueError("unexpected frequency")
def _annual_finder(locs, freqstr, aslocator): if freqstr != 'Q': raise ValueError("unexpected frequency") locs = N.asarray(locs) (vmin, vmax) = locs[[0,-1]] (vmin, vmax) = (int(vmin), int(vmax+1)) span = vmax - vmin + 1 #............................................ dates = N.arange(vmin, vmax+1) format = N.empty(span, dtype="|S8") format.flat = '' #............................................ (min_anndef, maj_anndef) = _get_default_annual_spacing(span) major_idx = dates % maj_anndef == 0 if aslocator: major = dates[major_idx] minor = dates[(dates % min_anndef == 0)] else: format[major_idx] = '%Y' #............................................ if aslocator: return minor, major else: formatted = (format != '') return dict([(d,f) for (d,f) in zip(dates[formatted],format[formatted])])
7a3c507a500aec86f9240f3a0e8437c36eeb7238 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/7a3c507a500aec86f9240f3a0e8437c36eeb7238/mpl_timeseries_pgm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1072, 1462, 67, 15356, 12, 24323, 16, 7684, 701, 16, 487, 20048, 4672, 309, 7684, 701, 480, 296, 53, 4278, 1002, 2068, 2932, 21248, 8670, 7923, 261, 90, 1154, 16, 17831, 13, 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, 1072, 1462, 67, 15356, 12, 24323, 16, 7684, 701, 16, 487, 20048, 4672, 309, 7684, 701, 480, 296, 53, 4278, 1002, 2068, 2932, 21248, 8670, 7923, 261, 90, 1154, 16, 17831, 13, 273, ...
self.assertEqual(None, self.repos.next_rev(16))
self.assertEqual(None, self.repos.next_rev(17))
def test_rev_navigation(self): self.assertEqual(1, self.repos.oldest_rev) self.assertEqual(None, self.repos.previous_rev(0)) self.assertEqual(None, self.repos.previous_rev(1)) self.assertEqual(16, self.repos.youngest_rev) self.assertEqual(6, self.repos.next_rev(5)) self.assertEqual(7, self.repos.next_rev(6)) # ... self.assertEqual(None, self.repos.next_rev(16))
19ecd012506375489920938d2a952ccb2c5b3ac4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/19ecd012506375489920938d2a952ccb2c5b3ac4/svn_fs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9083, 67, 19537, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 21, 16, 365, 18, 15564, 18, 1673, 395, 67, 9083, 13, 365, 18, 11231, 5812, 12, 7036, 16, 365, 18, 15564, 18, 1151...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9083, 67, 19537, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 21, 16, 365, 18, 15564, 18, 1673, 395, 67, 9083, 13, 365, 18, 11231, 5812, 12, 7036, 16, 365, 18, 15564, 18, 1151...
t.set_size( pixelToPoint(self.prefs['text_size'],self.dpi) ) texts.append(t)
t.set_size( pixelToPoint( self.prefs['text_size'], self.dpi ) ) texts.append( t )
def pie(self, explode=None, colors=None, autopct=None, pctdistance=0.6, shadow=False ): start = time.time() labels = self.pdata.getLabels(use_plotdata=True) #labels.reverse() values = [l[1] for l in labels] x = numpy.array(values, numpy.float64) self.legendData = labels
423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/423d7ba6a07ac9928874a4f9fd7da58c86c8cfcf/PieGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1385, 12, 2890, 16, 3172, 33, 7036, 16, 5740, 33, 7036, 16, 2059, 556, 299, 33, 7036, 16, 19857, 8969, 33, 20, 18, 26, 16, 10510, 33, 8381, 262, 30, 225, 787, 273, 813, 18, 95...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1385, 12, 2890, 16, 3172, 33, 7036, 16, 5740, 33, 7036, 16, 2059, 556, 299, 33, 7036, 16, 19857, 8969, 33, 20, 18, 26, 16, 10510, 33, 8381, 262, 30, 225, 787, 273, 813, 18, 95...
EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPT4'], dll='libdtool.dll', obj=[
EnqueueLink(opts=['ADVAPI', 'NSPR', 'OPT3'], dll='libdtool.dll', obj=[
if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
8f86705296f973090fc3f2bedce1bf0e6e54e9f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/8f86705296f973090fc3f2bedce1bf0e6e54e9f6/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 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, 309, 261, 1125, 422, 296, 2124, 12904, 11, 4672, 2195, 273, 2195, 397, 6619, 318, 536, 315, 397, 498, 397, 1548, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
raise ResourceForbiddenError("Provided localip is not allowed! IP: '"+localip+"'")
raise ResourceForbiddenError("Provided localip is not allowed! IP: "+localip)
def _bind_udp_socket(localip, localport, tattle_item): # Conrad: entirely stolen from listenforconnection(). Some of this input # verification stuff especially could probably be combined as a shared # function. Even the rest of the functions are similar enough to be worth # consolidating. # Check the input arguments (type) if type(localip) is not str: raise RepyArgumentError("Provided localip must be a string!") if type(localport) is not int: raise RepyArgumentError("Provided localport must be a int!") # Check the input arguments (sanity) if not _is_valid_ip_address(localip): raise RepyArgumentError("Provided localip is not valid! IP: '"+localip+"'") if not _is_valid_network_port(localport): raise RepyArgumentError("Provided localport is not valid! Port: "+str(localport)) # Check the input arguments (permission) update_ip_cache() if not _ip_is_allowed(localip): raise ResourceForbiddenError("Provided localip is not allowed! IP: '"+localip+"'") if not _is_allowed_localport("UDP", localport): raise ResourceForbiddenError("Provided localport is not allowed! Port: "+str(localport)) # Check if the tuple is in use normal_identity = ("UDP", localip, localport, False, None) listen_identity = ("UDP", localip, localport, None, None) if normal_identity in OPEN_SOCKET_INFO or listen_identity in OPEN_SOCKET_INFO: raise AlreadyListeningError("The provided localip and localport are already in use!") is_listensock = tattle_item == "insockets" if is_listensock: identity = listen_identity else: identity = normal_identity # Check if the tuple is pending PENDING_SOCKETS_LOCK.acquire() try: if normal_identity in PENDING_SOCKETS or listen_identity in PENDING_SOCKETS: raise AlreadyListeningError("Concurrent listenformessage with the localip and localport in progress!") else: # No pending operation, add us to the pending list PENDING_SOCKETS.add(identity) finally: PENDING_SOCKETS_LOCK.release() try: # Register this identity with nanny nanny.tattle_add_item(tattle_item, identity) try: # Get the socket sock = _get_udp_socket(localip, localport) except Exception, e: nanny.tattle_remove_item(tattle_item, identity) # Check if this an already in use error if _is_addr_in_use_exception(e): raise DuplicateTupleError("Provided Local IP and Local Port is already in use!") # Check if this is a binding error if _is_addr_unavailable_exception(e): raise AddressBindingError("Cannot bind to the specified local ip, invalid!") # Unknown error... else: raise # Create entry with a lock and the socket object OPEN_SOCKET_INFO[identity] = (threading.Lock(), sock) # Return the identity return identity finally: # Remove us from the pending operations list PENDING_SOCKETS_LOCK.acquire() PENDING_SOCKETS.remove(identity) PENDING_SOCKETS_LOCK.release()
cdc73d35527f2e8ba9aecc2ad1a44f2831f9c68c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7263/cdc73d35527f2e8ba9aecc2ad1a44f2831f9c68c/emulcomm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4376, 67, 26029, 67, 7814, 12, 3729, 625, 16, 1191, 655, 16, 268, 4558, 298, 67, 1726, 4672, 468, 735, 6012, 30, 21658, 384, 355, 275, 628, 6514, 1884, 4071, 7675, 10548, 434, 333...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4376, 67, 26029, 67, 7814, 12, 3729, 625, 16, 1191, 655, 16, 268, 4558, 298, 67, 1726, 4672, 468, 735, 6012, 30, 21658, 384, 355, 275, 628, 6514, 1884, 4071, 7675, 10548, 434, 333...
output = self.get_memdump(address, move_idx)
output = self._get_memdump(address, move_idx)
def dump(self, address = None, move_idx = 0): if not address: address = self.first if self.dumpmode == Constants.REGISTERS: output = self.get_registers() self.memory.set_label("".join(output)) return if not address: print "ERROR: address needed" return if self.dumpmode == Constants.MEMDUMP: output = self.get_memdump(address, move_idx) elif self.dumpmode == Constants.DISASM: output = self.get_disasm(address, move_idx) else: print "ERROR: unknown dumpmode:", self.dumpmode return self.memory.set_label("".join(output)) if move_idx: self.reset_entry()
0e0984f57cbf375cc2813fe0509dc8425a475afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2811/0e0984f57cbf375cc2813fe0509dc8425a475afc/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 1758, 273, 599, 16, 3635, 67, 3465, 273, 374, 4672, 309, 486, 1758, 30, 1758, 273, 365, 18, 3645, 225, 309, 365, 18, 8481, 3188, 422, 5245, 18, 5937, 5511, 11367, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 12, 2890, 16, 1758, 273, 599, 16, 3635, 67, 3465, 273, 374, 4672, 309, 486, 1758, 30, 1758, 273, 365, 18, 3645, 225, 309, 365, 18, 8481, 3188, 422, 5245, 18, 5937, 5511, 11367, ...
run_iptest()
if sys.argv[1] == 'all': run_iptestall() else: run_iptest()
def main(): if sys.argv[1] == 'all': run_iptestall() else: run_iptest()
ed8ff9e4e0f00850aadd82d09758ff430794285f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3900/ed8ff9e4e0f00850aadd82d09758ff430794285f/iptest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 2589, 18, 19485, 63, 21, 65, 422, 296, 454, 4278, 1086, 67, 8138, 395, 454, 1435, 469, 30, 309, 2589, 18, 19485, 63, 21, 65, 422, 296, 454, 4278, 1086, 67, 8138, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 2589, 18, 19485, 63, 21, 65, 422, 296, 454, 4278, 1086, 67, 8138, 395, 454, 1435, 469, 30, 309, 2589, 18, 19485, 63, 21, 65, 422, 296, 454, 4278, 1086, 67, 8138, 39...
dirs_in_sys_path[dircase] = 1
_dirs_in_sys_path[dircase] = 1
def makepath(*paths): dir = os.path.abspath(os.path.join(*paths)) return dir, os.path.normcase(dir)
80d1f511a09d315dae6929111a84fd09c89818c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/80d1f511a09d315dae6929111a84fd09c89818c1/site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 803, 30857, 4481, 4672, 1577, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 30857, 4481, 3719, 327, 1577, 16, 1140, 18, 803, 18, 7959, 3593, 12, 1214, 13, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 803, 30857, 4481, 4672, 1577, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 30857, 4481, 3719, 327, 1577, 16, 1140, 18, 803, 18, 7959, 3593, 12, 1214, 13, 225, ...
def ndim_meshgrid(*arrs): """n-dimensional analogue to numpy.meshgrid""" arrs = tuple(reversed(arrs)) lens = map(len, arrs) dim = len(arrs) sz = 1 for s in lens: sz*=s ans = [] for i, arr in enumerate(arrs): slc = [1]*dim slc[i] = lens[i] arr2 = asarray(arr).reshape(slc) for j, sz in enumerate(lens): if j!=i: arr2 = arr2.repeat(sz, axis=j) ans.append(arr2) return tuple(ans)
def ndim_meshgrid(*arrs): """n-dimensional analogue to numpy.meshgrid""" arrs = tuple(reversed(arrs)) #edit lens = map(len, arrs) dim = len(arrs) sz = 1 for s in lens: sz*=s ans = [] for i, arr in enumerate(arrs): slc = [1]*dim slc[i] = lens[i] arr2 = asarray(arr).reshape(slc) for j, sz in enumerate(lens): if j!=i: arr2 = arr2.repeat(sz, axis=j) ans.append(arr2) return tuple(ans)
78a2555bc50c75119ede56cc647c7916bce9a417 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8935/78a2555bc50c75119ede56cc647c7916bce9a417/grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9209, 67, 15557, 5222, 30857, 5399, 87, 4672, 3536, 82, 17, 31236, 25714, 344, 358, 3972, 18, 15557, 5222, 8395, 2454, 87, 273, 3193, 12, 266, 7548, 12, 5399, 87, 3719, 225, 468, 4619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9209, 67, 15557, 5222, 30857, 5399, 87, 4672, 3536, 82, 17, 31236, 25714, 344, 358, 3972, 18, 15557, 5222, 8395, 2454, 87, 273, 3193, 12, 266, 7548, 12, 5399, 87, 3719, 225, 468, 4619, ...
QWhatsThis.add(self.run_job_btn, """Save GAMESS parameters, generates the INP file and launches the GAMESS job.""") QWhatsThis.add(self.save_btn, """Save GAMESS parameters and generates the INP file. It does not launch the GAMESS job.""")
QWhatsThis.add(self.run_job_btn, """Save GAMESS parameters, generates the INP file and launches the GAMESS job.""") QWhatsThis.add(self.save_btn, """Save GAMESS parameters and generates the INP file. It does not launch the GAMESS job.""")
def __init__(self): GamessPropDialog.__init__(self, modal=True) self.sManager = ServerManager() self.servers = self.sManager.getServers() self.server = self.servers[0] QWhatsThis.add(self.name_linedit, """Name of the GAMESS jig.""") QWhatsThis.add(self.runtyp_combox, """Type of calculation, where "Energy" calculates the Energy Minima, and "Optimization" calculates the "Equilibrium Geometry".""") QWhatsThis.add(self.comment_linedit, """Description, also placed in the comment line of the $DATA section of the INP file.""") QWhatsThis.add(self.choose_color_btn, """Change the GAMESS jig color.""") QWhatsThis.add(self.rhf_radiobtn, """Restricted Hartree-Fock. All electrons are paired and each spatial orbital is doubly occupied. Cannot be used with multiplicities greater than 1.""") QWhatsThis.add(self.uhf_radiobtn, """Unrestricted Hartree-Fock. All electrons are unpaired and spatial (spin) orbitals are uniquely defined for each electron. More time consuming, but more accurate, than ROHF. """) QWhatsThis.add(self.rohf_radiobtn, """Restricted Open-shell Hartree-Fock. Spin-paired electrons are assigned to doubly-occupied spatial orbitals, while electrons with unpaired spins are provided unique spatial orbitals.""") QWhatsThis.add(self.icharg_spinbox, """The total charge of the structure to be treated quantum mechanically (ICHARG).""") QWhatsThis.add(self.multi_combox, """N + 1, where N is the number of unpaired electrons (MULT).""") QWhatsThis.add(self.memory_spinbox, """System memory reserved for calculation""") QWhatsThis.add(self.dirscf_checkbox, """Check this box to run the calculation in RAM and avoid hard disk usage for integral storage.""") QWhatsThis.add(self.gbasis_combox, """Select from among the standard Gaussian-type basis sets and semi-empirical parameters in GAMESS.""") QWhatsThis.add(self.checkBox10_3_2, """Reads the $HESS group from the output file of a previous GAMESS calculation. Only valid for identical molecules.""") QWhatsThis.add(self.checkBox10_2_2_2, """Reads the $VEC group from the output of a previous GAMESS calculation. Requires that both the molecule and basis set be identical. Useful for restarted calculations and starting orbitals for electron correlation methods.""") QWhatsThis.add(self.none_radiobtn, """Select this button to neglect electron correlation in the calculation.""") QWhatsThis.add(self.dft_radiobtn, """Select this button to perform a density functional theory calculation.""") QWhatsThis.add(self.mp2_radiobtn, """Select this button to perform a Second-Order Moeller Plesset calculation.""") QWhatsThis.add(self.dfttyp_combox, """Select an available density functional in GAMESS.""") QWhatsThis.add(self.gridsize_combox, """Select the grid spacing for the DFT calculation.""") QWhatsThis.add(self.core_electrons_checkbox, """Check this box to include both the valence and core electrons in the MP2 calculation.""") QWhatsThis.add(self.density_conv_combox, """Selects the accuracy of the electron density convergence for the calculation (CONV).""") QWhatsThis.add(self.rmsd_combox, """Gradient convergence tolerance (OPTTOL), in Hartree/Bohr. Convergence of a geometry search requires the largest component of the gradient to be less than this value, and the root mean square gradient less than 1/3 of OPTTOL. (default=0.0001)""") QWhatsThis.add(self.iterations_spinbox, """Maximum number of SCF iteration cycles (MAXIT).""") QWhatsThis.add(self.edit_input_file_cbox, """Opens the INP file generated by NanoEngineer-1 in a text editor.""") QWhatsThis.add(self.whats_this_btn, """What's This Help Utility""") QWhatsThis.add(self.run_job_btn, """Save GAMESS parameters, generates the INP file and launches the GAMESS job.""") QWhatsThis.add(self.save_btn, """Save GAMESS parameters and generates the INP file. It does not launch the GAMESS job.""") QWhatsThis.add(self.cancel_btn, """Cancels changes and closes dialog.""")
27df67bdd1347295fce56794988bf1709aeab362 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/27df67bdd1347295fce56794988bf1709aeab362/GamessProp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 611, 301, 403, 4658, 6353, 16186, 2738, 972, 12, 2890, 16, 13010, 33, 5510, 13, 365, 18, 87, 1318, 273, 3224, 1318, 1435, 365, 18, 14247, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 611, 301, 403, 4658, 6353, 16186, 2738, 972, 12, 2890, 16, 13010, 33, 5510, 13, 365, 18, 87, 1318, 273, 3224, 1318, 1435, 365, 18, 14247, 273, 365, 18,...
move_ids.append(act[1])
if isinstance(act[1], (int, long)): move_ids.append(act[1]) else: move_ids.extend(act[1])
def set_outgoing_moves(self, cursor, user, packing_id, name, value, arg, context=None): move_obj = self.pool.get('stock.move')
5efdb49e2e0d2fd62d905946c31c68b4e39075ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9298/5efdb49e2e0d2fd62d905946c31c68b4e39075ec/packing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 31891, 67, 81, 10829, 12, 2890, 16, 3347, 16, 729, 16, 2298, 310, 67, 350, 16, 508, 16, 460, 16, 1501, 16, 819, 33, 7036, 4672, 3635, 67, 2603, 273, 365, 18, 6011, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 31891, 67, 81, 10829, 12, 2890, 16, 3347, 16, 729, 16, 2298, 310, 67, 350, 16, 508, 16, 460, 16, 1501, 16, 819, 33, 7036, 4672, 3635, 67, 2603, 273, 365, 18, 6011, 18, 588...
chosenSite = result['ChosenSite']
chosenSite = result['ChosenSite']
def checkJob(self,job): """This method controls the checking of the job. """ self.log.verbose('Job %s will be processed' % (job)) #First check whether the job has an input data requirement result = self.jobDB.getInputData(job) if not result['OK']: self.log.warn('Failed to get input data from JobDB for %s' % (job)) self.log.error(result['Message'])
6a41e53ca0e8385ad60a7fc3b43a5923a12510f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6a41e53ca0e8385ad60a7fc3b43a5923a12510f3/JobSchedulingAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2278, 12, 2890, 16, 4688, 4672, 3536, 2503, 707, 11022, 326, 6728, 434, 326, 1719, 18, 3536, 365, 18, 1330, 18, 11369, 2668, 2278, 738, 87, 903, 506, 5204, 11, 738, 261, 4688, 371...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2278, 12, 2890, 16, 4688, 4672, 3536, 2503, 707, 11022, 326, 6728, 434, 326, 1719, 18, 3536, 365, 18, 1330, 18, 11369, 2668, 2278, 738, 87, 903, 506, 5204, 11, 738, 261, 4688, 371...
if self.minOccurs is 0: return None
if self.minOccurs is 0 or self.nilled(elt, ps): return None
def SimpleHREF(self, elt, ps, tag): '''Simple HREF for non-string and non-struct and non-array. Parameters: elt -- the DOM element being parsed ps -- the ParsedSoap object. tag -- ''' if len(_children(elt)): return elt href = _find_href(elt) if not href: if self.minOccurs is 0: return None raise EvaluateException('Required' + tag + ' missing', ps.Backtrace(elt)) return ps.FindLocalHREF(href, elt, 0)
688b6292b843eaa2344c20aea6c89297fe8011ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14538/688b6292b843eaa2344c20aea6c89297fe8011ad/TC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4477, 44, 10771, 12, 2890, 16, 11572, 16, 4250, 16, 1047, 4672, 9163, 5784, 670, 10771, 364, 1661, 17, 1080, 471, 1661, 17, 1697, 471, 1661, 17, 1126, 18, 7012, 30, 11572, 1493, 326, 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, 4477, 44, 10771, 12, 2890, 16, 11572, 16, 4250, 16, 1047, 4672, 9163, 5784, 670, 10771, 364, 1661, 17, 1080, 471, 1661, 17, 1697, 471, 1661, 17, 1126, 18, 7012, 30, 11572, 1493, 326, 4...
self.contents = self.buffer
self.contents.append(self.buffer)
def found_terminator(self): #print "Received:", repr(self.buffer) self.contents = self.buffer self.buffer = "" self.close()
0d7d2c9a092ad699c2677e319f3538df2719c720 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/0d7d2c9a092ad699c2677e319f3538df2719c720/test_asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 468, 1188, 315, 8872, 2773, 16, 8480, 12, 2890, 18, 4106, 13, 2890, 18, 3980, 18, 6923, 12, 2890, 18, 4106, 13, 365, 18, 4106, 273, 1408, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1392, 67, 9505, 639, 12, 2890, 4672, 468, 1188, 315, 8872, 2773, 16, 8480, 12, 2890, 18, 4106, 13, 2890, 18, 3980, 18, 6923, 12, 2890, 18, 4106, 13, 365, 18, 4106, 273, 1408, 365, 18...
<dl$tooltip$><dt>Value:</dt>
<dl><dt>Value:</dt>
def arg_name_to_html(self, func_doc, arg_name): """ A helper function used to format an argument name, for use in the argument description list under a routine's details entry. This just wraps strong & code tags around the arg name; and if the arg name is associated with a type, then adds it parenthetically after the name. """ s = '<strong class="pname"><code>%s</code></strong>' % arg_name if arg_name in func_doc.arg_types: typ = func_doc.arg_types[arg_name] typ_html = self.docstring_to_html(typ, func_doc, 10) s += " (<code>%s</code>)" % typ_html return s
ead96d86090e18fdeec64a06319b925d20efd2b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/ead96d86090e18fdeec64a06319b925d20efd2b2/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1501, 67, 529, 67, 869, 67, 2620, 12, 2890, 16, 1326, 67, 2434, 16, 1501, 67, 529, 4672, 3536, 432, 4222, 445, 1399, 358, 740, 392, 1237, 508, 16, 364, 999, 316, 326, 1237, 2477, 666...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1501, 67, 529, 67, 869, 67, 2620, 12, 2890, 16, 1326, 67, 2434, 16, 1501, 67, 529, 4672, 3536, 432, 4222, 445, 1399, 358, 740, 392, 1237, 508, 16, 364, 999, 316, 326, 1237, 2477, 666...
self.debug_pref_use_fancy_DND_graphic() debug_pref("MT debug: setDirtyRegion", Choice(["large","small","none"]), non_debug = True, prefs_key = True) debug_pref("MT debug: updateGeometry", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: scrollToBottom", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: set_scrollpos", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: show after replace", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: debug prints", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: disable replace_items", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: disable _remake_contents_0", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: disable scrollBar.valueChanged()", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: incremental update_item_tree?", Choice_boolean_False, non_debug = True, prefs_key = True)
self.debug_pref_use_fancy_DND_graphic() self.MT_debug_prints() if debug_pref_use_old_MT_code(): debug_pref("MT debug: setDirtyRegion", Choice(["large","small","none"]), non_debug = True, prefs_key = True) debug_pref("MT debug: updateGeometry", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: scrollToBottom", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: set_scrollpos", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: show after replace", Choice_boolean_True, non_debug = True, prefs_key = True) debug_pref("MT debug: disable replace_items", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: disable _remake_contents_0", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: disable scrollBar.valueChanged()", Choice_boolean_False, non_debug = True, prefs_key = True) debug_pref("MT debug: incremental update_item_tree?", Choice_boolean_False, non_debug = True, prefs_key = True) return
def __init__(self, win, ne1model): self.win = win self.ne1model = ne1model ne1model.view = self #e should rename this attr of ne1model self._mousepress_info_for_move = None # set by any mousePress that supports mouseMove not being a noop, to info about what that move should do #bruce 070509 self._ongoing_DND_info = None # set to a tuple of a private format, during a DND drag (not used during a selection-drag #k) self.setAcceptDrops(True) if DEBUG0: self._verify_api_compliance() self.debug_pref_use_fancy_DND_graphic() # make sure this is visible from the start in the debug_prefs menu
803f5c9bed45783a867e020fe3dc0133f196ec32 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/803f5c9bed45783a867e020fe3dc0133f196ec32/modelTreeGui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5657, 16, 1073, 21, 2284, 4672, 365, 18, 8082, 273, 5657, 365, 18, 4644, 21, 2284, 273, 1073, 21, 2284, 1073, 21, 2284, 18, 1945, 273, 365, 468, 73, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5657, 16, 1073, 21, 2284, 4672, 365, 18, 8082, 273, 5657, 365, 18, 4644, 21, 2284, 273, 1073, 21, 2284, 1073, 21, 2284, 18, 1945, 273, 365, 468, 73, 14...
def __init__(self, master=None):
def __init__(self, master=None, value=None, name=None):
def __init__(self, master=None): """Construct a string variable.
e5752d0ea67d3fbdf51cd291ebfc4c98db1ccf9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e5752d0ea67d3fbdf51cd291ebfc4c98db1ccf9c/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 460, 33, 7036, 16, 508, 33, 7036, 4672, 3536, 7249, 279, 533, 2190, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 460, 33, 7036, 16, 508, 33, 7036, 4672, 3536, 7249, 279, 533, 2190, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
files = popenx(cmdline, 'b') fi = files[0] fo = files[1] if self.have_popen3: fe = files[2]
files = subprocess.Popen(cmdline, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE )
def run_cgi(self): """Execute a CGI script.""" path = self.path dir, rest = self.cgi_info
6fd181e7964ee35b817e3c8b7b605cd2a3193c8c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/6fd181e7964ee35b817e3c8b7b605cd2a3193c8c/CGIHTTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 589, 273, 365, 18, 803, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 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, 1086, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 589, 273, 365, 18, 803, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 2, -100, -100, -100, -100, -100, -100, ...
assert do.doId in self.doId2do
def removeDOFromTables(self, do): assert self.notify.debugStateCall(self) assert do.doId in self.doId2do location = do.getLocation() if location is not None: if location not in self.zoneId2doIds: self.notify.warning( 'dobj %s (%s) has invalid location: %s' % (do, do.doId, location)) else: assert do.doId in self.zoneId2doIds[location] del(self.zoneId2doIds[location][do.doId]) if len(self.zoneId2doIds[location]) == 0: del self.zoneId2doIds[location]
0b8f6c1f3f41493cd4a484b2ee4cd30eda4c0468 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/0b8f6c1f3f41493cd4a484b2ee4cd30eda4c0468/DoCollectionManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 3191, 1265, 6905, 12, 2890, 16, 741, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 225, 2117, 273, 741, 18, 588, 2735, 1435, 309, 2117, 353, 486, 599, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 3191, 1265, 6905, 12, 2890, 16, 741, 4672, 1815, 365, 18, 12336, 18, 4148, 1119, 1477, 12, 2890, 13, 225, 2117, 273, 741, 18, 588, 2735, 1435, 309, 2117, 353, 486, 599, 30, 309, ...
item = self.item
item = getattr(self.item, 'proxiedItem', self.item)
def watchForChanges(self): if not hasattr(self, 'widget'): return assert not hasattr(self.widget, 'watchedAttributes') attrsToMonitor = self.attributesToMonitor() if attrsToMonitor is not None: # Map the attributes to the real attributes they're based on # (this isn't a list comprehension because we're relying on the # list-flattening behavior provided by 'update') watchedAttributes = set() item = self.item for a in attrsToMonitor: if a: watchedAttributes.update(item.getBasedAttributes(a)) if len(watchedAttributes): #logger.debug('%s: watching for changes in %s' % #(debugName(self), watchedAttributes)) self.itsView.watchItem(self, item, 'onWatchedItemChanged') self.widget.watchedAttributes = watchedAttributes
67e1f4c11d613f20c393942d4098f3a1e805d2f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/67e1f4c11d613f20c393942d4098f3a1e805d2f2/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4267, 1290, 7173, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 296, 6587, 11, 4672, 327, 1815, 486, 3859, 12, 2890, 18, 6587, 16, 296, 7585, 329, 2498, 6134, 3422, 774, 7187, 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, 4267, 1290, 7173, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 296, 6587, 11, 4672, 327, 1815, 486, 3859, 12, 2890, 18, 6587, 16, 296, 7585, 329, 2498, 6134, 3422, 774, 7187, 273, 365...
of $X$ under the Peterson inner product. Let $S_X$ and $S_Y$ be the
of $X$ under the Petersson inner product. Let $S_X$ and $S_Y$ be the
def congruence_number(self): r""" Let $X$ be the subspace of $S_2(\Gamma_0(N)) spanned by the newform associated with this elliptic curve, and $Y$ be orthogonal compliment of $X$ under the Peterson inner product. Let $S_X$ and $S_Y$ be the intersections of $X$ and $Y$ with $S_2(\Gamma_0(N)m \Z)$. The congruence number is defined to be $[S_X \oplus S_Y : S_2(\Gamma_0(N), \Z)]$. It measures congruences between $f$ and elements of $S_2(\Gamma_0(N), \Z)$ orthogonal to $f$.
085f38d15e8f37dfaede2dcc4e4a008b56ed0d2d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/085f38d15e8f37dfaede2dcc4e4a008b56ed0d2d/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 356, 3197, 23209, 67, 2696, 12, 2890, 4672, 436, 8395, 10559, 271, 60, 8, 506, 326, 720, 2981, 434, 271, 55, 67, 22, 4713, 31300, 67, 20, 12, 50, 3719, 1694, 10041, 635, 326, 394, 68...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 356, 3197, 23209, 67, 2696, 12, 2890, 4672, 436, 8395, 10559, 271, 60, 8, 506, 326, 720, 2981, 434, 271, 55, 67, 22, 4713, 31300, 67, 20, 12, 50, 3719, 1694, 10041, 635, 326, 394, 68...
members_options += '<a:option img="%s" value="%s" caption="%s"></a:option>' % (user.__image__, user.id, user.displayName.value)
members_options += \ '<a:option img="%s" value="%s" caption="%s"/>' % \ (user.__image__, user.id, user.displayName.value)
def setParams(self): self.response.setHeader('cache-control', 'no-cache') sLang = self.request.getLang()
9a2f8b99a4794ca66a515bfe9ca832718bd20756 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2504/9a2f8b99a4794ca66a515bfe9ca832718bd20756/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31705, 12, 2890, 4672, 365, 18, 2740, 18, 542, 1864, 2668, 2493, 17, 7098, 2187, 296, 2135, 17, 2493, 6134, 272, 7275, 273, 365, 18, 2293, 18, 588, 7275, 1435, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31705, 12, 2890, 4672, 365, 18, 2740, 18, 542, 1864, 2668, 2493, 17, 7098, 2187, 296, 2135, 17, 2493, 6134, 272, 7275, 273, 365, 18, 2293, 18, 588, 7275, 1435, 2, -100, -100, -100, -10...
child._ref = parent cursor = cursor._ref
child._parent = parent cursor = cursor._parent
def asSet(self, *flags, **kw): """ Convert a flag to a flag set, containing only this flag. If any child flags are passed as arguments, a flag set is created containing this flag and the child flags """ # a) create a Flag with knowledge about this flag and its # parents (parents all set to none)
1d86b8553b1fc36dd1c3948fcc6fd3d35472f0b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/1d86b8553b1fc36dd1c3948fcc6fd3d35472f0b6/use.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 694, 12, 2890, 16, 380, 7133, 16, 2826, 9987, 4672, 3536, 4037, 279, 2982, 358, 279, 2982, 444, 16, 4191, 1338, 333, 2982, 18, 971, 1281, 1151, 2943, 854, 2275, 487, 1775, 16, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 694, 12, 2890, 16, 380, 7133, 16, 2826, 9987, 4672, 3536, 4037, 279, 2982, 358, 279, 2982, 444, 16, 4191, 1338, 333, 2982, 18, 971, 1281, 1151, 2943, 854, 2275, 487, 1775, 16, 279...