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
event.when.append(gcalendar.When(start_time=start_time, end_time=end_time))
event.when.append(gcalendar.When(start_time=start_time, end_time=end_time))
def _InsertEvent(self, title='Tennis with Beth', content='Meet for a quick lesson', where='On the courts', start_time=None, end_time=None, recurrence_data=None): """Inserts a basic event using either start_time/end_time definitions or gd:recurrence RFC2445 icalendar syntax. Specifying both types of dates is not valid. Note how some members of the CalendarEventEntry class use arrays and others do not. Members which are allowed to occur more than once in the calendar or GData "kinds" specifications are stored as arrays. Even for these elements, Google Calendar may limit the number stored to 1. The general motto to use when working with the Calendar data API is that functionality not available through the GUI will not be available through the API. Please see the GData Event "kind" document: http://code.google.com/apis/gdata/elements.html#gdEventKind for more information""" event = gcalendar.CalendarEventEntry() event.author.append(atom.Author(name=atom.Name(text='CalendarExample'))) event.title = atom.Title(text=title) event.content = atom.Content(text=content) event.where.append(gcalendar.Where(value_string=where))
e2262800381bad093762f0b1a04c151ee756015d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6580/e2262800381bad093762f0b1a04c151ee756015d/calendarExample.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4600, 1133, 12, 2890, 16, 2077, 2218, 25601, 82, 291, 598, 605, 546, 2187, 913, 2218, 4667, 278, 364, 279, 9549, 22766, 2187, 1625, 2218, 1398, 326, 21833, 3428, 2187, 787, 67, 957,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4600, 1133, 12, 2890, 16, 2077, 2218, 25601, 82, 291, 598, 605, 546, 2187, 913, 2218, 4667, 278, 364, 279, 9549, 22766, 2187, 1625, 2218, 1398, 326, 21833, 3428, 2187, 787, 67, 957,...
for replicaID,info in res['Value'].items():
for replicaID, info in res['Value'].items():
def __getWaitingReplicas(self): """ This obtains the Waiting replicas from the Replicas table and for each LFN the requested storage element """ # First obtain the Waiting replicas from the Replicas table res = self.stagerClient.getWaitingReplicas() if not res['OK']: gLogger.error("StageRequest.__getWaitingReplicas: Failed to get replicas with Waiting status.", res['Message']) return res if not res['Value']: gLogger.debug("StageRequest.__getWaitingReplicas: No Waiting replicas found to process.") return S_OK() else: gLogger.debug("StageRequest.__getWaitingReplicas: Obtained %s Waiting replicas(s) to process." % len(res['Value'])) seReplicas = {} replicaIDs = {} for replicaID,info in res['Value'].items(): lfn = info['LFN'] storageElement = info['SE'] size = info['Size'] pfn = info['PFN']
87d9e4a612b5cfd0ddcec58ce5dded533250cdc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/87d9e4a612b5cfd0ddcec58ce5dded533250cdc2/StageRequestAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 15946, 17248, 12, 2890, 4672, 3536, 1220, 3768, 16598, 326, 23333, 21545, 628, 326, 31222, 1014, 471, 364, 1517, 18803, 50, 326, 3764, 2502, 930, 3536, 468, 5783, 7161, 326, 233...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15946, 17248, 12, 2890, 4672, 3536, 1220, 3768, 16598, 326, 23333, 21545, 628, 326, 31222, 1014, 471, 364, 1517, 18803, 50, 326, 3764, 2502, 930, 3536, 468, 5783, 7161, 326, 233...
logging.info(cmd)
if OPT_SHOW_COMMANDS: logging.info(cmd)
def readCostsFile(file): logging.info("Reading costs from '%s'" % file) costs = [ ] with open(file, "r") as fd: ## Read costs until we find our date tag for line in reversed(fd.readlines()): if line.startswith("-- "): break data = line.split("\t") costs.insert(0, (int(data[0]), float(data[1]))) ## Read ## WITH return costs
7252cafc619e15c263669d73db03ebfdbbe27311 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11748/7252cafc619e15c263669d73db03ebfdbbe27311/vldb-experiments.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 21420, 812, 12, 768, 4672, 2907, 18, 1376, 2932, 15714, 22793, 628, 1995, 87, 4970, 738, 585, 13, 22793, 273, 306, 308, 598, 1696, 12, 768, 16, 315, 86, 7923, 487, 5194, 30, 7541,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21420, 812, 12, 768, 4672, 2907, 18, 1376, 2932, 15714, 22793, 628, 1995, 87, 4970, 738, 585, 13, 22793, 273, 306, 308, 598, 1696, 12, 768, 16, 315, 86, 7923, 487, 5194, 30, 7541,...
f = fields[fpos]
f = fields[fpos]
def check_type(field_type): if field_type == 'float': return 0.0 elif field_type == 'integer': return 0 elif field_type == 'boolean': return False return ''
9f8394a3119b661e0f978387e8467c7103893025 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/9f8394a3119b661e0f978387e8467c7103893025/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 723, 12, 1518, 67, 723, 4672, 309, 652, 67, 723, 422, 296, 5659, 4278, 327, 374, 18, 20, 1327, 652, 67, 723, 422, 296, 7745, 4278, 327, 374, 1327, 652, 67, 723, 422, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 723, 12, 1518, 67, 723, 4672, 309, 652, 67, 723, 422, 296, 5659, 4278, 327, 374, 18, 20, 1327, 652, 67, 723, 422, 296, 7745, 4278, 327, 374, 1327, 652, 67, 723, 422, 296, ...
filePrefixes = set() fileIds = set()
fileIdsPathMap = {}
def _createPackageChangeSet(repos, db, cfg, bldList, recipeObj, sourceVersion, targetLabel=None, alwaysBumpCount=False, policyTroves=None, signatureKey = None): """ Helper function for cookPackage object. See there for most parameter definitions. BldList is the list of components created by cooking a package recipe. RecipeObj is the instantiation of the package recipe. """ # determine final version and flavor - flavor is shared among # all components, so just grab the first one. flavor = bldList[0].flavor.copy() componentNames = [ x.name for x in bldList ] targetVersion = nextVersion(repos, db, componentNames, sourceVersion, flavor, targetLabel, alwaysBumpCount=alwaysBumpCount) buildTime = time.time() sourceName = recipeObj.__class__.name + ':source' buildReqs = set((x.getName(), x.getVersion(), x.getFlavor()) for x in recipeObj.buildReqMap.itervalues()) buildReqs = getRecursiveRequirements(db, buildReqs, cfg.flavor) # create all of the package troves we need, and let each package provide # itself grpMap = {} filePrefixes = set() fileIds = set() for buildPkg in bldList: compName = buildPkg.getName() main, comp = compName.split(':') # Extract file prefixes and file ids for (path, (realPath, f)) in buildPkg.iteritems(): filePrefixes.add(os.path.dirname(path)) fileIds.add(f.fileId()) if main not in grpMap: grpMap[main] = trove.Trove(main, targetVersion, flavor, None) grpMap[main].setSize(0) grpMap[main].setSourceName(sourceName) grpMap[main].setBuildTime(buildTime) grpMap[main].setConaryVersion(constants.version) if policyTroves: grpMap[main].setPolicyProviders(policyTroves) grpMap[main].setLoadedTroves(recipeObj.getLoadedTroves()) grpMap[main].setBuildRequirements(buildReqs) grpMap[main].setBuildFlavor(use.allFlagsToFlavor(recipeObj.name)) provides = deps.DependencySet() provides.addDep(deps.TroveDependencies, deps.Dependency(main)) grpMap[main].setProvides(provides) grpMap[main].setIsCollection(True) grpMap[main].setIsDerived(recipeObj._isDerived) filePrefixes = list(filePrefixes) filePrefixes.sort() # Now eliminate prefixes of prefixes ret = [] oldp = None for p in filePrefixes: if oldp and p.startswith(oldp): continue ret.append(p) oldp = p filePrefixes = ret # Sort the file ids to make sure we get consistent behavior fileIds = sorted(fileIds) # look up the pathids used by our immediate predecessor troves. ident = _IdGen() searchBranch = targetVersion.branch() if targetLabel: # this keeps cook and emerge branchs from showing up searchBranch = searchBranch.parentBranch() if repos and not searchBranch.getHost() == 'local': versionDict = dict( [ (x, { searchBranch : None } ) for x in grpMap ] ) versionDict = repos.getTroveLeavesByBranch(versionDict) if not versionDict and searchBranch.hasParentBranch(): # there was no match on this branch; look uphill searchBranch = searchBranch.parentBranch() versionDict = dict((x, { searchBranch : None } ) for x in grpMap ) versionDict = repos.getTroveLeavesByBranch(versionDict) log.info('looking up pathids from repository history') # look up the pathids for every file that has been built by # this source component, following our branch ancestry while True: d = repos.getPackageBranchPathIds(sourceName, searchBranch, filePrefixes, fileIds) ident.merge(d) if not searchBranch.hasParentBranch(): break searchBranch = searchBranch.parentBranch() log.info('pathId lookup complete') built = [] packageList = [] perviousQuery = {} for buildPkg in bldList: # bldList only contains components compName = buildPkg.getName() main, comp = compName.split(':') assert(comp) grp = grpMap[main] (p, fileMap) = _createComponent(repos, buildPkg, targetVersion, ident) built.append((compName, p.getVersion().asString(), p.getFlavor())) packageList.append((None, p, fileMap)) p.setSourceName(sourceName) p.setBuildTime(buildTime) p.setConaryVersion(constants.version) p.setIsCollection(False) p.setIsDerived(recipeObj._isDerived) # Add build flavor p.setBuildFlavor(use.allFlagsToFlavor(recipeObj.name)) _signTrove(p, signatureKey) byDefault = recipeObj.byDefault(compName) grp.addTrove(compName, p.getVersion(), p.getFlavor(), byDefault = byDefault) if byDefault: grp.setSize(grp.getSize() + p.getSize()) if not targetVersion.isOnLocalHost(): # this keeps cook and emerge branchs from showing up searchBranch = targetVersion.branch() previousVersions = repos.getTroveLeavesByBranch( dict( ( x[1].getName(), { targetVersion.branch() : [ flavor ] } ) for x in packageList ) ) needTroves = [] for name in previousVersions: prevVersion = previousVersions[name].keys()[0] prevFlavor = previousVersions[name][prevVersion][0] needTroves.append((name, prevVersion, prevFlavor)) previousTroves = repos.getTroves(needTroves) previousTroveDict = dict( (x[0][0], x[1]) for x in itertools.izip(needTroves, previousTroves)) relativePackageList = [] needTroves = {} for empty, p, fileMap in packageList: if cfg.commitRelativeChangeset: oldTrove = previousTroveDict.get(p.getName(), None) else: oldTrove = None relativePackageList.append((oldTrove, p, fileMap)) packageList = relativePackageList changeSet = changeset.CreateFromFilesystem(packageList) for packageName in grpMap: changeSet.addPrimaryTrove(packageName, targetVersion, flavor) for grp in grpMap.values(): _signTrove(grp, signatureKey) grpDiff = grp.diff(None, absolute = 1)[0] changeSet.newTrove(grpDiff) return changeSet, built
e3de85c6ac4e6646b13442ebba235f6512d98a7c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/e3de85c6ac4e6646b13442ebba235f6512d98a7c/cook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 2261, 21565, 12, 15564, 16, 1319, 16, 2776, 16, 324, 1236, 682, 16, 16100, 2675, 16, 1084, 1444, 16, 1018, 2224, 33, 7036, 16, 3712, 38, 2801, 1380, 33, 8381, 16, 3329, 56, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 2261, 21565, 12, 15564, 16, 1319, 16, 2776, 16, 324, 1236, 682, 16, 16100, 2675, 16, 1084, 1444, 16, 1018, 2224, 33, 7036, 16, 3712, 38, 2801, 1380, 33, 8381, 16, 3329, 56, ...
full_path = self._ExpandPath(test_list_path)
full_path = os.path.join(path_utils.LayoutTestsDir(test_list_path), test_list_path) full_path = os.path.normpath(full_path)
def _Read(self, expectations): """For each test in an expectations iterable, generate the expectations for it. """ lineno = 0 for line in expectations: lineno += 1
211a3ffcbe86cd75b6c6053d87df43b574b52ab2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/211a3ffcbe86cd75b6c6053d87df43b574b52ab2/test_expectations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1994, 12, 2890, 16, 26305, 4672, 3536, 1290, 1517, 1842, 316, 392, 26305, 6087, 16, 2103, 326, 26305, 364, 518, 18, 3536, 7586, 273, 374, 364, 980, 316, 26305, 30, 7586, 1011, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1994, 12, 2890, 16, 26305, 4672, 3536, 1290, 1517, 1842, 316, 392, 26305, 6087, 16, 2103, 326, 26305, 364, 518, 18, 3536, 7586, 273, 374, 364, 980, 316, 26305, 30, 7586, 1011, 404, ...
dict[x[0][1:]] = (x[0][1:],) + x[1:]
dict[x[0][1:]] = (x[0][1:],) + x[1:]
def _lst2dict(lst): dict = {} for x in lst: dict[x[0][1:]] = (x[0][1:],) + x[1:] return dict
0049f0036898e656085d5c214ba07642a9c25a6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0049f0036898e656085d5c214ba07642a9c25a6e/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16923, 22, 1576, 12, 16923, 4672, 2065, 273, 2618, 364, 619, 316, 9441, 30, 2065, 63, 92, 63, 20, 6362, 21, 30, 13563, 273, 261, 92, 63, 20, 6362, 21, 30, 6487, 13, 397, 619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16923, 22, 1576, 12, 16923, 4672, 2065, 273, 2618, 364, 619, 316, 9441, 30, 2065, 63, 92, 63, 20, 6362, 21, 30, 13563, 273, 261, 92, 63, 20, 6362, 21, 30, 6487, 13, 397, 619, ...
fileout = out.split() fileout[3] = self.__convertPermission__(out[3]) outt.append( fileout )
if out: fileout = out.split() fileout[3] = self.__convertPermission__(out[3]) outt.append( fileout )
def getFileInfo(self, source, token = None, opt = ""): """ rfdir
bef012c3659e2f448845b79cebdf1584fed15e76 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8886/bef012c3659e2f448845b79cebdf1584fed15e76/ProtocolRfio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 966, 12, 2890, 16, 1084, 16, 1147, 273, 599, 16, 2153, 273, 1408, 4672, 3536, 9075, 1214, 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, 6034, 966, 12, 2890, 16, 1084, 16, 1147, 273, 599, 16, 2153, 273, 1408, 4672, 3536, 9075, 1214, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
no_of_snps, chr2no_of_snps, permutation_type=0)
no_of_snps, chr2no_of_snps, permutation_type=0, how_to_handle_rank=how_to_handle_rank)
def getPermutationRankSumPvalue(self, chr2rank_ls, candidate_gene_snp_index_ls, non_candidate_gene_snp_index_ls, rank_sum_stat, no_of_snps, \ chr2no_of_snps, permutation_type=1, no_of_permutations=10000, no_of_min_breaks=25): """ 2008-10-11 re-calculate rank_sum_stat (of the sample before permutation) due to possibility of overlapping in candidate_gene_snp_index_ls and non_candidate_gene_snp_index_ls ,which causes re-ranking is needed in getPermutationRankSumStat() add option non_candidate_gene_snp_index_ls 2008-10-09 do permutatioins in a smarter way. break away early if no_of_hits>= no_of_min_breaks 2008-10-09 """ if self.debug: sys.stderr.write("Getting permutation rank sum pvalue ...") rank_sum_stat = self.getPermutationRankSumStat(chr2rank_ls, candidate_gene_snp_index_ls, non_candidate_gene_snp_index_ls, no_of_snps, chr2no_of_snps, permutation_type=0) i = 0 no_of_hits = 0 while i<no_of_permutations: rank_sum_stat_perm = self.getPermutationRankSumStat(chr2rank_ls, candidate_gene_snp_index_ls, non_candidate_gene_snp_index_ls, no_of_snps, chr2no_of_snps, permutation_type=permutation_type) if rank_sum_stat_perm>=rank_sum_stat: no_of_hits += 1 i+=1 if no_of_min_breaks>0 and no_of_hits>=no_of_min_breaks: #if no_of_min_breaks<=0, no smart breaking break pvalue = no_of_hits/float(i) if self.debug: sys.stderr.write("%s/%s tests in total. Done.\n"%(no_of_hits, i)) return rank_sum_stat, pvalue
0cbc1eb0d025ba7f421937353b64926f439623e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/0cbc1eb0d025ba7f421937353b64926f439623e5/GeneListRankTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 1035, 9245, 12925, 3495, 52, 1132, 12, 2890, 16, 4513, 22, 11500, 67, 3251, 16, 5500, 67, 11857, 67, 87, 6782, 67, 1615, 67, 3251, 16, 1661, 67, 19188, 67, 11857, 67, 87, 6782, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 1035, 9245, 12925, 3495, 52, 1132, 12, 2890, 16, 4513, 22, 11500, 67, 3251, 16, 5500, 67, 11857, 67, 87, 6782, 67, 1615, 67, 3251, 16, 1661, 67, 19188, 67, 11857, 67, 87, 6782, ...
for (name, streamType) in self.streamList:
for streamType, name in self.streamDict.itervalues():
def metadataEqual(self, other, ignoreOwnerGroup):
a67de324b6550ed8a3b892f25e8458e04b9f4282 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a67de324b6550ed8a3b892f25e8458e04b9f4282/files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1982, 5812, 12, 2890, 16, 1308, 16, 2305, 5541, 1114, 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, ...
[ 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, 1982, 5812, 12, 2890, 16, 1308, 16, 2305, 5541, 1114, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
M = self.adjacency_matrix(boundary_first=boundary_first) A = list(-M) S = [sum(M.row(i)) for i in range(M.nrows())] for i in range(len(A)): A[i][i] = S[i] return M.parent()(A)
M = self.adjacency_matrix(**kwds) A = -M if M.is_sparse(): row_sums = {} for (i,j), entry in M.dict().iteritems(): row_sums[i] = row_sums.get(i, 0) + entry else: ones = matrix(M.base_ring(), M.nrows(), 1, [1]*M.nrows()) S = M*ones row_sums = dict((i, S[i,0]) for i in range(M.nrows())) for i in range(M.nrows()): A[i,i] = row_sums.get(i, 0) return A
def kirchhoff_matrix(self, weighted=None, boundary_first=False): """ Returns the Kirchhoff matrix (a.k.a. the Laplacian) of the graph.
1ca6f66137d47879244a15a66558f82f865333e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/1ca6f66137d47879244a15a66558f82f865333e3/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 481, 343, 76, 3674, 67, 5667, 12, 2890, 16, 13747, 33, 7036, 16, 7679, 67, 3645, 33, 8381, 4672, 3536, 2860, 326, 1475, 481, 343, 76, 3674, 3148, 261, 69, 18, 79, 18, 69, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 417, 481, 343, 76, 3674, 67, 5667, 12, 2890, 16, 13747, 33, 7036, 16, 7679, 67, 3645, 33, 8381, 4672, 3536, 2860, 326, 1475, 481, 343, 76, 3674, 3148, 261, 69, 18, 79, 18, 69, 18, ...
sources = ['sage/rings/padics/padic_fixed_mod_element.pyx', \ 'sage/rings/padics/padic_generic_element.c'],
sources = ['sage/rings/padics/padic_fixed_mod_element.pyx'],
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
c82811cc0b935d826f6cfba833e4406f8eb9ed19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c82811cc0b935d826f6cfba833e4406f8eb9ed19/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 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, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
asyncore.dispatcher.__init__(self)
GanetiBaseAsyncoreDispatcher.__init__(self)
def __init__(self): """Constructor for AsyncUDPSocket
b11780bba16a8aff96439b0acb04e20b90b983b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/b11780bba16a8aff96439b0acb04e20b90b983b5/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 6293, 364, 9672, 20352, 4534, 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, 1001, 2738, 972, 12, 2890, 4672, 3536, 6293, 364, 9672, 20352, 4534, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']])
self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], [trans_obj['res_id']])
def unlink(self, cursor, user, ids, context=None): if not context: context = {} for trans_obj in self.read(cursor, user, ids, ['name','type','res_id','src','lang'], context=context): self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], trans_obj['lang'], source=trans_obj['src']) self._get_ids.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], context.get('lang','en_US'), [trans_obj['res_id']]) result = super(ir_translation, self).unlink(cursor, user, ids, context=context) return result
d67b6eccda0e5e7089cacd9a87e96452e1742151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d67b6eccda0e5e7089cacd9a87e96452e1742151/ir_translation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 364, 906, 67, 2603, 316, 365, 18, 896, 12, 9216, 16, 729, 16, 3258, 16, 102...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 273, 2618, 364, 906, 67, 2603, 316, 365, 18, 896, 12, 9216, 16, 729, 16, 3258, 16, 102...
return new Node(t, LABEL)
return Node(t, LABEL)
def LABEL__build(t): return new Node(t, LABEL)
c7acf93c85d2480e1e64e292c2f42ae1721eefbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/c7acf93c85d2480e1e64e292c2f42ae1721eefbe/Builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18210, 972, 3510, 12, 88, 4672, 327, 394, 2029, 12, 88, 16, 18210, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 18210, 972, 3510, 12, 88, 4672, 327, 394, 2029, 12, 88, 16, 18210, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return dict(config.items(section))
configuration = dict(config.items(section))
def getConfigSettings(projectName='cjklib', section='Connection'): """ Gets the SQL connection parameter from a config file.
9ef9a7ae43659042b6895aa114e9f82a67ea24b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/9ef9a7ae43659042b6895aa114e9f82a67ea24b2/dbconnector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4367, 2628, 12, 4406, 461, 2218, 71, 26921, 2941, 2187, 2442, 2218, 1952, 11, 4672, 3536, 11881, 326, 3063, 1459, 1569, 628, 279, 642, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4367, 2628, 12, 4406, 461, 2218, 71, 26921, 2941, 2187, 2442, 2218, 1952, 11, 4672, 3536, 11881, 326, 3063, 1459, 1569, 628, 279, 642, 585, 18, 2, -100, -100, -100, -100, -100, -100, -10...
(lambda: Player.getElementByID("video").play(),
(createImageNode, lambda: Player.getElementByID("video").play(),
def createNode(): node = Player.createNode("video", {"href":"mjpeg1-48x48.avi", "fps":30})
55f1b2d40f73a815fcb28370f8c2d0f9b4a0dd9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/55f1b2d40f73a815fcb28370f8c2d0f9b4a0dd9f/PlayerTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24584, 13332, 756, 273, 19185, 18, 2640, 907, 2932, 9115, 3113, 12528, 7547, 15563, 81, 14423, 21, 17, 8875, 92, 8875, 18, 69, 522, 3113, 315, 74, 1121, 6877, 5082, 6792, 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, 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, 24584, 13332, 756, 273, 19185, 18, 2640, 907, 2932, 9115, 3113, 12528, 7547, 15563, 81, 14423, 21, 17, 8875, 92, 8875, 18, 69, 522, 3113, 315, 74, 1121, 6877, 5082, 6792, 2, -100, -100, ...
if map['large_look'] < map['small_look']: return strs = [str(x) for x in config] runner = Xdelta3Pair() runner.extra = ['-I', '0', '-D', '-C', ','.join(strs)] result = TimeRun(runner.Runner(f1, 1, f2, 2)) print 'config %s dsize %d time %.7f in %u trials' % \ (' '.join(strs), result.r1.dsize, result.time.mean, result.trials) return (config, result.r1.dsize, result.time.mean)
def ScoreTests(self): mint = float(min([test.time() for test in self.results])) maxt = float(max([test.time() for test in self.results])) mins = float(min([test.size() for test in self.results])) maxs = float(max([test.size() for test in self.results])) scored = [] timed = [] sized = [] for test in self.results: ntime = (test.time()) / float(maxt) nsize = (test.size()) / float(maxs) score = math.sqrt((maxs / mins) * ntime * ntime + (maxt / mint) * nsize * nsize) scored.append((score, test)) timed.append((test.time(), test, score)) sized.append((test.size(), test, score)) scored.sort() timed.sort() sized.sort() for (score, test) in scored: spos = PosInAlist(sized, test) tpos = PosInAlist(timed, test) print 'Score %f: %s (%d, %d)' % (score, test, spos, tpos) scored = scored[0:MAX_RESULTS/2] sized = sized[0:MAX_RESULTS/2] timed = timed[0:MAX_RESULTS/2] for (size, test, score) in sized: print 'Size: %s (%f)' % (test, score) for (time, test, score) in timed: print 'Time: %s (%f)' % (test, score) self.results = [] for (score, test) in scored: self.results.append(test)
def RandomBigRun(f1, f2): input_ranges = [ (7, 20, 'large_look'), (1, 30, 'large_step'), (4, 5, 'small_look'), (1, 32, 'small_chain'), (1, 16, 'small_lchain'), (0, 1, 'ssmatch'), (0, 1, 'trylazy'), (1, 128, 'max_lazy'), (1, 256, 'long_enough'), (0, 1, 'promote'), ] config = [] rand = random.Random() map = {} for input in input_ranges: x = rand.randrange(input[0], input[1] + 1) config.append(x) map[input[2]] = x #end if map['small_chain'] < map['small_lchain']: return if map['large_look'] < map['small_look']: return strs = [str(x) for x in config] runner = Xdelta3Pair() runner.extra = ['-I', '0', '-D', '-C', ','.join(strs)] result = TimeRun(runner.Runner(f1, 1, f2, 2)) print 'config %s dsize %d time %.7f in %u trials' % \ (' '.join(strs), result.r1.dsize, result.time.mean, result.trials) return (config, result.r1.dsize, result.time.mean)
9f465a9db201b97c43d69778eabd222d4fc09fd5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4464/9f465a9db201b97c43d69778eabd222d4fc09fd5/xdelta3-regtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8072, 9901, 1997, 12, 74, 21, 16, 284, 22, 4672, 225, 810, 67, 14530, 273, 306, 261, 27, 16, 4200, 16, 296, 14095, 67, 7330, 19899, 261, 21, 16, 5196, 16, 296, 14095, 67, 4119, 19899...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8072, 9901, 1997, 12, 74, 21, 16, 284, 22, 4672, 225, 810, 67, 14530, 273, 306, 261, 27, 16, 4200, 16, 296, 14095, 67, 7330, 19899, 261, 21, 16, 5196, 16, 296, 14095, 67, 4119, 19899...
interface = pUnk.QueryInterface(self._connect_interfaces_[0],1) interface = interface.QueryInterface(pythoncom.IID_IDispatch)
interface = pUnk.QueryInterface(self._connect_interfaces_[0],pythoncom.IID_IDispatch)
def Advise(self, pUnk): # Creates a connection to the client. Simply allocate a new cookie, # find the clients interface, and store it in a dictionary. try: interface = pUnk.QueryInterface(self._connect_interfaces_[0],1) interface = interface.QueryInterface(pythoncom.IID_IDispatch) except pythoncom.com_error: raise Exception(scode=olectl.CONNECT_E_NOCONNECTION) self.cookieNo = self.cookieNo + 1 self.connections[self.cookieNo] = interface return self.cookieNo
ebad034aef9424da803371d678019810a22b41fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/ebad034aef9424da803371d678019810a22b41fa/connect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4052, 90, 784, 12, 2890, 16, 293, 984, 79, 4672, 468, 10210, 279, 1459, 358, 326, 1004, 18, 225, 9587, 1283, 10101, 279, 394, 3878, 16, 468, 1104, 326, 7712, 1560, 16, 471, 1707, 518, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4052, 90, 784, 12, 2890, 16, 293, 984, 79, 4672, 468, 10210, 279, 1459, 358, 326, 1004, 18, 225, 9587, 1283, 10101, 279, 394, 3878, 16, 468, 1104, 326, 7712, 1560, 16, 471, 1707, 518, ...
if node == firstVarStatement:
if node is firstVarStatement:
def __patchVarStatements(node, firstVarStatement): """Patches all variable statements in the given node (works recursively) and replace them with assignments.""" if node == firstVarStatement: return elif node.type == "function": # Don't process inner functions/scopes return elif node.type == "var": __rebuildAsAssignment(node, firstVarStatement) else: # Recursion into children # Create a cast to list() to keep loop stable during modification for child in list(node): __patchVarStatements(child, firstVarStatement)
f3d3c29e06447304930daa29a6132584fa73d3a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/f3d3c29e06447304930daa29a6132584fa73d3a5/CombineDeclarations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2272, 1537, 14663, 12, 2159, 16, 1122, 1537, 3406, 4672, 3536, 23501, 777, 2190, 6317, 316, 326, 864, 756, 261, 18597, 8536, 13, 471, 1453, 2182, 598, 13610, 12123, 309, 756, 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, 1001, 2272, 1537, 14663, 12, 2159, 16, 1122, 1537, 3406, 4672, 3536, 23501, 777, 2190, 6317, 316, 326, 864, 756, 261, 18597, 8536, 13, 471, 1453, 2182, 598, 13610, 12123, 309, 756, 353, ...
data_paths.append((mylist[i], int(mylist[i+1])))
if use_extend: data_paths.extend((mylist[i], int(mylist[i+1]))) else: data_paths.append((mylist[i], int(mylist[i+1])))
def create_data_paths(thing): """ This function takes in a string that contains NeXus path and signal pairs and turns them into a tuple (for one pair) or a list of tuples. Parameters: ---------- -> things is a string containing a list of NeXus path and signal pairs Returns: ------- <- A tuple or list of tuples of the NeXus path,signal pairs """ mylist = thing.split(',') data_paths = [] for i in range(0,len(mylist),2): data_paths.append((mylist[i], int(mylist[i+1]))) if len(mylist) == 2: return tuple(data_paths) else: return data_paths
53800b1900bc3a0c841491708fef3e2dac940402 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/53800b1900bc3a0c841491708fef3e2dac940402/hlr_driver_helper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 892, 67, 4481, 12, 4274, 4672, 3536, 1220, 445, 5530, 316, 279, 533, 716, 1914, 7455, 60, 407, 589, 471, 4277, 5574, 471, 20748, 2182, 1368, 279, 3193, 261, 1884, 1245, 3082, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 892, 67, 4481, 12, 4274, 4672, 3536, 1220, 445, 5530, 316, 279, 533, 716, 1914, 7455, 60, 407, 589, 471, 4277, 5574, 471, 20748, 2182, 1368, 279, 3193, 261, 1884, 1245, 3082, ...
os.mkdir(self.testdir + "/results") os.mkdir(self.testdir + "/profiling") os.mkdir(self.testdir + "/debug") os.mkdir(self.testdir + "/analysis")
self.resultsdir = self.testdir + "/results" os.mkdir(self.resultsdir) self.profdir = self.testdir + "/profiling" os.mkdir(self.profdir) self.debugdir = self.testdir + "/debug" os.mkdir(self.debugdir) self.tmpdir = self.testdir + "/tmp" os.mkdir(self.tmpdir)
def __init__(self, job, testdir): self.job = job self.testdir = job.resultdir + '/' + testdir os.mkdir(self.testdir) os.mkdir(self.testdir + "/results") os.mkdir(self.testdir + "/profiling") os.mkdir(self.testdir + "/debug") os.mkdir(self.testdir + "/analysis")
b9c9b973a975bebd968a788af857b014f44406f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/b9c9b973a975bebd968a788af857b014f44406f1/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 16, 1842, 1214, 4672, 365, 18, 4688, 273, 1719, 365, 18, 3813, 1214, 273, 1719, 18, 2088, 1214, 397, 2023, 397, 1842, 1214, 1140, 18, 26686, 12, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 16, 1842, 1214, 4672, 365, 18, 4688, 273, 1719, 365, 18, 3813, 1214, 273, 1719, 18, 2088, 1214, 397, 2023, 397, 1842, 1214, 1140, 18, 26686, 12, 28...
f = open( T.absfile( outFile ), 'w' ) i=1 for alignment in parsed_blast.alignments: for hsp in alignment.hsps: s = string.replace(alignment.title,'\n',' ') s = string.replace(s, 'pdb|', '\npdb|') f.write('Sequence %i: %s\n'%(i,s)) f.write('Length: %i \tScore: %3.1f \tE-value: %2.1e\n'\ %(hsp.identities[1], hsp.score, hsp.expect)) f.write( 'Identities: %i \tPositives: %i \tGaps: %i\n'\ %(hsp.identities[0], hsp.positives[0], hsp.gaps[0] or 0 )) f.write( '%s\n'%hsp.query ) f.write( '%s\n'%hsp.match ) f.write( '%s\n\n'%hsp.sbjct ) i += 1 f.close()
try: f = open( T.absfile( outFile ), 'w' ) i=1 for alignment in parsed_blast.alignments: for hsp in alignment.hsps: s = string.replace(alignment.title,'\n',' ') s = string.replace(s, 'pdb|', '\npdb|') f.write('Sequence %i: %s\n'%(i,s)) f.write('Score: %3.1f \tE-value: %2.1e\n'\ %(hsp.score, hsp.expect)) f.write('Lenght/Identities: %r\tPositives: %r\tGaps: %r\n'\ %(hsp.identities, hsp.positives, hsp.gaps)) f.write( '%s\n'%hsp.query ) f.write( '%s\n'%hsp.match ) f.write( '%s\n\n'%hsp.sbjct ) i += 1 f.close() except Exception, why: EHandler.warning("Error while writing blast result to %s" %outFile) globals().update(locals()) EHandler.warning("function namespace published to globals")
def __writeBlastResult( self, parsed_blast, outFile): """ Write the result from the blast search to file (similar to the output produced by a regular blast run). writeBlastResult( parsed_blast, outFile ) @param parsed_blast: Bio.Blast.Record.Blast @type parsed_blast: Bio.Blast.Record.Blast @param outFile: file to write the blast result to @type outFile: str """ f = open( T.absfile( outFile ), 'w' )
ac3cf0bdca86ff1a95d9adc87b65595c562e4d2b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/ac3cf0bdca86ff1a95d9adc87b65595c562e4d2b/SequenceSearcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2626, 38, 2722, 1253, 12, 365, 16, 2707, 67, 30901, 16, 21651, 4672, 3536, 2598, 326, 563, 628, 326, 19047, 1623, 358, 585, 261, 22985, 358, 326, 876, 14929, 635, 279, 6736, 19047,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 38, 2722, 1253, 12, 365, 16, 2707, 67, 30901, 16, 21651, 4672, 3536, 2598, 326, 563, 628, 326, 19047, 1623, 358, 585, 261, 22985, 358, 326, 876, 14929, 635, 279, 6736, 19047,...
except httplib.HTTPException, e:
except (socket.error, httplib.HTTPException):
def _conn_request(self, conn, request_uri, method, body, headers): for i in range(2): try: conn.request(method, request_uri, body, headers) response = conn.getresponse() except socket.gaierror: conn.close() raise ServerNotFoundError("Unable to find the server at %s" % conn.host) except httplib.HTTPException, e: if i == 0: conn.close() conn.connect() continue else: raise else: content = response.read() response = Response(response) if method != "HEAD": content = _decompressContent(response, content)
cccda0b2b8d4876f612c3dd600a7123704c8dbd0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13138/cccda0b2b8d4876f612c3dd600a7123704c8dbd0/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4646, 67, 2293, 12, 2890, 16, 1487, 16, 590, 67, 1650, 16, 707, 16, 1417, 16, 1607, 4672, 364, 277, 316, 1048, 12, 22, 4672, 775, 30, 1487, 18, 2293, 12, 2039, 16, 590, 67, 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, 389, 4646, 67, 2293, 12, 2890, 16, 1487, 16, 590, 67, 1650, 16, 707, 16, 1417, 16, 1607, 4672, 364, 277, 316, 1048, 12, 22, 4672, 775, 30, 1487, 18, 2293, 12, 2039, 16, 590, 67, 16...
(game.condition.upper(), sum(map(lambda x: x > 0, damages))))
(game.condition.upper(), sum(map(lambda x: x > 0, game.damage))))
def status(req=0): "Emit status report lines" if not req or req == 1: prstat(_("Stardate"), _("%.1f, Time Left %.2f") \ % (game.state.date, game.state.remtime)) if not req or req == 2: if game.condition != "docked": newcnd() prstat(_("Condition"), _("%s, %i DAMAGES") % \ (game.condition.upper(), sum(map(lambda x: x > 0, damages)))) if not req or req == 3: prstat(_("Position"), "%s , %s" % (game.quadrant, game.sector)) if not req or req == 4: if damaged(DLIFSUP): if game.condition == "docked": s = _("DAMAGED, Base provides") else: s = _("DAMAGED, reserves=%4.2f") % game.lsupres else: s = _("ACTIVE") prstat(_("Life Support"), s) if not req or req == 5: prstat(_("Warp Factor"), "%.1f" % game.warpfac) if not req or req == 6: extra = "" if game.icrystl and (game.options & OPTION_SHOWME): extra = _(" (have crystals)") prstat(_("Energy"), "%.2f%s" % (game.energy, extra)) if not req or req == 7: prstat(_("Torpedoes"), "%d" % (game.torps)) if not req or req == 8: if damaged(DSHIELD): s = _("DAMAGED,") elif game.shldup: s = _("UP,") else: s = _("DOWN,") data = _(" %d%% %.1f units") \ % (int((100.0*game.shield)/game.inshld + 0.5), game.shield) prstat(_("Shields"), s+data) if not req or req == 9: prstat(_("Klingons Left"), "%d" \ % (game.state.remkl+len(game.state.kcmdr)+game.state.nscrem)) if not req or req == 10: if game.options & OPTION_WORLDS: plnet = game.state.galaxy[game.quadrant.i][game.quadrant.j].planet if plnet and plnet.inhabited: prstat(_("Major system"), plnet.name) else: prout(_("Sector is uninhabited")) elif not req or req == 11: attackreport(not req)
ca9c535343fcd397a088ed2ae758e23254397ca1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/ca9c535343fcd397a088ed2ae758e23254397ca1/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 12, 3658, 33, 20, 4672, 315, 17982, 1267, 2605, 2362, 6, 309, 486, 1111, 578, 1111, 422, 404, 30, 846, 5642, 24899, 2932, 18379, 712, 6, 3631, 389, 27188, 18, 21, 74, 16, 2647, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 12, 3658, 33, 20, 4672, 315, 17982, 1267, 2605, 2362, 6, 309, 486, 1111, 578, 1111, 422, 404, 30, 846, 5642, 24899, 2932, 18379, 712, 6, 3631, 389, 27188, 18, 21, 74, 16, 2647, ...
>>> VersionManagement.infer_next_version('3.1.2', '1.0')
>>> VM_infer('3.1.2', '1.0')
def infer_next_version(last_version, increment): """ Given a simple application version (as a StrictVersion), and an increment (1.0, 0.1, or 0.0.1), guess the next version. >>> VersionManagement.infer_next_version('3.2', '0.0.1') '3.2.1' >>> VersionManagement.infer_next_version(StrictVersion('3.2'), '0.0.1') '3.2.1' >>> VersionManagement.infer_next_version('3.2.3', '0.1') '3.3' >>> VersionManagement.infer_next_version('3.1.2', '1.0') '4.0' Subversions never increment parent versions >>> VersionManagement.infer_next_version('3.0.9', '0.0.1') '3.0.10' If it's a prerelease version, just remove the prerelease. >>> VersionManagement.infer_next_version('3.1a1', '0.0.1') '3.1' """ last_version = SummableVersion(str(last_version)) if last_version.prerelease: last_version.prerelease = None return str(last_version) increment = SummableVersion(increment) sum = last_version + increment sum.reset_less_significant(increment) return str(sum)
e305d484aa2294b4f486a574edcd9ecbe9dea495 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/833/e305d484aa2294b4f486a574edcd9ecbe9dea495/hgtools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12455, 67, 4285, 67, 1589, 12, 2722, 67, 1589, 16, 5504, 4672, 3536, 16803, 279, 4143, 2521, 1177, 261, 345, 279, 22307, 1444, 3631, 471, 392, 5504, 261, 21, 18, 20, 16, 374, 18, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12455, 67, 4285, 67, 1589, 12, 2722, 67, 1589, 16, 5504, 4672, 3536, 16803, 279, 4143, 2521, 1177, 261, 345, 279, 22307, 1444, 3631, 471, 392, 5504, 261, 21, 18, 20, 16, 374, 18, 21, ...
line = preparser_ipython.preparse_ipython(line)
line = preparser_ipython.preparse_ipython(line, not continuation)
def do_prefilter_paste(line, continuation): """ Alternate prefilter for input. INPUT: line -- a single line; must *not* have any newlines in it continuation -- whether the input line is really part of the previous line, because of open parens or backslash. """ if '\n' in line: raise RuntimeError, "bug in function that calls do_prefilter_paste -- there can be no newlines in the input" global attached # This is so it's OK to have lots of blank space at the # beginning of any non-continuation line. if continuation: # strip ...'s that appear in examples L = line.lstrip() if L[:3] == '...': line = L[3:] else: line = line.lstrip() line = line.rstrip() if not line[:7] == 'attach ' and not line[:5] == 'load ': for F in attached.keys(): tm = attached[F] if os.path.exists(F) and os.path.getmtime(F) > tm: # Reload F. try: if F[-3:] == '.py': ipmagic('run -i "%s"'%F) elif F[-5:] == '.sage': ipmagic('run -i "%s"'%process_file(F)) elif F[-5:] == '.spyx': X = load_sagex(F) __IPYTHON__.push(X) else: print "Loading of '%s' not implemented (load .py, .spyx, and .sage files)"%F line = '' raise IOError t = os.path.getmtime(F) attached[F] = t except IOError: del attached[F] # Get rid of leading sage: so that pasting of examples from the documentation # works. This is like MAGMA's SetLinePrompt(false). for prompt in ['sage:', '>>>']: if not continuation: while True: strip = False if line[:3] == prompt: line = line[3:].lstrip() strip = True elif line[:5] == prompt: line = line[5:].lstrip() strip = True if not strip: break else: line = line.lstrip() # 'quit' alone on a line to quit. if line.lower() in ['quit', 'exit', 'quit;', 'exit;']: line = '%quit' ################################################################# # An interactive load command, like iload in MAGMA. ################################################################# if line[:6] == 'iload ': try: name = str(eval(line[6:])) except: name = line[6:].strip() try: F = open(name) except IOError: raise ImportError, 'Could not open file "%s"'%name print 'Interactively loading "%s"'%name n = len(__IPYTHON__.input_hist) for L in F.readlines(): L = L.rstrip() Llstrip = L.lstrip() raw_input('sage: %s'%L.rstrip()) __IPYTHON__.input_hist_raw.append(L) if Llstrip[:5] == 'load ' or Llstrip[:7] == 'attach ' \ or Llstrip[:6] == 'iload ': log.offset -= 1 L = do_prefilter_paste(L, False) if len(L.strip()) > 0: ipmagic(L) L = '' else: L = preparser_ipython.preparse_ipython(L) __IPYTHON__.input_hist.append(L) __IPYTHON__.push(L) log.offset += 1 return '' ################################################################# # A "load" command, like \r file in PARI or load "file" in MAGMA ################################################################# if line[:5] == 'load ': # The -i so the file is run with the same environment, # e.g., including the "from sage import *" try: name = eval(line[5:]) except: name = line[5:].strip() if isinstance(name, str): if not os.path.exists(name): raise ImportError, "File '%s' not found (be sure to give .sage, .py, or .spyx extension)"%name elif name[-3:] == '.py': try: line = '%run -i "' + name + '"' except IOError, s: print s raise ImportError, "Error loading '%s'"%name elif name[-5:] == '.sage': try: line = '%run -i "' + process_file(name) + '"' except IOError, s: print s raise ImportError, "Error loading '%s'"%name line = "" elif name[-5:] == '.spyx': line = load_sagex(name) else: raise ImportError, "Loading of '%s' not implemented (load .py, .spyx, and .sage files)"%name line = '' elif line[:13] == 'save_session(': line = 'save_session(locals(), %s'%line[13:] elif line[:14] == 'save_session (': line = 'save_session (locals(), %s'%line[14:] elif line[:13] == 'load_session(': line = 'load_session(locals(), %s'%line[13:] elif line[:14] == 'load_session (': line = 'load_session (locals(), %s'%line[14:] elif ''.join(line.split()) == 'show_identifiers()': line = 'show_identifiers(locals())' # This is an attach command like in MAGMA. The file to attach is # any file that could be loaded. At attach time it is loaded as # above. It is put in a list that is a variable with scope this # interpreter.py file. Each time prefilter_paste is called and # continuation is False, check all attached file names and if any # have changed, compile the file, then use %run to load them again # as above. This is like the MAGMA attach, but in some ways # better. It is very nice for interactive code development. if line[:7] == 'attach ': # The -i so the file is run with the same environment, # e.g., including the "from sage import *" try: name = eval(line[7:]) except: name = line[7:].strip() name = os.path.abspath(name) if not os.path.exists(name): raise ImportError, "File '%s' not found (be sure to give .sage, .py, or .spyx extension)."%name elif name[-3:] == '.py': try: line = '%run -i "' + name + '"' attached[name] = os.path.getmtime(name) except IOError, OSError: raise ImportError, "File '%s' not found."%name elif name[-5:] == '.sage': try: line = '%run -i "' + process_file(name) + '"' attached[name] = os.path.getmtime(name) except IOError, OSError: raise ImportError, "File '%s' not found."%name elif name[-5:] == '.spyx': try: line = load_sagex(name) attached[name] = os.path.getmtime(name) except IOError, OSError: raise ImportError, "File '%s' not found."%name line = '' else: raise ImportError, "Attaching of '%s' not implemented (load .py, .spyx, and .sage files)"%name if len(line) > 0: line = preparser_ipython.preparse_ipython(line) return line
79bab614bd0dd588a81900ff8b4f0f467f94c35a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/79bab614bd0dd588a81900ff8b4f0f467f94c35a/interpreter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1484, 2188, 67, 29795, 12, 1369, 16, 17378, 4672, 3536, 21498, 340, 675, 2188, 364, 810, 18, 225, 12943, 30, 980, 1493, 279, 2202, 980, 31, 1297, 380, 902, 14, 1240, 1281, 191...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1484, 2188, 67, 29795, 12, 1369, 16, 17378, 4672, 3536, 21498, 340, 675, 2188, 364, 810, 18, 225, 12943, 30, 980, 1493, 279, 2202, 980, 31, 1297, 380, 902, 14, 1240, 1281, 191...
print timestamp(), " Syncing rpms for child channels in %s" % parent
child_printed = False rpm_printed = False print timestamp(), " Checking rpms for child channels in %s" % parent
def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print timestamp(), "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print timestamp(), "! This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print timestamp(), "! Error: Unable to create %s" % (options.localdir) raise if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(options.repo, options.localdir, only_systems) if not returncode == 0: print timestamp(), "! rsync process exited with returncode:", returncode raise # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID, only_systems, DELL_SYSTEM_NAMES) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print timestamp(), "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print timestamp(), "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print timestamp(), "- %s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print timestamp(), "+ %s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print timestamp(), " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print timestamp(), " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print timestamp(), "+ Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print timestamp(), "DEBUG: checking for dir:", c_dir if options.verbose: print timestamp(), "Info: Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print timestamp(), "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print timestamp(), "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print timestamp(), "+ Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print timestamp(), "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print timestamp(), "DEBUG: Channel mapping:", channels print timestamp(), "Syncing rpms as needed" for parent in channels: print timestamp(), " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print timestamp(), " Syncing rpms to child channel", channel if options.debug: print timestamp(), "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print timestamp(), "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print timestamp(), "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print timestamp(), "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print timestamp(), "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print timestamp(), "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print timestamp(), "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print timestamp(), "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print timestamp(), "! rhnpush process exited with returncode:", returncode if returncode == 255: print timestamp(), "You may force package uploads with --force" sys.exit(1) print timestamp(), "Completed uploading rpms.\n" if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print timestamp(), "Subscribing registered systems to the %s channel." % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print timestamp(), "Scheduling software installation and actions on clients." client_systems = schedule_actions(key, client_systems) print timestamp(), "Waiting for client actions to complete." client_systems = get_action_results(key, client_systems) print timestamp(), "All actions completed.\n" show_client_results(client_systems) if not options.demo: logout(key)
47bf7c5912da2993d3407be03ab7a0b52c21819b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/47bf7c5912da2993d3407be03ab7a0b52c21819b/dell-satellite-sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 702, 18, 27928, 30, 498, 273, 1083, 783, 67, 9114, 273, 2618, 783, 67, 4327, 67, 5336, 273, 10228, 30138, 292, 17, 92, 5292, 67, 1105, 17, 3567, 17, 25, 3546, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 702, 18, 27928, 30, 498, 273, 1083, 783, 67, 9114, 273, 2618, 783, 67, 4327, 67, 5336, 273, 10228, 30138, 292, 17, 92, 5292, 67, 1105, 17, 3567, 17, 25, 3546, 469, ...
- `j` - (integer) a symbol index
- ``j`` - (integer) a symbol index
def apply_I(self, j): """ Apply the matrix `I=[-1,0,0,1]` to the `j`-th Manin symbol.
671c84d5e7cdbe17c4a9c5101eeb0ee36a73d4c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/671c84d5e7cdbe17c4a9c5101eeb0ee36a73d4c3/manin_symbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 45, 12, 2890, 16, 525, 4672, 3536, 5534, 326, 3148, 1375, 45, 33, 18919, 21, 16, 20, 16, 20, 16, 21, 65, 68, 358, 326, 1375, 78, 68, 17, 451, 8660, 267, 3273, 18, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2230, 67, 45, 12, 2890, 16, 525, 4672, 3536, 5534, 326, 3148, 1375, 45, 33, 18919, 21, 16, 20, 16, 20, 16, 21, 65, 68, 358, 326, 1375, 78, 68, 17, 451, 8660, 267, 3273, 18, 2, -1...
app = wx.PySimpleApp(redirect=True)
app = wx.PySimpleApp(redirect=False)
def Clear(self): self._fgtxt.SetValue("") self._bgtxt.SetValue("") self._fgclr.SetBackgroundColour(self.GetBackgroundColour()) self._bgclr.SetBackgroundColour(self.GetBackgroundColour()) self._fgclr.Refresh() self._bgclr.Refresh()
0bdcd2f50750d235bff2766f3d03d7228aa88dff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/0bdcd2f50750d235bff2766f3d03d7228aa88dff/widgetLayoutTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10121, 12, 2890, 4672, 365, 6315, 2137, 5830, 18, 694, 620, 2932, 7923, 365, 6315, 12370, 5830, 18, 694, 620, 2932, 7923, 365, 6315, 2137, 830, 86, 18, 694, 8199, 26404, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10121, 12, 2890, 4672, 365, 6315, 2137, 5830, 18, 694, 620, 2932, 7923, 365, 6315, 12370, 5830, 18, 694, 620, 2932, 7923, 365, 6315, 2137, 830, 86, 18, 694, 8199, 26404, 12, 2890, 18, ...
libraries, library_dirs)
libraries, library_dirs, build_info)
def build_extensions (self, extensions):
e57e6ae5d4598077ad8628fb46c7746f64a13579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e57e6ae5d4598077ad8628fb46c7746f64a13579/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 9489, 261, 2890, 16, 4418, 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, ...
[ 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, 1361, 67, 9489, 261, 2890, 16, 4418, 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...
return res
return copy.deepcopy(res)
def get_info(self,notfound_action=0): """ Return a dictonary with items that are compatible with numpy.distutils.setup keyword arguments. """ flag = 0 if not self.has_info(): flag = 1 if self.verbosity>0: print self.__class__.__name__ + ':' if hasattr(self, 'calc_info'): self.calc_info() if notfound_action: if not self.has_info(): if notfound_action==1: warnings.warn(self.notfounderror.__doc__) elif notfound_action==2: raise self.notfounderror,self.notfounderror.__doc__ else: raise ValueError(repr(notfound_action))
9098bf39d2bc30cbb0162c92126a5b7c97901371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9098bf39d2bc30cbb0162c92126a5b7c97901371/system_info.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 2890, 16, 902, 7015, 67, 1128, 33, 20, 4672, 3536, 2000, 279, 2065, 265, 814, 598, 1516, 716, 854, 7318, 598, 3972, 18, 4413, 5471, 18, 8401, 4932, 1775, 18, 3536, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 12, 2890, 16, 902, 7015, 67, 1128, 33, 20, 4672, 3536, 2000, 279, 2065, 265, 814, 598, 1516, 716, 854, 7318, 598, 3972, 18, 4413, 5471, 18, 8401, 4932, 1775, 18, 3536, ...
raise DRMError()
raise DRMError("Cannot access DRM-protected book")
def _read_drm(self): self.drmlevel = 0 if '/DRMStorage/Licenses/EUL' in self.entries: self.drmlevel = 5 elif '/DRMStorage/DRMBookplate' in self.entries: self.drmlevel = 3 elif '/DRMStorage/DRMSealed' in self.entries: self.drmlevel = 1 else: return if self.drmlevel < 5: msdes.deskey(self._calculate_deskey(), msdes.DE1) bookkey = msdes.des(self.get_file('/DRMStorage/DRMSealed')) if bookkey[0] != '\000': raise LitError('Unable to decrypt title key!') self.bookkey = bookkey[1:9] else: raise DRMError()
d9b9513a50847b20f58232151be9e985c49ccabd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/d9b9513a50847b20f58232151be9e985c49ccabd/reader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 3069, 81, 12, 2890, 4672, 365, 18, 3069, 81, 2815, 273, 374, 309, 1173, 6331, 49, 3245, 19, 48, 16548, 19, 41, 1506, 11, 316, 365, 18, 8219, 30, 365, 18, 3069, 81, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 3069, 81, 12, 2890, 4672, 365, 18, 3069, 81, 2815, 273, 374, 309, 1173, 6331, 49, 3245, 19, 48, 16548, 19, 41, 1506, 11, 316, 365, 18, 8219, 30, 365, 18, 3069, 81, 28...
def _signalConnAlias(self, conn): f = self.connect if not conn: f = self.disconnect f(self.list_conn_alias, SIGNAL("currentIndexChanged(QString)"), self._loadAliases) f(self.list_alias, SIGNAL("currentIndexChanged(int)"), self._loadAlias)
self.connect(self.list_conn_alias, SIGNAL("currentIndexChanged(QString)"), self._loadAliases) self.connect(self.list_alias, SIGNAL("currentIndexChanged(int)"), self._loadAlias) def disableSignal(self, disable): self.list_alias.blockSignals(disable) self.list_conn_alias.blockSignals(disable)
def _setupSignal(self): clicked = SIGNAL("clicked()") self.connect(self.tab_widget, SIGNAL("currentChanged(int)"), self._syncTabs)
201b1c9e4adf26ba529bd9bf36b9e00c8fe2621e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8560/201b1c9e4adf26ba529bd9bf36b9e00c8fe2621e/gui_option.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 11208, 12, 2890, 4672, 17688, 273, 12057, 1013, 2932, 7475, 329, 1435, 7923, 365, 18, 3612, 12, 2890, 18, 7032, 67, 6587, 16, 12057, 1013, 2932, 2972, 5033, 12, 474, 2225, 363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 11208, 12, 2890, 4672, 17688, 273, 12057, 1013, 2932, 7475, 329, 1435, 7923, 365, 18, 3612, 12, 2890, 18, 7032, 67, 6587, 16, 12057, 1013, 2932, 2972, 5033, 12, 474, 2225, 363...
src = tarfile.open(tarname)
src = tarfile.open(tarname, encoding="iso8859-1")
def _create_testtar(self, mode="w:"): src = tarfile.open(tarname) t = src.getmember("ustar/regtype") t.name = "foo" f = src.extractfile(t) tar = tarfile.open(self.tarname, mode) tar.addfile(t, f) tar.close()
a36cde4ccc24a90604899ea9d25d273a2c92c87c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/a36cde4ccc24a90604899ea9d25d273a2c92c87c/test_tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 3813, 11718, 12, 2890, 16, 1965, 1546, 91, 2773, 4672, 1705, 273, 25857, 18, 3190, 12, 11718, 529, 16, 2688, 1546, 9699, 17258, 17, 21, 7923, 268, 273, 1705, 18, 588, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2640, 67, 3813, 11718, 12, 2890, 16, 1965, 1546, 91, 2773, 4672, 1705, 273, 25857, 18, 3190, 12, 11718, 529, 16, 2688, 1546, 9699, 17258, 17, 21, 7923, 268, 273, 1705, 18, 588, 59...
self.assertRaises(ValueError, time.strftime, '',
self.assertRaises(ValueError, func,
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple (0 is valid for *all* values).
e5bdf5740529b4ba238a2559495df94fbf74c768 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/e5bdf5740529b4ba238a2559495df94fbf74c768/test_time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 9982, 67, 10576, 67, 24609, 12, 2890, 4672, 468, 4344, 3071, 716, 10405, 1435, 4271, 326, 4972, 434, 326, 11191, 2140, 468, 792, 326, 813, 3193, 261, 20, 353, 923, 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, 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, 701, 9982, 67, 10576, 67, 24609, 12, 2890, 4672, 468, 4344, 3071, 716, 10405, 1435, 4271, 326, 4972, 434, 326, 11191, 2140, 468, 792, 326, 813, 3193, 261, 20, 353, 923, 364, ...
realfile = py['datadir'] + re.sub('.html', '.txt', pathInfo) if re.match(archiveRoot, redir) and os.path.exists(realfile):
if redir.startswith(archiveRoot):
def saveData(filename, document): makepath(filename) print document # Now we disect the document and remove the first few lines data = document.split('\n') file(filename, "w").write('\n'.join(data[4:]))
fcb5dafc9f2a61bc0a9afeb4b5eeaa7587ee3421 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/fcb5dafc9f2a61bc0a9afeb4b5eeaa7587ee3421/404_handler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 751, 12, 3459, 16, 1668, 4672, 1221, 803, 12, 3459, 13, 1172, 1668, 468, 4494, 732, 1015, 386, 326, 1668, 471, 1206, 326, 1122, 11315, 2362, 501, 273, 1668, 18, 4939, 2668, 64, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 751, 12, 3459, 16, 1668, 4672, 1221, 803, 12, 3459, 13, 1172, 1668, 468, 4494, 732, 1015, 386, 326, 1668, 471, 1206, 326, 1122, 11315, 2362, 501, 273, 1668, 18, 4939, 2668, 64, 8...
(-0.98174770424681035, -0.83146961230254524), (-0.78539816339744828,
(-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828,
def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: f -- a function of one variable p1, p2 -- two points to refine between plot_points -- (default: 5) the minimal number of plot points. adaptive_recursion -- (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. adaptive_tolerance -- (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: list -- a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.38268343236508989), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.83146961230254524), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.83146961230254524), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.38268343236508989), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points: sage: x = var('x') sage: f = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data
662ccb636620bd0abeed04142bada4e1054b961e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/662ccb636620bd0abeed04142bada4e1054b961e/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
if not (u2 >= c * (2.0 - c) and u2 > c * _exp(1.0 - c)):
if u2 < c * (2.0 - c) or u2 <= c * _exp(1.0 - c):
def vonmisesvariate(self, mu, kappa): """Circular data distribution.
fdaed79a0919ce05f40e1059b1d87de120ba03fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/fdaed79a0919ce05f40e1059b1d87de120ba03fc/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 265, 81, 6141, 1401, 3840, 12, 2890, 16, 4129, 16, 23125, 4672, 3536, 25858, 501, 7006, 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, ...
[ 1, 1, 1, 1, 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, 331, 265, 81, 6141, 1401, 3840, 12, 2890, 16, 4129, 16, 23125, 4672, 3536, 25858, 501, 7006, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
horiz_sep = style['horiz_sep'] border = style['border'] tab_str = style['tab_str'] * style['tab_num'] max_col = style['max_col'] - len(border[3]) - len(border[4]) - len(tab_str) prefix = style['prefix'] suffix = style['suffix'] force_horiz = style['force_horiz']
horiz_sep = astyle['horiz_sep'] border = astyle['border'] tab_str = astyle['tab_str'] * astyle['tab_num'] max_col = astyle['max_col'] - len(border[3]) - len(border[4]) - len(tab_str) prefix = astyle['prefix'] suffix = astyle['suffix'] force_horiz = astyle['force_horiz']
def _wrap_row(row, max_col): """Wrap a single row""" spaces = _RE_BEGINNING_SPACES.match(row).group() row = row[len(spaces):] return wrap(row, initial_indent=spaces, subsequent_indent=spaces, width=max_col)
4d14424c17c19594667895642a640eb6b62c737e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/4d14424c17c19594667895642a640eb6b62c737e/textutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 67, 492, 12, 492, 16, 943, 67, 1293, 4672, 3536, 2964, 279, 2202, 1027, 8395, 7292, 273, 389, 862, 67, 16061, 15870, 67, 6616, 55, 18, 1916, 12, 492, 2934, 1655, 1435, 1027,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4113, 67, 492, 12, 492, 16, 943, 67, 1293, 4672, 3536, 2964, 279, 2202, 1027, 8395, 7292, 273, 389, 862, 67, 16061, 15870, 67, 6616, 55, 18, 1916, 12, 492, 2934, 1655, 1435, 1027,...
content = memcache.get((str(_range[0]),str(_range[1])),namespace=url)
content = memcache.get("%d-%d" % ( _range[0], _range[1] ),namespace=url)
def set_last_modified(url,last_modified): query = URL().all().filter('url =',url) entity = query.get() if entity: entity.last_modified = last_modified else: entity = URL(url=url,last_modified=last_modified) entity.put()
bd51bcaf67daf9c48b3cff1bb149f333f4b228bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9599/bd51bcaf67daf9c48b3cff1bb149f333f4b228bf/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2722, 67, 7342, 12, 718, 16, 2722, 67, 7342, 4672, 843, 273, 1976, 7675, 454, 7675, 2188, 2668, 718, 273, 2187, 718, 13, 1522, 273, 843, 18, 588, 1435, 309, 1522, 30, 1522, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2722, 67, 7342, 12, 718, 16, 2722, 67, 7342, 4672, 843, 273, 1976, 7675, 454, 7675, 2188, 2668, 718, 273, 2187, 718, 13, 1522, 273, 843, 18, 588, 1435, 309, 1522, 30, 1522, ...
scripts=["archivemail"],
scripts=["archivemail.py"],
def check_python_version(): """Abort if we are running on python < v2.0""" too_old_error = """This program requires python v2.0 or greater.
83ac69d0f816dce75a58f5cf8f93197675d7d31d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1746/83ac69d0f816dce75a58f5cf8f93197675d7d31d/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 8103, 67, 1589, 13332, 3536, 13572, 309, 732, 854, 3549, 603, 5790, 411, 331, 22, 18, 20, 8395, 4885, 67, 1673, 67, 1636, 273, 3536, 2503, 5402, 4991, 5790, 331, 22, 18, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 866, 67, 8103, 67, 1589, 13332, 3536, 13572, 309, 732, 854, 3549, 603, 5790, 411, 331, 22, 18, 20, 8395, 4885, 67, 1673, 67, 1636, 273, 3536, 2503, 5402, 4991, 5790, 331, 22, 18, 20, ...
return p
return p
#ifndef Py_UNICODE_WIDE if sys.maxunicode > 0xffff: if (x > 0x10000): res = unicode_call_errorhandler( errors, "rawunicodeescape", "\\Uxxxxxxxx out of range", s, size, pos, pos+1) pos = i = res[1] p += res[0] i += 1 else: if (x > 0x10000): res = unicode_call_errorhandler( errors, "rawunicodeescape", "\\Uxxxxxxxx out of range", s, size, pos, pos+1) pos = i = res[1] p += res[0]
1068d8674b2ec1a7e31a58d2ec90350e5153201d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/1068d8674b2ec1a7e31a58d2ec90350e5153201d/app_codecs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 4707, 67, 26642, 67, 59, 10385, 309, 2589, 18, 1896, 9124, 405, 374, 20431, 30, 309, 261, 92, 405, 374, 92, 23899, 4672, 400, 273, 5252, 67, 1991, 67, 1636, 4176, 12, 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, 468, 430, 82, 536, 4707, 67, 26642, 67, 59, 10385, 309, 2589, 18, 1896, 9124, 405, 374, 20431, 30, 309, 261, 92, 405, 374, 92, 23899, 4672, 400, 273, 5252, 67, 1991, 67, 1636, 4176, 12, 13...
if node.parent.hasattr('id') and not self.use_latex_toc:
elif node.parent.hasattr('id') and not self.use_latex_toc:
def depart_title(self, node): self.body.append(self.context.pop()) # BUG level depends on style. if node.parent.hasattr('id') and not self.use_latex_toc: # pdflatex allows level 0 to 3 # ToC would be the only on level 0 so i choose to decrement the rest. # "Table of contents" bookmark to see the ToC. To avoid this # we set all zeroes to one. l = self.section_level if l>0: l = l-1 self.body.append('\\pdfbookmark[%d]{%s}{%s}\n' % \ (l,node.astext(),node.parent['id']))
ba3b8466618c47ebb705f31d29708a7418853ca9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/ba3b8466618c47ebb705f31d29708a7418853ca9/latex2e.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 2649, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 12, 2890, 18, 2472, 18, 5120, 10756, 468, 10937, 43, 1801, 10935, 603, 2154, 18, 1327, 756, 18, 2938, 18, 5332, 1747,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 2649, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 12, 2890, 18, 2472, 18, 5120, 10756, 468, 10937, 43, 1801, 10935, 603, 2154, 18, 1327, 756, 18, 2938, 18, 5332, 1747,...
else: instpkgs = [] availpkgs = [] if po: if po.repoid == 'installed': instpkgs.append(po) else: availpkgs.append(po) elif kwargs.has_key('pattern'):
instpkgs = [] availpkgs = [] if po: if po.repoid == 'installed': instpkgs.append(po) else: availpkgs.append(po) elif kwargs.has_key('pattern'): (e, m, u) = self.rpmdb.matchPackageNames([kwargs['pattern']]) instpkgs.extend(e) instpkgs.extend(m) if not instpkgs:
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of txmbr of the items it marked for update""" # check for args - if no po nor kwargs, do them all # if po, do it, ignore all else # if no po do kwargs # uninstalled pkgs called for update get returned with errors in a list, maybe?
833e6056ee3711813167142d53802e464a0ac258 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/833e6056ee3711813167142d53802e464a0ac258/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 8275, 33, 7036, 16, 29468, 29198, 33, 7036, 16, 2826, 4333, 4672, 3536, 698, 358, 2267, 364, 1089, 326, 761, 12, 87, 13, 1269, 18, 8275, 353, 279, 2181, 733, 300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 8275, 33, 7036, 16, 29468, 29198, 33, 7036, 16, 2826, 4333, 4672, 3536, 698, 358, 2267, 364, 1089, 326, 761, 12, 87, 13, 1269, 18, 8275, 353, 279, 2181, 733, 300, ...
self.runner = ['python', iptest_path, '-v']
self.runner = tools.cmd2argv(iptest_path) + ['-v']
def __init__(self,runner='iptest',params=None): """Create new test runner.""" if runner == 'iptest': # Find our own 'iptest' script OS-level entry point try: iptest_path = os.path.abspath(find_cmd('iptest')) except FindCmdError: # Script not installed (may be the case for testing situations # that are running from a source tree only), pull from internal # path: iptest_path = pjoin(genutils.get_ipython_package_dir(), 'scripts','iptest') self.runner = ['python', iptest_path, '-v'] else: self.runner = ['python', os.path.abspath(find_cmd('trial'))] if params is None: params = [] if isinstance(params,str): params = [params] self.params = params
91791416ab66f3e518bf5315760c09f0f06f8c9b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3900/91791416ab66f3e518bf5315760c09f0f06f8c9b/iptest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18156, 2218, 8138, 395, 2187, 2010, 33, 7036, 4672, 3536, 1684, 394, 1842, 8419, 12123, 309, 8419, 422, 296, 8138, 395, 4278, 468, 4163, 3134, 4953, 296, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 18156, 2218, 8138, 395, 2187, 2010, 33, 7036, 4672, 3536, 1684, 394, 1842, 8419, 12123, 309, 8419, 422, 296, 8138, 395, 4278, 468, 4163, 3134, 4953, 296, 8...
if line.startswith("["):
if line.startswith("Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id="): bug = line[53:] elif line.startswith("["):
def parseLogLine(logInfo): mapping = { "e": "editorial", "a": "authors", "c": "conformance-checkers", "g": "gecko", "i": "internet-explorer", "o": "opera", "w": "webkit", "r": "google-gears", "t": "tools", "0": "draft-content", "1": "stable-draft", "2": "implemented", "3": "stable" } changes = [] classes = [] for line in logInfo: if line.startswith("["): for c in line: if c in mapping: classes.append(mapping[c]) if c == "]": if (not classes) or (len(classes) == 1 and classes[0] == "editorial"): classes.append("none") if c == ")": break changes.append(line.split(") ", 1)[-1]) else: changes.append(line) return {"changes": changes, "classes": classes}
943afbec53903141cfdc88408bfe2ea256880388 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10248/943afbec53903141cfdc88408bfe2ea256880388/trackerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1343, 1670, 12, 1330, 966, 4672, 2874, 273, 288, 315, 73, 6877, 315, 9177, 649, 3113, 315, 69, 6877, 315, 19368, 3113, 315, 71, 6877, 315, 591, 687, 1359, 17, 1893, 414, 3113, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1343, 1670, 12, 1330, 966, 4672, 2874, 273, 288, 315, 73, 6877, 315, 9177, 649, 3113, 315, 69, 6877, 315, 19368, 3113, 315, 71, 6877, 315, 591, 687, 1359, 17, 1893, 414, 3113, 31...
list.InsertSizedColumn(0, "URL", min=100, greedy=False)
list.InsertSizedColumn(0, "File", min=100, greedy=False)
def createColumns(self, list): list.InsertSizedColumn(0, "URL", min=100, greedy=False) list.InsertSizedColumn(1, "Line", min=10, greedy=False) list.InsertSizedColumn(2, "Match", min=300, greedy=True)
ac13a415d46371714bb2a8ae04bcd47af7cfe478 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11522/ac13a415d46371714bb2a8ae04bcd47af7cfe478/search_in_files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3380, 12, 2890, 16, 666, 4672, 666, 18, 4600, 55, 1235, 1494, 12, 20, 16, 315, 812, 3113, 1131, 33, 6625, 16, 5174, 24009, 33, 8381, 13, 666, 18, 4600, 55, 1235, 1494, 12, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3380, 12, 2890, 16, 666, 4672, 666, 18, 4600, 55, 1235, 1494, 12, 20, 16, 315, 812, 3113, 1131, 33, 6625, 16, 5174, 24009, 33, 8381, 13, 666, 18, 4600, 55, 1235, 1494, 12, 21, ...
max_length=None, min_length=None, error_message=_(u'Enter a tax number field (NIP) in the format XXX-XXX-XX-XX or XX-XX-XXX-XXX.'), *args, **kwargs)
max_length=None, min_length=None, *args, **kwargs)
def __init__(self, *args, **kwargs): super(PLTaxNumberField, self).__init__(r'^\d{3}-\d{3}-\d{2}-\d{2}$|^\d{2}-\d{2}-\d{3}-\d{3}$', max_length=None, min_length=None, error_message=_(u'Enter a tax number field (NIP) in the format XXX-XXX-XX-XX or XX-XX-XXX-XXX.'), *args, **kwargs)
5c0607caf55cab784871570010f3e0845eef5e5f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9988/5c0607caf55cab784871570010f3e0845eef5e5f/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 6253, 7731, 1854, 974, 16, 365, 2934, 972, 2738, 972, 12, 86, 11, 17134, 72, 95, 23, 97, 6943, 72, 95, 23, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 6253, 7731, 1854, 974, 16, 365, 2934, 972, 2738, 972, 12, 86, 11, 17134, 72, 95, 23, 97, 6943, 72, 95, 23, ...
fname = urllib2.quote(elixer.fix_filename(orig_name, self.res_num))
fixed_name = elixer.fix_filename(orig_name, self.res_num) fname = urllib2.quote(fixed_name.encode('utf-8'))
def handle_file(self, file_elem): orig_name = file_elem.find('.//NAME').text
b434cb14ac738c2e839d622cc4ec7bc633af0f1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12927/b434cb14ac738c2e839d622cc4ec7bc633af0f1a/bb9_course.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 768, 12, 2890, 16, 585, 67, 10037, 4672, 1647, 67, 529, 273, 585, 67, 10037, 18, 4720, 2668, 18, 759, 1985, 16063, 955, 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, 1640, 67, 768, 12, 2890, 16, 585, 67, 10037, 4672, 1647, 67, 529, 273, 585, 67, 10037, 18, 4720, 2668, 18, 759, 1985, 16063, 955, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
this = apply(_quickfix.new_NestedPartyRole, args)
this = _quickfix.new_NestedPartyRole(*args)
def __init__(self, *args): this = apply(_quickfix.new_NestedPartyRole, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8649, 17619, 2996, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 8649, 17619, 2996, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
if buf != 'AB':
bytes = struct.unpack('B' * 2, buf) if bytes != (65, 66):
def xyz_3(): content = """Y X Z
652866744a864ab589481120e2ef01c9a8f03d6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/652866744a864ab589481120e2ef01c9a8f03d6f/xyz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14779, 67, 23, 13332, 225, 913, 273, 3536, 61, 1139, 2285, 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, 14779, 67, 23, 13332, 225, 913, 273, 3536, 61, 1139, 2285, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
data['product'] = self._product_id_to_name(data['product'] r = self._proxy.bugzilla.editComponent(data)
data['product'] = self._product_id_to_name(data['product']) r = self._proxy.bugzilla.editComponent(data,self.user,self.password)
def _editcomponent(self,data): edit_required_fields = ('initialowner','product','component') for field in edit_required_fields: if field not in data or not data[field]: raise TypeError, "mandatory field missing: %s" % field if type(data['product']) == int: data['product'] = self._product_id_to_name(data['product'] r = self._proxy.bugzilla.editComponent(data) return r
aa14a42b0dc429e8e693809f24e6587063216e59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5050/aa14a42b0dc429e8e693809f24e6587063216e59/rhbugzilla.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4619, 4652, 12, 2890, 16, 892, 4672, 3874, 67, 4718, 67, 2821, 273, 7707, 6769, 8443, 17023, 5896, 17023, 4652, 6134, 364, 652, 316, 3874, 67, 4718, 67, 2821, 30, 309, 652, 486, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4619, 4652, 12, 2890, 16, 892, 4672, 3874, 67, 4718, 67, 2821, 273, 7707, 6769, 8443, 17023, 5896, 17023, 4652, 6134, 364, 652, 316, 3874, 67, 4718, 67, 2821, 30, 309, 652, 486, 3...
rsync_filenames_client += "tcos_share/%s " %( os.path.basename(filename).replace(" ", "\ ").replace("(", "\(").replace(")", "\)").replace("*", "\*").replace("!", "\!").replace("?", "\?").replace("\"", "\\\"") ) rsync_filenames_server += "%s " %( filename.replace(" ", "\ ").replace("(", "\(").replace(")", "\)").replace("*", "\*").replace("!", "\!").replace("?", "\?").replace("\"", "\\\"") )
basename_scape=os.path.basename(filename) abspath_scape=filename for scape in str_scapes: basename_scape=basename_scape.replace("%s" %scape, "\%s" %scape) abspath_scape=abspath_scape.replace("%s" %scape, "\%s" %scape) rsync_filenames_client += "tcos_share/%s " %( basename_scape ) rsync_filenames_server += "%s " %( abspath_scape )
def menu_event_all(self, action): start1=time() # don't make actions in clients not selected if self.main.config.GetVar("selectedhosts") == 1: allclients=[] model=self.main.tabla.get_model() rows = [] model.foreach(lambda model, path, iter: rows.append(path)) for host in rows: iter=model.get_iter(host) if model.get_value(iter, COL_SEL_ST): allclients.append(model.get_value(iter, COL_IP)) else: # get all clients connected allclients=self.main.localdata.allclients allclients_txt="" for client in allclients: allclients_txt+="\n %s" %(client) if len(self.main.localdata.allclients) == 0: shared.info_msg ( _("No clients connected, press refresh button.") ) return if action == 0: # Ask for reboot msg=_( _("Do you want to reboot the following hosts:%s?" ) \ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "reboot" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "reboot" ) return if action == 1: # Ask for poweroff msg=_( _("Do you want to poweroff the following hosts:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "poweroff" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "poweroff" ) return if action == 2: # Ask for lock screens msg=_( _("Do you want to lock the following screens:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "lockscreen" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "lockscreen" ) return if action == 3: # Ask for unlock screens msg=_( _("Do you want to unlock the following screens:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "unlockscreen" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "unlockscreen" ) return if action == 4: connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) print_debug("menu_event_all() allclients=%s" %allclients) msg=_( _("Do you want to logout the following users:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): newusernames=[] remote_cmd="/usr/lib/tcos/session-cmd-send LOGOUT" for user in connected_users: if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) self.main.xmlrpc.DBus("exec", remote_cmd ) else: newusernames.append(user) result = self.main.dbus_action.do_exec( newusernames ,remote_cmd ) if not result: shared.error_msg ( _("Error while exec remote app:\nReason:%s") %( self.main.dbus_action.get_error_msg() ) ) if action == 5: # Ask for restart X session msg=_( _("Do you want to restart X screens:%s?" )\ %(allclients_txt) ) if shared.ask_msg ( msg ): #gobject.timeout_add( 50, self.action_for_clients, allclients, "restartx" ) self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "restartx" ) return if action == 6: connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) print_debug("menu_event_all() client=%s username=%s" %(client, connected_users[-1]) ) self.askfor(mode="exec", users=connected_users) if action == 7: connected_users=[] for client in allclients: if self.main.localdata.IsLogged(client): connected_users.append(self.main.localdata.GetUsernameAndHost(client)) print_debug("menu_event_all() client=%s username=%s" %(client, connected_users[-1]) ) self.askfor(mode="mess", users=connected_users) if action == 8: # demo mode os.system("killall x11vnc 2>/dev/null") #generate password vnc passwd=''.join( Random().sample(string.letters+string.digits, 12) ) self.main.exe_cmd("x11vnc -storepasswd %s %s >/dev/null 2>&1" \ %(passwd, os.path.expanduser('~/.tcosvnc')) ) # start x11vnc in local self.main.exe_cmd( "x11vnc -shared -noshm -viewonly -forever -rfbauth %s" %( os.path.expanduser('~/.tcosvnc') ) ) self.main.write_into_statusbar( _("Waiting for start demo mode...") ) # need to wait for start, PingPort loop from ping import PingPort status = "CLOSED" max_wait=10 wait=0 while status != "OPEN": status=PingPort("127.0.0.1", 5900).get_status() if status == "CLOSED": sleep(1) wait+=1 if wait > max_wait: break total=0 for client in allclients: if self.main.localdata.IsLogged(client): self.main.xmlrpc.vnc("genpass", client, passwd ) # get server ip server_ip=self.main.xmlrpc.GetStandalone("get_server") print_debug("menu_event_all() vnc server ip=%s" %(server_ip)) # start vncviewer self.main.xmlrpc.vnc("startclient", client, server_ip ) total+=1 if total < 1: self.main.write_into_statusbar( _("No users logged.") ) # kill x11vnc self.main.exe_cmd("killall x11vnc 2>/dev/null") else: self.main.write_into_statusbar( _("Running in demo mode with %s clients.") %(total) ) self.main.progresstext.set_text( _("Running in demo mode from host %s...") %server_ip ) # configure action for Stop button self.main.progressstop.show() # use new function to stop self.main.progressstop_target="vnc" self.main.progressstop_args['ip']="" self.main.progresstext.show() if action == 9: # capture screenshot of all and show minis # Ask for unlock screens self.main.worker=shared.Workers(self.main, None, None) self.main.worker.set_for_all_action(self.action_for_clients,\ allclients, "screenshot" )
02aa26e9decb17b7531b02e8a9add63d01cedfb3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/02aa26e9decb17b7531b02e8a9add63d01cedfb3/TcosActions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 454, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 225, 468, 2727, 1404, 1221, 4209, 316, 7712, 486, 3170, 309, 365, 18, 5254, 18, 1425, 18, 967, 1537, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 454, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 225, 468, 2727, 1404, 1221, 4209, 316, 7712, 486, 3170, 309, 365, 18, 5254, 18, 1425, 18, 967, 1537, 2932, ...
return "http://localhost:2310/common/%s.html" % name
return "http://localhost:%d/%s.html" % (self.webserver.port, name)
def _pageURL(self, name): return "http://localhost:2310/common/%s.html" % name
42a6bba019502106b50182370f7e0cd3f71b0d4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3504/42a6bba019502106b50182370f7e0cd3f71b0d4d/implicit_waits_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2433, 1785, 12, 2890, 16, 508, 4672, 327, 315, 2505, 2207, 13014, 30, 4366, 2163, 19, 6054, 5258, 87, 18, 2620, 6, 738, 508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2433, 1785, 12, 2890, 16, 508, 4672, 327, 315, 2505, 2207, 13014, 30, 4366, 2163, 19, 6054, 5258, 87, 18, 2620, 6, 738, 508, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
elif c.id.val == pr2.id.val:
elif c.id.val == pr2.id.val and isinstance(c, ProjectI):
def test1071(self): uuid = self.root.sf.getAdminService().getEventContext().sessionUuid ipojo = self.root.sf.getPojosService() query = self.root.sf.getQueryService() update = self.root.sf.getUpdateService() #projects pr1 = ProjectI() pr1.setName(omero.RString('test1071-pr1-%s' % (uuid))) pr1 = update.saveAndReturnObject(pr1)
c8092f897dc095636eab38a278deb48cad5c1502 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12409/c8092f897dc095636eab38a278deb48cad5c1502/tickets2000.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2163, 11212, 12, 2890, 4672, 3822, 273, 365, 18, 3085, 18, 21668, 18, 588, 4446, 1179, 7675, 588, 1133, 1042, 7675, 3184, 5897, 277, 1631, 30952, 273, 365, 18, 3085, 18, 21668, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2163, 11212, 12, 2890, 4672, 3822, 273, 365, 18, 3085, 18, 21668, 18, 588, 4446, 1179, 7675, 588, 1133, 1042, 7675, 3184, 5897, 277, 1631, 30952, 273, 365, 18, 3085, 18, 21668, 18,...
if __name__ == '__main__':
def cli():
def server_activate(self): self.base.server_activate(self) if self.callback: self.callback()
1d384634bf8f9e6180839048207bfd3539bbbc51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1d384634bf8f9e6180839048207bfd3539bbbc51/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1438, 67, 10014, 12, 2890, 4672, 365, 18, 1969, 18, 3567, 67, 10014, 12, 2890, 13, 309, 365, 18, 3394, 30, 365, 18, 3394, 1435, 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, 1438, 67, 10014, 12, 2890, 4672, 365, 18, 1969, 18, 3567, 67, 10014, 12, 2890, 13, 309, 365, 18, 3394, 30, 365, 18, 3394, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
sel = self.selection
sel = self.selection
def OnHeightInc(self, event): sel = self.selection if sel and sel.selection != self: sel.size.y = sel.size.y + 1 sel.startSize.y = sel.startSize.y + 1 sel.resizeCtrl() sel.setSelection()
102ae9e4df0cfddbfdb2acfb7df920a5d291af8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/102ae9e4df0cfddbfdb2acfb7df920a5d291af8c/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2686, 14559, 12, 2890, 16, 871, 4672, 357, 273, 365, 18, 10705, 309, 357, 471, 357, 18, 10705, 480, 365, 30, 357, 18, 1467, 18, 93, 273, 357, 18, 1467, 18, 93, 397, 404, 357, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2686, 14559, 12, 2890, 16, 871, 4672, 357, 273, 365, 18, 10705, 309, 357, 471, 357, 18, 10705, 480, 365, 30, 357, 18, 1467, 18, 93, 273, 357, 18, 1467, 18, 93, 397, 404, 357, ...
print >> sys.stderr, "Failed to get CVS Root for %s" % filename return None
return self.root.replace(":","")
def GetCleanRoot(self): parts = self.root.split('@') if len(parts) > 1: # we don't want the extra colon return parts[1].replace(":","") print >> sys.stderr, "Failed to get CVS Root for %s" % filename return None
b3996707b0c9b92f622a50309a45f5c44e3d42fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/b3996707b0c9b92f622a50309a45f5c44e3d42fd/symbolstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 7605, 2375, 12, 2890, 4672, 2140, 273, 365, 18, 3085, 18, 4939, 2668, 36, 6134, 309, 562, 12, 6019, 13, 405, 404, 30, 468, 732, 2727, 1404, 2545, 326, 2870, 13336, 327, 2140, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7605, 2375, 12, 2890, 4672, 2140, 273, 365, 18, 3085, 18, 4939, 2668, 36, 6134, 309, 562, 12, 6019, 13, 405, 404, 30, 468, 732, 2727, 1404, 2545, 326, 2870, 13336, 327, 2140, 63, ...
return ('UNIX', self.socket.getsockname())
return ('UNIX', repr(self.socket.getsockname()))
def getHost(self): return ('UNIX', self.socket.getsockname())
b179b298195f5b78c8f637eca6973ab49e6d0b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b179b298195f5b78c8f637eca6973ab49e6d0b89/unix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8580, 12, 2890, 4672, 327, 7707, 10377, 60, 2187, 365, 18, 7814, 18, 14665, 975, 529, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8580, 12, 2890, 4672, 327, 7707, 10377, 60, 2187, 365, 18, 7814, 18, 14665, 975, 529, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
length, = struct.unpack('>H', buffer(raw, n, 2))
length, = struct.unpack('>H', raw[n:n+2])
def __init__(self, filename = None):
cd62e8e6b90871124d426461d04b88bd4b1de33c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8084/cd62e8e6b90871124d426461d04b88bd4b1de33c/xauth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.winExifReader.Close()
def readEXIF(self,evt): print "Selected ",self.ExifReaderSelected self.winExifReader.Close() picture=wx.FileDialog(self) picture.SetWildcard("*.jpg") picture.ShowModal() pathPicture=picture.GetPath() if pathPicture !="" or None: myPicture=GeoExif(pathPicture) def read(): self.consoleEntry.AppendText("\n\nSelected metada in the EXIF header of the picture : \n") self.consoleEntry.AppendText("---------------------------------------------------------------\n") if self.ExifReaderSelected=="All EXIF metadata": self.consoleEntry.AppendText(myPicture.readExifAll()) if self.ExifReaderSelected=="Date/Time/Lat./Long.": dateTime=myPicture.readDateTime() datetimeString=dateTime[0]+":"+dateTime[1] if len(datetimeString)>5: self.consoleEntry.AppendText(datetimeString) self.consoleEntry.AppendText(" lat./long.="+str(myPicture.readLatLong())) else: self.consoleEntry.AppendText("None") start_new_thread(read,()) self.winExifReader.Close()
91ff1b00eaedb2025746d6c2889431911edf54ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11453/91ff1b00eaedb2025746d6c2889431911edf54ca/gpicsync-GUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2294, 5501, 12, 2890, 16, 73, 11734, 4672, 1172, 315, 7416, 3104, 2890, 18, 424, 430, 2514, 7416, 225, 15406, 33, 27226, 18, 812, 6353, 12, 2890, 13, 15406, 18, 694, 12121, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2294, 5501, 12, 2890, 16, 73, 11734, 4672, 1172, 315, 7416, 3104, 2890, 18, 424, 430, 2514, 7416, 225, 15406, 33, 27226, 18, 812, 6353, 12, 2890, 13, 15406, 18, 694, 12121, 2932, ...
fileCount +=1
def createDVDAuthorXMLNoMenus(screensize, numberofitems): """Creates the xml file for dvdauthor containing no menus.""" # creates a simple DVD with no menus that chains the videos one after the other # can contain an intro movie and each title can have a details page # displayed before each title write( "Creating DVD XML file for dvd author (No Menus)") dvddom = xml.dom.minidom.parseString( ''' <dvdauthor> <vmgm> </vmgm> </dvdauthor>''') dvdauthor_element = dvddom.documentElement titleset = dvddom.createElement("titleset") titles = dvddom.createElement("titles") titleset.appendChild(titles) dvdauthor_element.appendChild(titleset) dvdauthor_element.insertBefore(dvddom.createComment("dvdauthor XML file created by MythBurn script"), dvdauthor_element.firstChild ) dvdauthor_element.setAttribute("dest",os.path.join(getTempPath(),"dvd")) fileCount = 0 itemNum = 1 if wantIntro: node = themeDOM.getElementsByTagName("intro")[0] introFile = node.attributes["filename"].value titles.appendChild(dvddom.createComment("Intro movie")) pgc = dvddom.createElement("pgc") vob = dvddom.createElement("vob") vob.setAttribute("file",os.path.join(getThemeFile(themeName, videomode + '_' + introFile))) pgc.appendChild(vob) titles.appendChild(pgc) post = dvddom.createElement("post") post .appendChild(dvddom.createTextNode("jump title 2 chapter 1;")) pgc.appendChild(post) titles.appendChild(pgc) fileCount +=1 del pgc del vob del post while itemNum <= numberofitems: write( "Adding item %s" % itemNum) pgc = dvddom.createElement("pgc") if wantDetailsPage: #add the detail page intro for this item vob = dvddom.createElement("vob") vob.setAttribute("file",os.path.join(getTempPath(),"details-%s.mpg" % itemNum)) pgc.appendChild(vob) fileCount +=1 del vob vob = dvddom.createElement("vob") vob.setAttribute("file", os.path.join(getItemTempPath(itemNum), "final.mpg")) vob.setAttribute("chapters", createVideoChaptersFixedLength(chapterLength, getLengthOfVideo(itemNum))) pgc.appendChild(vob) del vob post = dvddom.createElement("post") if itemNum == numberofitems: post.appendChild(dvddom.createTextNode("exit;")) else: if wantIntro: post.appendChild(dvddom.createTextNode("jump title %d chapter 1;" % (itemNum + 2))) else: post.appendChild(dvddom.createTextNode("jump title %d chapter 1;" % (itemNum + 1))) pgc.appendChild(post) fileCount +=1 titles.appendChild(pgc) del pgc itemNum +=1 #Save xml to file WriteXMLToFile (dvddom,os.path.join(getTempPath(),"dvdauthor.xml")) #Destroy the DOM and free memory dvddom.unlink()
e80359024e03fa8904e3d3c802be0384d08b04e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/e80359024e03fa8904e3d3c802be0384d08b04e1/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 40, 21544, 3594, 4201, 2279, 29755, 12, 1017, 266, 773, 554, 16, 1300, 792, 3319, 4672, 3536, 2729, 326, 2025, 585, 364, 12494, 72, 4161, 4191, 1158, 21374, 12123, 225, 468, 3414, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 40, 21544, 3594, 4201, 2279, 29755, 12, 1017, 266, 773, 554, 16, 1300, 792, 3319, 4672, 3536, 2729, 326, 2025, 585, 364, 12494, 72, 4161, 4191, 1158, 21374, 12123, 225, 468, 3414, 2...
self.subtitle_info.append((i, desc.contents.name))
if i > 0: self.subtitle_info.append((i, desc.contents.name))
def setup_subtitle_info(self): self.subtitle_info = list() try: desc = libvlc.libvlc_video_get_spu_description(self.media_player, self.exc.ref()) self.exc.check() count = libvlc.libvlc_video_get_spu_count(self.media_player, self.exc.ref()) self.exc.check() first_desc = desc for i in range(0, count): self.subtitle_info.append((i, desc.contents.name)) desc = desc.contents.next libvlc.libvlc_track_description_release(first_desc) except VLCError, e: logging.warn("exception when getting list of subtitle tracks")
7256341c261e8d2e6285543b606b219ea2cc66c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/7256341c261e8d2e6285543b606b219ea2cc66c9/vlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 1717, 2649, 67, 1376, 12, 2890, 4672, 365, 18, 1717, 2649, 67, 1376, 273, 666, 1435, 775, 30, 3044, 273, 2561, 27362, 18, 2941, 27362, 67, 9115, 67, 588, 67, 1752, 89, 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, 3875, 67, 1717, 2649, 67, 1376, 12, 2890, 4672, 365, 18, 1717, 2649, 67, 1376, 273, 666, 1435, 775, 30, 3044, 273, 2561, 27362, 18, 2941, 27362, 67, 9115, 67, 588, 67, 1752, 89, 67, ...
if widget.tag == "widget":
w_tag = widget.tag if w_tag == "widget":
def readSkin(screen, skin, names, desktop): if not isinstance(names, list): names = [names] name = "<embedded-in-'%s'>" % screen.__class__.__name__ # try all skins, first existing one have priority for n in names: myscreen, path = lookupScreen(n) if myscreen is not None: # use this name for debug output name = n break # otherwise try embedded skin myscreen = myscreen or getattr(screen, "parsedSkin", None) # try uncompiled embedded skin if myscreen is None and getattr(screen, "skin", None): print "Looking for embedded skin" myscreen = screen.parsedSkin = xml.etree.cElementTree.fromstring(screen.skin) #assert myscreen is not None, "no skin for screen '" + repr(names) + "' found!" if myscreen is None: print "No skin to read..." emptySkin = "<screen></screen>" myscreen = screen.parsedSkin = xml.etree.cElementTree.fromstring(emptySkin) screen.skinAttributes = [ ] skin_path_prefix = getattr(screen, "skin_path", path) collectAttributes(screen.skinAttributes, myscreen, skin_path_prefix, ignore=["name"]) screen.additionalWidgets = [ ] screen.renderer = [ ] visited_components = set() # now walk all widgets for widget in myscreen.findall("widget"): get_attr = widget.attrib.get # ok, we either have 1:1-mapped widgets ('old style'), or 1:n-mapped # widgets (source->renderer). wname = get_attr('name') wsource = get_attr('source') if wname is None and wsource is None: print "widget has no name and no source!" continue if wname: #print "Widget name=", wname visited_components.add(wname) # get corresponding 'gui' object try: attributes = screen[wname].skinAttributes = [ ] except: raise SkinError("component with name '" + wname + "' was not found in skin of screen '" + name + "'!") #print "WARNING: component with name '" + wname + "' was not found in skin of screen '" + name + "'!"
726a696a8d423d9f994767f2df01e135f07fca96 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/726a696a8d423d9f994767f2df01e135f07fca96/skin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 26827, 12, 9252, 16, 18705, 16, 1257, 16, 21304, 4672, 309, 486, 1549, 12, 1973, 16, 666, 4672, 1257, 273, 306, 1973, 65, 225, 508, 273, 3532, 20722, 17, 267, 6627, 9, 87, 28533, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26827, 12, 9252, 16, 18705, 16, 1257, 16, 21304, 4672, 309, 486, 1549, 12, 1973, 16, 666, 4672, 1257, 273, 306, 1973, 65, 225, 508, 273, 3532, 20722, 17, 267, 6627, 9, 87, 28533, ...
def WalkPath(sourcePath): if os.path.isfile(sourcePath): filenames = list() filenames.append(os.path.basename(sourcePath)) yield os.path.dirname(sourcePath), list(), filenames else: for dirpath, dirnames, filenames in os.walk(sourcePath): yield dirpath, dirnames, filenames
if not os.path.exists(info.packagePath): os.mkdir(info.packagePath)
def WalkPath(sourcePath): if os.path.isfile(sourcePath): filenames = list() filenames.append(os.path.basename(sourcePath)) yield os.path.dirname(sourcePath), list(), filenames else: for dirpath, dirnames, filenames in os.walk(sourcePath): yield dirpath, dirnames, filenames
7f3312f1643157a93dee00ef14734ec6d030fbd5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3612/7f3312f1643157a93dee00ef14734ec6d030fbd5/packagezip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 486, 1140, 18, 803, 18, 1808, 12, 1376, 18, 5610, 743, 4672, 1140, 18, 26686, 12, 1376, 18, 5610, 743, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 309, 486, 1140, 18, 803, 18, 1808, 12, 1376, 18, 5610, 743, 4672, 1140, 18, 26686, 12, 1376, 18, 5610, 743, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
r"$V(\varphi)=V_0 + \frac{1}{2}m_0^2\varphi^2$"]
r"$V(\varphi)=U_0 + \frac{1}{2}m_0^2\varphi^2$"]
def get_cmb_models_K1(): msq = c.make_wrapper_model(os.path.join(resdir,"cmb-msqphisq-5e-62-1.0245e-58-1e-61.hf5")) lph = c.make_wrapper_model(os.path.join(resdir, "cmb-lambdaphi4-5e-62-1.0245e-58-1e-61.hf5")) phi23 = c.make_wrapper_model(os.path.join(resdir, "cmb-phi2over3-5e-62-1.0245e-58-1e-61.hf5")) mv0 = c.make_wrapper_model(os.path.join(resdir, "cmb-msqphisq_withV0-5e-62-1.0245e-58-1e-61.hf5")) models = [msq,lph,phi23,mv0] models_legends = [r"$V(\varphi)=\frac{1}{2}m^2\varphi^2$", r"$V(\varphi)=\frac{1}{4}\lambda\varphi^4$", r"$V(\varphi)=\sigma\varphi^{\frac{2}{3}}$", r"$V(\varphi)=V_0 + \frac{1}{2}m_0^2\varphi^2$"] return models, models_legends
4816fd6322ff2cb40b350d8d1610851f8efb7c56 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7283/4816fd6322ff2cb40b350d8d1610851f8efb7c56/makeplots.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 71, 1627, 67, 7665, 67, 47, 21, 13332, 4086, 85, 273, 276, 18, 6540, 67, 8376, 67, 2284, 12, 538, 18, 803, 18, 5701, 12, 455, 1214, 10837, 71, 1627, 17, 959, 85, 844, 291,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 71, 1627, 67, 7665, 67, 47, 21, 13332, 4086, 85, 273, 276, 18, 6540, 67, 8376, 67, 2284, 12, 538, 18, 803, 18, 5701, 12, 455, 1214, 10837, 71, 1627, 17, 959, 85, 844, 291,...
data_matrix=data_matrix, snps_table=QC_method_id2snps_table[self.QC_method_id])
data_matrix=data_matrix, snps_table=QC_method_id2snps_table.get(self.QC_method_id))
def run(self): """ 2008-04-25 return None if QC_method_id==0 2008-04-20 for plone to call it just to get row_id2NA_mismatch_rate """ #database connection and etc db = Stock_250kDatabase(username=self.user, password=self.passwd, hostname=self.hostname, database=self.dbname) session = db.session transaction = session.create_transaction() # if cmp_data_filename not specified, try to find in the data_description column in table QC_method. if not self.cmp_data_filename and self.QC_method_id!=0: qm = session.query(QCMethod).get_by(id=self.QC_method_id) if qm.data_description: data_description_ls = qm.data_description.split('=') if len(data_description_ls)>1: self.cmp_data_filename = qm.data_description.split('=')[1].strip() #after db query, cmp_data_filename is still nothing, exit program. if not self.cmp_data_filename and self.QC_method_id!=0: sys.stderr.write("cmp_data_filename is still nothing even after db query. please specify it on the commandline.\n") sys.exit(3) import MySQLdb conn = MySQLdb.connect(db=self.dbname, host=self.hostname, user = self.user, passwd = self.passwd) curs = conn.cursor() self.curs = curs if self.debug: import pdb pdb.set_trace() readme = formReadmeObj(sys.argv, self.ad, README) session.save(readme) QC_method_id2snps_table = {1:'at.locus',\ 2:'',\ 3:'stock.snps',\ 4:'',\ 5:'at.locus',\ 6:'',\ 7:'stock.snps',\ 8:'dbsnp.snps'} if self.QC_method_id==0: self.cal_independent_NA_rate(db, self.min_probability, readme) row_id2NA_mismatch_rate = None else: from variation.src.FilterStrainSNPMatrix import FilterStrainSNPMatrix header, strain_acc_list, category_list, data_matrix = FilterStrainSNPMatrix.read_data(self.cmp_data_filename) snpData2 = SNPData(header=header, strain_acc_list=strain_acc_list, \ data_matrix=data_matrix, snps_table=QC_method_id2snps_table[self.QC_method_id]) #category_list is not used. if self.input_dir and os.path.isdir(self.input_dir): #04/22/08 Watch: call_info_id2fname here is fake, it's actually keyed by (array_id, ecotypeid) #no submission to db call_info_id2fname = self.get_array_id2fname(curs, self.input_dir) elif self.input_dir and os.path.isfile(self.input_dir): #it's file call_info_id2fname = None else: if self.run_type==2: #no filtering on call_info entries that have been QCed. filter_calls_QCed=0 elif self.run_type==1: filter_calls_QCed = 1 self.max_call_info_mismatch_rate = 1 #don't use this when doing accession-wise QC else: sys.stderr.write("run_type=%s is not supported.\n"%self.run_type) sys.exit(5) call_info_id2fname, call_info_ls_to_return = self.get_call_info_id2fname(db, self.QC_method_id, self.call_method_id, filter_calls_QCed, self.max_call_info_mismatch_rate) if call_info_id2fname: header, call_info_id_ls, ecotype_id_ls, data_matrix = self.read_call_matrix(call_info_id2fname, self.min_probability) else: #input file is SNP by strain format. double header (1st two lines) header, snps_name_ls, category_list, data_matrix = FilterStrainSNPMatrix.read_data(self.input_dir, double_header=1) ecotype_id_ls = header[0][2:] call_info_id_ls = header[1][2:] data_matrix = numpy.array(data_matrix) data_matrix = data_matrix.transpose() header = ['', ''] + snps_name_ls #fake a header for SNPData if self.run_type==2: snps_name2snps_id = self.get_snps_name2snps_id(db) else: snps_name2snps_id = None snpData1 = SNPData(header=header, strain_acc_list=call_info_id_ls, category_list= ecotype_id_ls, data_matrix=data_matrix, \ min_probability=self.min_probability, call_method_id=self.call_method_id, col_id2id=snps_name2snps_id,\ max_call_info_mismatch_rate=self.max_call_info_mismatch_rate, snps_table='stock_250k.snps') #snps_table is set to the stock_250k snps_table twoSNPData = TwoSNPData(SNPData1=snpData1, SNPData2=snpData2, curs=curs, \ QC_method_id=self.QC_method_id, user=self.user, row_matching_by_which_value=1, debug=self.debug) if self.run_type==1: row_id2NA_mismatch_rate = twoSNPData.cmp_row_wise() elif self.run_type==2: twoSNPData.save_col_wise(session, readme) row_id2NA_mismatch_rate = None else: sys.stderr.write("run_type=%s is not supported.\n"%self.run_type) sys.exit(5) if self.output_fname and self.run_type==1 and row_id2NA_mismatch_rate: self.output_row_id2NA_mismatch_rate(row_id2NA_mismatch_rate, self.output_fname) if self.run_type==1 and self.commit and not self.input_dir and row_id2NA_mismatch_rate: #if self.input_dir is given, no db submission. call_info_id2fname here is fake, it's actually keyed by (array_id, ecotypeid) #row_id2NA_mismatch_rate might be None if it's method 0. self.submit_to_call_QC(session, row_id2NA_mismatch_rate, self.QC_method_id, self.user, self.min_probability, twoSNPData.row_id12row_id2, self.call_method_id, readme) if self.commit: curs.execute("commit") transaction.commit() else: transaction.rollback() self.row_id2NA_mismatch_rate = row_id2NA_mismatch_rate #for plone to get the data structure
c4e9b8926628d2b435f50364e10cb8870b473c8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/c4e9b8926628d2b435f50364e10cb8870b473c8c/QC_250k.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 4044, 28, 17, 3028, 17, 2947, 327, 599, 309, 2238, 39, 67, 2039, 67, 350, 631, 20, 4044, 28, 17, 3028, 17, 3462, 364, 886, 476, 358, 745, 518, 2537, 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, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 4044, 28, 17, 3028, 17, 2947, 327, 599, 309, 2238, 39, 67, 2039, 67, 350, 631, 20, 4044, 28, 17, 3028, 17, 3462, 364, 886, 476, 358, 745, 518, 2537, 358, ...
self.gridlayout34.addItem(spacerItem54,1,1,1,1)
self.gridlayout30.addItem(spacerItem54,1,1,1,1)
def setupUi(self, UserPrefsDialog): UserPrefsDialog.setObjectName("UserPrefsDialog") UserPrefsDialog.resize(QtCore.QSize(QtCore.QRect(0,0,917,661).size()).expandedTo(UserPrefsDialog.minimumSizeHint()))
752b48c67dcf97437d2cb83fa267b09487665da0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/752b48c67dcf97437d2cb83fa267b09487665da0/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 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, 3875, 13943, 12, 2890, 16, 2177, 1386, 2556, 6353, 4672, 2177, 1386, 2556, 6353, 18, 542, 16707, 2932, 1299, 1386, 2556, 6353, 7923, 2177, 1386, 2556, 6353, 18, 15169, 12, 23310, 4670, 18,...
if not self.db.security.hasPermission('Email Access', author): raise Unauthorized, 'You are not permitted to access this tracker.'
else: raise Unauthorized, 'You are not permitted to access '\ 'this tracker.'
def handle_message(self, message): ''' message - a Message instance
d707f9bfdb46f60188adeb8fefab434f16a66f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d707f9bfdb46f60188adeb8fefab434f16a66f3d/mailgw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2150, 12, 2890, 16, 883, 4672, 9163, 883, 300, 279, 2350, 791, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2150, 12, 2890, 16, 883, 4672, 9163, 883, 300, 279, 2350, 791, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
L1_over_omega = self.L_ratio()
L1_over_omega = E.L_ratio()
def sha_an(self, use_database=False): """ Returns the Birch and Swinnerton-Dyer conjectural order of Sha, unless the analytic rank is > 1, in which case this function returns 0.
c96468df560eb2a9187a40076ff99dda42b92dc0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c96468df560eb2a9187a40076ff99dda42b92dc0/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6056, 67, 304, 12, 2890, 16, 999, 67, 6231, 33, 8381, 4672, 3536, 2860, 326, 605, 481, 343, 471, 5434, 267, 82, 1051, 265, 17, 40, 93, 264, 356, 937, 3766, 1353, 434, 2638, 69, 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, 6056, 67, 304, 12, 2890, 16, 999, 67, 6231, 33, 8381, 4672, 3536, 2860, 326, 605, 481, 343, 471, 5434, 267, 82, 1051, 265, 17, 40, 93, 264, 356, 937, 3766, 1353, 434, 2638, 69, 16, ...
sp = os.popen("aesub '$sp' 2>/dev/null", "r").read()[:-1] sp = string.split(sp, os.pathsep)
paths = os.popen("aesub '$sp' 2>/dev/null", "r").read()[:-1] sp.extend(string.split(paths, os.pathsep))
def whereis(file): for dir in string.split(os.environ['PATH'], os.pathsep): f = os.path.join(dir, file) if os.path.isfile(f): try: st = os.stat(f) except OSError: continue if stat.S_IMODE(st[stat.ST_MODE]) & 0111: return f return None
ada9e8ad1bdf67b56031535c984c2c83ca90c6db /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7126/ada9e8ad1bdf67b56031535c984c2c83ca90c6db/runtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1625, 291, 12, 768, 4672, 364, 1577, 316, 533, 18, 4939, 12, 538, 18, 28684, 3292, 4211, 17337, 1140, 18, 803, 10814, 4672, 284, 273, 1140, 18, 803, 18, 5701, 12, 1214, 16, 585, 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, 1625, 291, 12, 768, 4672, 364, 1577, 316, 533, 18, 4939, 12, 538, 18, 28684, 3292, 4211, 17337, 1140, 18, 803, 10814, 4672, 284, 273, 1140, 18, 803, 18, 5701, 12, 1214, 16, 585, 13, ...
warn_on_default=True):
warn_on_default=True, raw=False):
def GetOption(self, configType, section, option, default=None, type=None, warn_on_default=True): """ Get an option value for given config type and given general configuration section/option or return a default. If type is specified, return as type. Firstly the user configuration is checked, with a fallback to the default configuration, and a final 'catch all' fallback to a useable passed-in default if the option isn't present in either the user or the default configuration. configType must be one of ('main','extensions','highlight','keys') If a default is returned, and warn_on_default is True, a warning is printed to stderr.
137bf72d36922d72ff92fe5d6f7999dd74b8fae9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/137bf72d36922d72ff92fe5d6f7999dd74b8fae9/configHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1895, 12, 2890, 16, 642, 559, 16, 2442, 16, 1456, 16, 805, 33, 7036, 16, 618, 33, 7036, 16, 1894, 67, 265, 67, 1886, 33, 5510, 16, 1831, 33, 8381, 4672, 3536, 968, 392, 1456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1895, 12, 2890, 16, 642, 559, 16, 2442, 16, 1456, 16, 805, 33, 7036, 16, 618, 33, 7036, 16, 1894, 67, 265, 67, 1886, 33, 5510, 16, 1831, 33, 8381, 4672, 3536, 968, 392, 1456, ...
var asyncObj
var asyncObj; var no_async = false; var userAgent = navigator.userAgent.toLowerCase();
def javascript(): return r"""
a8e6cf1b3af7597141cf6f99b93554e90107fe7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/a8e6cf1b3af7597141cf6f99b93554e90107fe7c/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11341, 13332, 327, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 11341, 13332, 327, 436, 8395, 225, 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, ...
self._b.remove(entries)
self._b.working_tree().remove(entries)
def _removePathnames(self, entries): """Remove a sequence of entries"""
6f1fc57d5d3f49beec008597a6ed44f227e66687 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/6f1fc57d5d3f49beec008597a6ed44f227e66687/bzr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4479, 743, 1973, 12, 2890, 16, 3222, 4672, 3536, 3288, 279, 3102, 434, 3222, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4479, 743, 1973, 12, 2890, 16, 3222, 4672, 3536, 3288, 279, 3102, 434, 3222, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def TimedRequest(self, type_string, record_string, timeout=None):
def TimedRequest(self, type_string, record_string, timeout=None, timer=DEFAULT_TIMER):
def TimedRequest(self, type_string, record_string, timeout=None): """Make a DNS request, returning the reply and duration it took.
e6e6c3fada66a7e5bdd87bdf2cb59f6206791e4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4170/e6e6c3fada66a7e5bdd87bdf2cb59f6206791e4c/nameserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23925, 691, 12, 2890, 16, 618, 67, 1080, 16, 1409, 67, 1080, 16, 2021, 33, 7036, 16, 5441, 33, 5280, 67, 56, 31582, 4672, 3536, 6464, 279, 8858, 590, 16, 5785, 326, 4332, 471, 3734, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23925, 691, 12, 2890, 16, 618, 67, 1080, 16, 1409, 67, 1080, 16, 2021, 33, 7036, 16, 5441, 33, 5280, 67, 56, 31582, 4672, 3536, 6464, 279, 8858, 590, 16, 5785, 326, 4332, 471, 3734, ...
if el.startswith('|'): el = '\\' + el
def rematch(el, l): try: # hack to deal with graphlog, which looks like bogus regexes if el.startswith('|'): el = '\\' + el # ensure that the regex matches to the end of the string return re.match(el + r'\Z', l) except re.error: # el is an invalid regex return False
c6c5c41d992b9e6e70280b69506b485338efe194 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/c6c5c41d992b9e6e70280b69506b485338efe194/run-tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 849, 505, 12, 292, 16, 328, 4672, 775, 30, 468, 11769, 358, 10490, 598, 2667, 1330, 16, 1492, 10192, 3007, 324, 28774, 28522, 7, 3387, 716, 326, 3936, 1885, 358, 326, 679, 434, 326, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 849, 505, 12, 292, 16, 328, 4672, 775, 30, 468, 11769, 358, 10490, 598, 2667, 1330, 16, 1492, 10192, 3007, 324, 28774, 28522, 7, 3387, 716, 326, 3936, 1885, 358, 326, 679, 434, 326, 53...
self.assertEquals(gio.File('foo.png').icon_new(), gio.File('foo.png').icon_new())
self.assertEquals(gio.FileIcon(gio.File('foo.png')), gio.FileIcon(gio.File('foo.png')))
def test_eq(self): self.assertEquals(gio.File('foo.png').icon_new(), gio.File('foo.png').icon_new()) self.assertEquals(gio.ThemedIcon('foo'), gio.ThemedIcon('foo'))
38848aaa4ffecf6cccf576df496d41f4ce984579 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8659/38848aaa4ffecf6cccf576df496d41f4ce984579/test_gicon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11253, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 75, 1594, 18, 812, 5554, 12, 75, 1594, 18, 812, 2668, 11351, 18, 6446, 6134, 3631, 314, 1594, 18, 812, 5554, 12, 75, 1594, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11253, 12, 2890, 4672, 365, 18, 11231, 8867, 12, 75, 1594, 18, 812, 5554, 12, 75, 1594, 18, 812, 2668, 11351, 18, 6446, 6134, 3631, 314, 1594, 18, 812, 5554, 12, 75, 1594, ...
fetch = []
fetch = {}
def findincoming(self, remote, base=None, heads=None): m = self.changelog.nodemap search = [] fetch = [] seen = {} seenbranch = {} if base == None: base = {}
4c84f5b46af788d6ffe65b1684f37753635888a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/4c84f5b46af788d6ffe65b1684f37753635888a0/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 31033, 12, 2890, 16, 2632, 16, 1026, 33, 7036, 16, 22742, 33, 7036, 4672, 312, 273, 365, 18, 24083, 12970, 18, 2159, 1458, 1623, 273, 5378, 2158, 273, 2618, 5881, 273, 2618, 5881, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31033, 12, 2890, 16, 2632, 16, 1026, 33, 7036, 16, 22742, 33, 7036, 4672, 312, 273, 365, 18, 24083, 12970, 18, 2159, 1458, 1623, 273, 5378, 2158, 273, 2618, 5881, 273, 2618, 5881, ...
if gp and gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD'):
if gp and (gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD') or gp.mode):
def iterhunks(ui, fp, sourcefile=None): """Read a patch and yield the following events: - ("file", afile, bfile, firsthunk): select a new target file. - ("hunk", hunk): a new hunk is ready to be applied, follows a "file" event. - ("git", gitchanges): current diff is in git format, gitchanges maps filenames to gitpatch records. Unique event. """ changed = {} current_hunk = None afile = "" bfile = "" state = None hunknum = 0 emitfile = False git = False # our states BFILE = 1 context = None lr = linereader(fp) dopatch = True # gitworkdone is True if a git operation (copy, rename, ...) was # performed already for the current file. Useful when the file # section may have no hunk. gitworkdone = False while True: newfile = newgitfile = False x = lr.readline() if not x: break if current_hunk: if x.startswith('\ '): current_hunk.fix_newline() yield 'hunk', current_hunk current_hunk = None gitworkdone = False if ((sourcefile or state == BFILE) and ((not context and x[0] == '@') or ((context is not False) and x.startswith('***************')))): try: if context is None and x.startswith('***************'): context = True gpatch = changed.get(bfile) create = afile == '/dev/null' or gpatch and gpatch.op == 'ADD' remove = bfile == '/dev/null' or gpatch and gpatch.op == 'DELETE' current_hunk = hunk(x, hunknum + 1, lr, context, create, remove) except PatchError, err: ui.debug(err) current_hunk = None continue hunknum += 1 if emitfile: emitfile = False yield 'file', (afile, bfile, current_hunk) elif state == BFILE and x.startswith('GIT binary patch'): current_hunk = binhunk(changed[bfile]) hunknum += 1 if emitfile: emitfile = False yield 'file', ('a/' + afile, 'b/' + bfile, current_hunk) current_hunk.extract(lr) elif x.startswith('diff --git'): # check for git diff, scanning the whole patch file if needed m = gitre.match(x) if m: afile, bfile = m.group(1, 2) if not git: git = True dopatch, gitpatches = scangitpatch(lr, x) yield 'git', gitpatches for gp in gitpatches: changed[gp.path] = gp # else error? # copy/rename + modify should modify target, not source gp = changed.get(bfile) if gp and gp.op in ('COPY', 'DELETE', 'RENAME', 'ADD'): afile = bfile gitworkdone = True newgitfile = True elif x.startswith('---'): # check for a unified diff l2 = lr.readline() if not l2.startswith('+++'): lr.push(l2) continue newfile = True context = False afile = parsefilename(x) bfile = parsefilename(l2) elif x.startswith('***'): # check for a context diff l2 = lr.readline() if not l2.startswith('---'): lr.push(l2) continue l3 = lr.readline() lr.push(l3) if not l3.startswith("***************"): lr.push(l2) continue newfile = True context = True afile = parsefilename(x) bfile = parsefilename(l2) if newgitfile or newfile: emitfile = True state = BFILE hunknum = 0 if current_hunk: if current_hunk.complete(): yield 'hunk', current_hunk else: raise PatchError(_("malformed patch %s %s") % (afile, current_hunk.desc)) if hunknum == 0 and dopatch and not gitworkdone: raise NoHunks
129a1fb327659ea0ed3bcb35f6db965e33976533 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/129a1fb327659ea0ed3bcb35f6db965e33976533/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 76, 1683, 87, 12, 4881, 16, 4253, 16, 1084, 768, 33, 7036, 4672, 3536, 1994, 279, 4729, 471, 2824, 326, 3751, 2641, 30, 300, 7566, 768, 3113, 279, 768, 16, 324, 768, 16, 1122, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1400, 76, 1683, 87, 12, 4881, 16, 4253, 16, 1084, 768, 33, 7036, 4672, 3536, 1994, 279, 4729, 471, 2824, 326, 3751, 2641, 30, 300, 7566, 768, 3113, 279, 768, 16, 324, 768, 16, 1122, ...
in setRollover().
in doRollover().
def emit(self, record): """ Emit a record.
6451a5e038a86cd88ded99e25d7c49870adb33ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6451a5e038a86cd88ded99e25d7c49870adb33ed/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 12, 2890, 16, 1409, 4672, 3536, 16008, 279, 1409, 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, 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, 3626, 12, 2890, 16, 1409, 4672, 3536, 16008, 279, 1409, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if not (cliOptions.stow and cliOptions.opt_packages and cliOptions.config_policies and cliOptions.vappio_py and
if not (cliOptions.stow or cliOptions.opt_packages or cliOptions.config_policies or cliOptions.vappio_py or
def cliMerger(cliOptions, _args): ## # If they are all false, set them all to true because they did not specify any if not (cliOptions.stow and cliOptions.opt_packages and cliOptions.config_policies and cliOptions.vappio_py and cliOptions.vappio_scripts): cliOptions.stow = True cliOptions.opt_packages = True cliOptions.config_policies = True cliOptions.vappio_py = True cliOptions.vappio_scripts = True return configFromMap({ 'stow': cliOptions.stow, 'opt_packages': cliOptions.opt_packages, 'config_policies': cliOptions.config_policies, 'vappio_py': cliOptions.vappio_py, 'vappio_scripts': cliOptions.vappio_scripts})
d2dd0365a73892f768cdeec863cdccdc30839d49 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5741/d2dd0365a73892f768cdeec863cdccdc30839d49/updateAllDirs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 8478, 693, 12, 4857, 1320, 16, 389, 1968, 4672, 7541, 468, 971, 2898, 854, 777, 629, 16, 444, 2182, 777, 358, 638, 2724, 2898, 5061, 486, 4800, 1281, 309, 486, 261, 4857, 1320, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 8478, 693, 12, 4857, 1320, 16, 389, 1968, 4672, 7541, 468, 971, 2898, 854, 777, 629, 16, 444, 2182, 777, 358, 638, 2724, 2898, 5061, 486, 4800, 1281, 309, 486, 261, 4857, 1320, 1...
self.main.exe_cmd("vlc dvd:// --sout '
self.main.exe_cmd("vlc dvd:// --sout '
def menu_event_one(self, action): start1=time() (model, iter) = self.main.tabla.get_selection().get_selected() if iter == None: print_debug( "menu_event_one() not selected thin client !!!" ) return self.main.selected_host=model.get_value(iter,COL_HOST) self.main.selected_ip=model.get_value(iter, COL_IP) if not self.doaction_onthisclient(action, self.main.selected_ip): # show a msg shared.info_msg ( _("Can't exec this action because you are connected at this host!") ) return if action == 0: # refresh terminal # call to read remote info self.main.xmlrpc.newhost(self.main.selected_ip) self.main.xmlrpc.ip=self.main.selected_ip self.main.worker=shared.Workers( self.main,\ target=self.populate_datatxt, args=([self.main.selected_ip]) ).start() if action == 1: # clean datatxtbuffer self.main.datatxt.clean() if action == 2: # Ask for reboot reboot ip=self.main.selected_ip msg=_( _("Do you want to reboot %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("reboot") if action == 3: # Ask for poweroff reboot msg=_( _("Do you want to poweroff %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("poweroff") if action == 4: # lock screen if not self.main.xmlrpc.lockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 5: # unlock screen if not self.main.xmlrpc.unlockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 6: # start ivs self.main.worker=shared.Workers(self.main, target=self.start_ivs, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 7: # start vnc self.main.worker=shared.Workers(self.main, target=self.start_vnc, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 8: # screenshot !!! self.main.worker=shared.Workers(self.main, target=self.get_screenshot, args=[self.main.selected_ip]) self.main.worker.start() if action == 9: # give a remote xterm throught SSH pass_msg=_("Enter password of remote thin client (if asked for it)") cmd="xterm -e \"echo '%s'; ssh root@%s\"" %(pass_msg, self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) if action == 10: # launch personalize settings if client is TCOS (PXES and LTSP not supported) client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": cmd="gksu \"tcospersonalize --host=%s\"" %(self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) else: shared.info_msg( _("%s is not supported to personalize!") %(client_type) ) if action == 11: # reset xorg # Ask for it if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't logout, user is not logged") ) return user=self.main.localdata.GetUsernameAndHost(self.main.selected_ip) print_debug("menu_event_one() user=%s" %user) msg=_( _("Do you want to logout user \"%s\"?" ) %(user) ) if shared.ask_msg ( msg ): newusernames=[] remote_cmd="/usr/lib/tcos/session-cmd-send LOGOUT" if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) self.main.xmlrpc.DBus("exec", remote_cmd ) else: newusernames.append(user) result = self.main.dbus_action.do_exec(newusernames ,remote_cmd ) if not result: shared.error_msg ( _("Error while exec remote app:\nReason:%s") %( self.main.dbus_action.get_error_msg() ) ) if action == 12: # restart xorg with new settings # thin client must download again XXX.XXX.XXX.XXX.conf and rebuild xorg.conf client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": msg=_( "Restart X session of %s with new config?" ) %(self.main.selected_ip) if shared.ask_msg ( msg ): # see xmlrpc/xorg.h, rebuild will download and sed xorg.conf.tpl self.main.xmlrpc.tc.tcos.xorg("rebuild", "--restartxorg", \ self.main.xmlrpc.username, \ self.main.xmlrpc.password ) self.refresh_client_info(self.main.selected_ip) else: shared.info_msg( _("%s is not supported to restart Xorg!") %(client_type) ) if action == 13: # exec app self.askfor(mode="exec", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)]) if action == 14: # send message self.askfor(mode="mess", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] ) if action == 15: print_debug ("menu_event_one() show running apps" ) self.get_user_processes(self.main.selected_ip) if action == 16: # action sent by vidal_joshur at gva dot es # start video broadcast mode # search for connected users users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] client=[self.main.selected_ip] dialog = gtk.FileChooserDialog(_("Select audio/video file.."), None, gtk.FILE_CHOOSER_ACTION_OPEN, (_("Play DVD"), 1, _("Play SVCD/VCD"), 2, _("Play AudioCD"), 3, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) self.folder = self._folder = os.environ['HOME'] dialog.set_current_folder(self.folder) filter = gtk.FileFilter() filter.set_name("Media Files ( *.avi, *.mpg, *.mpeg, *.mp3, *.wav, etc.. )") file_types=["*.avi", "*.mpg", "*.mpeg", "*.ogg", "*.ogm", "*.asf", "*.divx", "*.wmv", "*.vob", "*.m2v", "*.m4v", "*.mp2", "*.mp4", "*.ac3", "*.ogg", "*.mp1", "*.mp2", "*.mp3", "*.wav", "*.wma"] for elem in file_types: filter.add_pattern( elem ) dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All Files") filter.add_pattern("*.*") dialog.add_filter(filter)
53a3eea66bbc168c70ea325ef8439de22d83ed8b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/53a3eea66bbc168c70ea325ef8439de22d83ed8b/TcosActions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 476, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 261, 2284, 16, 1400, 13, 273, 365, 18, 5254, 18, 7032, 11821, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2575, 67, 476, 12, 2890, 16, 1301, 4672, 787, 21, 33, 957, 1435, 261, 2284, 16, 1400, 13, 273, 365, 18, 5254, 18, 7032, 11821, 18, 588, 67, 10705, 7675, 588, 67, 8109, 1435...
full_name = namespaces.pyste + 'UniqueInt<%d>' % EnumExporter.TYPE_COUNT EnumExporter.TYPE_COUNT += 1
full_name = namespaces.pyste + 'UniqueInt<%d>' % unique_number
def Export(self, codeunit, exported_names): if not self.info.exclude: indent = self.INDENT in_indent = self.INDENT*2 rename = self.info.rename or self.enum.name full_name = self.enum.FullName() unnamed_enum = False if rename.startswith('$_') or rename.startswith('._'): unnamed_enum = True self.ExportUniqueInt(codeunit) full_name = namespaces.pyste + 'UniqueInt<%d>' % EnumExporter.TYPE_COUNT EnumExporter.TYPE_COUNT += 1 rename = "unnamed" code = indent + namespaces.python code += 'enum_< %s >("%s")\n' % (full_name, rename) for name in self.enum.values: rename = self.info[name].rename or name value_fullname = self.enum.ValueFullName(name) code += in_indent + '.value("%s", %s)\n' % (rename, value_fullname) if self.info.export_values or unnamed_enum: code += in_indent + '.export_values()\n' code += indent + ';\n\n' codeunit.Write('module', code) exported_names[self.enum.FullName()] = 1
15e555c7f1916bcf3db9fba0076b807737d7f377 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/15e555c7f1916bcf3db9fba0076b807737d7f377/EnumExporter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11054, 12, 2890, 16, 981, 4873, 16, 11518, 67, 1973, 4672, 309, 486, 365, 18, 1376, 18, 10157, 30, 3504, 273, 365, 18, 2356, 2222, 316, 67, 9355, 273, 365, 18, 2356, 2222, 14, 22, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11054, 12, 2890, 16, 981, 4873, 16, 11518, 67, 1973, 4672, 309, 486, 365, 18, 1376, 18, 10157, 30, 3504, 273, 365, 18, 2356, 2222, 316, 67, 9355, 273, 365, 18, 2356, 2222, 14, 22, 64...
for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = period_obj.find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) todel.append(arg) break elif arg[0] == 'period_id' and arg[2] == 'current_year': current_year = fiscalyear_obj.find(cr, uid) ids = fiscalyear_obj.read(cr, uid, [current_year], ['period_ids'])[0]['period_ids'] domain.append(['period_id','in',ids]) todel.append(arg) for a in [['period_id','in','current_year'], ['period_id','in','current_period']]: if a in domain: domain.remove(a) return super(account_entries_report, self).read_group(cr, uid, domain, *args, **kwargs)
if context.get('period', False) == 'current_period': current_period = period_obj.find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) elif context.get('year', False) == 'current_year': current_year = fiscalyear_obj.find(cr, uid) ids = fiscalyear_obj.read(cr, uid, [current_year], ['period_ids'])[0]['period_ids'] domain.append(['period_id','in',ids]) else: domain = domain return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
def read_group(self, cr, uid, domain, *args, **kwargs): todel=[] fiscalyear_obj = self.pool.get('account.fiscalyear') period_obj = self.pool.get('account.period') for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = period_obj.find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) todel.append(arg) break elif arg[0] == 'period_id' and arg[2] == 'current_year': current_year = fiscalyear_obj.find(cr, uid) ids = fiscalyear_obj.read(cr, uid, [current_year], ['period_ids'])[0]['period_ids'] domain.append(['period_id','in',ids]) todel.append(arg) for a in [['period_id','in','current_year'], ['period_id','in','current_period']]: if a in domain: domain.remove(a) return super(account_entries_report, self).read_group(cr, uid, domain, *args, **kwargs)
4363de12dda2bcdd8aec1a2b2b8f7f774568ca01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4363de12dda2bcdd8aec1a2b2b8f7f774568ca01/account_entries_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1655, 12, 2890, 16, 4422, 16, 4555, 16, 2461, 16, 380, 1968, 16, 2826, 4333, 4672, 358, 3771, 33, 8526, 15324, 771, 6874, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1655, 12, 2890, 16, 4422, 16, 4555, 16, 2461, 16, 380, 1968, 16, 2826, 4333, 4672, 358, 3771, 33, 8526, 15324, 771, 6874, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 4631, ...
size = op.value
value = op.value
def parse_ERASE(self, context, operands): size = 0 if operands == None: size = 1 op = Number("1") else: # TODO: Change to use Expression. if '-' in operands[0]: op = Number(operands[0].strip()) if op.isValid(): size = op.value else: op = Number(operands[0]) if op.isValid(): size = op.value + 1 if context.currentRecord.label != None and op.isValid(): if not context.reparse: context.symtab.add(context.currentRecord.label, operands, context.loc) else: context.symtab.update(context.currentRecord.label, operands, context.loc) context.currentRecord.target = context.loc context.incrLoc(size) context.addSymbol = False
547fd2bc1e4463728858ab42cd4e9cf927abdd7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/547fd2bc1e4463728858ab42cd4e9cf927abdd7a/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 654, 4429, 12, 2890, 16, 819, 16, 14883, 4672, 963, 273, 374, 309, 14883, 422, 599, 30, 963, 273, 404, 1061, 273, 3588, 2932, 21, 7923, 469, 30, 468, 2660, 30, 7576, 358, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 654, 4429, 12, 2890, 16, 819, 16, 14883, 4672, 963, 273, 374, 309, 14883, 422, 599, 30, 963, 273, 404, 1061, 273, 3588, 2932, 21, 7923, 469, 30, 468, 2660, 30, 7576, 358, 9...
cmdStr += "wc -l"
cmdStr += "wc -l 2> /dev/null"
def existsListeningNetworkSocket(ip, port, tcp): """ <Purpose> Determines if there exists a network socket with the specified ip and port which is the LISTEN state. <Arguments> ip: The IP address of the listening socket port: The port of the listening socket tcp: Is the socket of TCP type, else UDP <Returns> True or False. """ # This only works if both are not of the None type if not (ip and port): return False # Escape the characters, so that they aren't treated as special regex ip = ip.replace(".","\.") ip = ip.replace("*",".*") # UDP connections are stateless, so for TCP check for the LISTEN state # and for UDP, just check that there exists a UDP port if tcp: grepTerms = ["tcp", "LISTEN"] else: grepTerms = ["udp"] # Construct the command cmdStr = 'netstat -an |grep -e "'+ip+'[:\.]'+str(port)+'[ \\t]" |' # Basic netstat with preliminary grep for term in grepTerms: # Add additional grep's cmdStr += 'grep -i '+term+' |' cmdStr += "wc -l" # Count up the lines # Launch up a shell, get the feed back processObject = subprocess.Popen(cmdStr, stdout=subprocess.PIPE, shell=True, close_fds=True) # Get the output numberOfSockets = processObject.stdout.read() # Close the pipe processObject.stdout.close() # Convert to an integer numberOfSockets = int(numberOfSockets) return (numberOfSockets > 0)
d3a623d6ca18cf961f74641194a4f4ade675a78c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/d3a623d6ca18cf961f74641194a4f4ade675a78c/nix_common_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1704, 31594, 3906, 4534, 12, 625, 16, 1756, 16, 9658, 4672, 3536, 411, 10262, 4150, 34, 30778, 309, 1915, 1704, 279, 2483, 2987, 598, 326, 1269, 2359, 471, 1756, 1492, 353, 326, 15130, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1704, 31594, 3906, 4534, 12, 625, 16, 1756, 16, 9658, 4672, 3536, 411, 10262, 4150, 34, 30778, 309, 1915, 1704, 279, 2483, 2987, 598, 326, 1269, 2359, 471, 1756, 1492, 353, 326, 15130, 1...
tag=vetoString[1:])
tag=vetoString[1:], ifos=ifos, cat=vetoCat)
def injZeroSlidePlots(dag, plotDir, config, logPath, injectionSuffix, zerolagSuffix, slideSuffix, cacheFile, doDagCategories, parentDags = None, vetoParentDags = None, vetoCat = 3): """ set up plots for injections, zero lag and time slides dag = the dag plotDir = directory in to set up plots config = config file logPath = location where log files will be written injectionSuffix = the string to restrict to for injections zerolagSuffix = the string to restrict to for zero lag slideSuffix = the string to restrict to for time slides cacheFile = the input cache file for plotting doCategories = dag categories turned on parentDags = the name of the parent dag to add vetoParentDags = the name of the veto parent dag to add vetoCat = veto category """ # first stage plotcp = copy.deepcopy(config) plotcp.add_section("plot-arguments") plotcp.set("plot-arguments","plotinspinj","") plotcp.set("plot-arguments","plotinjnum","") plotcp.set("plot-arguments","plotinspmissed","") plotcp.set("plot-arguments","ploteffdistcut","") plotcp.set("plot-arguments","write-script","") injPlotNode = plot_setup( plotDir, \ plotcp, logPath, "first", injectionSuffix, zerolagSuffix, \ slideSuffix, injectionSuffix, cacheFile, injectionSuffix ) if doDagCategories: injPlotNode.set_category('plotting') dag.add_node(injPlotNode) if parentDags: for thisDag in parentDags: injPlotNode.add_parent(thisDag) # second stage vetoString = "_CAT_" + str(vetoCat) + "_VETO" plotcp = copy.deepcopy(config) plotcp.add_section("plot-arguments") plotcp.set("plot-arguments","plotinspinj","") plotcp.set("plot-arguments","plotsnrchi","") plotcp.set("plot-arguments","plotethinca","") plotcp.set("plot-arguments","plotinjnum","") plotcp.set("plot-arguments","plotinspmissed","") plotcp.set("plot-arguments","plotinspfound","") plotcp.set("plot-arguments","plotcoincmissed","") plotcp.set("plot-arguments","ploteffdistcut","") plotcp.set("plot-arguments","write-script","") injPlotVetoNode = plot_setup( plotDir, \ plotcp, logPath, "second", injectionSuffix + vetoString, \ zerolagSuffix + vetoString, slideSuffix + vetoString, \ injectionSuffix + vetoString, cacheFile, injectionSuffix, \ tag=vetoString[1:]) if doDagCategories: injPlotVetoNode.set_category('plotting') dag.add_node(injPlotVetoNode) if parentDags: for thisDag in parentDags: injPlotVetoNode.add_parent(thisDag) if vetoParentDags: for thisDag in vetoParentDags: injPlotVetoNode.add_parent(thisDag) if not doDagCategories: injPlotVetoNode.add_parent(injPlotNode) return dag
fc357fee84a913444239d3b3d8829e5f036f7cd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/fc357fee84a913444239d3b3d8829e5f036f7cd4/inspiralutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 78, 7170, 21068, 29311, 12, 30204, 16, 3207, 1621, 16, 642, 16, 613, 743, 16, 10380, 5791, 16, 24910, 355, 346, 5791, 16, 12701, 5791, 16, 18748, 16, 741, 40, 346, 10487, 16, 982,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 78, 7170, 21068, 29311, 12, 30204, 16, 3207, 1621, 16, 642, 16, 613, 743, 16, 10380, 5791, 16, 24910, 355, 346, 5791, 16, 12701, 5791, 16, 18748, 16, 741, 40, 346, 10487, 16, 982,...
return
return
def cdata(self, data): if not data: self.data = None self.results = None self.setStatTable() return # have to handle this appropriately if self.testdata and data.domain <> self.testdata.domain: self.testdata = None self.results = None self.setStatTable() self.data = orange.Filter_hasClassValue(data) self.classindex = 0 # data.targetValIndx if self.learners: self.applyBtn.setDisabled(FALSE) self.results = None; self.scores = None self.test()
4a5d0b6408fb255b8754ad2849a498c83b9e6cc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4a5d0b6408fb255b8754ad2849a498c83b9e6cc3/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20712, 12, 2890, 16, 501, 4672, 309, 486, 501, 30, 365, 18, 892, 273, 599, 365, 18, 4717, 273, 599, 365, 18, 542, 5000, 1388, 1435, 327, 225, 468, 1240, 358, 1640, 333, 21419, 309, 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, 20712, 12, 2890, 16, 501, 4672, 309, 486, 501, 30, 365, 18, 892, 273, 599, 365, 18, 4717, 273, 599, 365, 18, 542, 5000, 1388, 1435, 327, 225, 468, 1240, 358, 1640, 333, 21419, 309, 3...
return self.tk.call(self._w, 'getmode', entrypath)
return self.tk.call(self._w, 'getmode', entrypath)
def getmode(self, entrypath):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3188, 12, 2890, 16, 1241, 803, 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, ...
[ 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, 336, 3188, 12, 2890, 16, 1241, 803, 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,...
self.__sig = selection.connect('changed', self.__changed) self.connect_object('destroy', self.__destroy, model) self.connect('popup-menu', self.__popup_menu, library)
self.__sig = selection.connect('changed', self.__selection_changed) s = self.connect('popup-menu', self.__popup_menu, library) self.connect_object('destroy', self.disconnect, s)
def __init__(self, mytag, next, library): super(PanedBrowser.Pane, self).__init__() self.set_fixed_height_mode(True)
65c353a2f58dd189cd3918d5836dbf8ca05e5f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/65c353a2f58dd189cd3918d5836dbf8ca05e5f5f/paned.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3399, 2692, 16, 1024, 16, 5313, 4672, 2240, 12, 4069, 329, 9132, 18, 8485, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 542, 67, 12429, 67, 4210, 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, 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, 3399, 2692, 16, 1024, 16, 5313, 4672, 2240, 12, 4069, 329, 9132, 18, 8485, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 542, 67, 12429, 67, 4210, 67, ...
if not WakeOnLan.WakeOnLan("%s"%mac):
if not WakeOnLan("%s"%mac):
def wol_all(self, *args): if self.main.config.GetVar("scan_network_method") != "static": msg=(_("Wake On Lan only works with static list.\n\nEnable scan method \"static\" in Preferences\nand (wake on lan) support in bios of clients." )) shared.info_msg ( msg ) return msg=_( _("Do you want boot all clients?" )) if shared.ask_msg ( msg ): data=[] hostslist=self.main.config.GetVar("statichosts") #eth=self.main.config.GetVar("network_interface") if hostslist == "": return data=hostslist.split("#") data=data[:-1] errors=[] for host in data: mac=host.split("|")[1] if mac == "": self.main.write_into_statusbar(_("No register MAC address for ip: \"%s\"")%host) continue print_debug("Send magic packet to mac=%s" %mac) if not WakeOnLan.WakeOnLan("%s"%mac): errors.append(mac) if len(errors) >1: print_debug("menu_event_all() errors=%s"%errors) self.main.write_into_statusbar(_("Not valid MAC address: \"%s\"")%" ".join(errors))
5df28d130fb730bac7b6ec68e4c44e143b006e97 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13520/5df28d130fb730bac7b6ec68e4c44e143b006e97/wakeonlan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 355, 67, 454, 12, 2890, 16, 380, 1968, 4672, 309, 365, 18, 5254, 18, 1425, 18, 967, 1537, 2932, 9871, 67, 5185, 67, 2039, 7923, 480, 315, 3845, 6877, 1234, 33, 24899, 2932, 59, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 355, 67, 454, 12, 2890, 16, 380, 1968, 4672, 309, 365, 18, 5254, 18, 1425, 18, 967, 1537, 2932, 9871, 67, 5185, 67, 2039, 7923, 480, 315, 3845, 6877, 1234, 33, 24899, 2932, 59, ...
return _("You seem to be a guest user. You have to %(x_url_open)slogin%(x_url_close)s first.") % ('<a href="../youraccount/login?ln=' + ln +'">', '<a/>')
return _("You seem to be a guest user. You have to %(x_url_open)slogin%(x_url_close)s first.") % \ {'x_url_open': '<a href="../youraccount/login?ln=' + ln + '">', 'x_url_close': '<a/>'}
def tmpl_account_adminactivities(self, ln, weburl, uid, guest, roles, activities): """ Displays the admin activities block for this user
a69853177d09ad68b8c1df1067c418693e2d7791 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/a69853177d09ad68b8c1df1067c418693e2d7791/websession_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 4631, 67, 3666, 24745, 12, 2890, 16, 7211, 16, 3311, 718, 16, 4555, 16, 13051, 16, 4900, 16, 17259, 4672, 3536, 9311, 87, 326, 3981, 17259, 1203, 364, 333, 729, 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, 4631, 67, 3666, 24745, 12, 2890, 16, 7211, 16, 3311, 718, 16, 4555, 16, 13051, 16, 4900, 16, 17259, 4672, 3536, 9311, 87, 326, 3981, 17259, 1203, 364, 333, 729, 2, -100, -10...
"xlogid": rp.xlogid, "xrecoff": rp.xrecoff, "wal_name": rp.wal_name,
"xlogid": ctl.xlogid, "xrecoff": ctl.xrecoff, "wal_name": ctl.wal_name,
def slave_backup(self): """ Create backup on slave host.
5c30a274a6945a32dc53e7725ba74053bda74e5e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14597/5c30a274a6945a32dc53e7725ba74053bda74e5e/walmgr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11735, 67, 9572, 12, 2890, 4672, 3536, 1788, 5114, 603, 11735, 1479, 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, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11735, 67, 9572, 12, 2890, 4672, 3536, 1788, 5114, 603, 11735, 1479, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
print 'Warning: number of controls %d is greater than number of self.affectedected individuals %d.' \
print 'Warning: number of controls %d is greater than number of affectedected individuals %d.' \
def prepareSample(self, input_pop): '''Find out indexes all affected and unaffected individuales. ''' BaseSampler.prepareSample(self, input_pop, isSequence(self.cases)) if self.pop is None: # this will produce self.pop and self.cases and self.controls self.prepareSample(input_pop) # if not isSequence(self.cases): # find affected individuals self.affected = [] self.unaffected = [] for idx,ind in enumerate(self.pop.individuals()): if ind.affected(): self.affected.append(idx) else: self.unaffected.append(idx) # if self.cases > len(self.affected): print 'Warning: number of cases %d is greater than number of self.affectedected individuals %d.' \ % (self.cases, len(self.affected)) # if self.controls > len(self.unaffected): print 'Warning: number of controls %d is greater than number of self.affectedected individuals %d.' \ % (self.controls, len(self.unaffected)) else: if len(self.cases) != self.pop.numSubPop(): raise ValueError('If an list of cases is given, it should be specified for all subpopulations') self.affected = [] self.unaffected = [] for sp in range(self.pop.numSubPop()): # find self.affectedected individuals aff = [] unaff = [] for idx in range(self.pop.subPopBegin(sp), self.pop.subPopEnd(sp)): if self.pop.individual(idx).affected(): aff.append(idx) else: unaff.append(idx) # if self.cases[sp] > len(aff): print 'Warning: number of cases %d is greater than number of self.affectedected individuals %d in subpopulation %d.' \ % (self.cases[sp], len(aff), sp) # if self.controls[sp] > len(unaff): print 'Warning: number of controls %d is greater than number of self.affectedected individuals %d in subpopulation %d.' \ % (self.controls[sp], len(unaff), sp) self.affected.append(aff) self.unaffected.append(unaff)
30b748ce630fe250610a749c82ee5a53aa4652d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/401/30b748ce630fe250610a749c82ee5a53aa4652d3/sampling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 8504, 12, 2890, 16, 810, 67, 5120, 4672, 9163, 3125, 596, 5596, 777, 9844, 471, 640, 20119, 7327, 281, 18, 9163, 3360, 26243, 18, 9366, 8504, 12, 2890, 16, 810, 67, 5120, 16, 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, 2911, 8504, 12, 2890, 16, 810, 67, 5120, 4672, 9163, 3125, 596, 5596, 777, 9844, 471, 640, 20119, 7327, 281, 18, 9163, 3360, 26243, 18, 9366, 8504, 12, 2890, 16, 810, 67, 5120, 16, 353...
security.declareProtected(permissions.View, 'filterWfStateIfNotOwner')
security.declareProtected(permissions.View, 'filterWfStateIfNotOwnerOfReference')
def criteriaByIndexId(self, indexId): # do not change the order of BIBLIOTOPIC_SORTFIELDS + BIBLIOTOPIC_CRITERIAFIELDS
ede980208b9d5ad4ed35b67cfa950c58f8ba9aaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9787/ede980208b9d5ad4ed35b67cfa950c58f8ba9aaf/bibliotopic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3582, 21268, 548, 12, 2890, 16, 770, 548, 4672, 468, 741, 486, 2549, 326, 1353, 434, 605, 13450, 2053, 27019, 20385, 67, 23988, 12683, 397, 605, 13450, 2053, 27019, 20385, 67, 5093, 11844,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3582, 21268, 548, 12, 2890, 16, 770, 548, 4672, 468, 741, 486, 2549, 326, 1353, 434, 605, 13450, 2053, 27019, 20385, 67, 23988, 12683, 397, 605, 13450, 2053, 27019, 20385, 67, 5093, 11844,...
p_email = CFG_EXTERNAL_AUTHENTICATION[login_method][0].auth_user(p_email, p_pw, req)
p_email = CFG_EXTERNAL_AUTHENTICATION[login_method][0].auth_user(p_email, p_pw, req) or CFG_EXTERNAL_AUTHENTICATION[login_method][0].auth_user(p_un, p_pw, req)
def loginUser(req, p_un, p_pw, login_method): """It is a first simple version for the authentication of user. It returns the id of the user, for checking afterwards if the login is correct """ # p_un passed may be an email or a nickname: p_email = get_email_from_username(p_un) # go on with the old stuff based on p_email: if not CFG_EXTERNAL_AUTHENTICATION.has_key(login_method): return ([], p_email, p_pw, 12) if CFG_EXTERNAL_AUTHENTICATION[login_method][0]: # External Authenthication try: p_email = CFG_EXTERNAL_AUTHENTICATION[login_method][0].auth_user(p_email, p_pw, req) if p_email: p_email = p_email.lower() else: raise InvenioWebAccessExternalAuthError except InvenioWebAccessExternalAuthError: return([], p_email, p_pw, 15) if p_email: # Authenthicated externally query_result = run_sql("SELECT id from user where email=%s", (p_email,)) if not query_result: # First time user p_pw_local = int(random.random() * 1000000) p_nickname = '' if CFG_EXTERNAL_AUTHENTICATION[login_method][0].enforce_external_nicknames: try: # Let's discover the external nickname! p_nickname = CFG_EXTERNAL_AUTHENTICATION[login_method][0].fetch_user_nickname(p_email, p_pw, req) except (AttributeError, NotImplementedError): pass res = registerUser(req, p_email, p_pw_local, p_nickname, register_without_nickname=p_nickname == '', login_method=login_method) if res == 4 or res == 2: # The nickname was already taken res = registerUser(req, p_email, p_pw_local, '', register_without_nickname=True, login_method=login_method) elif res == 0: # Everything was ok, with or without nickname. query_result = run_sql("SELECT id from user where email=%s", (p_email,)) elif res == 6: # error in contacting the user via email return([], p_email, p_pw_local, 19) else: return([], p_email, p_pw_local, 13) try: groups = CFG_EXTERNAL_AUTHENTICATION[login_method][0].fetch_user_groups_membership(p_email, p_pw, req) # groups is a dictionary {group_name : group_description,} new_groups = {} for key, value in groups.items(): new_groups[key + " [" + str(login_method) + "]"] = value groups = new_groups except (AttributeError, NotImplementedError): pass except InvenioWebAccessExternalAuthError: return([], p_email, p_pw, 16) else: # Groups synchronization if groups != 0: userid = query_result[0][0] from invenio.webgroup import synchronize_external_groups synchronize_external_groups(userid, groups, login_method) user_prefs = get_user_preferences(query_result[0][0]) if CFG_ACCESS_CONTROL_LEVEL_ACCOUNTS >= 4: # Let's prevent the user to switch login_method if user_prefs.has_key("login_method") and \ user_prefs["login_method"] != login_method: return([], p_email, p_pw, 11) user_prefs["login_method"] = login_method # Cleaning external settings for key in user_prefs.keys(): if key.startswith('EXTERNAL_'): del user_prefs[key] try: # Importing external settings new_prefs = CFG_EXTERNAL_AUTHENTICATION[login_method][0].fetch_user_preferences(p_email, p_pw, req) for key, value in new_prefs.items(): user_prefs['EXTERNAL_' + key] = value except (AttributeError, NotImplementedError): pass except InvenioWebAccessExternalAuthError: return([], p_email, p_pw, 16) # Storing settings set_user_preferences(query_result[0][0], user_prefs) else: return ([], p_un, p_pw, 10) else: # Internal Authenthication if not p_pw: p_pw = '' query_result = run_sql("SELECT id,email,note from user where email=%s and password=AES_ENCRYPT(email,%s)", (p_email, p_pw,)) if query_result: #FIXME drop external groups and settings note = query_result[0][2] if note == '1': # Good account preferred_login_method = get_user_preferences(query_result[0][0])['login_method'] p_email = query_result[0][1].lower() if login_method != preferred_login_method: if CFG_EXTERNAL_AUTHENTICATION.has_key(preferred_login_method): return ([], p_email, p_pw, 11) elif note == '2': # Email address need to be confirmed by user return ([], p_email, p_pw, 17) elif note == '0': # Account need to be confirmed by administrator return ([], p_email, p_pw, 18) else: return ([], p_email, p_pw, 14) # Login successful! Updating the last access time run_sql("UPDATE user SET last_login=NOW() WHERE email=%s", (p_email, )) return (query_result, p_email, p_pw, 0)
49031e8cb1930fbdf3cc384365eda238de8d18fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/49031e8cb1930fbdf3cc384365eda238de8d18fb/webuser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 1299, 12, 3658, 16, 293, 67, 318, 16, 293, 67, 14921, 16, 3925, 67, 2039, 4672, 3536, 7193, 353, 279, 1122, 4143, 1177, 364, 326, 5107, 434, 729, 18, 2597, 1135, 326, 612, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 1299, 12, 3658, 16, 293, 67, 318, 16, 293, 67, 14921, 16, 3925, 67, 2039, 4672, 3536, 7193, 353, 279, 1122, 4143, 1177, 364, 326, 5107, 434, 729, 18, 2597, 1135, 326, 612, 434, ...
s = [x for x in s.split('\n') if len(x.split()) > 0]
s = [x for x in s.split('\n') if len(x.split()) > 0 and \ x.lstrip()[0] != '
def do_POST(self): global current_log, fulltext_log ctype, pdict = cgi.parse_header(self.headers.getheader('content-type')) length = int(self.headers.getheader('content-length')) if ctype == 'multipart/form-data': self.body = cgi.parse_multipart(self.rfile, pdict) elif ctype == 'application/x-www-form-urlencoded': qs = self.rfile.read(length) C = cgi.parse_qs(qs, keep_blank_values=1) number = eval(C.keys()[0]) code_to_eval = C[C.keys()[0]][0] fulltext_log += '\n#%s\n'%('-'*70) + '\n' + code_to_eval + '\n\n' try: if number > len(current_log)-1: current_log.set_last_cmd(code_to_eval) number = len(current_log)-1 else: current_log[number].cmd = code_to_eval s = sage.misc.preparser.preparse_file(code_to_eval, magic=False, do_time=True, ignore_prompts=True) s = [x for x in s.split('\n') if len(x.split()) > 0] # remove all blank lines if len(s) > 0: t = s[-1] if len(t) > 0 and not t[0].isspace(): s[-1] = "exec compile('%s', '', 'single')"%t s = '\n'.join(s)
9579a1b288c8a709d76500548af6cb8d30378bad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/9579a1b288c8a709d76500548af6cb8d30378bad/server1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3798, 12, 2890, 4672, 2552, 783, 67, 1330, 16, 1983, 955, 67, 1330, 11920, 16, 293, 1576, 273, 276, 10052, 18, 2670, 67, 3374, 12, 2890, 18, 2485, 18, 75, 546, 18105, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 3798, 12, 2890, 4672, 2552, 783, 67, 1330, 16, 1983, 955, 67, 1330, 11920, 16, 293, 1576, 273, 276, 10052, 18, 2670, 67, 3374, 12, 2890, 18, 2485, 18, 75, 546, 18105, 2668, ...
if os.environ.get('RUN_MAIN') == 'true':
if os.environ.get('WERKZEUG_RUN_MAIN') == 'true':
def run_with_reloader(main_func, extra_watch): """ Run the given function in an independent python interpreter. """ if os.environ.get('RUN_MAIN') == 'true': thread.start_new_thread(main_func, ()) try: reloader_loop(extra_watch) except KeyboardInterrupt: return try: sys.exit(restart_with_reloader()) except KeyboardInterrupt: pass
f9e2fad30d34a6b0737539434c03c07c2bc658d4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14437/f9e2fad30d34a6b0737539434c03c07c2bc658d4/serving.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1918, 67, 266, 6714, 12, 5254, 67, 644, 16, 2870, 67, 7585, 4672, 3536, 1939, 326, 864, 445, 316, 392, 14807, 5790, 16048, 18, 3536, 309, 1140, 18, 28684, 18, 588, 2668, 1883...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1918, 67, 266, 6714, 12, 5254, 67, 644, 16, 2870, 67, 7585, 4672, 3536, 1939, 326, 864, 445, 316, 392, 14807, 5790, 16048, 18, 3536, 309, 1140, 18, 28684, 18, 588, 2668, 1883...
self.render('templates/info.htm', {'message': 'You need to accept the HIT'})
self.render('templates/info.htm', {'message': 'Please accept the HIT'})
def get(self): worker_id = self.request.GET.get('workerId', None)
2f60e67f9c6cfda903bb9a6fc58b671522d2d808 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13960/2f60e67f9c6cfda903bb9a6fc58b671522d2d808/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 4322, 67, 350, 273, 365, 18, 2293, 18, 3264, 18, 588, 2668, 10124, 548, 2187, 599, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 4322, 67, 350, 273, 365, 18, 2293, 18, 3264, 18, 588, 2668, 10124, 548, 2187, 599, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...