rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
The Fourier coefficients up to and including $a_p$ of the modular form attached to this elliptic curve, for all primes $p\leq n$.
The Fourier coefficients $a_p$ of the modular form attached to this elliptic curve, for all primes $p\leq n$.
def aplist(self, n, python_ints=False): r""" The Fourier coefficients up to and including $a_p$ of the modular form attached to this elliptic curve, for all primes $p\leq n$.
97a7111045a2e1421945261832ecad2046ecee85 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/97a7111045a2e1421945261832ecad2046ecee85/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 17842, 12, 2890, 16, 290, 16, 5790, 67, 28142, 33, 8381, 4672, 436, 8395, 1021, 478, 24775, 14229, 731, 358, 471, 6508, 271, 69, 67, 84, 8, 434, 326, 681, 2490, 646, 7495, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 17842, 12, 2890, 16, 290, 16, 5790, 67, 28142, 33, 8381, 4672, 436, 8395, 1021, 478, 24775, 14229, 731, 358, 471, 6508, 271, 69, 67, 84, 8, 434, 326, 681, 2490, 646, 7495, 358, ...
cwd=self.source_dir)
cwd=dest)
def clone_git(self): url = self.url.split('+', 1)[1] url = url.split('#', 1)[0] if '@' in url: url, rev = url.split('@', 1) else: rev = None if rev: rev_options = [rev] rev_display = ' (to revision %s)' % rev else: rev_options = ['master'] rev_display = '' dest = self.source_dir clone = True if os.path.exists(os.path.join(self.source_dir, '.git')): existing_url = get_git_url(self.source_dir) clone = False if existing_url == url: logger.info('Clone in %s exists, and has correct URL (%s)' % (display_path(self.source_dir), url)) logger.notify('Updating clone %s%s' % (display_path(self.source_dir), rev_display)) call_subprocess([GIT_CMD, 'fetch', '-q'], cwd=self.source_dir) call_subprocess([GIT_CMD, 'checkout', '-q', '-f'] + rev_options, cwd=self.source_dir) else: logger.warn('Git clone in %s exists with URL %s' % (display_path(self.source_dir), existing_url)) logger.warn('The plan is to install the git repository %s' % url) response = ask('What to do? (s)witch, (i)gnore, (w)ipe, (b)ackup ', ('s', 'i', 'w', 'b')) if response == 's': logger.notify('Switching clone %s to %s%s' % (display_path(self.source_dir), url, rev_display)) os.chdir(self.source_dir) call_subprocess([GIT_CMD, 'config', 'remote.origin.url', url], cwd=self.source_dir) call_subprocess([GIT_CMD, 'checkout', '-q'] + rev_options, cwd=self.source_dir) elif response == 'i': # do nothing pass elif response == 'w': logger.warn('Deleting %s' % display_path(self.source_dir)) shutil.rmtree(self.source_dir) clone = True elif response == 'b': dest_dir = backup_dir(self.source_dir) logger.warn('Backing up %s to %s' % (display_path(self.source_dir), dest_dir)) shutil.move(self.source_dir, dest_dir) clone = True if clone: logger.notify('Cloning %s%s to %s' % (url, rev_display, display_path(self.source_dir))) call_subprocess([GIT_CMD, 'clone', '-q', url, self.source_dir]) call_subprocess([GIT_CMD, 'checkout', '-q'] + rev_options, cwd=self.source_dir)
07705cd47355a1a10042b18aab154e5eeeafcbcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12982/07705cd47355a1a10042b18aab154e5eeeafcbcd/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3236, 67, 6845, 12, 2890, 4672, 880, 273, 365, 18, 718, 18, 4939, 2668, 15, 2187, 404, 25146, 21, 65, 880, 273, 880, 18, 4939, 2668, 7, 2187, 404, 25146, 20, 65, 309, 9175, 316, 880,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3236, 67, 6845, 12, 2890, 4672, 880, 273, 365, 18, 718, 18, 4939, 2668, 15, 2187, 404, 25146, 21, 65, 880, 273, 880, 18, 4939, 2668, 7, 2187, 404, 25146, 20, 65, 309, 9175, 316, 880,...
return os.WEXITSTATUS(err)
err = os.WEXITSTATUS(err)
def runCommandWithOutput(command): """ _runCommand_ Run the command without deadlocking stdou and stderr, echo all output to sys.stdout and sys.stderr Returns the exitCode """ child = popen2.Popen3(command, 1) # capture stdout and stderr from command child.tochild.close() # don't need to talk to child outfile = child.fromchild outfd = outfile.fileno() errfile = child.childerr errfd = errfile.fileno() makeNonBlocking(outfd) # don't deadlock! makeNonBlocking(errfd) outdata = errdata = '' outeof = erreof = 0 output = '' while 1: ready = select.select([outfd,errfd],[],[]) # wait for input if outfd in ready[0]: try: outchunk = outfile.read() except Exception, ex: msg = "Unable to read stdout chunk... skipping" print msg outchunk = '' if outchunk == '': outeof = 1 output += outchunk if errfd in ready[0]: try: errchunk = errfile.read() except Exception, ex: msg = "Unable to read stderr chunk... skipping" print msg, str(ex) errchunk = "" if errchunk == '': erreof = 1 output += errchunk if outeof and erreof: break select.select([],[],[],.1) # give a little time for buffers to fill err = child.wait() if os.WIFEXITED(err): return os.WEXITSTATUS(err) elif os.WIFSIGNALED(err): return os.WTERMSIG(err) elif os.WIFSTOPPED(err): return os.WSTOPSIG(err) return err, output
dd9af02ff8f8961c18d0a02d081a3750ddab9205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8887/dd9af02ff8f8961c18d0a02d081a3750ddab9205/Execute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31933, 1190, 1447, 12, 3076, 4672, 3536, 389, 2681, 2189, 67, 225, 1939, 326, 1296, 2887, 8363, 739, 310, 2044, 1395, 471, 4514, 16, 3376, 777, 876, 358, 2589, 18, 10283, 471, 2589, 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, 31933, 1190, 1447, 12, 3076, 4672, 3536, 389, 2681, 2189, 67, 225, 1939, 326, 1296, 2887, 8363, 739, 310, 2044, 1395, 471, 4514, 16, 3376, 777, 876, 358, 2589, 18, 10283, 471, 2589, 18, ...
if self.attributes[XMLSchemaComponent.xsd]['namespace'] == self._parent().attributes[XMLSchemaComponent.xsd]['targetNamespace']:
if self.attributes['namespace'] == self._parent().attributes['targetNamespace']:
def fromDom(self, node): self.setAttributes(node) contents = self.getContents(node)
e50368f02a007b522df43404acf761191b9356f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13054/e50368f02a007b522df43404acf761191b9356f0/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8832, 12, 2890, 16, 756, 4672, 365, 18, 542, 2498, 12, 2159, 13, 2939, 273, 365, 18, 588, 6323, 12, 2159, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
pickle_file = open(pickle_filename,'w')
pickle_file = open(pickle_filename,'wb')
def write_petscio(solution,frame,path='./',file_prefix='claw',write_aux=False,options={}): r""" Write out pickle and PETSc data files representing the solution. Common data is written from process 0 in pickle files. Shared data is written from all processes into PETSc data files. :Input: - *solution* - (:class:`~petclaw.solution.Solution`) petclaw object to be output - *frame* - (int) Frame number - *path* - (string) Root path - *file_prefix* - (string) Prefix for the file name. ``default = 'claw'`` - *write_aux* - (bool) Boolean controlling whether the associated auxiliary array should be written out. ``default = False`` - *options* - (dict) Optional argument dictionary, see `PETScIO Option Table`_ .. _`PETScIO Option Table`: format : one of 'ascii' or 'binary' clobber : if True (Default), files will be overwritten """ # Option parsing option_defaults = {'format':'ascii','clobber':True} for (k,v) in option_defaults.iteritems(): if options.has_key(k): pass else: options[k] = option_defaults[k] clobber = options['clobber'] if frame < 0: # Don't construct file names with negative frameno values. raise IOError("Frame " + str(frame) + " does not exist ***") pickle_filename = os.path.join(path, '%s.pkl' % file_prefix) + str(frame).zfill(4) viewer_filename = os.path.join(path, '%s.ptc' % file_prefix) + str(frame).zfill(4) if solution.maux > 0 and write_aux: write_aux = True aux_filename = os.path.join(path, '%s_aux.ptc' % file_prefix) + str(frame).zfill(4) else: write_aux = False if not clobber: if os.path.exists(pickle_filename): raise IOError('Cowardly refusing to clobber %s!' % pickle_filename) if os.path.exists(viewer_filename): raise IOError('Cowardly refusing to clobber %s!' % viewer_filename) if write_aux and os.path.exists(aux_filename): raise IOError('Cowardly refusing to clobber %s!' % aux_filename) rank = MPI.COMM_WORLD.rank if rank==0: pickle_file = open(pickle_filename,'w') # explicitly dumping a dictionary here to help out anybody trying to read the pickle file pickle.dump({'t':solution.t,'meqn':solution.meqn,'ngrids':len(solution.grids), 'maux':solution.maux,'ndim':solution.ndim, 'write_aux':write_aux}, pickle_file) # now set up the PETSc viewers if options['format'] == 'ascii': viewer = PETSc.Viewer().createASCII(viewer_filename, PETSc.Viewer.Mode.WRITE) if write_aux: aux_viewer = PETSc.Viewer().createASCII(aux_filename, PETSc.Viewer.Mode.WRITE) elif options['format'] == 'binary': viewer = PETSc.Viewer().createBinary(viewer_filename, PETSc.Viewer.Mode.WRITE) if write_aux: aux_viewer = PETSc.Viewer().createBinary(aux_filename, PETSc.Viewer.Mode.WRITE) else: raise IOError('format type %s not supported' % options['format']) for grid in solution.grids: if rank==0: pickle.dump(grid, pickle_file) grid.gqVec.view(viewer) if write_aux: grid.gauxVec.view(aux_viewer) viewer.flush() viewer.destroy() if rank==0: pickle_file.close()
82aecd9affb08493ea9183e84fe58cb0be96cbc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12812/82aecd9affb08493ea9183e84fe58cb0be96cbc4/petsc_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 6951, 1017, 1594, 12, 13385, 16, 3789, 16, 803, 2218, 18, 19, 2187, 768, 67, 3239, 2218, 830, 2219, 2187, 2626, 67, 18196, 33, 8381, 16, 2116, 12938, 4672, 436, 8395, 2598, 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, 1045, 67, 6951, 1017, 1594, 12, 13385, 16, 3789, 16, 803, 2218, 18, 19, 2187, 768, 67, 3239, 2218, 830, 2219, 2187, 2626, 67, 18196, 33, 8381, 16, 2116, 12938, 4672, 436, 8395, 2598, 5...
sql = """SELECT DISTINCTROW versions.value AS value FROM products, versions""" sql += " WHERE" + makeWhereClause('products.name', PRODUCTS)
sql = """SELECT DISTINCTROW v.value AS value FROM products p, versions v""" sql += " WHERE v.product_id = p.id AND" sql += makeWhereClause('p.name', PRODUCTS)
def convert(_db, _host, _user, _password, _env, _force): activityFields = FieldTranslator() # account for older versions of bugzilla print "Using Bugzilla v%s schema." % BZ_VERSION if BZ_VERSION == 2110: activityFields['removed'] = "oldvalue" activityFields['added'] = "newvalue" # init Bugzilla environment print "Bugzilla MySQL('%s':'%s':'%s':'%s'): connecting..." % \ (_db, _host, _user, ("*" * len(_password))) mysql_con = MySQLdb.connect(host=_host, user=_user, passwd=_password, db=_db, compress=1, cursorclass=MySQLdb.cursors.DictCursor) mysql_cur = mysql_con.cursor() # init Trac environment print "Trac SQLite('%s'): connecting..." % (_env) trac = TracDatabase(_env) # force mode... if _force == 1: print "\nCleaning all tickets..." c = trac.db().cursor() c.execute("DELETE FROM ticket_change") trac.db().commit() c.execute("DELETE FROM ticket") trac.db().commit() c.execute("DELETE FROM ticket_custom") trac.db().commit() c.execute("DELETE FROM attachment") attachments_dir = os.path.join(os.path.normpath(trac.env.path), "attachments") # Straight from the Python documentation. for root, dirs, files in os.walk(attachments_dir, topdown=False): for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) if not os.stat(attachments_dir): os.mkdir(attachments_dir) trac.db().commit() print "All tickets cleaned..." print "\n0. Filtering products..." if BZ_VERSION >= 2180: mysql_cur.execute("SELECT name FROM products") else: mysql_cur.execute("SELECT product AS name FROM products") products = [] for line in mysql_cur.fetchall(): product = line['name'] if PRODUCTS and product not in PRODUCTS: continue if product in IGNORE_PRODUCTS: continue products.append(product) PRODUCTS[:] = products print " Using products", " ".join(PRODUCTS) print "\n1. Import severities..." trac.setSeverityList(SEVERITIES) print "\n2. Import components..." if not COMPONENTS_FROM_PRODUCTS: if BZ_VERSION >= 2180: sql = """SELECT DISTINCT c.name AS name, c.initialowner AS owner FROM components AS c, products AS p WHERE c.product_id = p.id AND""" sql += makeWhereClause('p.name', PRODUCTS) else: sql = "SELECT value AS name, initialowner AS owner FROM components" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) components = mysql_cur.fetchall() for component in components: component['owner'] = trac.getLoginName(mysql_cur, component['owner']) trac.setComponentList(components, 'name') else: if BZ_VERSION >= 2180: sql = ("SELECT p.name AS product, c.name AS comp, " " c.initialowner AS owner " "FROM components c, products p " "WHERE c.product_id = p.id and " + makeWhereClause('p.name', PRODUCTS)) else: sql = ("SELECT program AS product, value AS comp, " " initialowner AS owner " "FROM components WHERE" + makeWhereClause('program', PRODUCTS)) mysql_cur.execute(sql) lines = mysql_cur.fetchall() all_components = {} # product -> components all_owners = {} # product, component -> owner for line in lines: product = line['product'] comp = line['comp'] owner = line['owner'] all_components.setdefault(product, []).append(comp) all_owners[(product, comp)] = owner component_list = [] for product, components in all_components.items(): # find best default owner default = None for comp in DEFAULT_COMPONENTS: if comp in components: default = comp break if default is None: default = components[0] owner = all_owners[(product, default)] owner_name = trac.getLoginName(mysql_cur, owner) component_list.append({'product': product, 'owner': owner_name}) trac.setComponentList(component_list, 'product') print "\n3. Import priorities..." trac.setPriorityList(PRIORITIES) print "\n4. Import versions..." if BZ_VERSION >= 2180: sql = """SELECT DISTINCTROW versions.value AS value FROM products, versions""" sql += " WHERE" + makeWhereClause('products.name', PRODUCTS) else: sql = "SELECT DISTINCTROW value FROM versions" sql += " WHERE" + makeWhereClause('program', PRODUCTS) mysql_cur.execute(sql) versions = mysql_cur.fetchall() trac.setVersionList(versions, 'value') print "\n5. Import milestones..." sql = "SELECT DISTINCT value FROM milestones" sql += " WHERE" + makeWhereClause('value', IGNORE_MILESTONES, negative=True) mysql_cur.execute(sql) milestones = mysql_cur.fetchall() trac.setMilestoneList(milestones, 'value') print "\n6. Retrieving bugs..." if BZ_VERSION >= 2180: sql = """SELECT DISTINCT b.*, c.name AS component, p.name AS product FROM bugs AS b, components AS c, products AS p """ sql += " WHERE (" + makeWhereClause('p.name', PRODUCTS) sql += ") AND b.product_id = p.id" sql += " AND b.component_id = c.id" sql += " ORDER BY b.bug_id" else: sql = """SELECT DISTINCT b.*, c.value AS component, p.product AS product FROM bugs AS b, components AS c, products AS p """ sql += " WHERE (" + makeWhereClause('p.product', PRODUCTS) sql += ") AND b.product = p.product" sql += " AND b.component = c.value" sql += " ORDER BY b.bug_id" mysql_cur.execute(sql) bugs = mysql_cur.fetchall() print "\n7. Import bugs and bug activity..." for bug in bugs: bugid = bug['bug_id'] ticket = {} keywords = [] ticket['id'] = bugid ticket['time'] = bug['creation_ts'] ticket['changetime'] = bug['delta_ts'] if COMPONENTS_FROM_PRODUCTS: ticket['component'] = bug['product'] else: ticket['component'] = bug['component'] if SEVERITIES: ticket['severity'] = bug['bug_severity'] ticket['priority'] = bug['priority'].lower() else: # use bugzilla severities as trac priorities, and ignore bugzilla # priorities ticket['severity'] = '' ticket['priority'] = bug['bug_severity'] ticket['owner'] = trac.getLoginName(mysql_cur, bug['assigned_to']) ticket['reporter'] = trac.getLoginName(mysql_cur, bug['reporter']) # pack bugzilla fields into dictionary of trac custom field # names and values customfields = {} for bugfield, customfield in CUSTOMFIELD_MAP.iteritems(): customfields[customfield] = bug[bugfield] ticket['customfields'] = customfields mysql_cur.execute("SELECT * FROM cc WHERE bug_id = %s", bugid) cc_records = mysql_cur.fetchall() cc_list = [] for cc in cc_records: cc_list.append(trac.getLoginName(mysql_cur, cc['who'])) cc_list = [cc for cc in cc_list if cc not in IGNORE_CC] ticket['cc'] = string.join(cc_list, ', ') ticket['version'] = bug['version'] target_milestone = bug['target_milestone'] if target_milestone in IGNORE_MILESTONES: target_milestone = '' ticket['milestone'] = target_milestone bug_status = bug['bug_status'].lower() ticket['status'] = statusXlator[bug_status] ticket['resolution'] = bug['resolution'].lower() # a bit of extra work to do open tickets if bug_status == 'open': if owner != '': ticket['status'] = 'assigned' else: ticket['status'] = 'new' ticket['summary'] = bug['short_desc'] mysql_cur.execute("SELECT * FROM longdescs WHERE bug_id = %s" % bugid) longdescs = list(mysql_cur.fetchall()) # check for empty 'longdescs[0]' field... if len(longdescs) == 0: ticket['description'] = '' else: ticket['description'] = longdescs[0]['thetext'] del longdescs[0] for desc in longdescs: ignore = False for comment in IGNORE_COMMENTS: if re.match(comment, desc['thetext']): ignore = True if ignore: continue trac.addTicketComment(ticket=bugid, time = desc['bug_when'], author=trac.getLoginName(mysql_cur, desc['who']), value = desc['thetext']) mysql_cur.execute("""SELECT * FROM bugs_activity WHERE bug_id = %s ORDER BY bug_when""" % bugid) bugs_activity = mysql_cur.fetchall() resolution = '' ticketChanges = [] keywords = [] for activity in bugs_activity: field_name = trac.getFieldName(mysql_cur, activity['fieldid']).lower() removed = activity[activityFields['removed']] added = activity[activityFields['added']] # statuses and resolutions are in lowercase in trac if field_name == "resolution" or field_name == "bug_status": removed = removed.lower() added = added.lower() # remember most recent resolution, we need this later if field_name == "resolution": resolution = added.lower() add_keywords = [] remove_keywords = [] # convert bugzilla field names... if field_name == "bug_severity": if SEVERITIES: field_name = "severity" else: field_name = "priority" elif field_name == "assigned_to": field_name = "owner" elif field_name == "bug_status": field_name = "status" if removed in STATUS_KEYWORDS: remove_keywords.append(STATUS_KEYWORDS[removed]) if added in STATUS_KEYWORDS: add_keywords.append(STATUS_KEYWORDS[added]) added = statusXlator[added] removed = statusXlator[removed] elif field_name == "short_desc": field_name = "summary" elif field_name == "product" and COMPONENTS_FROM_PRODUCTS: field_name = "component" elif ((field_name == "product" and not COMPONENTS_FROM_PRODUCTS) or (field_name == "component" and COMPONENTS_FROM_PRODUCTS)): if MAP_ALL_KEYWORDS or removed in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(removed, removed) if kw: remove_keywords.append(kw) if MAP_ALL_KEYWORDS or added in KEYWORDS_MAPPING: kw = KEYWORDS_MAPPING.get(added, added) if kw: add_keywords.append(kw) if field_name == "component": # just keep the keyword change added = removed = "" elif field_name == "target_milestone": field_name = "milestone" if added in IGNORE_MILESTONES: added = "" if removed in IGNORE_MILESTONES: removed = "" ticketChange = {} ticketChange['ticket'] = bugid ticketChange['time'] = activity['bug_when'] ticketChange['author'] = trac.getLoginName(mysql_cur, activity['who']) ticketChange['field'] = field_name ticketChange['oldvalue'] = removed ticketChange['newvalue'] = added if add_keywords or remove_keywords: # ensure removed ones are in old old_keywords = keywords + [kw for kw in remove_keywords if kw not in keywords] # remove from new keywords = [kw for kw in keywords if kw not in remove_keywords] # add to new keywords += [kw for kw in add_keywords if kw not in keywords] if old_keywords != keywords: ticketChangeKw = ticketChange.copy() ticketChangeKw['field'] = "keywords" ticketChangeKw['oldvalue'] = ' '.join(old_keywords) ticketChangeKw['newvalue'] = ' '.join(keywords) ticketChanges.append(ticketChangeKw) if field_name in IGNORED_ACTIVITY_FIELDS: continue # Skip changes that have no effect (think translation!). if added == removed: continue # Bugzilla splits large summary changes into two records. for oldChange in ticketChanges: if (field_name == "summary" and oldChange['field'] == ticketChange['field'] and oldChange['time'] == ticketChange['time'] and oldChange['author'] == ticketChange['author']): oldChange['oldvalue'] += " " + ticketChange['oldvalue'] oldChange['newvalue'] += " " + ticketChange['newvalue'] break # cc sometime appear in different activities with same time if (field_name == "cc" \ and oldChange['time'] == ticketChange['time']): oldChange['newvalue'] += ", " + ticketChange['newvalue'] break else: ticketChanges.append (ticketChange) for ticketChange in ticketChanges: trac.addTicketChange (**ticketChange) # For some reason, bugzilla v2.11 seems to clear the resolution # when you mark a bug as closed. Let's remember it and restore # it if the ticket is closed but there's no resolution. if not ticket['resolution'] and ticket['status'] == "closed": ticket['resolution'] = resolution bug_status = bug['bug_status'] if bug_status in STATUS_KEYWORDS: kw = STATUS_KEYWORDS[bug_status] if kw not in keywords: keywords.append(kw) product = bug['product'] if product in KEYWORDS_MAPPING and not COMPONENTS_FROM_PRODUCTS: kw = KEYWORDS_MAPPING.get(product, product) if kw and kw not in keywords: keywords.append(kw) component = bug['component'] if (COMPONENTS_FROM_PRODUCTS and \ (MAP_ALL_KEYWORDS or component in KEYWORDS_MAPPING)): kw = KEYWORDS_MAPPING.get(component, component) if kw and kw not in keywords: keywords.append(kw) ticket['keywords'] = string.join(keywords) ticketid = trac.addTicket(**ticket) if BZ_VERSION >= 2210: mysql_cur.execute("SELECT attachments.*, attach_data.thedata " "FROM attachments, attach_data " "WHERE attachments.bug_id = %s AND " "attachments.attach_id = attach_data.id" % bugid) else: mysql_cur.execute("SELECT * FROM attachments WHERE bug_id = %s" % bugid) attachments = mysql_cur.fetchall() for a in attachments: author = trac.getLoginName(mysql_cur, a['submitter_id']) trac.addAttachment(author, a) print "\n8. Importing users and passwords..." if BZ_VERSION >= 2167: selectlogins = "SELECT login_name, cryptpassword FROM profiles"; if IGNORE_DISABLED_USERS: selectlogins = selectlogins + " WHERE disabledtext=''" mysql_cur.execute(selectlogins) users = mysql_cur.fetchall() htpasswd = file("htpasswd", 'w') for user in users: if LOGIN_MAP.has_key(user['login_name']): login = LOGIN_MAP[user['login_name']] else: login = user['login_name'] htpasswd.write(login + ":" + user['cryptpassword'] + "\n") htpasswd.close() print " Bugzilla users converted to htpasswd format, see 'htpasswd'." print "\nAll tickets converted."
25808c2392bb997c559e4337e46435149d877949 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2831/25808c2392bb997c559e4337e46435149d877949/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 24899, 1966, 16, 389, 2564, 16, 389, 1355, 16, 389, 3664, 16, 389, 3074, 16, 389, 5734, 4672, 5728, 2314, 273, 2286, 12233, 1435, 225, 468, 2236, 364, 12156, 5244, 434, 7934, 15990...
long = long,
long = long + " (Basic Video)",
def __get_image_stanzas(self, isodir): versions = [] kernels = self._get_kernel_versions() for kernel in kernels: for version in kernels[kernel]: versions.append(version)
fd2df98902f7225587d5305f2f04e35ae23647a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9342/fd2df98902f7225587d5305f2f04e35ae23647a7/live.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 2730, 67, 541, 94, 345, 12, 2890, 16, 353, 369, 481, 4672, 5244, 273, 5378, 5536, 87, 273, 365, 6315, 588, 67, 8111, 67, 10169, 1435, 364, 5536, 316, 5536, 87, 30, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 67, 2730, 67, 541, 94, 345, 12, 2890, 16, 353, 369, 481, 4672, 5244, 273, 5378, 5536, 87, 273, 365, 6315, 588, 67, 8111, 67, 10169, 1435, 364, 5536, 316, 5536, 87, 30, 364...
try: f.close() except: pass os.unlink(TESTFN)
test_support.unlink(TESTFN)
def test_bug1728403(self): try: open(TESTFN, 'w').write('\xa1') f = codecs.open(TESTFN, encoding='cp949') self.assertRaises(UnicodeDecodeError, f.read, 2) finally: try: f.close() except: pass os.unlink(TESTFN)
765fb53bb0f3a9006cff0d294050c59d49364475 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/765fb53bb0f3a9006cff0d294050c59d49364475/test_multibytecodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 925, 28406, 5193, 4630, 12, 2890, 4672, 775, 30, 1696, 12, 16961, 19793, 16, 296, 91, 16063, 2626, 2668, 64, 6995, 21, 6134, 284, 273, 17437, 18, 3190, 12, 16961, 19793, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 925, 28406, 5193, 4630, 12, 2890, 4672, 775, 30, 1696, 12, 16961, 19793, 16, 296, 91, 16063, 2626, 2668, 64, 6995, 21, 6134, 284, 273, 17437, 18, 3190, 12, 16961, 19793, 16, ...
return {'ConnectionID': connection_id, 'AVTransportID': avt_id, 'RcsID': rcs_id}
return {'ConnectionID': connection_id, 'AVTransportID': avt_id, 'RcsID': rcs_id}
def upnp_PrepareForConnection(self, *args, **kwargs): self.info('upnp_PrepareForConnection') """ check if we really support that mimetype """ RemoteProtocolInfo = kwargs['RemoteProtocolInfo'] """ if we are a MR and this in not 'Input' then there is something strange going on """ Direction = kwargs['Direction'] if( self.device.device_type == 'MediaRenderer' and Direction == 'Output'): return failure.Failure(errorCode(702)) if( self.device.device_type == 'MediaServer' and Direction != 'Input'): return failure.Failure(errorCode(702)) """ the InstanceID of the MS ? """ PeerConnectionID = kwargs['PeerConnectionID'] """ ??? """ PeerConnectionManager = kwargs['PeerConnectionManager'] local_protocol_infos = None if self.device.device_type == 'MediaRenderer': local_protocol_infos = self.get_variable('SinkProtocolInfo').value if self.device.device_type == 'MediaServer': local_protocol_infos = self.get_variable('SourceProtocolInfo').value self.debug('ProtocalInfos:',RemoteProtocolInfo, '--', local_protocol_infos)
8dffb5892646e15c7cb1ac51a69ef0a6d9bff3c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11626/8dffb5892646e15c7cb1ac51a69ef0a6d9bff3c7/connection_manager_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 731, 6782, 67, 7543, 1290, 1952, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 1376, 2668, 416, 6782, 67, 7543, 1290, 1952, 6134, 3536, 866, 309, 732, 8654, 2865, 716, 12595, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 731, 6782, 67, 7543, 1290, 1952, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 365, 18, 1376, 2668, 416, 6782, 67, 7543, 1290, 1952, 6134, 3536, 866, 309, 732, 8654, 2865, 716, 12595, ...
pass
if self.gencomments: if savedcomment or line.strip(): savedcomment.append((lineno, '// '+line)) def _extendlines(self, comment): rv = [] for lineno, line in comment: line = line[:-1] if len(line) < 75: line = line + (75-len(line))*' ' line = line + '\n' rv.append((lineno, line)) return rv
def read(self): """Read the source file and store all definitions""" while 1: lineno, line = self._readline() if not line: break mo = BEGINDEFINITION.search(line) if mo: name = mo.group('name') value = self._readitem() self._define(name, value) else: pass # We could output the TeX code but we don't bother.
c83e7d15600dd57cc3f38f6ce85ee52b5f633816 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c83e7d15600dd57cc3f38f6ce85ee52b5f633816/unweave.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 4672, 3536, 1994, 326, 1084, 585, 471, 1707, 777, 6377, 8395, 1323, 404, 30, 7586, 16, 980, 273, 365, 6315, 896, 1369, 1435, 309, 486, 980, 30, 898, 7344, 273, 19270, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 4672, 3536, 1994, 326, 1084, 585, 471, 1707, 777, 6377, 8395, 1323, 404, 30, 7586, 16, 980, 273, 365, 6315, 896, 1369, 1435, 309, 486, 980, 30, 898, 7344, 273, 19270, 25...
vList.append(Violation(self, line.number))
vList.append(Violation(self, line))
def apply(self, lines): vList = [] if (self.getFiletype() in self.getTypeList()): for line in lines: if line.inPublic: # if it's only 1 arg, it should fit on one line ... there will be exceptions m = re.search("^\s*([^\(]+)\s*\([^\),]+\s[^\),]+\)", line.stripped) if m: name = m.group(1) if (re.search(name, line.className) and not re.search("^\s*explicit", line.stripped)): vList.append(Violation(self, line.number)) return vList
cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6529/cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 2362, 4672, 331, 682, 273, 5378, 309, 261, 2890, 18, 588, 25579, 5872, 1435, 316, 365, 18, 588, 559, 682, 1435, 4672, 364, 980, 316, 2362, 30, 309, 980, 18, 267, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 2362, 4672, 331, 682, 273, 5378, 309, 261, 2890, 18, 588, 25579, 5872, 1435, 316, 365, 18, 588, 559, 682, 1435, 4672, 364, 980, 316, 2362, 30, 309, 980, 18, 267, ...
custom_text+= key_val_grp_dict[key[0]][0] + ":" + key_val_grp_dict[key[0]][1] + ","
if key[0] in key_val_grp_dict: custom_text+= key_val_grp_dict[key[0]][0] + ":" + key_val_grp_dict[key[0]][1] + "," else: custom_text+= "Key %d without value," % (key[0])
def list_customizations(self, cr, uid, ids, name, args, context): result = {} for id in ids: result[id] = False #TODO CHECKME: stock.move should only be linked to one and only one mrp.production hopefully req = """ SELECT sale_order_line_id FROM mrp_production prod INNER JOIN mrp_production_move_ids rel ON rel.production_id = prod.id WHERE move_id = %d """ % id
ab33e82e1b9877b01e9bf33f2a43aec00630cd01 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/ab33e82e1b9877b01e9bf33f2a43aec00630cd01/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 3662, 7089, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 563, 273, 2618, 364, 612, 316, 3258, 30, 563, 63, 350, 65, 273, 1083, 225, 468, 6241, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 3662, 7089, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 4672, 563, 273, 2618, 364, 612, 316, 3258, 30, 563, 63, 350, 65, 273, 1083, 225, 468, 6241, ...
l = []
def get_all(self, locallist = 0): l = [] if locallist: (rc, self.flist) = semanage_fcontext_list_local(self.sh) else: (rc, self.flist) = semanage_fcontext_list(self.sh) if rc < 0: raise ValueError(_("Could not list file contexts"))
1f4d94f4c408d30346afa7f6858c42d5ca0230e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7147/1f4d94f4c408d30346afa7f6858c42d5ca0230e1/seobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 12, 2890, 16, 1515, 454, 376, 273, 374, 4672, 309, 1515, 454, 376, 30, 261, 1310, 16, 365, 18, 74, 1098, 13, 273, 6111, 304, 410, 67, 74, 2472, 67, 1098, 67, 3729, 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, 336, 67, 454, 12, 2890, 16, 1515, 454, 376, 273, 374, 4672, 309, 1515, 454, 376, 30, 261, 1310, 16, 365, 18, 74, 1098, 13, 273, 6111, 304, 410, 67, 74, 2472, 67, 1098, 67, 3729, 12...
elif probMode=='cumulative':
elif probMode=='cumulative':
def pipeline(self, data):
cb054caf41cfaab38df27356f0c49c68de0e93fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12580/cb054caf41cfaab38df27356f0c49c68de0e93fb/PyPipelineServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5873, 12, 2890, 16, 501, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5873, 12, 2890, 16, 501, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
in_mf = abs in mf
mfentry = mf.get(abs)
def revert(ui, repo, *pats, **opts): """revert files or dirs to their states as of some revision With no revision specified, revert the named files or directories to the contents they had in the parent of the working directory. This restores the contents of the affected files to an unmodified state. If the working directory has two parents, you must explicitly specify the revision to revert to. Modified files are saved with a .orig suffix before reverting. To disable these backups, use --no-backup. Using the -r option, revert the given files or directories to their contents as of a specific revision. This can be helpful to"roll back" some or all of a change that should not have been committed. Revert modifies the working directory. It does not commit any changes, or change the parent of the working directory. If you revert to a revision other than the parent of the working directory, the reverted files will thus appear modified afterwards. If a file has been deleted, it is recreated. If the executable mode of a file was changed, it is reset. If names are given, all files matching the names are reverted. If no arguments are given, all files in the repository are reverted. """ parent, p2 = repo.dirstate.parents() if opts['rev']: node = repo.lookup(opts['rev']) elif p2 != nullid: raise util.Abort(_('working dir has two parents; ' 'you must specify the revision to revert to')) else: node = parent pmf = None mf = repo.manifest.read(repo.changelog.read(node)[0]) wlock = repo.wlock() # need all matching names in dirstate and manifest of target rev, # so have to walk both. do not print errors if files exist in one # but not other. names = {} target_only = {} # walk dirstate. for src, abs, rel, exact in walk(repo, pats, opts, badmatch=mf.has_key): names[abs] = (rel, exact) if src == 'b': target_only[abs] = True # walk target manifest. for src, abs, rel, exact in walk(repo, pats, opts, node=node, badmatch=names.has_key): if abs in names: continue names[abs] = (rel, exact) target_only[abs] = True changes = repo.changes(node, match=names.has_key, wlock=wlock) modified, added, removed, deleted, unknown = map(dict.fromkeys, changes) revert = ([], _('reverting %s\n')) add = ([], _('adding %s\n')) remove = ([], _('removing %s\n')) forget = ([], _('forgetting %s\n')) undelete = ([], _('undeleting %s\n')) update = {} disptable = ( # dispatch table: # file state # action if in target manifest # action if not in target manifest # make backup if in target manifest # make backup if not in target manifest (modified, revert, remove, True, True), (added, revert, forget, True, False), (removed, undelete, None, False, False), (deleted, revert, remove, False, False), (unknown, add, None, True, False), (target_only, add, None, False, False), ) entries = names.items() entries.sort() for abs, (rel, exact) in entries: in_mf = abs in mf def handle(xlist, dobackup): xlist[0].append(abs) if dobackup and not opts['no_backup'] and os.path.exists(rel): bakname = "%s.orig" % rel ui.note(_('saving current version of %s as %s\n') % (rel, bakname)) shutil.copyfile(rel, bakname) shutil.copymode(rel, bakname) if ui.verbose or not exact: ui.status(xlist[1] % rel) for table, hitlist, misslist, backuphit, backupmiss in disptable: if abs not in table: continue # file has changed in dirstate if in_mf: handle(hitlist, backuphit) elif misslist is not None: handle(misslist, backupmiss) else: if exact: ui.warn(_('file not managed: %s\n' % rel)) break else: # file has not changed in dirstate if node == parent: if exact: ui.warn(_('no changes needed to %s\n' % rel)) continue if not in_mf: if pmf is None: # only need parent manifest in this unlikely case, # so do not read by default pmf = repo.manifest.read(repo.changelog.read(parent)[0]) if abs in pmf: handle(remove, False) update[abs] = True repo.dirstate.forget(forget[0]) r = repo.update(node, False, True, update.has_key, False, wlock=wlock, show_stats=False) repo.dirstate.update(add[0], 'a') repo.dirstate.update(undelete[0], 'n') repo.dirstate.update(remove[0], 'r') return r
b220f0f06a9f1aeff53a90e55e16fd502ed24fdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/b220f0f06a9f1aeff53a90e55e16fd502ed24fdd/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 266, 1097, 1390, 578, 7717, 358, 3675, 5493, 487, 434, 2690, 6350, 225, 3423, 1158, 6350, 1269, 16, 15226, 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, 15226, 12, 4881, 16, 3538, 16, 380, 84, 2323, 16, 2826, 4952, 4672, 3536, 266, 1097, 1390, 578, 7717, 358, 3675, 5493, 487, 434, 2690, 6350, 225, 3423, 1158, 6350, 1269, 16, 15226, 326, ...
_inlets=0
_inlets=1
def recv_gl(arg): """This is a global receive function, it has no access to class members.""" print "GLOBAL",arg
04ca9127efe9c11d756b9463279ff0a8c8dd300c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4449/04ca9127efe9c11d756b9463279ff0a8c8dd300c/sendrecv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10665, 67, 7043, 12, 3175, 4672, 3536, 2503, 353, 279, 2552, 6798, 445, 16, 518, 711, 1158, 2006, 358, 667, 4833, 12123, 1172, 315, 20402, 3113, 3175, 225, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 10665, 67, 7043, 12, 3175, 4672, 3536, 2503, 353, 279, 2552, 6798, 445, 16, 518, 711, 1158, 2006, 358, 667, 4833, 12123, 1172, 315, 20402, 3113, 3175, 225, 2, -100, -100, -100, -100, -10...
self._backend.add_edge(u,v,l,False)
self._backend.add_edge(u,v,l,True)
def __init__(self, data=None, pos=None, loops=False, format=None, boundary=[], weighted=False, implementation='networkx', sparse=True, vertex_labels=True, **kwds): if implementation == 'networkx': import networkx from sage.graphs.base.graph_backends import NetworkXGraphBackend elif implementation == 'c_graph': from sage.graphs.base.sparse_graph import SparseGraphBackend from sage.graphs.base.dense_graph import DenseGraphBackend if kwds.get('multiedges', False) or weighted: sparse = True CGB = SparseGraphBackend if sparse else DenseGraphBackend else: raise NotImplementedError() from sage.structure.element import is_Matrix self._weighted = weighted if format is None: if is_Matrix(data): if data.is_square(): format = 'adjacency_matrix' else: format = 'incidence_matrix' elif isinstance(data, DiGraph): if implementation == 'networkx': self._backend = NetworkXGraphBackend(data.networkx_graph()) self.loops(data.loops()) self.multiple_edges(data.multiple_edges()) self.name(data.name()) elif implementation == 'c_graph': if not sparse and data.multiple_edges(): raise TypeError("Dense graphs do not support multiple edges.") self._backend = CGB(data.num_verts()) self.loops(data.loops()) self.multiple_edges(data.multiple_edges()) self.name(data.name()) if data.vertices() != range(data.num_verts()): verts = data.vertices() self._backend.relabel(dict([[i, verts[i]] for i in xrange(data.num_verts())]), False) for u,v,l in data.edge_iterator(): self._backend.add_edge(u,v,l,False) elif hasattr(data, 'adj'): import networkx if isinstance(data, (networkx.XGraph, networkx.Graph)) and not isinstance(data, (networkx.XDiGraph, networkx.DiGraph)): data = data.to_directed() if isinstance(data, (networkx.XDiGraph, networkx.DiGraph)): if implementation == 'networkx': if isinstance(data, networkx.XDiGraph): self._backend = NetworkXGraphBackend(data) else: self._backend = NetworkXGraphBackend(networkx.XDiGraph(data, selfloops=loops, **kwds)) elif implementation == 'c_graph': keys = data.adj.keys() for u in data: for v in data[u]: if v not in keys: keys.append(v) if not sparse and isinstance(data, networkx.XDiGraph) and data.multiedges: raise TypeError("Dense graphs do not support multiple edges.") self._backend = CGB(data.order()) self.loops(loops) self.multiple_edges(kwds.get('multiedges', False)) if sorted(keys) != range(data.order()): self._backend.relabel(dict([[i, keys[i]] for i in xrange(len(keys))]), False) if isinstance(data, networkx.XDiGraph): for u,v,l in data.edges_iter(): self.add_edge(u,v,l) else: for u,v in data.edges_iter(): self.add_edge(u,v) else: raise NotImplementedError() elif isinstance(data, str): format = 'dig6' elif isinstance(data,list) and len(data)>=2 and callable(data[1]): if implementation == 'networkx': # Pass XGraph a dict of lists describing the adjacencies self._backend = NetworkXGraphBackend(networkx.XDiGraph(dict([[i]+[[j for j in data[0] if data[1](i,j)]] for i in data[0]]), selfloops=loops, **kwds)) elif implementation == 'c_graph': self._backend = CGB(len(data[0])) if sorted(data[0]) != range(len(data[0])): verts = data[0] self._backend.relabel(dict([[i, verts[i]] for i in xrange(len(data[0]))]), False) for u in xrange(len(data[0])): for v in xrange(len(data[0])): uu,vv = data[0][u], data[0][v] if data[1](uu,vv): self.add_edge(uu,vv) self.loops(loops) elif isinstance(data, dict): if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph(data, selfloops=loops, **kwds)) elif implementation == 'c_graph': keys = data.keys() for u in data: if isinstance(data[u], (list,dict)): for v in data[u]: if v not in keys: keys.append(v) else: raise TypeError("Dict must be in NetworkX format. (was: %s)"%data) self._backend = CGB(len(keys)) self.loops(loops) self.multiple_edges(kwds.get('multiedges', False)) if sorted(keys) != range(len(keys)): verts = keys self._backend.relabel(dict([[i, verts[i]] for i in xrange(len(keys))]), False) for u in data: if isinstance(data[u], dict): for v in data[u].keys(): if data[u][v] is None and not self.has_edge(u,v): self.add_edge(u, v) elif data[u][v] is not None and not self.has_edge(u,v,data[u][v]): self.add_edge(u, v, data[u][v]) elif isinstance(data[u], list): for v in data[u]: if not self.has_edge(u,v): self.add_edge(u, v) elif isinstance(data, (int, Integer)): if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph(selfloops=loops, **kwds)) self.add_vertices(xrange(data)) elif implementation == 'c_graph': self._backend = CGB(data) self.loops(loops) self.multiple_edges(kwds.get('multiedges',False)) self.name(kwds.get('name','')) else: if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph(data, selfloops=loops, **kwds)) elif implementation == 'c_graph': if data is None: self._backend = CGB(0) self.loops(loops) self.multiple_edges(kwds.get('multiedges',False)) else: raise NotImplementedError("Datatype not suppported for C graphs.") if format == 'adjacency_matrix': if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph(selfloops = loops, **kwds)) self.add_vertices(xrange(data.nrows())) else: self._backend = CGB(data.nrows()) self.loops(loops) e = [] for i,j in data.nonzero_positions(): if i == j and loops and kwds.get('multiedges',False): e += [(i,j)]*int(data[i][j]) elif i == j and loops: e.append((i,j)) elif not i == j and kwds.get('multiedges',False): e += [(i,j)]*int(data[i][j]) elif not i == j: e.append((i,j)) self.add_edges(e) elif format == 'weighted_adjacency_matrix': self._weighted = True if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph(d, selfloops = loops, **kwds)) self.add_vertices(xrange(data.nrows())) else: self._backend = CGB(data.nrows()) self.loops(loops) e = [] for i,j in data.nonzero_positions(): if i != j: e.append((i,j,data[i][j])) elif i == j and loops: e.append((i,j,data[i][j])) self.add_edges(e) elif format == 'incidence_matrix': b = True for c in data.columns(): d = c.dict() if not len(d) == 2: b = False else: k = d.keys() if not d[k[0]] == -1 * d[k[1]]: b = False if not b: raise AttributeError, "Incidence Matrix must have one 1 and one -1 per column." if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph(selfloops = loops, **kwds)) self.add_vertices(xrange(data.nrows())) else: self._backend = CGB(data.nrows()) e = [] for c in data.columns(): k = c.dict().keys() if c[k[0]] == -1: e.append((k[0],k[1])) else: e.append((k[1],k[0])) self.add_edges(e) elif format == 'dig6': if not isinstance(data, str): raise ValueError, 'If input format is dig6, then data must be a string.' n = data.find('\n') if n == -1: n = len(data) ss = data[:n] n, s = graph_fast.N_inverse(ss) m = graph_fast.D_inverse(s, n) expected = n**2 if len(m) > expected: raise RuntimeError("The string (%s) seems corrupt: for n = %d, the string is too long."%(ss,n)) elif len(m) < expected: raise RuntimeError("The string (%s) seems corrupt: for n = %d, the string is too short."%(ss,n)) if implementation == 'networkx': self._backend = NetworkXGraphBackend(networkx.XDiGraph()) self.add_vertices(xrange(n)) else: self._backend = CGB(n) k = 0 for i in range(n): for j in range(n): if m[k] == '1': self.add_edge(i, j) k += 1 self.loops(False) self._pos = pos self._boundary = boundary self.name( kwds.get('name', None) )
10ebcd28fb1acd0f4fd364be4be0a9722f9379fe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/10ebcd28fb1acd0f4fd364be4be0a9722f9379fe/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 8381, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 8381, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 501, 33, 7036, 16, 949, 33, 7036, 16, 14075, 33, 8381, 16, 740, 33, 7036, 16, 7679, 22850, 6487, 13747, 33, 8381, 16, 4471, 2218, 5185, 92, 2187, 9387, ...
strip --strip-all libfreetype-6.dll
dlltool -D libfreetype-6.dll -d freetype.def -l libfreetype.dll.a
5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 302, 2906, 6738, 300, 40, 2561, 74, 266, 5872, 17, 26, 18, 27670, 300, 72, 22010, 5872, 18, 536, 300, 80, 2561, 74, 266, 5872, 18, 27670, 18, 69, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 302, 2906, 6738, 300, 40, 2561, 74, 266, 5872, 17, 26, 18, 27670, 300, 72, 22010, 5872, 18, 536, 300, 80, 2561, 74, 266, 5872, 18, 27670, 18, 69, 2, -100, -100, -100, -100, -100, -100, -10...
return self.path.joinpath(netloc, upath[1:])
return self.path.joinpath(netloc, upath.strip('/'))
def filepath(self, uri): """Return a path object to the uri in the cache.
2ae79776959ca2db73d75db6abc360a4c38f76f4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/2ae79776959ca2db73d75db6abc360a4c38f76f4/datasource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3608, 12, 2890, 16, 2003, 4672, 3536, 990, 279, 589, 733, 358, 326, 2003, 316, 326, 1247, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3608, 12, 2890, 16, 2003, 4672, 3536, 990, 279, 589, 733, 358, 326, 2003, 316, 326, 1247, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
autoremovalnames += catalog[catalogname]['autoremoveitems']
if catalogname in catalog.keys(): autoremovalnames += catalog[catalogname]['autoremoveitems']
def getAutoRemovalItems(installinfo, cataloglist): '''Gets a list of items marked for automatic removal from the catalogs in cataloglist. Filters those against items in the managed_installs list, which should contain everything that is supposed to be installed. ''' autoremovalnames = [] for catalogname in cataloglist: autoremovalnames += catalog[catalogname]['autoremoveitems'] #print "Managed Installs: ", installinfo.get('managed_installs',[]) already_processed_names = [item['name'] for item in installinfo.get('managed_installs',[])] #print "Removals: ", installinfo.get('removals',[]) already_processed_names += [item['manifestitem'] for item in installinfo.get('removals',[])] autoremovalnames = [item for item in autoremovalnames if item not in already_processed_names] #print "Auto removal names: ", autoremovalnames return autoremovalnames
5350042f4ddfb098468c8d75b15dfa28757b9321 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/5350042f4ddfb098468c8d75b15dfa28757b9321/updatecheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26707, 24543, 3126, 12, 5425, 1376, 16, 6222, 1098, 4672, 9163, 3002, 279, 666, 434, 1516, 9350, 364, 5859, 14817, 628, 326, 26455, 316, 6222, 1098, 18, 14475, 5348, 5314, 1516, 316, 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, 26707, 24543, 3126, 12, 5425, 1376, 16, 6222, 1098, 4672, 9163, 3002, 279, 666, 434, 1516, 9350, 364, 5859, 14817, 628, 326, 26455, 316, 6222, 1098, 18, 14475, 5348, 5314, 1516, 316, 326, ...
"""
Call the method that enters BreakStrands_Command. (After entering the command) Also make sure that all the other actions on the DnaFlyout toolbar are unchecked AND the BreakStrands Action is checked. """
def activateBreakStrands_Command(self, isChecked): """ """ self.win.enterBreakStrandCommand(isChecked) #Uncheck all the actions except the break strands action #in the flyout toolbar (subcontrol area) for action in self.subControlActionGroup.actions(): if action is not self.breakStrandAction and action.isChecked(): action.setChecked(False)
5fcd9a5eea664a197838b9ac668a4b53d9dc6abd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/5fcd9a5eea664a197838b9ac668a4b53d9dc6abd/Ui_DnaFlyout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 7634, 1585, 5708, 67, 2189, 12, 2890, 16, 31041, 4672, 3049, 326, 707, 716, 3281, 414, 17030, 1585, 5708, 67, 2189, 18, 261, 4436, 19014, 326, 1296, 13, 8080, 1221, 3071, 716, 777...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 7634, 1585, 5708, 67, 2189, 12, 2890, 16, 31041, 4672, 3049, 326, 707, 716, 3281, 414, 17030, 1585, 5708, 67, 2189, 18, 261, 4436, 19014, 326, 1296, 13, 8080, 1221, 3071, 716, 777...
self.assertIs(p.poll(), None)
self.assertIsNone(p.poll())
def test_kill(self): p = subprocess.Popen([sys.executable, "-c", "input()"])
13548cc3492ea2f1520b9e2fb970f9a9ff78cfb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/13548cc3492ea2f1520b9e2fb970f9a9ff78cfb0/test_subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16418, 12, 2890, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 2630, 10031, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16418, 12, 2890, 4672, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 315, 2630, 10031, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if titleistarget:
if not has_explicit_title:
def xfileref_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): env = inliner.document.settings.env if not typ: typ = env.config.default_role else: typ = typ.lower() text = utils.unescape(text) # if the first character is a bang, don't cross-reference at all if text[0:1] == '!': text = _fix_parens(typ, text[1:], env) return [innernodetypes.get(typ, nodes.literal)( rawtext, text, classes=['xref'])], [] # we want a cross-reference, create the reference node nodeclass = (typ == 'download') and addnodes.download_reference or \ addnodes.pending_xref pnode = nodeclass(rawtext, reftype=typ, refcaption=False, modname=env.currmodule, classname=env.currclass) # we may need the line number for warnings pnode.line = lineno # look if explicit title and target are given with `foo <bar>` syntax has_explicit_title, title, target = split_explicit_title(text) if has_explicit_title: pnode['refcaption'] = True # special target for Python object cross-references if typ in ('data', 'exc', 'func', 'class', 'const', 'attr', 'meth', 'mod', 'obj'): # fix-up parentheses in link title if not has_explicit_title: title = title.lstrip('.') # only has a meaning for the target target = target.lstrip('~') # only has a meaning for the title title = _fix_parens(typ, title, env) # if the first character is a tilde, don't display the module/class # parts of the contents if title[0:1] == '~': title = title[1:] dot = title.rfind('.') if dot != -1: title = title[dot+1:] # remove parentheses from the target too if target.endswith('()'): target = target[:-2] # if the first character is a dot, search more specific namespaces first # else search builtins first if target[0:1] == '.': target = target[1:] pnode['refspecific'] = True # some other special cases for the target elif typ == 'option': program = env.currprogram if not has_explicit_title: if ' ' in title and not (title.startswith('/') or title.startswith('-')): program, target = re.split(' (?=-|--|/)', title, 1) program = ws_re.sub('-', program) target = target.strip() elif ' ' in target: program, target = re.split(' (?=-|--|/)', target, 1) program = ws_re.sub('-', program) pnode['refprogram'] = program elif typ == 'term': # normalize whitespace in definition terms (if the term reference is # broken over a line, a newline will be in target) target = ws_re.sub(' ', target).lower() elif typ == 'ref': # reST label names are always lowercased target = ws_re.sub('', target).lower() elif typ == 'cfunc': # fix-up parens for C functions too if titleistarget: title = _fix_parens(typ, title, env) # remove parentheses from the target too if target.endswith('()'): target = target[:-2] else: # remove all whitespace to avoid referencing problems target = ws_re.sub('', target) pnode['reftarget'] = target pnode += innernodetypes.get(typ, nodes.literal)(rawtext, title, classes=['xref']) return [pnode], []
a08c64709eb36335d2965d6e04c6dd2c271468ff /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7032/a08c64709eb36335d2965d6e04c6dd2c271468ff/roles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 619, 7540, 822, 74, 67, 4615, 12, 12846, 16, 1831, 955, 16, 977, 16, 7586, 16, 316, 7511, 264, 16, 702, 28793, 913, 33, 8526, 4672, 1550, 273, 316, 7511, 264, 18, 5457, 18, 4272, 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, 619, 7540, 822, 74, 67, 4615, 12, 12846, 16, 1831, 955, 16, 977, 16, 7586, 16, 316, 7511, 264, 16, 702, 28793, 913, 33, 8526, 4672, 1550, 273, 316, 7511, 264, 18, 5457, 18, 4272, 18,...
total+=string.atof(string.split(element)[col])
total+=float(element.split()[col])
def _col_ave(list,col):
b6f4304a9e1c98ac4ed81730027b28d8219fd7b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/b6f4304a9e1c98ac4ed81730027b28d8219fd7b6/NOEtools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1293, 67, 836, 12, 1098, 16, 1293, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1652, 389, 1293, 67, 836, 12, 1098, 16, 1293, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
rec = (self, util.Set())
rec = CompileTrigger(self)
def _add_compile_trigger(self, argument): """given an argument which is either a Class or a Mapper, sets a "compile trigger" indicating this mapper should be compiled directly after the given mapper (or class's mapper) is compiled.""" if isinstance(argument, Mapper): classkey = argument.class_key else: classkey = ClassKey(argument, None) try: rec = _compile_triggers[self] except KeyError: # a tuple of: (mapper to be compiled, Set of classkeys of mappers to be compiled first) rec = (self, util.Set()) _compile_triggers[self] = rec if classkey in rec[1]: return
6ca6b3552257e40252b619123973e0f40d6fa0f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1074/6ca6b3552257e40252b619123973e0f40d6fa0f5/mapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 11100, 67, 10668, 12, 2890, 16, 1237, 4672, 3536, 10822, 392, 1237, 1492, 353, 3344, 279, 1659, 578, 279, 19273, 16, 1678, 279, 315, 11100, 3080, 6, 11193, 333, 5815, 1410...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 11100, 67, 10668, 12, 2890, 16, 1237, 4672, 3536, 10822, 392, 1237, 1492, 353, 3344, 279, 1659, 578, 279, 19273, 16, 1678, 279, 315, 11100, 3080, 6, 11193, 333, 5815, 1410...
descr = p.get_description().strip()
if p.get_description(): descr = p.get_description().strip() else: descr = '<empty message>' options.edit_patches = True
def __build_message(tmpl, patch, patch_nr, total_nr, msg_id, ref_id, options): """Build the message to be sent via SMTP """ p = crt_series.get_patch(patch) descr = p.get_description().strip() descr_lines = descr.split('\n') short_descr = descr_lines[0].rstrip() long_descr = '\n'.join(descr_lines[1:]).lstrip() authname = p.get_authname(); authemail = p.get_authemail(); commname = p.get_commname(); commemail = p.get_commemail(); sender = __get_sender() fromauth = '%s <%s>' % (authname, authemail) if fromauth != sender: fromauth = 'From: %s\n\n' % fromauth else: fromauth = '' if options.version: version_str = ' %s' % options.version else: version_str = '' if options.prefix: prefix_str = options.prefix + ' ' else: confprefix = config.get('stgit.mail.prefix') if confprefix: prefix_str = confprefix + ' ' else: prefix_str = '' if options.diff_opts: diff_flags = options.diff_opts.split() else: diff_flags = [] total_nr_str = str(total_nr) patch_nr_str = str(patch_nr).zfill(len(total_nr_str)) if not options.unrelated and total_nr > 1: number_str = ' %s/%s' % (patch_nr_str, total_nr_str) else: number_str = '' tmpl_dict = {'patch': patch, 'sender': sender, # for backward template compatibility 'maintainer': sender, 'shortdescr': short_descr, 'longdescr': long_descr, # for backward template compatibility 'endofheaders': '', 'diff': git.diff( rev1 = git_id(crt_series, '%s//bottom' % patch), rev2 = git_id(crt_series, '%s//top' % patch), diff_flags = diff_flags), 'diffstat': git.diffstat( rev1 = git_id(crt_series, '%s//bottom'%patch), rev2 = git_id(crt_series, '%s//top' % patch)), # for backward template compatibility 'date': '', 'version': version_str, 'prefix': prefix_str, 'patchnr': patch_nr_str, 'totalnr': total_nr_str, 'number': number_str, 'fromauth': fromauth, 'authname': authname, 'authemail': authemail, 'authdate': p.get_authdate(), 'commname': commname, 'commemail': commemail} # change None to '' for key in tmpl_dict: if not tmpl_dict[key]: tmpl_dict[key] = '' try: msg_string = tmpl % tmpl_dict except KeyError, err: raise CmdException, 'Unknown patch template variable: %s' \ % err except TypeError: raise CmdException, 'Only "%(name)s" variables are ' \ 'supported in the patch template' if options.edit_patches: msg_string = __edit_message(msg_string) # The Python email message try: msg = email.message_from_string(msg_string) except Exception, ex: raise CmdException, 'template parsing error: %s' % str(ex) if options.auto: extra_cc = __get_signers_list(descr) else: extra_cc = [] __build_address_headers(msg, options, extra_cc) __build_extra_headers(msg, msg_id, ref_id) __encode_message(msg) return msg
f3cec16e70129a705ec33feacf1cfbc6258ed8a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12366/f3cec16e70129a705ec33feacf1cfbc6258ed8a8/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3510, 67, 2150, 12, 24717, 16, 4729, 16, 4729, 67, 11611, 16, 2078, 67, 11611, 16, 1234, 67, 350, 16, 1278, 67, 350, 16, 702, 4672, 3536, 3116, 326, 883, 358, 506, 3271, 3970, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3510, 67, 2150, 12, 24717, 16, 4729, 16, 4729, 67, 11611, 16, 2078, 67, 11611, 16, 1234, 67, 350, 16, 1278, 67, 350, 16, 702, 4672, 3536, 3116, 326, 883, 358, 506, 3271, 3970, ...
if scanner.next() != IHREAL:
if scanner.next() != "IHREAL":
def eta(): "Use computer to get estimated time of arrival for a warp jump." w1 = coord(); w2 = coord() prompt = False if damaged(DCOMPTR): prout(_("COMPUTER DAMAGED, USE A POCKET CALCULATOR.")) skip(1) return if scanner.next() != IHREAL: prompt = True scanner.chew() proutn(_("Destination quadrant and/or sector? ")) if scanner.next()!=IHREAL: huh() return w1.j = int(scanner.real-0.5) if scanner.next() != IHREAL: huh() return w1.i = int(scanner.real-0.5) if scanner.next() == IHREAL: w2.j = int(scanner.real-0.5) if scanner.next() != IHREAL: huh() return w2.i = int(scanner.real-0.5) else: if game.quadrant.j>w1.i: w2.i = 0 else: w2.i=QUADSIZE-1 if game.quadrant.i>w1.j: w2.j = 0 else: w2.j=QUADSIZE-1 if not VALID_QUADRANT(w1.i, w1.j) or not VALID_SECTOR(w2.i, w2.j): huh() return game.dist = math.sqrt((w1.j-game.quadrant.j+0.1*(w2.j-game.sector.j))**2+ (w1.i-game.quadrant.i+0.1*(w2.i-game.sector.i))**2) wfl = False if prompt: prout(_("Answer \"no\" if you don't know the value:")) while True: scanner.chew() proutn(_("Time or arrival date? ")) if scanner.next()==IHREAL: ttime = scanner.real if ttime > game.state.date: ttime -= game.state.date # Actually a star date twarp=(math.floor(math.sqrt((10.0*game.dist)/ttime)*10.0)+1.0)/10.0 if ttime <= 1e-10 or twarp > 10: prout(_("We'll never make it, sir.")) scanner.chew() return if twarp < 1.0: twarp = 1.0 break scanner.chew() proutn(_("Warp factor? ")) if scanner.next()== IHREAL: wfl = True twarp = scanner.real if twarp<1.0 or twarp > 10.0: huh() return break prout(_("Captain, certainly you can give me one of these.")) while True: scanner.chew() ttime = (10.0*game.dist)/twarp**2 tpower = game.dist*twarp*twarp*twarp*(game.shldup+1) if tpower >= game.energy: prout(_("Insufficient energy, sir.")) if not game.shldup or tpower > game.energy*2.0: if not wfl: return proutn(_("New warp factor to try? ")) if scanner.next() == IHREAL: wfl = True twarp = scanner.real if twarp<1.0 or twarp > 10.0: huh() return continue else: scanner.chew() skip(1) return prout(_("But if you lower your shields,")) proutn(_("remaining")) tpower /= 2 else: proutn(_("Remaining")) prout(_(" energy will be %.2f.") % (game.energy-tpower)) if wfl: prout(_("And we will arrive at stardate %.2f.") % (game.state.date+ttime)) elif twarp==1.0: prout(_("Any warp speed is adequate.")) else: prout(_("Minimum warp needed is %.2f,") % (twarp)) prout(_("and we will arrive at stardate %.2f.") % (game.state.date+ttime)) if game.state.remtime < ttime: prout(_("Unfortunately, the Federation will be destroyed by then.")) if twarp > 6.0: prout(_("You'll be taking risks at that speed, Captain")) if (game.isatb==1 and game.state.kscmdr == w1 and \ scheduled(FSCDBAS)< ttime+game.state.date) or \ (scheduled(FCDBAS)<ttime+game.state.date and game.battle == w1): prout(_("The starbase there will be destroyed by then.")) proutn(_("New warp factor to try? ")) if scanner.next() == IHREAL: wfl = True twarp = scanner.real if twarp<1.0 or twarp > 10.0: huh() return else: scanner.chew() skip(1) return
af15867a294e48006eba4fd9997cae401ccbfb05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/af15867a294e48006eba4fd9997cae401ccbfb05/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14251, 13332, 315, 3727, 26579, 358, 336, 13137, 813, 434, 2454, 5162, 364, 279, 341, 11441, 11833, 1199, 341, 21, 273, 2745, 5621, 341, 22, 273, 2745, 1435, 6866, 273, 1083, 309, 302, 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, 14251, 13332, 315, 3727, 26579, 358, 336, 13137, 813, 434, 2454, 5162, 364, 279, 341, 11441, 11833, 1199, 341, 21, 273, 2745, 5621, 341, 22, 273, 2745, 1435, 6866, 273, 1083, 309, 302, 3...
"DateSubmitted varchar(128),"+
"DateSubmitted datetime,"+
def __init__ (self): options = OptionsStore() try: #print options.db_driver_out self.database = create_database(options.db_driver_out +"://"+ options.db_user_out +":"+ options.db_password_out +"@"+ options.db_hostname_out+":"+ options.db_port_out+"/"+ options.db_database_out) except DatabaseModuleError, e: raise DBDatabaseDriverNotAvailable (str (e)) except ImportError: raise DBDatabaseDriverNotSupported except: raise
900bfa3da083243a22e8a8fa703346e76a043583 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10888/900bfa3da083243a22e8a8fa703346e76a043583/SqlBug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 702, 273, 5087, 2257, 1435, 225, 775, 30, 468, 1188, 702, 18, 1966, 67, 7407, 67, 659, 365, 18, 6231, 273, 752, 67, 6231, 12, 2116, 18, 1966, 67, 74...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 702, 273, 5087, 2257, 1435, 225, 775, 30, 468, 1188, 702, 18, 1966, 67, 7407, 67, 659, 365, 18, 6231, 273, 752, 67, 6231, 12, 2116, 18, 1966, 67, 74...
os.remove(filename)
if not debug: os.remove(filename)
def call_gnucap(self): if not self.components: if debug: print "call_gnucap: No component" self.gnucap_timer = 0 return connected = 0 for component in self.components: if component.is_connected(): connected = 1
36ffbab600fc135abd08551835331076ae3eab04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/36ffbab600fc135abd08551835331076ae3eab04/electric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 67, 1600, 5286, 438, 12, 2890, 4672, 309, 486, 365, 18, 8119, 30, 309, 1198, 30, 1172, 315, 1991, 67, 1600, 5286, 438, 30, 2631, 1794, 6, 365, 18, 1600, 5286, 438, 67, 12542, 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, 745, 67, 1600, 5286, 438, 12, 2890, 4672, 309, 486, 365, 18, 8119, 30, 309, 1198, 30, 1172, 315, 1991, 67, 1600, 5286, 438, 30, 2631, 1794, 6, 365, 18, 1600, 5286, 438, 67, 12542, 27...
if request.method == 'POST': if(not id): form = PersonRelationsForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("1") else: return HttpResponse("0") else: personrelations = PersonRelations.objects.get(id=id) form = PersonRelationsForm(request.POST, instance = personrelations) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
if request.method == 'POST': if(not id): form = PersonRelationsForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("1") else: return HttpResponse("0") else: personrelations = PersonRelations.objects.get(id=id) form = PersonRelationsForm(request.POST, instance = personrelations) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
def save_personrelation_offline(request, id): if request.method == 'POST': if(not id): form = PersonRelationsForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("1") else: return HttpResponse("0") else: personrelations = PersonRelations.objects.get(id=id) form = PersonRelationsForm(request.POST, instance = personrelations) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 12479, 5488, 67, 23787, 12, 2293, 16, 612, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 309, 12, 902, 612, 4672, 646, 273, 11573, 10666, 1204, 12, 2293, 18, 3798, 13, 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, 1923, 67, 12479, 5488, 67, 23787, 12, 2293, 16, 612, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 309, 12, 902, 612, 4672, 646, 273, 11573, 10666, 1204, 12, 2293, 18, 3798, 13, 309,...
def configuration(parent_package='',parent_path=None): from scipy.distutils.system_info import get_info package = 'cluster' local_path = get_path(__name__,parent_path) config = Configuration(package,parent_package)
def configuration(parent_package='',top_path=None): from scipy.distutils.misc_util import Configuration config = Configuration('cluster',parent_package,top_path) config.add_data_dir('tests')
def configuration(parent_package='',parent_path=None): from scipy.distutils.system_info import get_info package = 'cluster' local_path = get_path(__name__,parent_path) config = Configuration(package,parent_package) config.add_extension('_vq', sources=[join('src', 'vq_wrap.cpp')]) return config
64d85ae8d3fb0f7cebd49730623ca86bac49fef6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/64d85ae8d3fb0f7cebd49730623ca86bac49fef6/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 4672, 628, 10966, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 642, 273, 4659, 2668, 7967, 2187, 2938, 67, 5610, 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, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 4672, 628, 10966, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 642, 273, 4659, 2668, 7967, 2187, 2938, 67, 5610, 16, ...
authz_file = env.config.get('trac','authz_file')
authz_file = env.config.get('trac', 'authz_file')
def SubversionAuthorizer(env, authname): authz_file = env.config.get('trac','authz_file') if not authz_file: return Authorizer() module_name = env.config.get('trac','authz_module_name','') db = env.get_db_cnx() return RealSubversionAuthorizer(db, authname, module_name, authz_file)
10691b08b6b4d2d6c4a8e4345aae1268f5dbc412 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10691b08b6b4d2d6c4a8e4345aae1268f5dbc412/svn_authz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2592, 1589, 17170, 12, 3074, 16, 1357, 529, 4672, 18686, 67, 768, 273, 1550, 18, 1425, 18, 588, 2668, 313, 1077, 2187, 296, 1944, 94, 67, 768, 6134, 309, 486, 18686, 67, 768, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2592, 1589, 17170, 12, 3074, 16, 1357, 529, 4672, 18686, 67, 768, 273, 1550, 18, 1425, 18, 588, 2668, 313, 1077, 2187, 296, 1944, 94, 67, 768, 6134, 309, 486, 18686, 67, 768, 30, 327, ...
return all[0]
return all and all[0]
def guess_extension(ctype, ext): # mimetypes maps multiple extensions to the same type, e.g. .doc, .dot, # and .wiz are all mapped to application/msword. This sucks for finding # the best reverse mapping. If the extension is one of the giving # mappings, we'll trust that, otherwise we'll just guess. :/ all = guess_all_extensions(ctype, strict=0) if ext in all: return ext return all[0]
cb051571464241022bec312d78d5b3da320c5f5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/cb051571464241022bec312d78d5b3da320c5f5b/Scrubber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 6447, 12, 12387, 16, 1110, 4672, 468, 20369, 15180, 7565, 3229, 4418, 358, 326, 1967, 618, 16, 425, 18, 75, 18, 263, 2434, 16, 263, 9811, 16, 468, 471, 263, 91, 452, 854, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 6447, 12, 12387, 16, 1110, 4672, 468, 20369, 15180, 7565, 3229, 4418, 358, 326, 1967, 618, 16, 425, 18, 75, 18, 263, 2434, 16, 263, 9811, 16, 468, 471, 263, 91, 452, 854, 7...
WindowSched.enter(child.my_number*1000, 0, my_ringer, child)
WindowSched.enter(child.my_number*1000, 0, my_ringer, (child,))
def my_hook(child): # schedule for the bell to ring in N seconds; cancel previous if child.my_id: WindowSched.cancel(child.my_id) child.my_id = \ WindowSched.enter(child.my_number*1000, 0, my_ringer, child)
43cd7e837d69dc6ba28321625ed28e476a5f4a76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/43cd7e837d69dc6ba28321625ed28e476a5f4a76/TestSched.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 4476, 12, 3624, 4672, 468, 4788, 364, 326, 324, 1165, 358, 9221, 316, 423, 3974, 31, 3755, 2416, 309, 1151, 18, 4811, 67, 350, 30, 6076, 55, 2049, 18, 10996, 12, 3624, 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, 3399, 67, 4476, 12, 3624, 4672, 468, 4788, 364, 326, 324, 1165, 358, 9221, 316, 423, 3974, 31, 3755, 2416, 309, 1151, 18, 4811, 67, 350, 30, 6076, 55, 2049, 18, 10996, 12, 3624, 18, ...
self.shell.th_ended_event.wait(0.01)
self.shell.th_ended_event.wait(0.001)
def alpm_run_in_thread_and_wait(self, method, args): th_obj = None self.run_in_thread(method, args)
0e2af9ea0c3ad00f5a8c4bcd11a7554a8c61e8c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2759/0e2af9ea0c3ad00f5a8c4bcd11a7554a8c61e8c5/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 2681, 67, 267, 67, 5930, 67, 464, 67, 7048, 12, 2890, 16, 707, 16, 833, 4672, 286, 67, 2603, 273, 599, 365, 18, 2681, 67, 267, 67, 5930, 12, 2039, 16, 833, 13, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 524, 7755, 67, 2681, 67, 267, 67, 5930, 67, 464, 67, 7048, 12, 2890, 16, 707, 16, 833, 4672, 286, 67, 2603, 273, 599, 365, 18, 2681, 67, 267, 67, 5930, 12, 2039, 16, 833, 13, 2, ...
return "%s.%s" % (mod.__name__, cls_name)
name = mod.__name__ if name.startswith('org.python.core.'): name = name[len('org.python.core.'):] return "%s.%s" % (name, cls_name)
def nice_classname(obj): """Returns a nice name for class object or class instance. >>> nice_classname(Exception()) # doctest: +ELLIPSIS '...Exception' >>> nice_classname(Exception) 'exceptions.Exception' """ if inspect.isclass(obj): cls_name = obj.__name__ else: cls_name = obj.__class__.__name__ mod = inspect.getmodule(obj) if mod: return "%s.%s" % (mod.__name__, cls_name) else: return cls_name
da5a089e54366c87dcb0119522a4f9b68e8d8bd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11821/da5a089e54366c87dcb0119522a4f9b68e8d8bd0/xunit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13752, 67, 18340, 12, 2603, 4672, 3536, 1356, 279, 13752, 508, 364, 667, 733, 578, 667, 791, 18, 225, 4080, 13752, 67, 18340, 12, 503, 10756, 468, 31263, 395, 30, 397, 2247, 2053, 52, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13752, 67, 18340, 12, 2603, 4672, 3536, 1356, 279, 13752, 508, 364, 667, 733, 578, 667, 791, 18, 225, 4080, 13752, 67, 18340, 12, 503, 10756, 468, 31263, 395, 30, 397, 2247, 2053, 52, ...
else: possibleLinks.append((outS.name, inS.name))
else: possibleLinks.append((outS.name, inS.name))
def getPossibleConnections(self, outputs, inputs, outConnected, inConnected): possibleLinks = [] canConnect = 0 sameType = 0 for outS in outputs: outType = self.outWidget.instance.getOutputType(outS.name) if outType == None: print "Unable to find signal type for signal %s. Check the definition of the widget." % (outS.name) return None # report error for inS in inputs: inType = self.inWidget.instance.getInputType(inS.name) if inType == None: print "Unable to find signal type for signal %s. Check the definition of the widget." % (inS.name) return None # report error if issubclass(outType, inType): canConnect = 1 if (outS.name in outConnected) or (inS.name in inConnected): continue if issubclass(inType, outType): possibleLinks.insert(sameType, (outS.name, inS.name)) sameType += 1 else: possibleLinks.append((outS.name, inS.name)) return possibleLinks, canConnect, sameType
b58d113cf9b08a311e9ca3025590dc0045a6948c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/b58d113cf9b08a311e9ca3025590dc0045a6948c/orngDlgs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 13576, 9314, 12, 2890, 16, 6729, 16, 4540, 16, 596, 8932, 16, 316, 8932, 4672, 3323, 7100, 273, 5378, 848, 5215, 273, 374, 1967, 559, 273, 374, 364, 596, 55, 316, 6729, 30, 596, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13576, 9314, 12, 2890, 16, 6729, 16, 4540, 16, 596, 8932, 16, 316, 8932, 4672, 3323, 7100, 273, 5378, 848, 5215, 273, 374, 1967, 559, 273, 374, 364, 596, 55, 316, 6729, 30, 596, ...
if portal_type is None:
if portal_type is None or not ob:
def getChainFor(self, ob): """ monkey-patched by CMFPlacefulWorkflow to look for placeful workflow configurations. """ cbt = self._chains_by_type if type(ob) == type(''): portal_type = ob elif hasattr(aq_base(ob), '_getPortalTypeName'): portal_type = ob._getPortalTypeName() else: portal_type = None if portal_type is None: return () # Take some extra care when ob is a string is_policy_container=0 objectids=[] try: objectids = ob.objectIds() except AttributeError, TypeError: pass if WorkflowPolicyConfig_id in objectids: is_policy_container=1 if type(ob) != type('') and portal_type != None and not is_policy_container: # Inspired by implementation in CPSWorkflowTool.py of CPSCore 3.9.0 # Workflow needs to be determined by true containment not context # so we loop over the actual containers wfpolicyconfig = None current_ob = aq_inner(ob) portal = aq_base(getToolByName(self, 'portal_url').getPortalObject()) while wfpolicyconfig is None and current_ob is not None: if base_hasattr(current_ob, WorkflowPolicyConfig_id): wfpolicyconfig = getattr(current_ob, WorkflowPolicyConfig_id) elif aq_base(current_ob) is portal: break current_ob = aq_inner(aq_parent(current_ob)) if wfpolicyconfig is not None: # Was it here or did we acquire? start_here = base_hasattr(aq_parent(aq_inner(ob)), WorkflowPolicyConfig_id) chain = wfpolicyconfig.getPlacefulChainFor(portal_type, start_here=start_here) if chain is not None: return chain chain = None if cbt is not None: chain = cbt.get(portal_type, None) # Note that if chain is not in cbt or has a value of # None, we use a default chain. if chain is None: chain = self.getDefaultChainFor(ob) if chain is None: return () return chain
e9fc2120ee5c4bdfecc26f88d71d8409ed12d4a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11955/e9fc2120ee5c4bdfecc26f88d71d8409ed12d4a9/workflowtoolPatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30170, 1290, 12, 2890, 16, 3768, 4672, 3536, 6921, 856, 17, 2272, 329, 635, 385, 13542, 6029, 2706, 8484, 358, 2324, 364, 3166, 2706, 6095, 10459, 18, 3536, 2875, 88, 273, 365, 6315, 230...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30170, 1290, 12, 2890, 16, 3768, 4672, 3536, 6921, 856, 17, 2272, 329, 635, 385, 13542, 6029, 2706, 8484, 358, 2324, 364, 3166, 2706, 6095, 10459, 18, 3536, 2875, 88, 273, 365, 6315, 230...
all_images = len([True for c in node.getAllChildren() if c.__class__ not in [Row, Cell, ImageLink]]) > 0
all_images = True for row in node.children: for cell in row.children: for item in cell.children: if item.__class__ != ImageLink: all_images = False
def transformSingleColTables(self, node): # "not 'box' in node.attr(class)" is a hack to detect infoboxes and thelike. they are not split into divs. # tables like this should be detected and marked in a separate module probably single_col = node.__class__ == Table and node.numcols == 1 infobox = 'box' in node.attributes.get('class', '') is_long = len(node.getAllDisplayText()) > 500 if single_col: all_images = len([True for c in node.getAllChildren() if c.__class__ not in [Row, Cell, ImageLink]]) > 0 else: all_images = False if single_col and ( (not infobox and is_long) or all_images): if not node.parents: return divs = [] items = [] content_len = len(node.getAllDisplayText()) if content_len > 5000 or all_images: div_wrapper = False else: div_wrapper = True for row in node: for cell in row: if div_wrapper: d = Div() d.border = 1 d.vlist = node.vlist for item in cell: d.appendChild(item) divs.append(d) else: for item in cell: items.append(item) parent = node.parent if div_wrapper: parent.replaceChild(node, divs) self.report('replaced single col table with div. div children:', parent.children) else: parent.replaceChild(node, items) self.report('replaced single col table with items:', parent.children) for c in node.children: self.transformSingleColTables(c)
3ec8974e9ba497ab828642df7c2f5935eb823626 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/3ec8974e9ba497ab828642df7c2f5935eb823626/treecleaner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 5281, 914, 6905, 12, 2890, 16, 756, 4672, 468, 315, 902, 296, 2147, 11, 316, 756, 18, 1747, 12, 1106, 2225, 353, 279, 11769, 358, 5966, 1123, 15918, 471, 286, 292, 2547, 18, 2898...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2510, 5281, 914, 6905, 12, 2890, 16, 756, 4672, 468, 315, 902, 296, 2147, 11, 316, 756, 18, 1747, 12, 1106, 2225, 353, 279, 11769, 358, 5966, 1123, 15918, 471, 286, 292, 2547, 18, 2898...
str += _uid_to_uri(uid) + '">show&nbsp;private</a>'
str += self._uid_to_uri(uid) + '">show&nbsp;private</a>'
def _public_private_link(self, uid): """ @return: The HTML code for a link between the public & private copies of the documentation. @rtype: C{string} """ if self._show_private and _is_private(uid.name()): return ''
62ff4e473663c51d0a945a451e36120f11d9450a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/62ff4e473663c51d0a945a451e36120f11d9450a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 482, 67, 1152, 67, 1232, 12, 2890, 16, 4555, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 1692, 3086, 326, 1071, 473, 3238, 13200, 434, 326, 7323, 18, 632, 86, 723, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 482, 67, 1152, 67, 1232, 12, 2890, 16, 4555, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 1692, 3086, 326, 1071, 473, 3238, 13200, 434, 326, 7323, 18, 632, 86, 723, 30, ...
self.cRayNodePath.detachNode()
def off(self): """ Turn off the shadow placement. The shadow will still be there, but the z position will not be updated until a call to on() is made. """ assert self.notify.debugCall("activeCount=%s"%(self.activeCount,)) if not self.isActive: assert not self.cTrav.hasCollider(self.cRayNodePath) return assert self.cTrav.hasCollider(self.cRayNodePath) didIt = self.cTrav.removeCollider(self.cRayNodePath) assert didIt self.cRayNodePath.detachNode() # Now that we have disabled collisions, make one more pass # right now to ensure we aren't standing in a wall. self.oneTimeCollide() self.isActive = 0 if __debug__: self.activeCount -= 1 self.debugDisplay()
7e55872343b9a8057ba5502662338a7ee1a8c91a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/7e55872343b9a8057ba5502662338a7ee1a8c91a/ShadowPlacer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3397, 12, 2890, 4672, 3536, 22425, 3397, 326, 10510, 12607, 18, 225, 1021, 10510, 903, 4859, 506, 1915, 16, 1496, 326, 998, 1754, 903, 486, 506, 3526, 3180, 279, 745, 358, 603, 1435, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3397, 12, 2890, 4672, 3536, 22425, 3397, 326, 10510, 12607, 18, 225, 1021, 10510, 903, 4859, 506, 1915, 16, 1496, 326, 998, 1754, 903, 486, 506, 3526, 3180, 279, 745, 358, 603, 1435, 353...
line = self.in_buffer.strip() self.in_buffer = ""
line = ''.join(self.in_buffer).strip() self.in_buffer = [] self.in_buffer_len = 0
def found_terminator(self): line = self.in_buffer.strip() self.in_buffer = "" cmd = line.split(' ')[0].upper() space = line.find(' ') if space != -1: arg = line[space + 1:] else: arg = ""
2b49fa3de02dfdf4d413aa47c77cdf68f0b9d030 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/2b49fa3de02dfdf4d413aa47c77cdf68f0b9d030/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1392, 67, 9505, 639, 12, 2890, 4672, 980, 273, 875, 18, 5701, 12, 2890, 18, 267, 67, 4106, 2934, 6406, 1435, 365, 18, 267, 67, 4106, 273, 5378, 365, 18, 267, 67, 4106, 67, 1897, 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, 1392, 67, 9505, 639, 12, 2890, 4672, 980, 273, 875, 18, 5701, 12, 2890, 18, 267, 67, 4106, 2934, 6406, 1435, 365, 18, 267, 67, 4106, 273, 5378, 365, 18, 267, 67, 4106, 67, 1897, 273,...
optionlist = string.join(options, ' ') self.putcmd("mail", "FROM:%s %s" % (quoteaddr(sender) ,optionlist))
optionlist = ' ' + string.join(options, ' ') self.putcmd("mail", "FROM:%s%s" % (quoteaddr(sender) ,optionlist))
def mail(self,sender,options=[]): """SMTP 'mail' command -- begins mail xfer session.""" optionlist = '' if options and self.does_esmtp: optionlist = string.join(options, ' ') self.putcmd("mail", "FROM:%s %s" % (quoteaddr(sender) ,optionlist)) return self.getreply()
db23d3dbf73e3a1a0f9caa0e0a026aa933a61e9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/db23d3dbf73e3a1a0f9caa0e0a026aa933a61e9d/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4791, 12, 2890, 16, 15330, 16, 2116, 33, 8526, 4672, 3536, 55, 14636, 296, 4408, 11, 1296, 1493, 17874, 4791, 619, 586, 1339, 12123, 1456, 1098, 273, 875, 309, 702, 471, 365, 18, 20657, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4791, 12, 2890, 16, 15330, 16, 2116, 33, 8526, 4672, 3536, 55, 14636, 296, 4408, 11, 1296, 1493, 17874, 4791, 619, 586, 1339, 12123, 1456, 1098, 273, 875, 309, 702, 471, 365, 18, 20657, ...
def __del__(self): self.unregister()
def __del__(self): self.unregister()
ed7849ccda41906278ef1d4acdca6fba1e39c4d2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3020/ed7849ccda41906278ef1d4acdca6fba1e39c4d2/xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 365, 18, 318, 4861, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 365, 18, 318, 4861, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self._makeShadowCopy(var) self.dict[var] = data
self.setVar(var,data)
def __setitem__(self,var,data): self._makeShadowCopy(var) self.dict[var] = data
fb01c5daecbcb7eb05709ceceadb92e62f03d96b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2672/fb01c5daecbcb7eb05709ceceadb92e62f03d96b/data_smart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1726, 972, 12, 2890, 16, 1401, 16, 892, 4672, 365, 6315, 6540, 12957, 2951, 12, 1401, 13, 365, 18, 1576, 63, 1401, 65, 273, 501, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 542, 1726, 972, 12, 2890, 16, 1401, 16, 892, 4672, 365, 6315, 6540, 12957, 2951, 12, 1401, 13, 365, 18, 1576, 63, 1401, 65, 273, 501, 2, -100, -100, -100, -100, -100, -100, -100,...
"db_user": self.conf.get("Credentials", "aws_access_key_id"), "db_passwd": self.conf.get("Credentials", "aws_secret_access_key")
"db_user": self.config.get("Credentials", "aws_access_key_id"), "db_passwd": self.config.get("Credentials", "aws_secret_access_key")
def __init__(self, module, env="prod"): self.module = module self.env = env
8cba568c4e7199656e03b4c3ac0df9f7f823f07c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10599/8cba568c4e7199656e03b4c3ac0df9f7f823f07c/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1605, 16, 1550, 1546, 17672, 6, 4672, 365, 18, 2978, 273, 1605, 365, 18, 3074, 273, 1550, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1605, 16, 1550, 1546, 17672, 6, 4672, 365, 18, 2978, 273, 1605, 365, 18, 3074, 273, 1550, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertEqual(context.devices, [])
self.assertEqual(hw_context.devices, [])
def test_construction_1(self): hw_context = HardwareContext() self.assertEqual(context.devices, [])
ce54aa5c679c13f696fb5cc82e3ec222c5d9d937 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12617/ce54aa5c679c13f696fb5cc82e3ec222c5d9d937/test_dashboard_bundle_format_1_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 591, 4549, 67, 21, 12, 2890, 4672, 16139, 67, 2472, 273, 27438, 1042, 1435, 365, 18, 11231, 5812, 12, 2472, 18, 12506, 16, 5378, 13, 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, 1842, 67, 591, 4549, 67, 21, 12, 2890, 4672, 16139, 67, 2472, 273, 27438, 1042, 1435, 365, 18, 11231, 5812, 12, 2472, 18, 12506, 16, 5378, 13, 2, -100, -100, -100, -100, -100, -100, -1...
changeCommonscat (page, currentCommonscat, commonscatLink)
changeCommonscat (page, currentCommonscatTemplate, currentCommonscatTarget, primaryCommonscat, commonscatLink)
def addCommonscat (page = None, summary = None, always = False): ''' Take a page. Go to all the interwiki page looking for a commonscat template. When all the interwiki's links are checked and a proper category is found add it to the page. ''' wikipedia.output(u'Working on ' + page.title()); #Get the right templates for this page primaryCommonscat, commonscatAlternatives=getCommonscatTemplate(page.site().language()) commonscatLink = getCommonscatLink (page) if commonscatLink: wikipedia.output(u'Commonscat template is already on ' + page.title()); (currentCommonscatTemplate, currentCommonscatTarget) = commonscatLink checkedCommonscatTarget = checkCommonscatLink(currentCommonscatTarget) if (currentCommonscatTarget==checkedCommonscatTarget): #The current commonscat link is good wikipedia.output(u'Commonscat link at ' + page.title() + u' to Category:' + currentCommonscatTarget + u' is ok'); return (True, always) elif checkedCommonscatTarget!=u'': #We have a new Commonscat link, replace the old one changeCommonscat (page, currentCommonscatTemplate, currentCommonscat, primaryCommonscat, checkedCommonscat) return (True, always) else: #Commonscat link is wrong commonscatLink = findCommonscatLink(page) if (commonscatLink!=u''): changeCommonscat (page, currentCommonscat, commonscatLink) #else #Should i remove the commonscat link? elif skipPage(page): wikipedia.output("Found a template in the skip list. Skipping " + page.title()); else: commonscatLink = findCommonscatLink(page) if (commonscatLink!=u''): textToAdd = u'{{' + primaryCommonscat + u'|' + commonscatLink + u'}}' (success, status, always) = add_text.add_text(page, textToAdd, summary, None, None, always); return (True, always); return (True, always);
8a16e8705845d15cd9cd5cd8bd6edd9e10334a8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/8a16e8705845d15cd9cd5cd8bd6edd9e10334a8a/commonscat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6517, 1017, 270, 261, 2433, 273, 599, 16, 4916, 273, 599, 16, 3712, 273, 1083, 4672, 9163, 17129, 279, 1363, 18, 4220, 358, 777, 326, 1554, 13044, 1363, 7849, 364, 279, 2975, 1017, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6517, 1017, 270, 261, 2433, 273, 599, 16, 4916, 273, 599, 16, 3712, 273, 1083, 4672, 9163, 17129, 279, 1363, 18, 4220, 358, 777, 326, 1554, 13044, 1363, 7849, 364, 279, 2975, 1017, ...
intersects = intersects_all
def all_intersects(self, other): """ Returns True if each segmentlist in self intersects the corresponding segmentlist in other; returns False otherwise. """ for key, value in self.iteritems(): if key not in other or not other[key].intersects(value): return False return True
520d2d5c9ba3a388887bd08303f9bd636037f081 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3589/520d2d5c9ba3a388887bd08303f9bd636037f081/segments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 12288, 87, 12, 2890, 16, 1308, 4672, 3536, 2860, 1053, 309, 1517, 3267, 1098, 316, 365, 19791, 326, 4656, 3267, 1098, 316, 1308, 31, 225, 1135, 1083, 3541, 18, 3536, 364, 498, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 12288, 87, 12, 2890, 16, 1308, 4672, 3536, 2860, 1053, 309, 1517, 3267, 1098, 316, 365, 19791, 326, 4656, 3267, 1098, 316, 1308, 31, 225, 1135, 1083, 3541, 18, 3536, 364, 498, ...
localChanges = True etag = item.getAttributeValue('etag', default=None) if etag: davETag = dav.etag
if item.sharedVersion == -1: localChanges = True else: localChanges = HistoryChecker(item).isDirty() try: davItem = DAVItem.DAVItem(dav) davETag = davItem.etag etag = item.getAttributeValue('etag', default=None)
def syncItem(dav, item): # changes flags needsPut = False localChanges = False serverChanges = False # see if the local version has changed by comparing the last shared version # with the item's current version if item.sharedVersion != item._version: localChanges = True etag = item.getAttributeValue('etag', default=None) if etag: davETag = dav.etag # set serverChanges based on if the etags match serverChanges = (etag != davETag) # I need to understand the difference between strong etags # and weak ones... for now, pretend they are the same! if serverChanges: serverChanges = (etag != str('W/' + davETag)) else: # this is the first time this item has been shared. needsPut = True localChanges = True serverChanges = False log.info('Syncing %s (%s)' % (unicode(dav.url), item.getItemDisplayName())) log.info('|- needsPut %s' % (needsPut)) log.info('|- localChanges %s' % (localChanges)) log.info('`- serverChanges %s' % (serverChanges)) if serverChanges: log.info(' |-- our etag %s' % (etag)) log.info(' `-- svr etag %s' % (davETag)) if needsPut: dav.putResource(item.itsKind.itsName, 'text/plain') item.etag = dav.etag if serverChanges: # pull down server changes davItem = DAVItem.DAVItem(dav) # merge any local changes with server changes merge(dav, item, davItem, localChanges) if localChanges: # put back merged local changes syncToServer(dav, item) # because some server suck (moddav) and don't change the etag # when you change properties, lets force this # maybe use a "ptag" property instead of etags so we can change it # whenever dav.putResource(item.itsKind.itsName, 'text/plain') if serverChanges or localChanges: # Make sure we have the latest etag and lastModified # Note: some servers *cough*xythos*cough* change the etag when you # do a PROPPATCH item.etag = dav.etag #item.lastModified = dav.lastModified item.sharedVersion = item._version
16f96e6b86a64e6f85a2f9c226b558e66188b1aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/16f96e6b86a64e6f85a2f9c226b558e66188b1aa/Sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 1180, 12, 20752, 16, 761, 4672, 468, 3478, 2943, 4260, 6426, 273, 1083, 1191, 7173, 273, 1083, 1438, 7173, 273, 1083, 225, 468, 2621, 309, 326, 1191, 1177, 711, 3550, 635, 17553, 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, 3792, 1180, 12, 20752, 16, 761, 4672, 468, 3478, 2943, 4260, 6426, 273, 1083, 1191, 7173, 273, 1083, 1438, 7173, 273, 1083, 225, 468, 2621, 309, 326, 1191, 1177, 711, 3550, 635, 17553, 3...
"%s not in sys.path" % pth_file.imported) self.assertTrue(site.makepath(pth_file.good_dir_path)[0] in sys.path) self.assertTrue(not os.path.exists(pth_file.bad_dir_path))
"%s not in sys.modules" % pth_file.imported) self.assertIn(site.makepath(pth_file.good_dir_path)[0], sys.path) self.assertFalse(os.path.exists(pth_file.bad_dir_path))
def pth_file_tests(self, pth_file): """Contain common code for testing results of reading a .pth file""" self.assertTrue(pth_file.imported in sys.modules, "%s not in sys.path" % pth_file.imported) self.assertTrue(site.makepath(pth_file.good_dir_path)[0] in sys.path) self.assertTrue(not os.path.exists(pth_file.bad_dir_path))
c866588d2bb7dde3fc14ec64c6fe3ce476a08353 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/c866588d2bb7dde3fc14ec64c6fe3ce476a08353/test_site.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18540, 67, 768, 67, 16341, 12, 2890, 16, 18540, 67, 768, 4672, 3536, 22928, 2975, 981, 364, 7769, 1686, 434, 6453, 279, 263, 2397, 585, 8395, 365, 18, 11231, 5510, 12, 2397, 67, 768, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18540, 67, 768, 67, 16341, 12, 2890, 16, 18540, 67, 768, 4672, 3536, 22928, 2975, 981, 364, 7769, 1686, 434, 6453, 279, 263, 2397, 585, 8395, 365, 18, 11231, 5510, 12, 2397, 67, 768, 1...
print "build_executable\n\t", target, template, arcname, script, vars
def build_executable(self, target, template, arcname, script, vars={}): print "build_executable\n\t", target, template, arcname, script, vars
5e5237f4d0ebf02aeaf994f9a57a52ad7f7f5e9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1361/5e5237f4d0ebf02aeaf994f9a57a52ad7f7f5e9c/build_exe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 17751, 12, 2890, 16, 1018, 16, 1542, 16, 8028, 529, 16, 2728, 16, 4153, 12938, 4672, 1172, 315, 3510, 67, 17751, 64, 82, 64, 88, 3113, 1018, 16, 1542, 16, 8028, 529, 16, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 17751, 12, 2890, 16, 1018, 16, 1542, 16, 8028, 529, 16, 2728, 16, 4153, 12938, 4672, 1172, 315, 3510, 67, 17751, 64, 82, 64, 88, 3113, 1018, 16, 1542, 16, 8028, 529, 16, 27...
ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_VERSION.encode("utf-8")) ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8"))
ofilehdl.write("%s\n" \ % CFG_REFEXTRACT_XML_VERSION.encode("utf-8")) ofilehdl.write("%s\n" \ % CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8"))
def main(): """Main function. """ global cli_opts (cli_opts, cli_args) = get_cli_options() extract_jobs = get_recids_and_filepaths(cli_args) if len(extract_jobs) == 0: ## no files provided for reference extraction - error message usage() ## Read the journal titles knowledge base, creating the search patterns and replace terms: (title_search_kb, title_search_standardised_titles, title_search_keys) = \ build_titles_knowledge_base(CFG_REFEXTRACT_KB_JOURNAL_TITLES) (preprint_reportnum_sre, standardised_preprint_reportnum_categs) = \ build_institutes_preprints_numeration_knowledge_base(CFG_REFEXTRACT_KB_REPORT_NUMBERS) done_coltags = 0 ## flag to signal that the XML collection tags have been output for curitem in extract_jobs: extract_error = 0 ## extraction was OK unless determined otherwise ## reset the stats counters: count_misc = count_title = count_reportnum = count_url = 0 recid = curitem[0] if cli_opts['verbosity'] >= 1: sys.stdout.write("--- processing RecID: %s pdffile: %s\n" \ % (str(curitem[0]), curitem[1])) if not done_coltags: ## Output opening XML collection tags: if cli_opts['xmlfile']: try: ofilehdl = open(cli_opts['xmlfile'], 'w') ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_VERSION.encode("utf-8")) ofilehdl.write("%s\n" % CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8")) ofilehdl.flush() except: sys.stdout.write("***%s\n\n" % cli_opts['xmlfile']) raise IOError("Cannot open %s to write!" % cli_opts['xmlfile']) else: sys.stdout.write("%s\n" % (CFG_REFEXTRACT_XML_VERSION.encode("utf-8"),)) sys.stdout.write("%s\n" % (CFG_REFEXTRACT_XML_COLLECTION_OPEN.encode("utf-8"),)) done_coltags = 1 ## 1. Get this document body as plaintext: (docbody, extract_error) = get_plaintext_document_body(curitem[1]) if extract_error == 0 and len(docbody) == 0: extract_error = 3 if cli_opts['verbosity'] >= 1: sys.stdout.write("-----get_plaintext_document_body gave: %s lines," \ " overall error: %s\n" % (str(len(docbody)), str(extract_error))) if len(docbody) > 0: ## the document body is not empty: ## 2. If necessary, locate the reference section: if cli_opts['treat_as_reference_section']: ## don't search for citations in the document body: treat it as a reference section: reflines = docbody else: ## launch search for the reference section in the document body: (reflines, extract_error) = extract_references_from_fulltext(docbody) if len(reflines) == 0 and extract_error == 0: extract_error = 6 if cli_opts['verbosity'] >= 1: sys.stdout.write("-----extract_references_from_fulltext gave " \ "len(reflines): %s overall error: %s\n" \ % (str(len(reflines)), str(extract_error))) ## 3. Standardise the reference lines:
afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 445, 18, 3536, 2552, 4942, 67, 4952, 261, 4857, 67, 4952, 16, 4942, 67, 1968, 13, 273, 225, 336, 67, 4857, 67, 2116, 1435, 225, 2608, 67, 10088, 273, 336, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 445, 18, 3536, 2552, 4942, 67, 4952, 261, 4857, 67, 4952, 16, 4942, 67, 1968, 13, 273, 225, 336, 67, 4857, 67, 2116, 1435, 225, 2608, 67, 10088, 273, 336, 67, ...
def __getMigratedFiles(self,se,pfns):
def __getMigratedFiles( self, se, pfns ):
def __getMigratedFiles(self,se,pfns): # Get the active files from the database migrated = {} terminal = {} res = self.ReplicaManager.getStorageFileMetadata(pfns,se) if not res['OK']: return res for pfn,error in res['Value']['Failed'].items(): if re.search("File does not exist",error): gLogger.error("[%s] __getStorageMetadata: PFN does not exist at StorageElement." % se,"%s %s" % (pfn,error)) terminal[pfn] = 'PFNMissing' else: gLogger.warn("[%s] __getMigratedFiles: Failed to obtain physical file metadata." % se,"%s %s" % (pfn,error)) storageMetadata = res['Value']['Successful'] for pfn,metadata in storageMetadata.items(): if metadata['Migrated']: checksum = '' if metadata.has_key('Checksum'): checksum = metadata['Checksum'] migrated[pfn] = checksum elif metadata['Lost']: gLogger.error("[%s] __getMigratedFiles: PFN has been Lost by the StorageElement." % se,"%s" % (pfn)) terminal[pfn] = 'PFNLost' elif metadata['Unavailable']: gLogger.error("[%s] __getMigratedFiles: PFN declared Unavailable by StorageElement." % se,"%s" % (pfn)) terminal[pfn] = 'PFNUnavailable' resDict = {'Terminal':terminal,'Migrated':migrated} return S_OK(resDict)
9a22336d92a455ef5a2bab49d70e2e3a11f3d910 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9a22336d92a455ef5a2bab49d70e2e3a11f3d910/MigrationMonitoringAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 25483, 690, 2697, 12, 365, 16, 695, 16, 10811, 2387, 262, 30, 468, 968, 326, 2695, 1390, 628, 326, 2063, 24741, 273, 2618, 8651, 273, 2618, 400, 273, 365, 18, 14222, 1318, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 25483, 690, 2697, 12, 365, 16, 695, 16, 10811, 2387, 262, 30, 468, 968, 326, 2695, 1390, 628, 326, 2063, 24741, 273, 2618, 8651, 273, 2618, 400, 273, 365, 18, 14222, 1318, 1...
return (type (other) is Node and self.data == other.data)
return (self.data == other.data)
def __eq__ (self, other): return (type (other) is Node and self.data == other.data)
ddd9860284fbabb30c11d0625506fc7d542186ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/ddd9860284fbabb30c11d0625506fc7d542186ab/Combinatoric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 261, 2890, 16, 1308, 4672, 327, 261, 723, 261, 3011, 13, 353, 2029, 471, 365, 18, 892, 422, 1308, 18, 892, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 261, 2890, 16, 1308, 4672, 327, 261, 723, 261, 3011, 13, 353, 2029, 471, 365, 18, 892, 422, 1308, 18, 892, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
@param id: structure ID
@param sid: structure ID
def GetStrucIdx(id): """ Get structure index by structure ID @param id: structure ID @return: -1 if bad structure ID is passed otherwise returns structure index. See GetFirstStrucIdx() for the explanation of structure indices and IDs. """ return idaapi.get_struc_idx(id)
244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1585, 5286, 4223, 12, 350, 4672, 3536, 968, 3695, 770, 635, 3695, 1599, 225, 632, 891, 7348, 30, 3695, 1599, 225, 632, 2463, 30, 565, 300, 21, 309, 5570, 3695, 1599, 353, 2275, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1585, 5286, 4223, 12, 350, 4672, 3536, 968, 3695, 770, 635, 3695, 1599, 225, 632, 891, 7348, 30, 3695, 1599, 225, 632, 2463, 30, 565, 300, 21, 309, 5570, 3695, 1599, 353, 2275, 35...
self.testRequest.openConnection('foo.com', 80,
self.testRequest.openConnection('foo.com', 80,
def setUp(self): AsyncSocketTest.setUp(self) self.testRequest = DumbTestingHTTPConnection() self.testRequest.openConnection('foo.com', 80, lambda x: None, lambda x: None) self.testRequest.sendRequest(self.callback, self.errback, "", 80, method='GET', path='/bar/baz;123?a=b')
e30788a9dacabc7a8a0d8e1a962216cf42816d5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/e30788a9dacabc7a8a0d8e1a962216cf42816d5e/httpclienttest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 9672, 4534, 4709, 18, 542, 1211, 12, 2890, 13, 365, 18, 3813, 691, 273, 463, 3592, 22218, 3693, 1952, 1435, 365, 18, 3813, 691, 18, 3190, 1952, 2668, 11351, 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, 24292, 12, 2890, 4672, 9672, 4534, 4709, 18, 542, 1211, 12, 2890, 13, 365, 18, 3813, 691, 273, 463, 3592, 22218, 3693, 1952, 1435, 365, 18, 3813, 691, 18, 3190, 1952, 2668, 11351, 18, ...
libraries=ext.libraries,
libraries=self.get_libraries(ext),
def build_extensions (self):
4af195eaba7e2658f3d6590c72fdaa3d40432e7f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4af195eaba7e2658f3d6590c72fdaa3d40432e7f/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 9489, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 9489, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
file.Write(" DeleteGLObjects<GL%sHelper>(n, %s);\n" %
file.Write(" %sHelper(n, %s);\n" %
def WriteImmediateHandlerImplementation (self, func, file): """Overrriden from TypeHandler.""" file.Write(" DeleteGLObjects<GL%sHelper>(n, %s);\n" % (func.original_name, func.GetLastOriginalArg().name))
9fa7a2b02d77ec300c60a11cdfaf23fc9c50a619 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/9fa7a2b02d77ec300c60a11cdfaf23fc9c50a619/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1503, 13621, 261, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 738, 87, 2276, 12, 82, 16, 738, 87, 20472, 82, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 22651, 1503, 13621, 261, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 2932, 225, 738, 87, 2276, 12, 82, 16, 738, 87, 20472, 82, 6...
if self.options["trash"][1]:
if self.options["tmp"][1]:
def list_files(self): # cache if self.options["cache"][1]: dirname = os.path.expanduser("~/.cache/") for filename in children_in_directory(dirname, True): yield filename
a5533253301312033782802b40822c85bb5c65a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/a5533253301312033782802b40822c85bb5c65a7/CleanerBackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2354, 12, 2890, 4672, 468, 1247, 309, 365, 18, 2116, 9614, 2493, 6, 6362, 21, 14542, 4283, 273, 1140, 18, 803, 18, 12320, 1355, 2932, 98, 15865, 2493, 4898, 13, 364, 1544, 316...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 67, 2354, 12, 2890, 4672, 468, 1247, 309, 365, 18, 2116, 9614, 2493, 6, 6362, 21, 14542, 4283, 273, 1140, 18, 803, 18, 12320, 1355, 2932, 98, 15865, 2493, 4898, 13, 364, 1544, 316...
msg += '\nalert name : \'%s\'' % alert[5] msg += '\npattern : \'%s\'' % pattern msg += '\ncatalogue(s) : %s' % catalogue msg += '\nfrequency : %s ' % format_frequency(alert[3]) msg += '\nrun time : %s ' % strftime("%c")
msg += '\nalert name: \'%s\'' % alert[5] msg += '\npattern: \'%s\'' % pattern msg += '\ncatalogue(s): %s' % catalogue msg += '\nfrequency: %s ' % format_frequency(alert[3]) msg += '\nrun time: %s ' % strftime("%c") msg += '\nfound: %s record(s)' % len(records)
def email_notify(alert, records, argstr): global FROMADDR global ALERTURL global DEBUGLEVEL if len(records) == 0: return msg = "\nHello\n\nBelow are the results of the email alert that you set up with the CERN Document Server:\n" email = get_email(alert[0]) url = weburl + "/search.py?" + argstr pattern = get_pattern(argstr) catalogue = get_catalogue(argstr) msg += '\nalert name : \'%s\'' % alert[5] msg += '\npattern : \'%s\'' % pattern msg += '\ncatalogue(s) : %s' % catalogue msg += '\nfrequency : %s ' % format_frequency(alert[3]) msg += '\nrun time : %s ' % strftime("%c") msg += print_records(records) msg += "\n\nThe search URL for this alert is <%s>\n\n" % url msg += "To modify your alerts: <%s>" % ALERTURL msg += "\n\n-- \nCERN Document Server Alert Service <%s>\nEmail: <%s>" % (weburl, supportemail) subject = 'Search for \'%s\' in %s' % (pattern, catalogue) body = forge_email(FROMADDR, email, subject, msg) if DEBUGLEVEL > 0: print "********************************************************************************" print body print "********************************************************************************" if DEBUGLEVEL < 2: send_email(FROMADDR, email, body)
accc0ccafc5566a0582cd7acddeba0dfd44f4e9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/accc0ccafc5566a0582cd7acddeba0dfd44f4e9b/alert_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2699, 67, 12336, 12, 11798, 16, 3853, 16, 833, 313, 4672, 2552, 4571, 14142, 2552, 7981, 11539, 1785, 2552, 6369, 10398, 225, 309, 562, 12, 7094, 13, 422, 374, 30, 327, 225, 1234, 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, 2699, 67, 12336, 12, 11798, 16, 3853, 16, 833, 313, 4672, 2552, 4571, 14142, 2552, 7981, 11539, 1785, 2552, 6369, 10398, 225, 309, 562, 12, 7094, 13, 422, 374, 30, 327, 225, 1234, 273, ...
"--parent-command=commit-queue",
def process_work_item(self, patch): try: self._cc_watchers(patch.bug_id()) args = [ "land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch.id() ] if patch.is_rollout(): # We need to ignore the builders when landing a rollout # because they're probably red. args.append("--ignore-builders") else: # We pass --no-update in the normal (non-rollout) case # because we've already validated that the current revision # actually builds and passes the tests. If we update, we risk # moving to a revision that doesn't! args.append("--no-update") self.run_webkit_patch(args) self._did_pass(patch) except ScriptError, e: self._did_fail(patch) raise e
f35f820f732c63619925f225cd986ca8d21f526b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/f35f820f732c63619925f225cd986ca8d21f526b/queues.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 1252, 67, 1726, 12, 2890, 16, 4729, 4672, 775, 30, 365, 6315, 952, 67, 7585, 414, 12, 2272, 18, 925, 67, 350, 10756, 833, 273, 306, 315, 15733, 17, 11461, 3113, 5238, 5734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1252, 67, 1726, 12, 2890, 16, 4729, 4672, 775, 30, 365, 6315, 952, 67, 7585, 414, 12, 2272, 18, 925, 67, 350, 10756, 833, 273, 306, 315, 15733, 17, 11461, 3113, 5238, 5734, ...
capsString = "audio/x-raw-int;audio/x-raw-float" caps = gst.caps_from_string(capsString)
caps = gst.caps_from_string("audio/x-raw-int;audio/x-raw-float")
def Record(self): """ Start recording all selected instruments. """
cd96e39316c1950933a6bb4b6f0a9e852851ad57 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10033/cd96e39316c1950933a6bb4b6f0a9e852851ad57/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5059, 12, 2890, 4672, 3536, 3603, 14949, 777, 3170, 29555, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5059, 12, 2890, 4672, 3536, 3603, 14949, 777, 3170, 29555, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.atoms = owner.atoms
def __init__(self, owner): self._posn_offset = Numeric.array((0.0, 0.0, 0.0)) # owner is a measurement jig. It is expected to provide an # atom list and a glpane. It should also have a center() # method which gives the average position of the atoms in the # atom list. self.owner = owner self.atoms = owner.atoms self.glpane = owner.assy.o
c3fc042ba5d169cb8eabb07c03a9bf20524cab21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/c3fc042ba5d169cb8eabb07c03a9bf20524cab21/jigs_measurements.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3410, 4672, 365, 6315, 917, 82, 67, 3348, 273, 16980, 18, 1126, 12443, 20, 18, 20, 16, 374, 18, 20, 16, 374, 18, 20, 3719, 468, 3410, 353, 279, 12464, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3410, 4672, 365, 6315, 917, 82, 67, 3348, 273, 16980, 18, 1126, 12443, 20, 18, 20, 16, 374, 18, 20, 16, 374, 18, 20, 3719, 468, 3410, 353, 279, 12464, ...
unicode_comment_pattern = re.compile(r'( |\n|^).. ')
unicode_comment_pattern = re.compile(r'( |\n|^)\.\. ')
def unicode_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): r""" Convert Unicode character codes (numbers) to characters. Codes may be decimal numbers, hexadecimal numbers (prefixed by ``0x``, ``x``, ``\x``, ``U+``, ``u``, or ``\u``; e.g. ``U+262E``), or XML-style numeric character entities (e.g. ``&#x262E;``). Text following ".." is a comment and is ignored. Spaces are ignored, and any other text remains as-is. """ if not isinstance(state, states.SubstitutionDef): error = state_machine.reporter.error( 'Invalid context: the "%s" directive can only be used within a ' 'substitution definition.' % (name), nodes.literal_block(block_text, block_text), line=lineno) return [error] codes = unicode_comment_pattern.split(arguments[0])[0].split() element = nodes.Element() for code in codes: try: decoded = directives.unicode_code(code) except ValueError, err: error = state_machine.reporter.error( 'Invalid character code: %s\n%s: %s' % (code, err.__class__.__name__, err), nodes.literal_block(block_text, block_text), line=lineno) return [error] element += nodes.Text(decoded) return element.children
a53b81a6fb74020df31a5e563bc2eb63ac171289 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/a53b81a6fb74020df31a5e563bc2eb63ac171289/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5252, 67, 22347, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 436, 8395, 4037, 9633, 3351, 6198, 261, 13851,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5252, 67, 22347, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 436, 8395, 4037, 9633, 3351, 6198, 261, 13851,...
client.quick_add_event(args, cal_user)
for cal in cal_user_list: client.quick_add_event(args, cal.user)
def _run_add(client, options, args): cal_user = client.get_calendar_user(options.cal) if not cal_user: print 'No calendar matches "' + options.cal + '"' return client.quick_add_event(args, cal_user)
f846a2afa8ac791418b89ed03bd00a3c62cf31be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/f846a2afa8ac791418b89ed03bd00a3c62cf31be/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 1289, 12, 2625, 16, 702, 16, 833, 4672, 1443, 67, 1355, 273, 1004, 18, 588, 67, 11650, 67, 1355, 12, 2116, 18, 771, 13, 309, 486, 1443, 67, 1355, 30, 1172, 296, 2279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 1289, 12, 2625, 16, 702, 16, 833, 4672, 1443, 67, 1355, 273, 1004, 18, 588, 67, 11650, 67, 1355, 12, 2116, 18, 771, 13, 309, 486, 1443, 67, 1355, 30, 1172, 296, 2279, ...
(t > len(self.bitmasks) or (self.bitmasks[t] & mask).isZero()):
(t >= len(self.bitmasks) or (self.bitmasks[t] & mask).isZero()):
def findOverflowHole(self, area, w, h): """ Searches for a hole large enough for (w, h), in the overflow space. Since the overflow space is infinite, this will always succeed. """
3fbb4b22ad49206f380327bd21da623d2929d8cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/3fbb4b22ad49206f380327bd21da623d2929d8cb/TexMemWatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 15526, 29501, 12, 2890, 16, 5091, 16, 341, 16, 366, 4672, 3536, 5167, 281, 364, 279, 19922, 7876, 7304, 364, 261, 91, 16, 366, 3631, 316, 326, 9391, 3476, 18, 225, 7897, 326, 939...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 15526, 29501, 12, 2890, 16, 5091, 16, 341, 16, 366, 4672, 3536, 5167, 281, 364, 279, 19922, 7876, 7304, 364, 261, 91, 16, 366, 3631, 316, 326, 9391, 3476, 18, 225, 7897, 326, 939...
logger.info("ldap network timeout:" + str(self.l.get_option(ldap.OPT_NETWORK_TIMEOUT)))
logger.debug("ldap network timeout:" + str(self.l.get_option(ldap.OPT_NETWORK_TIMEOUT)))
def setGroupDiskQuota(self, group, device, quota, overwrite): logger = logging.getLogger() logger.info("SetGroupDiskQuota: Overwrite mode: " + overwrite) logger.info("ldap timeout:" + str(self.l.timeout)) self.l.set_option(ldap.OPT_NETWORK_TIMEOUT, 100) logger.info("ldap network timeout:" + str(self.l.get_option(ldap.OPT_NETWORK_TIMEOUT))) self.addGroupDefaultDiskQuotaObjectClass(group) blocks = self.convertMBtoBlocks(quota, device); softblocks = int (blocks * self.configuserquota.softquotablocks) inodes = int(blocks * self.configuserquota.inodesperblock) softinodes = int(inodes * self.configuserquota.softquotainodes) devicepath = device.split(':')[0] ldapquota = '%s=%s:%s:%s:%s' % (devicepath, str(blocks), str(softblocks), str(inodes), str(softinodes)) # @todo improve this, it's a copy of set disk quota. try: currentquotas = self.getDetailedGroup(group)["quota"] newquotas = [] quotachanged = False for x in currentquotas: if x.split('=')[0] == devicepath: newquotas.append(ldapquota) quotachanged = True else: newquotas.append(x) if not quotachanged: newquotas.append(ldapquota) self.changeGroupAttribute(group, "quota", newquotas) except KeyError: self.changeGroupAttribute(group, "quota", ldapquota) pass
c1b148277eaa33380684c03817015cbdb8ea5c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5988/c1b148277eaa33380684c03817015cbdb8ea5c22/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1114, 6247, 10334, 12, 2890, 16, 1041, 16, 2346, 16, 13257, 16, 6156, 4672, 1194, 273, 2907, 18, 588, 3328, 1435, 1194, 18, 1376, 2932, 694, 1114, 6247, 10334, 30, 29747, 1965, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 1114, 6247, 10334, 12, 2890, 16, 1041, 16, 2346, 16, 13257, 16, 6156, 4672, 1194, 273, 2907, 18, 588, 3328, 1435, 1194, 18, 1376, 2932, 694, 1114, 6247, 10334, 30, 29747, 1965, 30, ...
logging.error("Timed out trying to download programme XML")
def get_playlist_xml(self): """ Downloads and returns the XML for a PID from the iPlayer site. """ try: url = self.playlist_url logging.info("Getting XML playlist at URL: %s", url) r, xml = http.request(url, 'GET') return xml except SocketTimeoutError: logging.error("Timed out trying to download programme XML") raise
e9308323abd7d76cee674599e87bde273bc1afa0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11070/e9308323abd7d76cee674599e87bde273bc1afa0/iplayer2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1601, 1098, 67, 2902, 12, 2890, 4672, 3536, 13059, 87, 471, 1135, 326, 3167, 364, 279, 14788, 628, 326, 277, 12148, 2834, 18, 3536, 775, 30, 880, 273, 365, 18, 1601, 1098, 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, 336, 67, 1601, 1098, 67, 2902, 12, 2890, 4672, 3536, 13059, 87, 471, 1135, 326, 3167, 364, 279, 14788, 628, 326, 277, 12148, 2834, 18, 3536, 775, 30, 880, 273, 365, 18, 1601, 1098, 67,...
_("Detailed record"),
_("Detailed record"),
def tmpl_print_record_brief_links(self, ln, recID, weburl): """Displays links for brief record on-the-fly
db331841a37d58542b7cf2ea4a7c39fdd1d31403 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/db331841a37d58542b7cf2ea4a7c39fdd1d31403/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 1188, 67, 3366, 67, 25888, 67, 7135, 12, 2890, 16, 7211, 16, 1950, 734, 16, 3311, 718, 4672, 3536, 16900, 4716, 364, 324, 17802, 1409, 603, 17, 5787, 17, 29670, 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, 10720, 67, 1188, 67, 3366, 67, 25888, 67, 7135, 12, 2890, 16, 7211, 16, 1950, 734, 16, 3311, 718, 4672, 3536, 16900, 4716, 364, 324, 17802, 1409, 603, 17, 5787, 17, 29670, 2, -100, -10...
[(userlang, langs[userlang])] + sorted(langs.items())]),
[(userlang, langs[userlang])] + sorted(langs.items(), key=lambda i: i[1])]),
def advanced_ui(macro): _ = macro._ f = macro.formatter search_boxes = ''.join([ f.table_row(1), f.table_cell(1, attrs={'rowspan': '6', 'class': 'searchfor'}), f.text(_('Search for pages')), f.table_cell(0), ''.join([''.join([ f.table_row(1), f.table_cell(1), f.text(_(txt)), f.table_cell(0), f.table_cell(1), f.rawHTML(input_field), f.table_cell(0), f.table_row(0), ]) for txt, input_field in ( (_('containing all the following terms'), '<input type="text" name="and_terms" size="30">'), (_('containing one or more of the following terms'), '<input type="text" name="or_terms" size="30">'), (_('not containing the following terms'), '<input type="text" name="not_terms" size="30">'), #('containing only one of the following terms', # '<input type="text" name="xor_terms" size="30">'), # TODO: dropdown-box? (_('belonging to one of the following categories'), '<input type="text" name="categories" size="30">'), (_('last modified since'), '<input type="text" name="mtime" size="30" value="">'), )]) ]) langs = dict([(lang, lmeta['x-language-in-english']) for lang, lmeta in languages.items()]) userlang = macro.request.user.language or \ macro.request.cfg.language_default lang_dropdown = ''.join([ u'<select name="language" size="1">', u'<option value="" selected>%s</option>' % _('any language'), ''.join(['<option value="%s">%s</option>' % lt for lt in [(userlang, langs[userlang])] + sorted(langs.items())]), u'</select>', ]) ft_dropdown = ''.join([ u'<select name="mimetype" size="1">', u'<option value="" selected>%s</option>' % _('any type'), ''.join(['<option value="%s">%s</option>' % (m[1], '*%s - %s' % m) for m in sorted(mimetypes.types_map.items())]), u'</select>', ]) search_options = ''.join([ ''.join([ f.table_row(1), f.table_cell(1, attrs={'class': 'searchfor'}), txt[0], f.table_cell(0), f.table_cell(1, colspan=2), txt[1], f.table_cell(0), f.table_row(0), ]) for txt in ( (_('Language'), lang_dropdown), (_('File Type'), ft_dropdown), ('', '<input type="checkbox" name="titlesearch" value="1">%s</input>' % _('Search only in titles')), ('', '<input type="checkbox" name="case" value="1">%s</input>' % _('Case-sensitive search')), ('', '<input type="checkbox" name="includeunderlay" value="1" checked>%s' '</input>' % _('Include underlay')), ('', '<input type="checkbox" name="onlysystempages" value="1">%s' '</input>' % _('Only system pages')), ) ]) html = [ u'<form method="get" action="">', u'<div>', u'<input type="hidden" name="action" value="fullsearch">', u'<input type="hidden" name="advancedsearch" value="1">', f.table(1, attrs={'tableclass': 'advancedsearch'}), search_boxes, search_options, f.table_row(1), f.table_cell(1, attrs={'class': 'submit', 'colspan': '3'}), u'<input type="submit" value="%s">' % _('Go get it!'), f.table_cell(0), f.table_row(0), f.table(0), u'</div>', u'</form>', ] return f.rawHTML('\n'.join(html))
8f44b851d1f930a139552cdca739bafd5c4538a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/8f44b851d1f930a139552cdca739bafd5c4538a2/AdvancedSearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16111, 67, 4881, 12, 26448, 4672, 389, 273, 11522, 6315, 284, 273, 11522, 18, 12354, 225, 1623, 67, 15918, 273, 875, 18, 5701, 3816, 284, 18, 2121, 67, 492, 12, 21, 3631, 284, 18, 2121...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16111, 67, 4881, 12, 26448, 4672, 389, 273, 11522, 6315, 284, 273, 11522, 18, 12354, 225, 1623, 67, 15918, 273, 875, 18, 5701, 3816, 284, 18, 2121, 67, 492, 12, 21, 3631, 284, 18, 2121...
elif brackets == True and license_found != None: brackets = False return True
def checkStep(self): # nothing = Defining an empty image description nothing = ['', ' ', ' ', ' ', '\n', '\n ', '\n ', '\n\n', '\n \n', ' \n', ' \n ', ' \n \n'] # something = Minimal requirements for an image description. # If this fits, no tagging will take place (if there aren't other issues) # MIT license is ok on italian wikipedia, let also this here something = ['{{'] # Don't put "}}" here, please. Useless and can give problems. # Unused file extensions. Does not contain PDF. notallowed = ("xcf", "xls", "sxw", "sxi", "sxc", "sxd") brackets = False delete = False extension = self.imageName.split('.')[-1] # get the extension from the image's name # Load the notification messages HiddenTN = wikipedia.translate(self.site, HiddenTemplateNotification) unvertext = wikipedia.translate(self.site, n_txt) di = wikipedia.translate(self.site, delete_immediately) dih = wikipedia.translate(self.site, delete_immediately_head) din = wikipedia.translate(self.site, delete_immediately_notification) nh = wikipedia.translate(self.site, nothing_head) nn = wikipedia.translate(self.site, nothing_notification) dels = wikipedia.translate(self.site, del_comm) smwl = wikipedia.translate(self.site, second_message_without_license)
d8ca76ad9193119d7b21ee2d0156002355bc4032 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/d8ca76ad9193119d7b21ee2d0156002355bc4032/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 4160, 12, 2890, 4672, 468, 5083, 273, 18003, 310, 392, 1008, 1316, 2477, 5083, 273, 10228, 2187, 296, 2265, 296, 225, 2265, 296, 282, 2265, 2337, 82, 2187, 2337, 82, 2265, 2337, 82,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 4160, 12, 2890, 4672, 468, 5083, 273, 18003, 310, 392, 1008, 1316, 2477, 5083, 273, 10228, 2187, 296, 2265, 296, 225, 2265, 296, 282, 2265, 2337, 82, 2187, 2337, 82, 2265, 2337, 82,...
return matches.group(1)
return matches.group(0)
def getLocation(description): # Assume that the location is before date. # Based on dateregex locationregex = u'^([^\(^\r^\n]+)\(([^\)]+\d\d\d\d)\)' matches = re.search(locationregex, description, re.MULTILINE) if matches: return matches.group(1) else: # Unknown location return u'unknown'
799c8bc822ed9c96de0357880ea01505969626d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7426/799c8bc822ed9c96de0357880ea01505969626d1/navy_bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13312, 12, 3384, 4672, 468, 15983, 716, 326, 2117, 353, 1865, 1509, 18, 468, 25935, 603, 1150, 11877, 338, 2117, 7584, 273, 582, 19856, 19042, 12, 17134, 86, 17134, 82, 16004, 12, 19042, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13312, 12, 3384, 4672, 468, 15983, 716, 326, 2117, 353, 1865, 1509, 18, 468, 25935, 603, 1150, 11877, 338, 2117, 7584, 273, 582, 19856, 19042, 12, 17134, 86, 17134, 82, 16004, 12, 19042, ...
return "\\abs"
return "\\mathrm{abs}" def _latex_composition(self, x): """ sage: f = sage.calculus.calculus.Function_abs() sage: latex(f) \mathrm{abs} sage: latex(abs(x)) \left| x \right| """ return "\\left| " + latex(x) + " \\right|"
def _latex_(self): return "\\abs"
c4601f39f17a4813e7ad03b1e9c5e02caeae9725 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c4601f39f17a4813e7ad03b1e9c5e02caeae9725/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 327, 8422, 5113, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 327, 8422, 5113, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'coordinates_3_ObenRechts', 'microformat']
'coordinates_3_ObenRechts', 'microformat', 'coordinates']
def __init__(self, tree, save_reports=False, nesting_strictness='loose', status_cb=None): """Init with parsetree.
ad75aef098f98681c6925cb5e156253688aa2523 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/ad75aef098f98681c6925cb5e156253688aa2523/treecleaner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2151, 16, 1923, 67, 20195, 33, 8381, 16, 17174, 67, 13948, 4496, 2218, 383, 2584, 2187, 1267, 67, 7358, 33, 7036, 4672, 3536, 2570, 598, 779, 542, 992, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 2151, 16, 1923, 67, 20195, 33, 8381, 16, 17174, 67, 13948, 4496, 2218, 383, 2584, 2187, 1267, 67, 7358, 33, 7036, 4672, 3536, 2570, 598, 779, 542, 992, 1...
self.__order = Integer(self._gap_().Order())
try: self.__order = Integer(self._gap_().Order()) except TypeError: self.__order = Infinity
def order(self): """ Return the order of this group element, which is the smallest positive integer $n$ such that $g^n = 1$.
065765e298ccc1907599a7c932285299b2975238 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/065765e298ccc1907599a7c932285299b2975238/matrix_group_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1353, 12, 2890, 4672, 3536, 2000, 326, 1353, 434, 333, 1041, 930, 16, 1492, 353, 326, 13541, 6895, 3571, 271, 82, 8, 4123, 716, 271, 75, 66, 82, 273, 404, 8, 18, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1353, 12, 2890, 4672, 3536, 2000, 326, 1353, 434, 333, 1041, 930, 16, 1492, 353, 326, 13541, 6895, 3571, 271, 82, 8, 4123, 716, 271, 75, 66, 82, 273, 404, 8, 18, 2, -100, -100, -100,...
def __init__(self, poly, prec, halt, print_mode, names): UnramifiedExtensionGeneric.__init__(self, poly, prec, print_mode, names, UnramifiedExtensionCappedRelativeElement)
def __init__(self, prepoly, poly, prec, halt, print_mode, shift_seed, names): ntl_poly = ntl_ZZ_pX([a.lift() for a in poly.list()], poly.base_ring().prime()**prec) if prec <= 30: self.prime_pow = PowComputer_ext_maker(poly.base_ring().prime(), prec, prec, prec, True, ntl_poly, "small", "u") else: self.prime_pow = PowComputer_ext_maker(poly.base_ring().prime(), 30, prec, prec, True, ntl_poly, "big", "u") self._shift_seed = None self._pre_poly = prepoly UnramifiedExtensionGeneric.__init__(self, poly, prec, print_mode, names, pAdicZZpXCRElement)
def __init__(self, poly, prec, halt, print_mode, names): UnramifiedExtensionGeneric.__init__(self, poly, prec, print_mode, names, UnramifiedExtensionCappedRelativeElement)
b9ffa8b1f92ad68de3210909edfe6b8fd5f5e7af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/b9ffa8b1f92ad68de3210909edfe6b8fd5f5e7af/padic_extension_leaves.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 18389, 16, 1172, 67, 3188, 16, 1257, 4672, 1351, 1940, 939, 3625, 7014, 16186, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 1172, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 18389, 16, 1172, 67, 3188, 16, 1257, 4672, 1351, 1940, 939, 3625, 7014, 16186, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 1172, 6...
onClick = 'onClick="javascript: return(false);"'
onClick = 'onClick="javascript: return(false);"'
def ctxtnav(active = True): if active: disabled = ''; onClick = ''; else: disabled = 'un-clickable'; onClick = 'onClick="javascript: return(false);"' return ''' <div id="ctxtnav" class="nav"> <h2>Context Navigation</h2> <ul> <li><a href="/groups/new" title="%s" %s class="%s"><div class="ctxt-icon %s" id="icon-add">%s</div></a></li> </ul> </div> ''' % (_('Add a new group on the system.'), onClick, disabled, disabled, _('Add a group'))
e74a9415e90d5a3af83e10abed2f1876ae4e528a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/e74a9415e90d5a3af83e10abed2f1876ae4e528a/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1103, 5088, 842, 12, 3535, 273, 1053, 4672, 225, 309, 2695, 30, 5673, 273, 26028, 18296, 273, 26028, 469, 30, 5673, 273, 296, 318, 17, 7475, 429, 13506, 18296, 225, 273, 296, 265, 6563, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1103, 5088, 842, 12, 3535, 273, 1053, 4672, 225, 309, 2695, 30, 5673, 273, 26028, 18296, 273, 26028, 469, 30, 5673, 273, 296, 318, 17, 7475, 429, 13506, 18296, 225, 273, 296, 265, 6563, ...
def totalSubDirs(self) :
def totalSubDirs(self) :
def totalItems(self) : if self._summaryDirty : self.recalc() return self._totalItems
7d24eb563acbdf95537060f92a52d5efea584294 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2277/7d24eb563acbdf95537060f92a52d5efea584294/FileInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2078, 3126, 12, 2890, 13, 294, 309, 365, 6315, 7687, 10785, 294, 365, 18, 266, 12448, 1435, 327, 365, 6315, 4963, 3126, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2078, 3126, 12, 2890, 13, 294, 309, 365, 6315, 7687, 10785, 294, 365, 18, 266, 12448, 1435, 327, 365, 6315, 4963, 3126, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
y = asarray(y,ndmin=2)
y = array(y,copy=False,ndmin=2)
def cov(m,y=None, rowvar=1, bias=0): """Estimate the covariance matrix. If m is a vector, return the variance. For matrices return the covariance matrix. If y is given it is treated as an additional (set of) variable(s). Normalization is by (N-1) where N is the number of observations (unbiased estimate). If bias is 1 then normalization is by N. If rowvar is non-zero (default), then each row is a variable with observations in the columns, otherwise each column is a variable and the observations are in the rows. """ X = asarray(m,ndmin=2) if X.shape[0] == 1: rowvar = 1 if rowvar: axis = 0 tup = (slice(None),newaxis) else: axis = 1 tup = (newaxis, slice(None)) if y is not None: y = asarray(y,ndmin=2) X = concatenate((X,y),axis) X -= X.mean(axis=1-axis)[tup] if rowvar: N = X.shape[1] else: N = X.shape[0] if bias: fact = N*1.0 else: fact = N-1.0 if not rowvar: return (dot(X.transpose(), X.conj()) / fact).squeeze() else: return (dot(X,X.transpose().conj())/fact).squeeze()
8898b967ff8fa95375fcf5c744011e8b3bf06664 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/8898b967ff8fa95375fcf5c744011e8b3bf06664/function_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10613, 12, 81, 16, 93, 33, 7036, 16, 1027, 1401, 33, 21, 16, 12005, 33, 20, 4672, 3536, 13638, 326, 17366, 3148, 18, 225, 971, 312, 353, 279, 3806, 16, 327, 326, 12380, 18, 225, 2457...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10613, 12, 81, 16, 93, 33, 7036, 16, 1027, 1401, 33, 21, 16, 12005, 33, 20, 4672, 3536, 13638, 326, 17366, 3148, 18, 225, 971, 312, 353, 279, 3806, 16, 327, 326, 12380, 18, 225, 2457...
>>> for i in range(21): ... print(i, end=' ')
>>> if 1: ... for i in range(20): ... print(i, end=' ') ... print(20)
>>> def f(x):
d5c9c6f929123bf058238049eb301fb654b9f9fe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/d5c9c6f929123bf058238049eb301fb654b9f9fe/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if not dmtoken: error = dm.DeviceManagementResponse.DEVICE_MANAGEMENT_TOKEN_INVALID elif not self._server.LookupDevice(dmtoken): error = dm.DeviceManagementResponse.DEVICE_NOT_FOUND else: return (dmtoken, None)
if not dmtoken: error = dm.DeviceManagementResponse.DEVICE_MANAGEMENT_TOKEN_INVALID elif not self._server.LookupDevice(dmtoken): error = dm.DeviceManagementResponse.DEVICE_NOT_FOUND else: return (dmtoken, None)
def CheckToken(self): """Helper for checking whether the client supplied a valid DM token.
fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/fa682f7d51bd14a9fb9e4f7ed3a874030e1c1d18/device_management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 1345, 12, 2890, 4672, 3536, 2276, 364, 6728, 2856, 326, 1004, 4580, 279, 923, 30072, 1147, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 1345, 12, 2890, 4672, 3536, 2276, 364, 6728, 2856, 326, 1004, 4580, 279, 923, 30072, 1147, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
New in 10.0.
New in 10.1.
def __init__(self, canceller=None): """ Initialize a L{Deferred}.
69210b4626337e722bd1505efb78321f06723cad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12595/69210b4626337e722bd1505efb78321f06723cad/defer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3755, 749, 33, 7036, 4672, 3536, 9190, 279, 511, 95, 16886, 5496, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3755, 749, 33, 7036, 4672, 3536, 9190, 279, 511, 95, 16886, 5496, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def _raw_input(prompt=""):
def _raw_input(prompt="", stream=None):
def _raw_input(prompt=""): # A raw_input() replacement that doesn't save the string in the # GNU readline history. prompt = str(prompt) if prompt: sys.stdout.write(prompt) line = sys.stdin.readline() if not line: raise EOFError if line[-1] == '\n': line = line[:-1] return line
42477b4f8585f5cfd3d8dba2b8a5b0f74c5a13af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/42477b4f8585f5cfd3d8dba2b8a5b0f74c5a13af/getpass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1899, 67, 2630, 12, 13325, 1546, 3113, 1407, 33, 7036, 4672, 468, 432, 1831, 67, 2630, 1435, 6060, 716, 3302, 1404, 1923, 326, 533, 316, 326, 468, 611, 50, 57, 12023, 4927, 18, 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, 389, 1899, 67, 2630, 12, 13325, 1546, 3113, 1407, 33, 7036, 4672, 468, 432, 1831, 67, 2630, 1435, 6060, 716, 3302, 1404, 1923, 326, 533, 316, 326, 468, 611, 50, 57, 12023, 4927, 18, 68...
def parse_path(db, path, level, reparse, mail_on_failure):
def _get_job_subdirs(path): """ Returns a list of job subdirectories at path. Returns None if the test is itself a job directory. Does not recurse into the subdirs. """
def parse_path(db, path, level, reparse, mail_on_failure): machine_list = os.path.join(path, ".machines") if os.path.exists(machine_list): # multi-machine job for m in file(machine_list): machine = m.rstrip() if not machine: continue jobpath = os.path.join(path, machine) jobname = "%s/%s" % (os.path.basename(path), machine) try: db.run_with_retry(parse_one, db, jobname, jobpath, reparse, mail_on_failure) except Exception: traceback.print_exc() continue else: # single machine job job_elements = path.split("/")[-level:] jobname = "/".join(job_elements) try: db.run_with_retry(parse_one, db, jobname, path, reparse, mail_on_failure) except Exception: traceback.print_exc()
6cf9c0dd2a0160fbd12497fcbfa7da94027da214 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/6cf9c0dd2a0160fbd12497fcbfa7da94027da214/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4688, 67, 1717, 8291, 12, 803, 4672, 3536, 2860, 279, 666, 434, 1719, 31220, 622, 589, 18, 2860, 599, 309, 326, 1842, 353, 6174, 279, 1719, 1867, 18, 9637, 486, 11502, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4688, 67, 1717, 8291, 12, 803, 4672, 3536, 2860, 279, 666, 434, 1719, 31220, 622, 589, 18, 2860, 599, 309, 326, 1842, 353, 6174, 279, 1719, 1867, 18, 9637, 486, 11502, 13...
def __init__(self, parent, title): BalloonMessage.__init__(self, parent, title)
def __init__(self, title, rearrange_callback=None): BalloonMessage.__init__(self, title=title, rearrange_callback=rearrange_callback)
def __init__(self, parent, title): BalloonMessage.__init__(self, parent, title)
6da3a49668769c8248fc6884f3a4fb927515ce5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/6da3a49668769c8248fc6884f3a4fb927515ce5a/gui_pyqt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 2077, 4672, 605, 287, 383, 265, 1079, 16186, 2738, 972, 12, 2890, 16, 982, 16, 2077, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 2077, 4672, 605, 287, 383, 265, 1079, 16186, 2738, 972, 12, 2890, 16, 982, 16, 2077, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return apply (os.path.join, tail)
if tail: return apply (os.path.join, tail) else: return ''
def get_package_dir (self, package): """Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any)."""
631e6a0c070810b064c48ff6cf777ebb0276f038 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/631e6a0c070810b064c48ff6cf777ebb0276f038/build_py.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5610, 67, 1214, 261, 2890, 16, 2181, 4672, 3536, 990, 326, 1867, 16, 3632, 358, 326, 1760, 434, 326, 1084, 7006, 16, 1625, 2181, 296, 5610, 11, 1410, 506, 1392, 261, 270, 4520...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 5610, 67, 1214, 261, 2890, 16, 2181, 4672, 3536, 990, 326, 1867, 16, 3632, 358, 326, 1760, 434, 326, 1084, 7006, 16, 1625, 2181, 296, 5610, 11, 1410, 506, 1392, 261, 270, 4520...
self.putsequences()
self.putsequences(sequences)
def removefromallsequences(self, list): if hasattr(self, 'last') and self.last in list: del self.last sequences = self.getsequences() changed = 0 for name, seq in sequences.items(): for n in list: if n in seq: seq.remove(n) changed = 1 if not seq: del sequences[name] if changed: self.putsequences()
fbd79256ea05fe1a37412a7b70c3b5eea5751794 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fbd79256ea05fe1a37412a7b70c3b5eea5751794/mhlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 2080, 454, 17190, 12, 2890, 16, 666, 4672, 309, 3859, 12, 2890, 16, 296, 2722, 6134, 471, 365, 18, 2722, 316, 666, 30, 1464, 365, 18, 2722, 8463, 273, 365, 18, 588, 17190, 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, 1206, 2080, 454, 17190, 12, 2890, 16, 666, 4672, 309, 3859, 12, 2890, 16, 296, 2722, 6134, 471, 365, 18, 2722, 316, 666, 30, 1464, 365, 18, 2722, 8463, 273, 365, 18, 588, 17190, 1435, ...
key = (location, product, uom)
key = (location, product, default_uom[product].id)
def products_by_location(self, cursor, user, location_ids, product_ids=None, context=None):
9106e27d17ef999853c6304793e435b5f505120e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/9106e27d17ef999853c6304793e435b5f505120e/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 819, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10406, 67, 1637, 67, 3562, 12, 2890, 16, 3347, 16, 729, 16, 2117, 67, 2232, 16, 3017, 67, 2232, 33, 7036, 16, 819, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
U_ISOW = matrixmultiply(A_ANISOW, X_ANISO)
def lsq_fit_segment(self, frag_id1, frag_id2): """Performs a LSQ fit of TLS parameters for the protein segment starting with fragment index ifrag_start to (and including) the fragment ifrag_end. """ ## all return values here fit_info = {} ## calculate the start/end indexes of the start fragment ## and end fragment so the A matrix and b vector can be sliced ## in the correct placees
e84d51aa8f483309e902b29a0f740a21562abad5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/e84d51aa8f483309e902b29a0f740a21562abad5/tlsmd_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7180, 85, 67, 7216, 67, 9273, 12, 2890, 16, 10111, 67, 350, 21, 16, 10111, 67, 350, 22, 4672, 3536, 9409, 279, 29204, 53, 4845, 434, 8098, 1472, 364, 326, 14314, 3267, 5023, 598, 5481,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7180, 85, 67, 7216, 67, 9273, 12, 2890, 16, 10111, 67, 350, 21, 16, 10111, 67, 350, 22, 4672, 3536, 9409, 279, 29204, 53, 4845, 434, 8098, 1472, 364, 326, 14314, 3267, 5023, 598, 5481,...
"dirindexes":1, "dirnames":1, "basenames":1,
"oldfilenames":1, "dirindexes":1, "dirnames":1, "basenames":1,
def S_ISDIR(mode): return (mode & 0170000) == 0040000
c29b9b2e4992af6d2d2e055a6abeb64c05ab291e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/c29b9b2e4992af6d2d2e055a6abeb64c05ab291e/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 67, 5127, 4537, 12, 3188, 4672, 327, 261, 3188, 473, 374, 4033, 2787, 13, 422, 374, 3028, 2787, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 67, 5127, 4537, 12, 3188, 4672, 327, 261, 3188, 473, 374, 4033, 2787, 13, 422, 374, 3028, 2787, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'ok': Color3f( 0,0,1 ), 'missing': Color3f( 0,1,0 ), 'corrupted': Color3f( 1,0,0 ), 'suspicious': Color3f( 1,1,0 ),
'ok': Color3f( 0.1, 0.7, 0.1 ), 'missing': Color3f( 0.5, 0.3, 0.7 ), 'corrupted': Color3f( 0.8, 0.3, 0.3 ), 'suspicious': Color3f( 1, 1, 0.3 ),
def doOperation( self, args ) :
edc003fdd08d3182d6878ebe4ce3d69793b23c76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9042/edc003fdd08d3182d6878ebe4ce3d69793b23c76/FileSequenceGraphOp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2988, 12, 365, 16, 833, 262, 294, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2988, 12, 365, 16, 833, 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, ...
def OpAlt1(ea,str): return OpAlt(ea,0,str) def OpAlt2(ea,str): return OpAlt(ea,1,str)
def OpAlt1(ea, opstr): return OpAlt(ea, 0, opstr) def OpAlt2(ea, opstr): return OpAlt(ea, 1, opstr)
def OpAlt1(ea,str): return OpAlt(ea,0,str)
4f22943d42ee1d5013421d280b3bd776bee83fb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3410/4f22943d42ee1d5013421d280b3bd776bee83fb9/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6066, 10655, 21, 12, 24852, 16, 701, 4672, 1850, 327, 6066, 10655, 12, 24852, 16, 20, 16, 701, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6066, 10655, 21, 12, 24852, 16, 701, 4672, 1850, 327, 6066, 10655, 12, 24852, 16, 20, 16, 701, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if 1:
try:
def __init__(self, plotmcmcjob, ifo, trig, cp,opts,dag,mcmcnode):
5cd8d3923ef01328239be5138781f507d85b79ba /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/5cd8d3923ef01328239be5138781f507d85b79ba/fu_Condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3207, 81, 7670, 71, 4688, 16, 21479, 16, 23142, 16, 3283, 16, 4952, 16, 30204, 16, 81, 7670, 71, 2159, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 3207, 81, 7670, 71, 4688, 16, 21479, 16, 23142, 16, 3283, 16, 4952, 16, 30204, 16, 81, 7670, 71, 2159, 4672, 2, -100, -100, -100, -100, -100, -100, -100,...
output, errors = mysql_command ("-u%s %s%s --add-drop-table --default-character-set=utf8 %s" % (user, "-p" if password else "", password, db)) return output
return mysqldump_command ("-u%s %s%s --add-drop-table --default-character-set=utf8 %s" % (user, "-p" if password else "", password, db))
def restore_point(): config = cmds.init.config() user = config["db_user"] password = config["db_pass"] db = config["db_db"] output, errors = mysql_command ("-u%s %s%s --add-drop-table --default-character-set=utf8 %s" % (user, "-p" if password else "", password, db)) return output
f9672ef22c36beb2f986d93b7fabb63b0ec77442 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10536/f9672ef22c36beb2f986d93b7fabb63b0ec77442/dump.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 1153, 13332, 642, 273, 13446, 18, 2738, 18, 1425, 1435, 729, 377, 273, 642, 9614, 1966, 67, 1355, 11929, 2201, 273, 642, 9614, 1966, 67, 5466, 11929, 1319, 4202, 273, 642, 9614...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 1153, 13332, 642, 273, 13446, 18, 2738, 18, 1425, 1435, 729, 377, 273, 642, 9614, 1966, 67, 1355, 11929, 2201, 273, 642, 9614, 1966, 67, 5466, 11929, 1319, 4202, 273, 642, 9614...
""" % (author, email, self.log)
""" % (self.escape(author), self.escape(email), self.escape(self.log)) def escape(self, s): import regsub if '&' in s: s = regsub.gsub("&", "&amp;", s) if '<' in s: s = regsub.gsub("<", "&lt;", s) if '>' in s: s = regsub.gsub(">", "&gt;", s) if '"' in s: s = regsub.gsub('"', "&quot;", s) return s
def showedit(self, name, title, text):
ad1a35314a5efa738d30d85899e3ba525e0af160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ad1a35314a5efa738d30d85899e3ba525e0af160/faqmain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 4619, 12, 2890, 16, 508, 16, 2077, 16, 977, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 4619, 12, 2890, 16, 508, 16, 2077, 16, 977, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if line_model is None or len (line_model) == 0:
if line_model is None:
def handle_log_view_selection_changed (self, selection):
f55099b212fd51749f81b6b478cdce5b70043424 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12310/f55099b212fd51749f81b6b478cdce5b70043424/GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1330, 67, 1945, 67, 10705, 67, 6703, 261, 2890, 16, 4421, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1330, 67, 1945, 67, 10705, 67, 6703, 261, 2890, 16, 4421, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
frame = 1 nc.close() log.info("Current frame number is: %i" % (frame-1))
if hasattr(self,'atoms'): frame = 1 else: frame = 0 log.info("Current frame number is: %i" % (frame-1))
def _set_frame_number(self, frame=None): 'set framenumber in the netcdf file' if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as # 9.6E36. Dacapos energies should always be negative, # so if the energy is > 1E36, there is definitely # something wrong and a restart is required. if nc.variables.get('TotalEnergy', None)[-1] > 1E36: log.warn("Total energy > 1E36. NC file is incomplete. \ calc.restart required") self.restart() else: frame = 1 nc.close() log.info("Current frame number is: %i" % (frame-1)) self._frame = frame-1 #netCDF starts counting with 1
c4c689ddb31c66b009b29e08aca7ded5b64b2748 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/c4c689ddb31c66b009b29e08aca7ded5b64b2748/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 296, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 11, 225, 309, 2623, 353, 599, 30, 8194, 273, 2901, 39, 4577, 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, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 296, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 11, 225, 309, 2623, 353, 599, 30, 8194, 273, 2901, 39, 4577, 12, ...
to contains dicts of { version : flavorList } sets instead of
to contain dicts of { version : flavorList } sets instead of
def getTroveVersionFlavors(self, troveDict):
6ff6887add99b7111ae9df1f5733bb5a7bd9b3d3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/6ff6887add99b7111ae9df1f5733bb5a7bd9b3d3/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3181, 303, 537, 1444, 2340, 842, 1383, 12, 2890, 16, 23432, 537, 5014, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3181, 303, 537, 1444, 2340, 842, 1383, 12, 2890, 16, 23432, 537, 5014, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.datasets[i] += [self.pmonitors[i].stop()]
self.datasets[k] += [self.pmonitors[k].stop()] self.active = False
def stop(self): for i in range(len(self.cbs)): if self.datasets[i] is None: self.datasets[i] = [self.pmonitors[i].stop()] else: self.datasets[i] += [self.pmonitors[i].stop()]
8c860a65b7d3d0c4154b79977b181d0ece64761d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8117/8c860a65b7d3d0c4154b79977b181d0ece64761d/perception_monitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 71, 2038, 3719, 30, 309, 365, 18, 21125, 63, 77, 65, 353, 599, 30, 365, 18, 21125, 63, 77, 65, 273, 306, 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, 2132, 12, 2890, 4672, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 71, 2038, 3719, 30, 309, 365, 18, 21125, 63, 77, 65, 353, 599, 30, 365, 18, 21125, 63, 77, 65, 273, 306, 2890, 18...