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 |
|---|---|---|---|---|---|---|
f = open(change_number_file, "r") change_number = f.read() f.close() change_attr.close() | fd = open(change_number_file.name, "rb") change_number = fd.read() fd.close() | def __new_change(self, title = "none", description = "none"): change_attr = NamedTemporaryFile() change_attr.write("brief_description = \"%s\";\n" % self.repository.normalize(title)) change_attr.write("description = \"%s\";" % self.repository.normalize(description)) change_attr.write("cause = external_improvement;\n") change_attr.flush() change_number_file = mkstemp()[1] cmd = self.repository.command("-new_change", "-project", self.repository.module, "-file", change_attr.name, "-output", change_number_file) new_change = ExternalCommand(cwd="/tmp", command=cmd) output = new_change.execute(stdout = PIPE, stderr = STDOUT)[0] if new_change.exit_status > 0: raise ChangesetApplicationFailure( "%s returned status %d, saying: %s" % (str(new_change), new_change.exit_status, output.read())) f = open(change_number_file, "r") change_number = f.read() f.close() change_attr.close() return change_number.strip() | 036fe17de70629d1794101bf96956150eafd678e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5981/036fe17de70629d1794101bf96956150eafd678e/target.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
67,
3427,
12,
2890,
16,
2077,
273,
315,
6102,
3113,
2477,
273,
315,
6102,
6,
4672,
2549,
67,
1747,
273,
27555,
1435,
2549,
67,
1747,
18,
2626,
2932,
25888,
67,
3384,
273,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2704,
67,
3427,
12,
2890,
16,
2077,
273,
315,
6102,
3113,
2477,
273,
315,
6102,
6,
4672,
2549,
67,
1747,
273,
27555,
1435,
2549,
67,
1747,
18,
2626,
2932,
25888,
67,
3384,
273,
2... |
print >> out, "ERROR_(update_solvent_and_scale1): %s"%pdb[-11:], hkl[:-4] | print >> out, "ERROR_update_solvent_and_scale1: %s"%pdb, hkl | def update_solvent_and_scale(fmodel, pdb, hkl, out): try: status = None params = bss.solvent_and_scale_params() params.b_sol_min=0.0 params.b_sol_max=200.0 params.k_sol_min=0.0 params.k_sol_max=1.5 fmodel.update_solvent_and_scale(params = params, verbose = -1) r_work = fmodel.r_work()*100 r_free = fmodel.r_free()*100 rwrf_delta = 1.5 if(fmodel.f_obs.d_min() < 1.2): rwrf_delta = 0.5 if(r_work > r_free or abs(r_work - r_free) <= rwrf_delta or r_work > 45.0): status = "bad" else: status = "good" except KeyboardInterrupt: raise except: print >> out, "ERROR_(update_solvent_and_scale1): %s"%pdb[-11:], hkl[:-4] status = None fmodel = None convert_to_intensities = False convert_to_amplitudes = False if([status, fmodel].count(None) == 0 and status == "bad"): fmodel_dc = fmodel.deep_copy() rw, rf = update_solvent_and_scale_helper(fmodel = fmodel_dc, params = params, out=out,pdb=pdb,hkl=hkl) if([rw, rf].count(None) > 0): return None, None check = (rw>rf or abs(rw-rf) <= rwrf_delta or rw > 45.) if(check): status = "bad" else: status = "good" if([status, fmodel].count(None) == 0 and status == "bad"): fmodel_dc = fmodel.deep_copy() f_obs = fmodel_dc.f_obs f_obs = f_obs.set_observation_type(observation_type = None) f_obs = f_obs.f_sq_as_f() fmodel_dc.update(f_obs = f_obs) rw, rf = update_solvent_and_scale_helper(fmodel = fmodel_dc, params = params, out=out,pdb=pdb,hkl=hkl) if([rw, rf].count(None) > 0): return None, None check = (rw>rf or abs(rw-rf) <= rwrf_delta or rw > 45. or abs(r_work-rw) <= 5.) if(check): status = "bad" else: status = "good" convert_to_amplitudes = True if([status, fmodel].count(None) == 0 and status == "bad"): fmodel_dc = fmodel.deep_copy() f_obs = fmodel_dc.f_obs f_obs = f_obs.set_observation_type(observation_type = None) f_obs = f_obs.f_as_f_sq() fmodel_dc.update(f_obs = f_obs) rw, rf = update_solvent_and_scale_helper(fmodel = fmodel_dc, params = params, out=out,pdb=pdb,hkl=hkl) if([rw, rf].count(None) > 0): return None, None check = (rw>rf or abs(rw-rf) <= rwrf_delta or rw > 45. or abs(r_work-rw) <= 5.) if(check): status = "bad" else: status = "good" convert_to_intensities = True if(status == "good" and [convert_to_intensities, convert_to_amplitudes].count(True) > 0): fmodel.f_obs.set_observation_type(observation_type = None) if(convert_to_intensities): fmodel.update(k_sol=0, b_sol=0, b_cart=[0,0,0,0,0,0], f_obs = fmodel.f_obs.f_as_f_sq()) if(convert_to_amplitudes): fmodel.update(k_sol=0, b_sol=0, b_cart=[0,0,0,0,0,0], f_obs = fmodel.f_obs.f_sq_as_f()) fmodel.f_obs.set_observation_type_xray_amplitude() fmodel.update_solvent_and_scale(params = params, verbose = -1) if(status == "bad"): print >> out, "ERROR_(status=bad): %s"%pdb[-11:], hkl[:-4] status = None fmodel = None return status, fmodel | 9e0b7031e121e2fc878f68faaa8779137d9fc180 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/9e0b7031e121e2fc878f68faaa8779137d9fc180/pdb_refl_cif_to_mtz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
18281,
616,
67,
464,
67,
5864,
12,
74,
2284,
16,
10892,
16,
366,
16391,
16,
596,
4672,
775,
30,
1267,
273,
599,
859,
273,
324,
1049,
18,
18281,
616,
67,
464,
67,
5864,
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,
1089,
67,
18281,
616,
67,
464,
67,
5864,
12,
74,
2284,
16,
10892,
16,
366,
16391,
16,
596,
4672,
775,
30,
1267,
273,
599,
859,
273,
324,
1049,
18,
18281,
616,
67,
464,
67,
5864,
67,
... |
If no revision is given, the parent of the working directory is used. | If no revision is given, the parent of the working directory is used, or tip if no revision is checked out. | def tag(ui, repo, name, rev_=None, **opts): """add a tag for the current tip or a given revision Name a particular revision using <name>. Tags are used to name particular revisions of the repository and are very useful to compare different revision, to go back to significant earlier versions or to mark branch points as releases, etc. If no revision is given, the parent of the working directory is used. To facilitate version control, distribution, and merging of tags, they are stored as a file named ".hgtags" which is managed similarly to other project files and can be hand-edited if necessary. The file '.hg/localtags' is used for local tags (not shared among repositories). """ if name in ['tip', '.', 'null']: raise util.Abort(_("the name '%s' is reserved") % name) if rev_ is not None: ui.warn(_("use of 'hg tag NAME [REV]' is deprecated, " "please use 'hg tag [-r REV] NAME' instead\n")) if opts['rev']: raise util.Abort(_("use only one form to specify the revision")) if opts['rev']: rev_ = opts['rev'] if not rev_ and repo.dirstate.parents()[1] != nullid: raise util.Abort(_('uncommitted merge - please provide a ' 'specific revision')) r = repo.changectx(rev_).node() message = opts['message'] if not message: message = _('Added tag %s for changeset %s') % (name, short(r)) repo.tag(name, r, message, opts['local'], opts['user'], opts['date']) | fd090cca738aac7f011d593517e2dc303c5f27be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/fd090cca738aac7f011d593517e2dc303c5f27be/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1047,
12,
4881,
16,
3538,
16,
508,
16,
5588,
67,
33,
7036,
16,
2826,
4952,
4672,
3536,
1289,
279,
1047,
364,
326,
783,
9529,
578,
279,
864,
6350,
225,
1770,
279,
6826,
6350,
1450,
411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1047,
12,
4881,
16,
3538,
16,
508,
16,
5588,
67,
33,
7036,
16,
2826,
4952,
4672,
3536,
1289,
279,
1047,
364,
326,
783,
9529,
578,
279,
864,
6350,
225,
1770,
279,
6826,
6350,
1450,
411,... |
>>> import doctest | def set_unittest_reportflags(flags): """Sets the unittest option flags. The old flag is returned so that a runner could restore the old value if it wished to: >>> old = _unittest_reportflags >>> set_unittest_reportflags(REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) == old True >>> import doctest >>> doctest._unittest_reportflags == (REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) True Only reporting flags can be set: >>> set_unittest_reportflags(ELLIPSIS) Traceback (most recent call last): ... ValueError: ('Only reporting flags allowed', 8) >>> set_unittest_reportflags(old) == (REPORT_NDIFF | ... REPORT_ONLY_FIRST_FAILURE) True """ global _unittest_reportflags if (flags & REPORTING_FLAGS) != flags: raise ValueError("Only reporting flags allowed", flags) old = _unittest_reportflags _unittest_reportflags = flags return old | b4050033ee3334d0c45cf8206e611f25511d0815 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b4050033ee3334d0c45cf8206e611f25511d0815/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4873,
3813,
67,
6006,
7133,
12,
7133,
4672,
3536,
2785,
326,
2836,
3813,
1456,
2943,
18,
225,
1021,
1592,
2982,
353,
2106,
1427,
716,
279,
8419,
3377,
5217,
326,
1592,
460,
309,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
4873,
3813,
67,
6006,
7133,
12,
7133,
4672,
3536,
2785,
326,
2836,
3813,
1456,
2943,
18,
225,
1021,
1592,
2982,
353,
2106,
1427,
716,
279,
8419,
3377,
5217,
326,
1592,
460,
309,... | |
ligolw_sqlite.insert(connection, xml_files) | ligolw_sqlite.insert(connection, xml_files) | def setup_files(dir_name, gps_start_time, gps_end_time): # extract directory from URL glob_pattern = dir_name + '/*.xml' # Filter out the ones that are outside our time range xml_files = filter(lambda x: file_filter(x, gps_start_time, gps_end_time), glob.glob(glob_pattern)) # TODO: This should have a better name that includes the # start and end times temp_db = 'glitch-temp.db' target = dbtables.get_connection_filename(temp_db, None, True, False) connection = ligolw_sqlite.setup(target) ligolw_sqlite.insert(connection, xml_files) # [temp_xml]) return connection | 74cfcafb9b989d9984116365ea47245045a00514 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/74cfcafb9b989d9984116365ea47245045a00514/ligolw_glitch_page.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
67,
2354,
12,
1214,
67,
529,
16,
20985,
67,
1937,
67,
957,
16,
20985,
67,
409,
67,
957,
4672,
468,
2608,
1867,
628,
1976,
4715,
67,
4951,
273,
1577,
67,
529,
397,
1173,
11146,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2354,
12,
1214,
67,
529,
16,
20985,
67,
1937,
67,
957,
16,
20985,
67,
409,
67,
957,
4672,
468,
2608,
1867,
628,
1976,
4715,
67,
4951,
273,
1577,
67,
529,
397,
1173,
11146,
... |
if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) tmpList=list() for chan in zValueDictAQ[sngl.ifo]: | for zFile in fnmatch.filter(filesAnalyze,\ "*_%s_%s_*.txt"%(sngl.ifo,timeString)): for chan in wikiFileFinder.__readSummary__(zFile): | def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.exists(wikiFilename) and maxCount < 15: sys.stdout.write("File %s already exists.\n"%\ os.path.split(wikiFilename)[1]) wikiFilename=wikiFilename+".wiki" maxCount=maxCount+1 # #Create the wikipage object etc # wikiPage=wiki(wikiFilename) # # Create top two trigger params tables # cTable=wikiPage.wikiTable(2,9) cTable.data=[ ["Trigger Type", "Rank", "FAR", "SNR", "IFOS(Coinc)", "Instruments(Active)", "Coincidence Time (s)", "Total Mass (mSol)", "Chirp Mass (mSol)" ], ["%s"%(wikiCoinc.type), "%s"%(wikiCoinc.rank), "%s"%(wikiCoinc.far), "%s"%(wikiCoinc.snr), "%s"%(wikiCoinc.ifos), "%s"%(wikiCoinc.instruments), "%s"%(wikiCoinc.time), "%s"%(wikiCoinc.mass), "%s"%(wikiCoinc.mchirp) ] ] pTable=wikiPage.wikiTable(len(wikiCoinc.sngls_in_coinc())+1,7) pTable.data[0]=[ "IFO", "GPS Time(s)", "SNR", "CHISQR", "Mass 1", "Mass 2", "Chirp Mass" ] for row,cSngl in enumerate(wikiCoinc.sngls_in_coinc()): pTable.data[row+1]=[ "%s"%(cSngl.ifo), "%s"%(cSngl.time), "%s"%(cSngl.snr), "%s"%(cSngl.chisqr), "%s"%(cSngl.mass1), "%s"%(cSngl.mass2), "%s"%(cSngl.mchirp) ] #Write the tables into the Wiki object wikiPage.putText("Coincident Trigger Event Information: %s\n"\ %(stfu_pipe.gpsTimeToReadableDate(wikiCoinc.time))) wikiPage.insertTable(cTable) wikiPage.putText("Corresponding Coincident Single IFO Trigger Information\n") wikiPage.insertTable(pTable) #Generate a table of contents to appear after candidate params table wikiPage.tableOfContents(3) #Begin including each checklist item as section with subsections wikiPage.section("Follow-up Checklist") #Put each checklist item wikiPage.subsection("Checklist Summary") wikiPage.subsubsection("Does this candidate pass this checklist?") wikiPage.subsubsection("Answer") wikiPage.subsubsection("Relevant Information and Comments") wikiPage.insertHR() # #First real checklist item wikiPage.subsection("#0 False Alarm Probability") wikiPage.subsubsection("Question") wikiPage.putText("What is the false alarm rate associated with this candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") farTable=wikiPage.wikiTable(2,1) farTable.setTableStyle("background-color: yellow; text-align center;") farTable.data[0][0]="False Alarm Rate" farTable.data[1][0]="%s"%(wikiCoinc.far) wikiPage.insertTable(farTable) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#1 Data Quality Flags") wikiPage.subsubsection("Question") wikiPage.putText("Can the data quality flags coincident with this candidate be safely disregarded?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPath=os.path.split(wikiFilename)[0] dqFileList=wikiFileFinder.get_findFlags() if len(dqFileList) != 1: sys.stdout.write("Warning: DQ flags data product import problem.\n") print "Found %i files."%len(dqFileList) for mf in dqFileList: print mf for myFile in dqFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#2 Veto Investigations") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate survive the veto investigations performed at its time?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") vetoFileList=wikiFileFinder.get_findVetos() if len(vetoFileList) != 1: sys.stdout.write("Warning: Veto flags data product import problem.\n") for myFile in vetoFileList:print myFile for myFile in vetoFileList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#3 IFO Status") wikiPage.subsubsection("Question") wikiPage.putText("Are the interferometers operating normally with a reasonable level of sensitivity around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") #Add link to Daily Stats if wikiCoinc.time <= endOfS5: statsLink=wikiPage.makeExternalLink("http://blue.ligo-wa.caltech.edu/scirun/S5/DailyStatistics/",\ "S5 Daily Stats Page") else: statsLink="This should be a link to S6 Daily Stats!\n" wikiPage.putText(statsLink) #Link figures of merit #Get link for all members of wikiCoinc wikiPage.putText("Figures of Merit\n") if wikiCoinc.time > endOfS5: fomLinks=dict() elems=0 for wikiSngl in wikiCoinc.sngls: if not(wikiSngl.ifo.upper().rstrip().lstrip() == 'V1'): fomLinks[wikiSngl.ifo]=stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo) elems=elems+len(fomLinks[wikiSngl.ifo]) else: for myLabel,myLink,myThumb in stfu_pipe.getFOMLinks(wikiCoinc.time,wikiSngl.ifo): wikiPage.putText("%s\n"%(wikiPage.makeExternalLink(myLink,myLabel))) cols=4 rows=(elems/3)+1 fTable=wikiPage.wikiTable(rows,cols) fTable.data[0]=["IFO,Shift","FOM1","FOM2","FOM3"] currentIndex=0 for myIFOKey in fomLinks.keys(): for label,link,thumb in fomLinks[myIFOKey]: myRow=currentIndex/int(3)+1 myCol=currentIndex%int(3)+1 fTable.data[myRow][0]=label thumbURL=thumb fTable.data[myRow][myCol]="%s"%(wikiPage.linkedRemoteImage(thumb,link)) currentIndex=currentIndex+1 wikiPage.insertTable(fTable) else: wikiPage.putText("Can not automatically fetch S5 FOM links.") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # #Additional Checklist Item #First real checklist item wikiPage.subsection("#4 Candidate Appearance") wikiPage.subsubsection("Question") wikiPage.putText("Do the Qscan figures show what we would expect for a gravitational-wave event?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() for sngl in wikiCoinc.sngls: frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'hoft') indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*/%s/*/%s/*index.html"%(frametype,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened.png"\ %(sngl.time,channelName)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_hoft_frame(),\ "*%s*_%s_16.00_spectrogram_whitened?thumb.png"\ %(sngl.time,channelName)) # #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("GW data channel scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >= 1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >= 1 if enoughImage and enoughIndex: wikiPage.insertQscanTable(imageDict,\ thumbDict,\ indexDict) else: sys.stdout.write("Warning: Candidate appearance plot import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#5 Seismic Plots") wikiPage.subsubsection("Question") wikiPage.putText("Is the seismic activity insignificant around the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() # for sngl in wikiCoinc.sngls_in_coinc(): indexDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*index.html"%(sngl.ifo,sngl.time)) imageDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)) thumbDict[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*SEI*_512.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1_SEIS(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if (len(zValueFiles) > 0): for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Search for analyzeQscan files #/L1-analyseQscan_L1_932797512_687_seis_rds_L1_SEI-ETMX_X_z_scat-unspecified-gpstime.png timeString=str(float(sngl.time)).replace(".","_") zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.txt"%(sngl.ifo,timeString)) indexDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*_%s_%s_*.html"%(sngl.ifo,timeString)) thumbDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime_thumb.png"\ %(sngl.ifo,timeString)) imageDictAQ[sngl.ifo]=fnmatch.filter(wikiFileFinder.get_analyzeQscan_SEIS(),\ "*%s-*_%s_*_SEI*_z_scat-unspecified-gpstime.png"\ %(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse keeping SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Seismic scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: Seismic plots product import problem.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#6 Other environmental causes") wikiPage.subsubsection("Question") wikiPage.putText("Were the environmental disturbances (other than seismic) insignificant at the time of the candidate?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only PEM channels for sngl in wikiCoinc.sngls_in_coinc(): imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) #Search for corresponding Omega summary.txt file zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse only keeping PEM and not SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) for chan in zValueDictAQ[sngl.ifo]: if "PEM" in chan[0] and not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Analyze Qscan Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if "PEM" in myFile.upper() and not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(imageDict[sngl.ifo]) < 1: wikiPage.putText("PEM scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: PEM plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#7 Auxiliary degree of freedom") wikiPage.subsubsection("Question") wikiPage.putText("Were the auxiliary channel transients coincident with the candidate insignificant?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") imageDict=dict() indexDict=dict() thumbDict=dict() zValueDict=dict() imageDictAQ=dict() indexDictAQ=dict() thumbDictAQ=dict() zValueDictAQ=dict() #Select only AUX channels for sngl in wikiCoinc.sngls: imageDict[sngl.ifo]=list() indexDict[sngl.ifo]=list() thumbDict[sngl.ifo]=list() for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*html"%(sngl.ifo,sngl.time)): indexDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDict[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*_16.00_spectrogram_whitened?thumb.png"%\ (sngl.ifo,sngl.time)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDict[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_RDS_R_L1(),\ "*/%s_RDS_*/%s/*summary.txt"%(sngl.ifo,sngl.time)) zValueDict[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDict[sngl.ifo].extend(wikiFileFinder.__readSummary__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDict[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDict[sngl.ifo]=tmpList else: sys.stdout.write("Omega scan summary file not for for %s. ...skipping...\n"%sngl.ifo) #Select associated analyzeQscans imageDictAQ[sngl.ifo]=list() indexDictAQ[sngl.ifo]=list() thumbDictAQ[sngl.ifo]=list() timeString=str(float(sngl.time)).replace(".","_") #H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.html for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*html"%(sngl.ifo,timeString)): indexDictAQ[sngl.ifo].append(myFile) zValueFiles=fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*txt"%(sngl.ifo,timeString)) #Process zValue ranking file if found for IFO zValueDictAQ[sngl.ifo]=list() if len(zValueFiles)>0: for zFile in zValueFiles: zValueDictAQ[sngl.ifo].extend(wikiFileFinder.__readZranks__(zFile)) #Reparse NOT keeping PEM or SEI channels tmpList=list() for chan in zValueDictAQ[sngl.ifo]: if not "PEM" in chan[0] or not "SEI" in chan[0]: tmpList.append(chan) zValueDictAQ[sngl.ifo]=tmpList else: sys.stdout.write("Z ranking file not found for %s. ...skipping...\n"%sngl.ifo) #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime_thumb.png #H1-analyseQscan_H1_931176926_116_rds_H0_PEM-MY_SEISX_z_scat-unspecified-gpstime.png for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): imageDictAQ[sngl.ifo].append(myFile) for myFile in fnmatch.filter(wikiFileFinder.get_analyzeQscan_RDS(),\ "*%s-*_%s_*_z_scat-unspecified-gpstime?thumb.png"%\ (sngl.ifo,timeString)): if not "PEM" in myFile.upper() or not "SEI" in myFile.upper(): thumbDictAQ[sngl.ifo].append(myFile) #Convert disk locals to URLs imageDict[sngl.ifo]=[file2URL.convert(x) for x in imageDict[sngl.ifo]] indexDict[sngl.ifo]=[file2URL.convert(x) for x in indexDict[sngl.ifo]] thumbDict[sngl.ifo]=[file2URL.convert(x) for x in thumbDict[sngl.ifo]] imageDictAQ[sngl.ifo]=[file2URL.convert(x) for x in imageDictAQ[sngl.ifo]] indexDictAQ[sngl.ifo]=[file2URL.convert(x) for x in indexDictAQ[sngl.ifo]] thumbDictAQ[sngl.ifo]=[file2URL.convert(x) for x in thumbDictAQ[sngl.ifo]] if len(indexDict[sngl.ifo]) < 1: wikiPage.putText("Other scans for %s not available.\n"%sngl.ifo) enoughImage=[len(imageDict[key])>0 for key in imageDict.keys()].count(True) >=1 enoughIndex=[len(indexDict[key])>0 for key in indexDict.keys()].count(True) >=1 if enoughImage and enoughIndex: wikiPage.insertAnalyzeQscanTable(imageDict, thumbDict, indexDict, zValueDict, imageDictAQ, thumbDictAQ, indexDictAQ, zValueDictAQ) else: sys.stdout.write("Warning: AUX plots import trouble.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#8 Electronic Log Book") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the comments posted by the sci-mons or the operators in the e-log?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiLinkLHOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"H1"), "Hanford eLog") wikiLinkLLOlog=wikiPage.makeExternalLink(stfu_pipe.getiLogURL(myCoinc.time,"L1"), "Livingston eLog") wikiPage.putText("%s\n\n%s\n\n"%(wikiLinkLHOlog,wikiLinkLLOlog)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#9 Glitch Report") wikiPage.subsubsection("Question") wikiPage.putText("Were the instruments behaving normally according to the weekly glitch report?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") if int(wikiCoinc.time) >= endOfS5: wikiLinkGlitch=wikiPage.makeExternalLink( "https://www.lsc-group.phys.uwm.edu/twiki/bin/view/DetChar/GlitchStudies", "Glitch Reports for S6" ) else: wikiLinkGlitch=wikiPage.makeExternalLink( "http://www.lsc-group.phys.uwm.edu/glitch/investigations/s5index.html#shift", "Glitch Reports for S5" ) wikiPage.putText("%s\n"%(wikiLinkGlitch)) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#10 Snr versus time") wikiPage.subsubsection("Question") wikiPage.putText("Is this trigger significant in a SNR versus time plot of all triggers in its analysis chunk?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#11 Parameters of the candidate") wikiPage.subsubsection("Question") wikiPage.putText("Does the candidate have a high likelihood of being a gravitational-wave according to its parameters?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Effective Distance Ratio Test\n") effDList=wikiFileFinder.get_effDRatio() if len(effDList) != 1: sys.stdout.write("Warning: Effective Distance Test import problem.\n") for myFile in effDList: wikiPage.putText("%s\n"%(file(myFile).read())) wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#12 Snr and Chisq") wikiPage.subsubsection("Question") wikiPage.putText("Are the SNR and CHISQ time series consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") # #Put plots SNR and Chi sqr # indexList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*.html") thumbList=fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_snr-*thumb.png") thumbList.extend(fnmatch.filter(wikiFileFinder.get_plotsnrchisq(),"*_chisq-*thumb.png")) thumbList.sort() indexList=[file2URL.convert(x) for x in indexList] thumbList=[file2URL.convert(x) for x in thumbList] #Two thumb types possible "_thumb.png" or ".thumb.png" imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] ifoCount=len(wikiCoinc.sngls) rowLabel={"SNR":1,"CHISQ":2} rowCount=len(rowLabel) colCount=ifoCount if len(indexList) >= 1: snrTable=wikiPage.wikiTable(rowCount+1,colCount+1) for i,sngl in enumerate(wikiCoinc.sngls): myIndex="" for indexFile in indexList: if indexFile.__contains__("_pipe_%s_FOLLOWUP_"%sngl.ifo): myIndex=indexFile if myIndex=="": snrTable.data[0][i+1]=" %s "%sngl.ifo else: snrTable.data[0][i+1]=wikiPage.makeExternalLink(myIndex,sngl.ifo) for col,sngl in enumerate(wikiCoinc.sngls): for row,label in enumerate(rowLabel.keys()): snrTable.data[row+1][0]=label for k,image in enumerate(imageList): if (image.__contains__("_%s-"%label.lower()) \ and image.__contains__("pipe_%s_FOLLOWUP"%sngl.ifo)): snrTable.data[row+1][col+1]=" %s "%(wikiPage.linkedRemoteImage(thumbList[k],thumbList[k])) wikiPage.insertTable(snrTable) else: sys.stdout.write("Warning: SNR and CHISQ plots not found.\n") wikiPage.putText("SNR and CHISQ plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#13 Template bank veto") wikiPage.subsubsection("Question") wikiPage.putText("Is the bank veto value consistent with our expectations for a gravitational wave?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#14 Coherent studies") wikiPage.subsubsection("Question") wikiPage.putText("Are the triggers found in multiple interferometers coherent with each other?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") indexList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),"*.html") if len(indexList) >= 1: myIndex=file2URL.convert(indexList[0]) wikiPage.putText(wikiPage.makeExternalLink(myIndex,\ "%s Coherence Study Results"%(wikiCoinc.ifos))) thumbList=fnmatch.filter(wikiFileFinder.get_plotchiatimeseries(),\ "PLOT_CHIA_%s_snr-squared*thumb.png"%(wikiCoinc.time)) imageList=[x.replace("_thumb.png",".png").replace(".thumb.png",".png") for x in thumbList] rowCount=len(imageList) colCount=1 cohSnrTimeTable=wikiPage.wikiTable(rowCount+1,colCount) cohSnrTimeTable.data[0][0]="%s Coherent SNR Squared Times Series"%(wikiCoinc.ifos) for i,image in enumerate(imageList): cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImage(image,thumbList[i]) wikiPage.insertTable(cohSnrTimeTable) else: sys.stdout.write("Warning: Coherent plotting jobs not found.\n") wikiPage.putText("Coherent Studies plots not found.\n") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#15 Segmentation Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in segmentation?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # #Additional Checklist Item wikiPage.subsection("#16 Calibration Stability") wikiPage.subsubsection("Question") wikiPage.putText("Is the candidate stable against changes in calibration that are consistent with systematic uncertainties?") wikiPage.subsubsection("Answer") wikiPage.putText("Edit Here") wikiPage.subsubsection("Relevant Information") wikiPage.putText("Plots and pipeline data go here!") wikiPage.subsubsection("Investigator Comments") wikiPage.putText("Edit Here") wikiPage.insertHR() # # | fb84ac33aba836b8fcb61075cfaec34ced2846c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/fb84ac33aba836b8fcb61075cfaec34ced2846c0/makeCheckListWiki.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
1564,
1098,
12,
13044,
5359,
33,
7036,
16,
13044,
27055,
71,
33,
7036,
16,
13044,
2471,
33,
7036,
16,
768,
22,
1785,
33,
7036,
4672,
3536,
2985,
358,
2911,
279,
866,
1098,
1625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1564,
1098,
12,
13044,
5359,
33,
7036,
16,
13044,
27055,
71,
33,
7036,
16,
13044,
2471,
33,
7036,
16,
768,
22,
1785,
33,
7036,
4672,
3536,
2985,
358,
2911,
279,
866,
1098,
1625,
... |
self.assert_(set(self._box.list_folders()) == set(('two', 'three'))) | self.assertEqual(set(self._box.list_folders()), set(('two', 'three'))) | def test_add_and_remove_folders(self): # Delete folders self._box.add_folder('one') self._box.add_folder('two') self.assertEqual(len(self._box.list_folders()), 2) self.assert_(set(self._box.list_folders()) == set(('one', 'two'))) self._box.remove_folder('one') self.assertEqual(len(self._box.list_folders()), 1) self.assertEqual(set(self._box.list_folders()), set(('two',))) self._box.add_folder('three') self.assertEqual(len(self._box.list_folders()), 2) self.assert_(set(self._box.list_folders()) == set(('two', 'three'))) self._box.remove_folder('three') self.assertEqual(len(self._box.list_folders()), 1) self.assertEqual(set(self._box.list_folders()), set(('two',))) self._box.remove_folder('two') self.assertEqual(len(self._box.list_folders()), 0) self.assertEqual(self._box.list_folders(), []) | 7731c36bc6f787ca91b8429603fe004822f1f2d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7731c36bc6f787ca91b8429603fe004822f1f2d8/test_mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
67,
464,
67,
4479,
67,
16064,
12,
2890,
4672,
468,
2504,
9907,
365,
6315,
2147,
18,
1289,
67,
5609,
2668,
476,
6134,
365,
6315,
2147,
18,
1289,
67,
5609,
2668,
15415,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1289,
67,
464,
67,
4479,
67,
16064,
12,
2890,
4672,
468,
2504,
9907,
365,
6315,
2147,
18,
1289,
67,
5609,
2668,
476,
6134,
365,
6315,
2147,
18,
1289,
67,
5609,
2668,
15415,
6... |
elif left_protocol == 'xmpp': if p.irc_connection == 'both': was_on_both = True | if left_protocol == 'xmpp': | def removeParticipant(self, left_protocol, nickname, leave_message): """Remove the participant using nickname from the bridge. Raises a NoSuchParticipantException if nickname is not used in the bridge.""" was_on_both = None p = self.getParticipant(nickname) if p.protocol == 'xmpp': if left_protocol == 'irc': was_on_both = True elif left_protocol == 'xmpp': if p.irc_connection == 'both': was_on_both = True p.protocol = 'irc' p.createDuplicateOnXMPP() else: was_on_both = False elif p.protocol == 'irc': if left_protocol == 'xmpp': was_on_both = True elif left_protocol == 'irc': if p.xmpp_c == 'both': was_on_both = True p.protocol = 'xmpp' p.createDuplicateOnIRC() else: was_on_both = False else: raise Exception('[Internal Error] bad protocol') if was_on_both == True: self.bot.error('===> Debug: "'+nickname+'" was on both sides of bridge "'+str(self)+'" but left '+left_protocol, debug=True) elif was_on_both == False: self.lock.acquire() self.bot.error('===> Debug: removing participant "'+nickname+'" from bridge "'+str(self)+'"', debug=True) self.participants.remove(p) p.leave(leave_message) del p i = 0 for p in self.participants: if p.protocol == 'xmpp': i += 1 self.lock.release() if left_protocol == 'xmpp': if self.irc_connections_limit != -1 and self.irc_connections_limit > i: self.switchFromLimitedToNormalMode() if self.mode != 'normal': xmpp_participants_nicknames = self.get_participants_nicknames_list(protocols=['xmpp']) self.say('[Info] Participants on XMPP: '+' '.join(xmpp_participants_nicknames), on_xmpp=False) elif left_protocol == 'irc': if self.mode == 'minimal': irc_participants_nicknames = self.get_participants_nicknames_list(protocols=['irc']) self.say('[Info] Participants on IRC: '+' '.join(irc_participants_nicknames), on_irc=False) else: self.bot.error('=> Debug: Bad decision tree, p.protocol='+p.protocol+' left_protocol='+left_protocol+'\np.xmpp_c='+str(p.xmpp_c)+'\np.irc_connection='+str(p.irc_connection), debug=True) | 149dd43020f1e98a97573a2bc38f82171b550782 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9915/149dd43020f1e98a97573a2bc38f82171b550782/bridge.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
22540,
12,
2890,
16,
2002,
67,
8373,
16,
19570,
16,
8851,
67,
2150,
4672,
3536,
3288,
326,
14188,
1450,
19570,
628,
326,
10105,
18,
20497,
279,
5823,
22540,
503,
309,
19570,
353,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
22540,
12,
2890,
16,
2002,
67,
8373,
16,
19570,
16,
8851,
67,
2150,
4672,
3536,
3288,
326,
14188,
1450,
19570,
628,
326,
10105,
18,
20497,
279,
5823,
22540,
503,
309,
19570,
353,
4... |
def min_avg_max(list): minr = 100 | def min_avg_max(l): minr = 2**30 | def min_avg_max(list): minr = 100 maxr = 0 avgr = 0.0 for v in list: avgr += v if v < minr: minr = v if v > maxr: maxr = v avgr /= len(list) return (minr,avgr,maxr) | a95a24bd7e0c23168169ad9e4bc2f956ff3f5a30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3762/a95a24bd7e0c23168169ad9e4bc2f956ff3f5a30/dist_check.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
67,
14141,
67,
1896,
12,
80,
4672,
1131,
86,
273,
576,
636,
5082,
943,
86,
273,
374,
1712,
3197,
273,
374,
18,
20,
364,
331,
316,
666,
30,
1712,
3197,
1011,
331,
309,
331,
411,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1131,
67,
14141,
67,
1896,
12,
80,
4672,
1131,
86,
273,
576,
636,
5082,
943,
86,
273,
374,
1712,
3197,
273,
374,
18,
20,
364,
331,
316,
666,
30,
1712,
3197,
1011,
331,
309,
331,
411,... |
for (uid, doc) in docs: | for uid in uids: doc = self._docmap[uid] | def _module_tree(self, sortorder=None): """ @return: The HTML code for the module hierarchy tree. This is used by L{_tree_to_html} to construct the hiearchy page. @rtype: C{string} """ str = '<ul>\n' docs = self._docmap.items() docs.sort(lambda a,b: cmp(a[0], b[0])) # Find all top-level packages. (what about top-level # modules?) for (uid, doc) in docs: if not isinstance(doc, ModuleDoc): continue if not doc.package(): str += self._module_tree_item(uid) return str +'</ul>\n' | 60b4598f963657af72659f4c3492b6028c51c37e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/60b4598f963657af72659f4c3492b6028c51c37e/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2978,
67,
3413,
12,
2890,
16,
1524,
1019,
33,
7036,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
1605,
9360,
2151,
18,
225,
1220,
353,
1399,
635,
511,
95,
67,
3413,
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,
389,
2978,
67,
3413,
12,
2890,
16,
1524,
1019,
33,
7036,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
1605,
9360,
2151,
18,
225,
1220,
353,
1399,
635,
511,
95,
67,
3413,
67,
... |
global data timescale = "<div class=\"t\" style=\"right:{0}%\">{1}</div>\n" | timescale = '<div class="t" style="right:{0}%">{1}</div>\n' | def createTimeScale(t0, tMax, tSuspended): global data timescale = "<div class=\"t\" style=\"right:{0}%\">{1}</div>\n" output = '<div id="timescale">\n' # set scale for timeline tTotal = tMax - t0 tS = 0.1 if(tTotal <= 0): return output if(tTotal > 4): tS = 1 if(tSuspended < 0): for i in range(int(tTotal/tS)+1): pos = "%0.3f" % (100 - ((float(i)*tS*100)/tTotal)) if(i > 0): val = "%0.f" % (float(i)*tS*1000) else: val = "" output += timescale.format(pos, val) else: tSuspend = tSuspended - t0 divTotal = int(tTotal/tS) + 1 divSuspend = int(tSuspend/tS) s0 = (tSuspend - tS*divSuspend)*100/tTotal for i in range(divTotal): pos = "%0.3f" % (100 - ((float(i)*tS*100)/tTotal) - s0) if((i == 0) and (s0 < 3)): val = "" elif(i == divSuspend): val = "S/R" else: val = "%0.f" % (float(i-divSuspend)*tS*1000) output += timescale.format(pos, val) output += '</div>\n' return output | 0c52bda8f6c5785b5982bc3636b627b4ccd59c3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/0c52bda8f6c5785b5982bc3636b627b4ccd59c3f/analyze_suspend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
950,
5587,
12,
88,
20,
16,
268,
2747,
16,
268,
55,
22942,
4672,
1658,
31402,
273,
2368,
2892,
667,
1546,
88,
6,
2154,
1546,
4083,
18611,
20,
97,
9,
6441,
95,
21,
12863,
2892,
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,
752,
950,
5587,
12,
88,
20,
16,
268,
2747,
16,
268,
55,
22942,
4672,
1658,
31402,
273,
2368,
2892,
667,
1546,
88,
6,
2154,
1546,
4083,
18611,
20,
97,
9,
6441,
95,
21,
12863,
2892,
53... |
new_document = etree.tostring(xml_doc, 'UTF-8', xml_declaration=True) | new_document = etree.tostring(xml_doc, encoding='UTF-8', xml_declaration=True) | def _cb_delete_element(self, response, uri, check_etag): if response.code == 404: raise ResourceNotFound document = response.data xml_doc = etree.parse(StringIO(document)) node_selector = uri.node_selector application = getApplicationForURI(uri) ns_dict = node_selector.get_xpath_ns_bindings(application.default_ns) try: selector = node_selector.element_selector + '/' + node_selector.terminal_selector elem = xml_doc.xpath(selector, namespaces = ns_dict) except: raise ResourceNotFound if len(elem) != 1: raise ResourceNotFound elem = elem[0] elem.getparent().remove(elem) new_document = etree.tostring(xml_doc, 'UTF-8', xml_declaration=True) return self.put_document(uri, new_document, check_etag) | 4816b35f72d6c6d170668c3b8e4adab6a759e312 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3446/4816b35f72d6c6d170668c3b8e4adab6a759e312/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7358,
67,
3733,
67,
2956,
12,
2890,
16,
766,
16,
2003,
16,
866,
67,
20788,
4672,
309,
766,
18,
710,
422,
7709,
30,
1002,
2591,
2768,
1668,
273,
766,
18,
892,
2025,
67,
2434,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
7358,
67,
3733,
67,
2956,
12,
2890,
16,
766,
16,
2003,
16,
866,
67,
20788,
4672,
309,
766,
18,
710,
422,
7709,
30,
1002,
2591,
2768,
1668,
273,
766,
18,
892,
2025,
67,
2434,
273... |
('boost_regex', '${Boost_regex}'), | ('boost_regex', '${Boost_regex_LIBRARY}'), | def getlibs(library): libs = [] linkopts = os.popen('cmt show macro_value %s_use_linkopts' % library).readlines()[0][:-1] for opt in linkopts.split(): if opt[:2] == '-l': if opt[2:] not in ignorelibs and opt[2:] not in libs: libs.append(opt[2:]) return libs | 686060d2c7cd795bc18416141534578eb4b4306c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9140/686060d2c7cd795bc18416141534578eb4b4306c/genCMake.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
21571,
12,
12083,
4672,
15042,
273,
5378,
1692,
4952,
273,
1140,
18,
84,
3190,
2668,
71,
1010,
2405,
11522,
67,
1132,
738,
87,
67,
1202,
67,
1232,
4952,
11,
738,
5313,
2934,
896,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21571,
12,
12083,
4672,
15042,
273,
5378,
1692,
4952,
273,
1140,
18,
84,
3190,
2668,
71,
1010,
2405,
11522,
67,
1132,
738,
87,
67,
1202,
67,
1232,
4952,
11,
738,
5313,
2934,
896,
... |
opts = '-%s, --%s' % (shortopt, longopt), | opts = '-%s, --%s' % (shortopt, longopt) | def usage(): print usage_header for longopt, shortopt, description in options: if longopt[-1:] == '=': opts = '-%s arg, --%sarg' % (shortopt, longopt) else: opts = '-%s, --%s' % (shortopt, longopt), print '%-15s' % opts, if len(opts) > 14: print '%-16s' % '\n', while len(description) > 60: limit = description.rindex(' ', 0, 60) print description[:limit].strip() description = description[limit + 1:] print '%-15s' % ' ', print description | d0d16cc3d9e0f51d88f1690563760e881ffaeb50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/d0d16cc3d9e0f51d88f1690563760e881ffaeb50/quicktest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
4084,
67,
3374,
364,
1525,
3838,
16,
3025,
3838,
16,
2477,
316,
702,
30,
309,
1525,
3838,
18919,
21,
26894,
422,
5214,
30,
1500,
273,
2400,
9,
87,
1501,
16,
1493,
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,
4084,
13332,
1172,
4084,
67,
3374,
364,
1525,
3838,
16,
3025,
3838,
16,
2477,
316,
702,
30,
309,
1525,
3838,
18919,
21,
26894,
422,
5214,
30,
1500,
273,
2400,
9,
87,
1501,
16,
1493,
9,... |
if not end: | if end is None: | def parse_proc(self, i): rawdata = self.rawdata end = procclose.search(rawdata, i) if not end: return -1 j = end.start(0) if illegal.search(rawdata, i+2, j): self.syntax_error('illegal character in processing instruction') res = tagfind.match(rawdata, i+2) if not res: raise RuntimeError, 'unexpected call to parse_proc' k = res.end(0) name = res.group(0) if string.find(string.lower(name), 'xml') >= 0: self.syntax_error('illegal processing instruction target name') self.handle_proc(name, rawdata[k:j]) return end.end(0) | eeb2f32aad5c080dbc80705d5b3fc807c0c31037 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eeb2f32aad5c080dbc80705d5b3fc807c0c31037/xmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
9381,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
679,
273,
450,
952,
2061,
18,
3072,
12,
1899,
892,
16,
277,
13,
309,
679,
353,
599,
30,
327,
300,
21,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
9381,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
679,
273,
450,
952,
2061,
18,
3072,
12,
1899,
892,
16,
277,
13,
309,
679,
353,
599,
30,
327,
300,
21,
5... |
phylogeny.other.append(self.to_other(elem)) | phylogeny.other.append(self.other(elem, namespace, tag)) | def _parse_phylogeny(self, parent): """Parse a single phylogeny within the phyloXML tree. | 5f38465441061de22d67bc9df2281f70d7ac37ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/5f38465441061de22d67bc9df2281f70d7ac37ce/PhyloXMLIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
844,
93,
1330,
275,
93,
12,
2890,
16,
982,
4672,
3536,
3201,
279,
2202,
1844,
93,
1330,
275,
93,
3470,
326,
1844,
93,
383,
4201,
2151,
18,
2,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2670,
67,
844,
93,
1330,
275,
93,
12,
2890,
16,
982,
4672,
3536,
3201,
279,
2202,
1844,
93,
1330,
275,
93,
3470,
326,
1844,
93,
383,
4201,
2151,
18,
2,
-100,
-100,
-100,
-100,
-... |
gtol = N*avegtol | def fmin_cg(f, x0, fprime=None, args=(), avegtol=1e-5, epsilon=_epsilon, maxiter=None, full_output=0, disp=1, retall=0): """Minimize a function with nonlinear conjugate gradient algorithm. Description: Optimize the function, f, whose gradient is given by fprime using the nonlinear conjugate gradient algorithm of Polak and Ribiere See Wright, and Nocedal 'Numerical Optimization', 1999, pg. 120-122. Inputs: f -- the Python function or method to be minimized. x0 -- the initial guess for the minimizer. fprime -- a function to compute the gradient of f. args -- extra arguments to f and fprime. avegtol -- minimum average value of gradient for stopping epsilon -- if fprime is approximated use this value for the step size (can be scalar or vector) Outputs: (xopt, {fopt, func_calls, grad_calls, warnflag}, {allvecs}) xopt -- the minimizer of f. fopt -- the value of f(xopt). func_calls -- the number of function_calls. grad_calls -- the number of gradient calls. warnflag -- an integer warning flag: 1 : 'Maximum number of iterations exceeded.' 2 : 'Gradient and/or function calls not changing' allvecs -- if retall then this vector of the iterates is returned Additional Inputs: avegtol -- the minimum occurs when fprime(xopt)==0. This specifies how close to zero the average magnitude of fprime(xopt) needs to be. maxiter -- the maximum number of iterations. full_output -- if non-zero then return fopt, func_calls, grad_calls, and warnflag in addition to xopt. disp -- print convergence message if non-zero. retall -- return a list of results at each iteration if True """ app_fprime = 0 if fprime is None: app_fprime = 1 x0 = asarray(x0) if maxiter is None: maxiter = len(x0)*200 func_calls = 0 grad_calls = 0 k = 0 N = len(x0) gtol = N*avegtol xk = x0 old_fval = f(xk,*args) old_old_fval = old_fval + 5000 func_calls +=1 if app_fprime: gfk = apply(approx_fprime,(x0,f,epsilon)+args) myfprime = (approx_fprime,epsilon) func_calls = func_calls + len(x0) + 1 else: gfk = apply(fprime,(x0,)+args) myfprime = fprime grad_calls = grad_calls + 1 if retall: allvecs = [xk] sk = [2*gtol] warnflag = 0 pk = -gfk while (Num.add.reduce(abs(gfk)) > gtol) and (k < maxiter): deltak = Num.dot(gfk,gfk) alpha_k, fc, gc, old_fval, old_old_fval, gfkp1 = \ line_search(f,myfprime,xk,pk,gfk,old_fval,old_old_fval,args=args,c2=0.3) func_calls += fc grad_calls += gc xk = xk + alpha_k*pk if retall: allvecs.append(xk) if gfkp1 is None: if app_fprime: gfkp1 = apply(approx_fprime,(xk,f,epsilon)+args) func_calls = func_calls + len(x0) + 1 else: gfkp1 = apply(fprime,(xk,)+args) grad_calls = grad_calls + 1 yk = gfkp1 - gfk beta_k = pymax(0,Num.dot(yk,gfkp1)/deltak) pk = -gfkp1 + beta_k * pk gfk = gfkp1 k = k + 1 if disp or full_output: fval = old_fval if warnflag == 2: if disp: print "Warning: Desired error not necessarily achieved due to precision loss" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls elif k >= maxiter: warnflag = 1 if disp: print "Warning: Maximum number of iterations has been exceeded" print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls else: if disp: print "Optimization terminated successfully." print " Current function value: %f" % fval print " Iterations: %d" % k print " Function evaluations: %d" % func_calls print " Gradient evaluations: %d" % grad_calls if full_output: retlist = xk, fval, func_calls, grad_calls, warnflag if retall: retlist += (allvecs,) else: retlist = xk if retall: retlist = (xk, allvecs) return retlist | 0b485ee95cd5b21a0a959c6b89ed7b94a83dd453 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/0b485ee95cd5b21a0a959c6b89ed7b94a83dd453/optimize.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
1154,
67,
26275,
12,
74,
16,
619,
20,
16,
284,
16382,
33,
7036,
16,
833,
33,
9334,
279,
537,
75,
3490,
33,
21,
73,
17,
25,
16,
12263,
33,
67,
13058,
10327,
16,
25743,
33,
7036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
284,
1154,
67,
26275,
12,
74,
16,
619,
20,
16,
284,
16382,
33,
7036,
16,
833,
33,
9334,
279,
537,
75,
3490,
33,
21,
73,
17,
25,
16,
12263,
33,
67,
13058,
10327,
16,
25743,
33,
7036... | |
def testReadAfterEOF(self): teststring = "spam" bag = open(TESTFN, "w") bag.write(teststring) bag.close() buf = array("c", " "*len(teststring)) methods = [("readline", ()), ("read",()), ("readlines", ()), ("readinto", (buf,))] for attr in 'r', 'rU': for methodname, args in methods: f = open(TESTFN, "rU") f.seek(0, 2) meth = getattr(f, methodname) meth(*args) try: append = open(TESTFN, "a+") append.write(teststring) append.flush() append.close() try: meth = getattr(f, methodname) if methodname == 'readlines': self.failUnlessEqual(meth(*args), [teststring]) elif methodname == 'readinto': meth(*args) self.failUnlessEqual(buf.tostring(), teststring) else: self.failUnlessEqual(meth(*args), teststring) except ValueError: self.fail("read* failed after hitting EOF") finally: f.close() | def testReadAfterEOF(self): # Regression test for SF bug #1523853. # Verify read works after hitting EOF | 3c08e45b70ddce2d702d3bcb67612682bf551845 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/3c08e45b70ddce2d702d3bcb67612682bf551845/test_file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1994,
4436,
12706,
12,
2890,
4672,
468,
868,
2329,
285,
1842,
364,
21318,
7934,
468,
3600,
4366,
7140,
23,
18,
468,
8553,
855,
6330,
1839,
6800,
1787,
6431,
2,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1994,
4436,
12706,
12,
2890,
4672,
468,
868,
2329,
285,
1842,
364,
21318,
7934,
468,
3600,
4366,
7140,
23,
18,
468,
8553,
855,
6330,
1839,
6800,
1787,
6431,
2,
-100,
-100,
-100,
-1... | |
matrix.items = self.data | matrix.setattr("items", self.data) | def relabel(self): self.error() matrix = self.matrix if self.data: if self.takeAttributeNames: domain = self.data.domain if matrix.dim == len(domain.attributes): matrix.items = domain.attributes elif matrix.dim == len(domain.variables): matrix.items = domain.variables else: self.error("The number of attributes doesn't match the matrix dimension") | 503f0738b07ae0ddc2b2ebc525b30a2e7c464e85 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/503f0738b07ae0ddc2b2ebc525b30a2e7c464e85/OWDistanceFile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1279,
873,
12,
2890,
4672,
365,
18,
1636,
1435,
3148,
273,
365,
18,
5667,
225,
309,
365,
18,
892,
30,
309,
365,
18,
22188,
26080,
30,
2461,
273,
365,
18,
892,
18,
4308,
309,
3148,
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,
1279,
873,
12,
2890,
4672,
365,
18,
1636,
1435,
3148,
273,
365,
18,
5667,
225,
309,
365,
18,
892,
30,
309,
365,
18,
22188,
26080,
30,
2461,
273,
365,
18,
892,
18,
4308,
309,
3148,
18... |
else: status.append (self.addr) | except TypeError: status.append (repr(self.addr)) | def __repr__ (self): try: status = [self.__class__.__module__+"."+self.__class__.__name__] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr: if type(self.addr) == types.TupleType: status.append ('%s:%d' % self.addr) else: status.append (self.addr) return '<%s at %#x>' % (' '.join (status), id (self)) except: pass | eee80ee2efa5288b3e30d3336a9fce0ebdde68eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/eee80ee2efa5288b3e30d3336a9fce0ebdde68eb/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12715,
972,
261,
2890,
4672,
775,
30,
1267,
273,
306,
2890,
16186,
1106,
972,
16186,
2978,
972,
9078,
1199,
15,
2890,
16186,
1106,
972,
16186,
529,
972,
65,
309,
365,
18,
9436,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12715,
972,
261,
2890,
4672,
775,
30,
1267,
273,
306,
2890,
16186,
1106,
972,
16186,
2978,
972,
9078,
1199,
15,
2890,
16186,
1106,
972,
16186,
529,
972,
65,
309,
365,
18,
9436,
310... |
if os.path.exists(ok_file): os.unlink(ok_file) | if os.path.exists(ok_file): os.unlink(ok_file) | def check_pth_processing(self): """Empirically verify whether .pth files are supported in inst. dir""" instdir = self.install_dir log.info("Checking .pth file support in %s", instdir) pth_file = self.pseudo_tempname()+".pth" ok_file = pth_file+'.ok' ok_exists = os.path.exists(ok_file) try: if ok_exists: os.unlink(ok_file) f = open(pth_file,'w') except (OSError,IOError): self.cant_write_to_target() else: try: f.write("import os;open(%r,'w').write('OK')\n" % (ok_file,)) f.close(); f=None executable = sys.executable if os.name=='nt': dirname,basename = os.path.split(executable) alt = os.path.join(dirname,'pythonw.exe') if basename.lower()=='python.exe' and os.path.exists(alt): # use pythonw.exe to avoid opening a console window executable = alt from distutils.spawn import spawn spawn([executable,'-E','-c','pass'],0) | 6bd7460a036613a1ef0fb1f7115c5833c1fd4efb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/6bd7460a036613a1ef0fb1f7115c5833c1fd4efb/easy_install.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2397,
67,
10632,
12,
2890,
4672,
3536,
41,
1291,
481,
6478,
3929,
2856,
263,
2397,
1390,
854,
3260,
316,
1804,
18,
1577,
8395,
1804,
1214,
273,
365,
18,
5425,
67,
1214,
613,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2397,
67,
10632,
12,
2890,
4672,
3536,
41,
1291,
481,
6478,
3929,
2856,
263,
2397,
1390,
854,
3260,
316,
1804,
18,
1577,
8395,
1804,
1214,
273,
365,
18,
5425,
67,
1214,
613,
1... |
skip = len(code); emit(0) | skip = _len(code); emit(0) | def fixup(literal, flags=flags): return _sre.getlower(literal, flags) | 2177055b902a7e649c7988bb4499ab5115b4ea1d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2177055b902a7e649c7988bb4499ab5115b4ea1d/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
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,
2917,
416,
12,
13107,
16,
2943,
33,
7133,
4672,
327,
389,
87,
266,
18,
588,
8167,
12,
13107,
16,
2943,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.valueOf_ or | def hasContent_(self): if ( self.valueOf_ or super(AbstractNode, self).hasContent_() ): return True else: return False | 9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
1350,
67,
12,
2890,
4672,
309,
261,
2240,
12,
7469,
907,
16,
365,
2934,
5332,
1350,
67,
1435,
262,
30,
327,
1053,
469,
30,
327,
1083,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
1350,
67,
12,
2890,
4672,
309,
261,
2240,
12,
7469,
907,
16,
365,
2934,
5332,
1350,
67,
1435,
262,
30,
327,
1053,
469,
30,
327,
1083,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
print w, h, self.rwidth, self.rheight, self.rx, self.ry | def render(self, cr): assert None not in (self.rx, self.ry, self.rwidth, self.rheight), self | 5b8471ae24f9eaaf95270d0b79fc3203260a0192 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10761/5b8471ae24f9eaaf95270d0b79fc3203260a0192/ui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
4422,
4672,
1815,
599,
486,
316,
261,
2890,
18,
20122,
16,
365,
18,
1176,
16,
365,
18,
86,
2819,
16,
365,
18,
86,
4210,
3631,
365,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
16,
4422,
4672,
1815,
599,
486,
316,
261,
2890,
18,
20122,
16,
365,
18,
1176,
16,
365,
18,
86,
2819,
16,
365,
18,
86,
4210,
3631,
365,
2,
-100,
-100,
-100,
-100,
-100... | |
h = SpatialHash(tableSize=tableSize, ncolors=ncol) | h = SpatialHash(ncol, tableSize=tableSize) | def findGoodHashPerm(tableSize, ncol): ''' Find a hash function permutation table which is "nice" in the sense that it results in few adjacent repititions of the same tile. ''' while True: h = SpatialHash(tableSize=tableSize, ncolors=ncol) ind = hashTilingInds(tableSize, h) goodness0 = sum(diff(ind, axis=0) == 0) / float(ind.size) goodness1 = sum(diff(ind, axis=1) == 0) / float(ind.size) print abs(goodness0-goodness1), goodness0, goodness1 if abs(goodness0-goodness1) < 0.02 and goodness0 < 0.057 \ and goodness1 < 0.057: break print h.P return h | 008992a25e99f83c4795c3056f77da5d61cd151a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11560/008992a25e99f83c4795c3056f77da5d61cd151a/sample_patterns.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
18195,
2310,
9123,
12,
2121,
1225,
16,
290,
1293,
4672,
9163,
4163,
279,
1651,
445,
17440,
1014,
1492,
353,
315,
82,
1812,
6,
316,
326,
12764,
716,
518,
1686,
316,
11315,
16335,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
18195,
2310,
9123,
12,
2121,
1225,
16,
290,
1293,
4672,
9163,
4163,
279,
1651,
445,
17440,
1014,
1492,
353,
315,
82,
1812,
6,
316,
326,
12764,
716,
518,
1686,
316,
11315,
16335,
20... |
begin_retval = self.assy.undo_checkpoint_before_command("(press)") | begin_retval = self.assy.undo_checkpoint_before_command("(mouse)") | def mousePressEvent(self, event): """Dispatches mouse press events depending on shift and control key state. """ ## Huaicai 2/25/05. This is to fix item 2 of bug 400: make this rendering context ## as current, otherwise, the first event will get wrong coordinates self.makeCurrent() self.begin_select_cmd() #bruce 051031 if self.debug_event(event, 'mousePressEvent', permit_debug_menu_popup = 1): return ## but = event.stateAfter() but = self.fix_event(event, 'press', self.mode) | e8c50f57c55e135089f1938dcbc8e080ba453a0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e8c50f57c55e135089f1938dcbc8e080ba453a0e/GLPane.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7644,
11840,
1133,
12,
2890,
16,
871,
4672,
3536,
5325,
281,
7644,
11779,
2641,
8353,
603,
4654,
471,
3325,
498,
919,
18,
3536,
7541,
670,
11886,
335,
10658,
576,
19,
2947,
19,
6260,
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,
7644,
11840,
1133,
12,
2890,
16,
871,
4672,
3536,
5325,
281,
7644,
11779,
2641,
8353,
603,
4654,
471,
3325,
498,
919,
18,
3536,
7541,
670,
11886,
335,
10658,
576,
19,
2947,
19,
6260,
18,... |
self.bbox = afwImage.BBox(afwImage.PointI(0, 1500), | self.offset = 1500 self.bbox = afwImage.BBox(afwImage.PointI(0, self.offset), | def setUp(self): self.diffimDir = eups.productDir('ip_diffim') self.diffimPolicy = os.path.join(self.diffimDir, 'pipeline', 'ImageSubtractStageDictionary.paf') self.policy = ipDiffim.generateDefaultPolicy(self.diffimPolicy) self.defDataDir = eups.productDir('afwdata') if self.defDataDir: | 914dc5f436225f5d8bdc170aa48b744439eb0bda /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6527/914dc5f436225f5d8bdc170aa48b744439eb0bda/SubtractExposures.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
5413,
381,
1621,
565,
273,
425,
18294,
18,
5896,
1621,
2668,
625,
67,
5413,
381,
6134,
365,
18,
5413,
381,
2582,
273,
1140,
18,
803,
18,
5701,
12,
2890,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
365,
18,
5413,
381,
1621,
565,
273,
425,
18294,
18,
5896,
1621,
2668,
625,
67,
5413,
381,
6134,
365,
18,
5413,
381,
2582,
273,
1140,
18,
803,
18,
5701,
12,
2890,... |
for article in self.translations: | for article in chain(self.articles, self.translations): | def generate_feeds(self, writer): """Generate the feeds from the current context, and output files.""" | 52459768f24bddbd1d7316814930b2479b9b30dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14457/52459768f24bddbd1d7316814930b2479b9b30dc/generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
7848,
87,
12,
2890,
16,
2633,
4672,
3536,
4625,
326,
27684,
628,
326,
783,
819,
16,
471,
876,
1390,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
7848,
87,
12,
2890,
16,
2633,
4672,
3536,
4625,
326,
27684,
628,
326,
783,
819,
16,
471,
876,
1390,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
body.write("\n") | body.write(b"\n") | def upload_file(self, command, pyversion, filename): # Sign if requested if self.sign: gpg_args = ["gpg", "--detach-sign", "-a", filename] if self.identity: gpg_args[2:2] = ["--local-user", self.identity] spawn(gpg_args, dry_run=self.dry_run) | ced6203ffef566cf6a86e860e570efc5dd66580b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/ced6203ffef566cf6a86e860e570efc5dd66580b/upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
67,
768,
12,
2890,
16,
1296,
16,
2395,
1589,
16,
1544,
4672,
468,
4383,
309,
3764,
309,
365,
18,
2977,
30,
22544,
67,
1968,
273,
8247,
6403,
75,
3113,
5238,
8238,
497,
17,
2977,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
67,
768,
12,
2890,
16,
1296,
16,
2395,
1589,
16,
1544,
4672,
468,
4383,
309,
3764,
309,
365,
18,
2977,
30,
22544,
67,
1968,
273,
8247,
6403,
75,
3113,
5238,
8238,
497,
17,
2977,
... |
if name != exclude and name in frozenset(("dd", "dt", "li", "p", "td", "th", "tr")): self.processEndTag(name) self.generateImpliedEndTags() | while name in frozenset(("dd", "dt", "li", "p", "td", "th", "tr")) \ and name != exclude: self.phase.processEndTag(name) name = self.openElements[-1].name | def generateImpliedEndTags(self, exclude=None): name = self.openElements[-1].name if name != exclude and name in frozenset(("dd", "dt", "li", "p", "td", "th", "tr")): self.processEndTag(name) # XXX as opposed to the method proposed below, this seems to break # when an exclude paramter is passed... self.generateImpliedEndTags() | a14f5cca78f9bbf02665d6288a092c954f12bce0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/a14f5cca78f9bbf02665d6288a092c954f12bce0/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
2828,
2092,
1638,
3453,
12,
2890,
16,
4433,
33,
7036,
4672,
508,
273,
365,
18,
3190,
3471,
18919,
21,
8009,
529,
309,
508,
480,
4433,
471,
508,
316,
23462,
12,
2932,
449,
3113,
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,
2103,
2828,
2092,
1638,
3453,
12,
2890,
16,
4433,
33,
7036,
4672,
508,
273,
365,
18,
3190,
3471,
18919,
21,
8009,
529,
309,
508,
480,
4433,
471,
508,
316,
23462,
12,
2932,
449,
3113,
3... |
print "%s EXIT STATUS: TIMED OUT (%s seconds)" % (prefix, sys.argv[1]) | stoptime = time.time() elapsedtime = stoptime - starttime print "\n%s EXIT STATUS: TIMED OUT (%s seconds)\n" % (prefix, elapsedtime) | def alarm_handler(signum, frame): global pid global prefix try: print "%s EXIT STATUS: TIMED OUT (%s seconds)" % (prefix, sys.argv[1]) flushkill(pid, signal.SIGKILL) except OSError, e: print "timed_run.py: exception trying to kill process: %d (%s)" % (e.errno, e.strerror) pass flushexit(exitTimeout) | e66e48a291dc1a59e55600b2f95f4526a0e16fe2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/e66e48a291dc1a59e55600b2f95f4526a0e16fe2/timed_run.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13721,
67,
4176,
12,
2977,
379,
16,
2623,
4672,
2552,
4231,
2552,
1633,
775,
30,
384,
3838,
494,
273,
813,
18,
957,
1435,
9613,
957,
273,
384,
3838,
494,
300,
23437,
1172,
1548,
82,
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,
13721,
67,
4176,
12,
2977,
379,
16,
2623,
4672,
2552,
4231,
2552,
1633,
775,
30,
384,
3838,
494,
273,
813,
18,
957,
1435,
9613,
957,
273,
384,
3838,
494,
300,
23437,
1172,
1548,
82,
9,... |
retcolsSQL = 'COUNT(*)' | retcolsSQL = '1' | def __retcolsSQL(self, retcols): retcolsSQL = '' retcolsNew = [] | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1349,
6842,
3997,
12,
2890,
16,
325,
6842,
4672,
325,
6842,
3997,
273,
875,
325,
6842,
1908,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1349,
6842,
3997,
12,
2890,
16,
325,
6842,
4672,
325,
6842,
3997,
273,
875,
325,
6842,
1908,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
preparetest.copy_to_target("seattlelib/repypp.py") | preparetest.copy_to_target("seattlelib/repypp.py", target_dir) | def run(self): """Do it""" #store root directory and get target directory target_dir = self.directory | 0d178ed9c10cf37fad2afed6acd3fbe814c48dca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/0d178ed9c10cf37fad2afed6acd3fbe814c48dca/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
3244,
518,
8395,
468,
2233,
1365,
1867,
471,
336,
1018,
1867,
1018,
67,
1214,
273,
365,
18,
5149,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
3244,
518,
8395,
468,
2233,
1365,
1867,
471,
336,
1018,
1867,
1018,
67,
1214,
273,
365,
18,
5149,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.record_dic = None self.clusters = None self.bestOfCluster = None | self.record_dic = None self.clusters = None self.bestOfCluster = None | def __init__(self, outFolder='.', clusterLimit=50, verbose=0, log=None ): """ @param outFolder: project folder (results are put into subfolder) ['.'] @type outFolder: str @param clusterLimit: maximal number of returned sequence clusters (default: 50) @type clusterLimit: int @param verbose: keep temporary files (default: 0) @type verbose: 1|0 @param log: log file instance, if None, STDOUT is used (default: None) @type log: LogFile """ self.outFolder = T.absfile( outFolder ) | 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,
2738,
972,
12,
2890,
16,
596,
3899,
2218,
1093,
16,
2855,
3039,
33,
3361,
16,
3988,
33,
20,
16,
613,
33,
7036,
262,
30,
3536,
632,
891,
596,
3899,
30,
1984,
3009,
261,
4717,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
596,
3899,
2218,
1093,
16,
2855,
3039,
33,
3361,
16,
3988,
33,
20,
16,
613,
33,
7036,
262,
30,
3536,
632,
891,
596,
3899,
30,
1984,
3009,
261,
4717,
85... |
self.archive._int(x0) | self.archive._int32(x0) | def testInt(self): """Test storage and retrieval of Int""" x0 = 42 self.archive._int(x0) self.setRead() self.assertEqual(self.size, 4) x1 = self.archive._int() self.assertEqual(x0, x1) | 527997eab92cc3a66dcd3f6f3b3042ee1a85d9b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14747/527997eab92cc3a66dcd3f6f3b3042ee1a85d9b8/ArchiveTests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
1702,
12,
2890,
4672,
3536,
4709,
2502,
471,
22613,
434,
3094,
8395,
619,
20,
273,
14856,
365,
18,
10686,
6315,
474,
1578,
12,
92,
20,
13,
365,
18,
542,
1994,
1435,
365,
18,
1123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1702,
12,
2890,
4672,
3536,
4709,
2502,
471,
22613,
434,
3094,
8395,
619,
20,
273,
14856,
365,
18,
10686,
6315,
474,
1578,
12,
92,
20,
13,
365,
18,
542,
1994,
1435,
365,
18,
1123... |
This ensures that no copy of xk occurs and only a pointer to xk is used. | This ensures that no copy of xk occurs and only a pointer to xk is used. | def __init__( self, c, **kwargs ): """ Solve the equality-constrained quadratic programming problem | 13d679a16d231ffa56faf4521258f050db7be423 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/13d679a16d231ffa56faf4521258f050db7be423/ppcg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
276,
16,
2826,
4333,
262,
30,
3536,
348,
5390,
326,
14958,
17,
591,
31142,
26146,
5402,
11987,
6199,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
276,
16,
2826,
4333,
262,
30,
3536,
348,
5390,
326,
14958,
17,
591,
31142,
26146,
5402,
11987,
6199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.assertEqual(-017777777777, -2147483647) | if platform_long_is_32_bits: self.assertEqual(-017777777777, -2147483647) else: self.assertEqual(-0777777777777777777777, -9223372036854775807) | def test_oct_baseline(self): # Baseline tests self.assertEqual(00, 0) self.assertEqual(020, 16) self.assertEqual(017777777777, 2147483647) # Ditto with a minus sign and parentheses self.assertEqual(-(00), 0) self.assertEqual(-(020), -16) self.assertEqual(-(017777777777), -2147483647) # Ditto with a minus sign and NO parentheses self.assertEqual(-00, 0) self.assertEqual(-020, -16) self.assertEqual(-017777777777, -2147483647) | dca06f414126601662a498a0302f48b20977381b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/dca06f414126601662a498a0302f48b20977381b/test_hexoct.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13410,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
713,
16,
374,
13,
365,
18,
11231,
5812,
12,
3103,
20,
16,
2872,
13,
365,
18,
11231,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13410,
67,
27818,
12,
2890,
4672,
468,
605,
345,
3027,
7434,
365,
18,
11231,
5812,
12,
713,
16,
374,
13,
365,
18,
11231,
5812,
12,
3103,
20,
16,
2872,
13,
365,
18,
11231,
5... |
format=GeomVertexFormat.getV3cp() vdata=GeomVertexData('card-frame', format, Geom.UHDynamic) vwriter=GeomVertexWriter(vdata, 'vertex') cwriter=GeomVertexWriter(vdata, 'color') | format=GeomVertexFormat.getV3cp() vdata=GeomVertexData('card-frame', format, Geom.UHDynamic) vwriter=GeomVertexWriter(vdata, 'vertex') cwriter=GeomVertexWriter(vdata, 'color') | def makeFrame(self, sizex, sizey): """Access: private. Each texture card is displayed with a two-pixel wide frame (a ring of black and a ring of white). This routine builds the frame geometry. It is necessary to be precise so that the frame exactly aligns to pixel boundaries, and so that it doesn't overlap the card at all.""" | bb22ee7bc01ec7e5f945f8fcc01f9b11bca8b8f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/bb22ee7bc01ec7e5f945f8fcc01f9b11bca8b8f6/BufferViewer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
3219,
12,
2890,
16,
272,
452,
338,
16,
272,
452,
402,
4672,
3536,
1862,
30,
3238,
18,
225,
8315,
11428,
5270,
353,
10453,
598,
279,
2795,
17,
11743,
14812,
2623,
261,
69,
9221,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
3219,
12,
2890,
16,
272,
452,
338,
16,
272,
452,
402,
4672,
3536,
1862,
30,
3238,
18,
225,
8315,
11428,
5270,
353,
10453,
598,
279,
2795,
17,
11743,
14812,
2623,
261,
69,
9221,
4... |
lambda_ = self.nparticles/self.z_length A = self.p_mass / self.units.EL_MASS xi = ((4 * Q**2 * r0 * lambda_) / (A * self.beta**2 * self.gamma**2)) return xi | Q = 1 A = 1 total_charge = self.p_charge*self.nparticles lambda_ = total_charge/(self.z_length*self.units.EL_CHARGE) print "total_charge", total_charge print "z_length", self.z_length print "lambda", lambda_ print "beta", self.beta print "gamma", self.gamma xi = 2*((lambda_ * r0) / (self.beta**2 * self.gamma**3)) print "xi", xi return 15*xi | def get_total_space_charge_parameter(self): from math import pi | 10dc67017e070a2129d78b71be1e55a27cf0792d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12869/10dc67017e070a2129d78b71be1e55a27cf0792d/kv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4963,
67,
2981,
67,
16385,
67,
6775,
12,
2890,
4672,
628,
4233,
1930,
4790,
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,
336,
67,
4963,
67,
2981,
67,
16385,
67,
6775,
12,
2890,
4672,
628,
4233,
1930,
4790,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
records = selectors.RandomSelect(records, count, include_duplicates=include_duplicates) | select_mode = 'random' | def GetTestsFromSource(self, source, count=50, select_mode=None): """Parse records from source, and returnrequest tuples to use for testing. | b6832af1d2cf58421301a686da44e8be138f1140 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4170/b6832af1d2cf58421301a686da44e8be138f1140/data_sources.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
14650,
1265,
1830,
12,
2890,
16,
1084,
16,
1056,
33,
3361,
16,
2027,
67,
3188,
33,
7036,
4672,
3536,
3201,
3853,
628,
1084,
16,
471,
327,
2293,
10384,
358,
999,
364,
7769,
18,
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,
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,
968,
14650,
1265,
1830,
12,
2890,
16,
1084,
16,
1056,
33,
3361,
16,
2027,
67,
3188,
33,
7036,
4672,
3536,
3201,
3853,
628,
1084,
16,
471,
327,
2293,
10384,
358,
999,
364,
7769,
18,
2,
... |
self.control.send(msg + "\n") | print "->", msg self.control.sendall(msg + "\n") time.sleep(0.2) | def send_message(self, msg): if self.control: self.control.send(msg + "\n") return True else: print "ERROR: no Hatari (control socket)" return False | b57edc74c494d59f645ae7a3c88c107e1b456736 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8501/b57edc74c494d59f645ae7a3c88c107e1b456736/hatari-console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
67,
2150,
12,
2890,
16,
1234,
4672,
309,
365,
18,
7098,
30,
1172,
315,
2122,
3113,
1234,
365,
18,
7098,
18,
4661,
454,
12,
3576,
397,
1548,
82,
7923,
225,
813,
18,
19607,
12,
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,
1366,
67,
2150,
12,
2890,
16,
1234,
4672,
309,
365,
18,
7098,
30,
1172,
315,
2122,
3113,
1234,
365,
18,
7098,
18,
4661,
454,
12,
3576,
397,
1548,
82,
7923,
225,
813,
18,
19607,
12,
2... |
item.stamp = stamp | item.stamp = stamp | def update_item(self, item, status, was_selected, stamp): change_parent = False if (item.status.level != status.level): change_parent = True if (change_parent): self._tree_control.Delete(item.tree_id) if (status.level == 0): parent_id = self._ok_id elif (status.level == 1): parent_id = self._warnings_id elif (status.level == -1): parent_id = self._stale_id else: parent_id = self._errors_id id = self._tree_control.AppendItem(parent_id, status.name + ": " + status.message) item.tree_id = id item.stamp = stamp self._tree_control.SetPyData(id, item) if (status.level > 1 or status.level == -1): self._tree_control.Expand(parent_id) self._tree_control.SortChildren(parent_id) if (was_selected): self._tree_control.SelectItem(item.tree_id) else: self._tree_control.SetItemText(item.tree_id, status.name + ": " + status.message) item.status = status if (was_selected): self.fillout_info(item.tree_id) item.mark = True | 35ebffecd85402be45604eafc71abdde286a39a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10233/35ebffecd85402be45604eafc71abdde286a39a5/monitor_panel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
1726,
12,
2890,
16,
761,
16,
1267,
16,
1703,
67,
8109,
16,
14429,
4672,
2549,
67,
2938,
273,
1083,
309,
261,
1726,
18,
2327,
18,
2815,
480,
1267,
18,
2815,
4672,
2549,
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,
1089,
67,
1726,
12,
2890,
16,
761,
16,
1267,
16,
1703,
67,
8109,
16,
14429,
4672,
2549,
67,
2938,
273,
1083,
309,
261,
1726,
18,
2327,
18,
2815,
480,
1267,
18,
2815,
4672,
2549,
67,
... |
if args in ['rec','unrec']: | elif args in ['rec','unrec']: | def set_mixer(name, args, idx=0): # Demonstrates how to set mixer settings try: mixer = alsaaudio.Mixer(name, cardindex=idx) except alsaaudio.ALSAAudioError: sys.stderr.write("No such mixer") sys.exit(1) if args in ['mute','unmute']: # Mute/unmute the mixer if args == 'mute': mixer.setmute(1) else: mixer.setmute(0) sys.exit(0) if args in ['rec','unrec']: # Enable/disable recording if args == 'rec': mixer.setrec(1) else: mixer.setrec(0) sys.exit(0) if args.find(',') != -1: channel,volume = map(int,args.split(',')) else: channel = alsaaudio.MIXER_CHANNEL_ALL volume = int(args) # Set volume for specified channel. MIXER_CHANNEL_ALL means set # volume for all channels mixer.setvolume(volume, channel) | cf41942ed57983a3a124937fc348323d231386b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4473/cf41942ed57983a3a124937fc348323d231386b3/mixertest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
14860,
264,
12,
529,
16,
833,
16,
2067,
33,
20,
4672,
468,
463,
4758,
701,
815,
3661,
358,
444,
6843,
264,
1947,
775,
30,
6843,
264,
273,
524,
87,
7598,
4484,
18,
21294,
264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14860,
264,
12,
529,
16,
833,
16,
2067,
33,
20,
4672,
468,
463,
4758,
701,
815,
3661,
358,
444,
6843,
264,
1947,
775,
30,
6843,
264,
273,
524,
87,
7598,
4484,
18,
21294,
264... |
self.check_ticks(ticks, [base+i*secs_per_day for i in range(5)]) | desired = [base+i*secs_per_day for i in range(6)] print "ticks: ", ticks print "desired: ", desired self.check_ticks(ticks, desired) | def test_daily(self): base = DTS(2005, 1, 1) secs_per_day = 24*3600 ticks = trange(base, base + secs_per_day*5, days=1) self.check_ticks(ticks, [base+i*secs_per_day for i in range(5)]) | ce5a1506ff3d0a18905cca94fa73312e7c2ab094 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/ce5a1506ff3d0a18905cca94fa73312e7c2ab094/time_scale_test_case.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
26790,
12,
2890,
4672,
1026,
273,
463,
8047,
12,
6976,
25,
16,
404,
16,
404,
13,
18043,
67,
457,
67,
2881,
273,
4248,
14,
5718,
713,
13003,
273,
433,
726,
12,
1969,
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,
1842,
67,
26790,
12,
2890,
4672,
1026,
273,
463,
8047,
12,
6976,
25,
16,
404,
16,
404,
13,
18043,
67,
457,
67,
2881,
273,
4248,
14,
5718,
713,
13003,
273,
433,
726,
12,
1969,
16,
102... |
logger.debud(str(e)) | logger.debug(str(e)) | def setJobTree(self, jobtree, tree_id = 0): self._rep_lock.acquire(1) try: jtreefldr = os.path.join(self.root_dir, self._jobsTreeFldr) attrs = [self._jobsTreeAttr[0]] fn = os.path.join(jtreefldr, str(tree_id)) if self._tree_streamer: val = self._tree_streamer.getStreamFromTree(jobtree) values = [self._pstr2text(val)] else: logger.warning("JobTree streamer has not been set.") logger.warning("jobtree object can not be saved in the repository") return try: self.listEntries(jtreefldr) while not self.eot(): try: file, type = self.getEntry() except Exception, e: logger.error(str(e)) else: if os.path.basename(file) == os.path.basename(fn): self.setAttr(fn, attrs, values) break else: self.addEntry(fn, attrs, values) except CommandException, e: logger.debud(str(e)) raise RepositoryError(e = e, msg = str(e)) finally: self._rep_lock.release() | 9daf73d98ccd36b8408170df3e431a9c7457b588 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/9daf73d98ccd36b8408170df3e431a9c7457b588/ARDA.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2278,
2471,
12,
2890,
16,
1719,
3413,
16,
2151,
67,
350,
273,
374,
4672,
365,
6315,
14462,
67,
739,
18,
1077,
1039,
12,
21,
13,
775,
30,
525,
3413,
74,
14796,
273,
1140,
18,
803... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2278,
2471,
12,
2890,
16,
1719,
3413,
16,
2151,
67,
350,
273,
374,
4672,
365,
6315,
14462,
67,
739,
18,
1077,
1039,
12,
21,
13,
775,
30,
525,
3413,
74,
14796,
273,
1140,
18,
803... |
self.lfFaceName=name.decode('utf-8').encode('utf-16')[2:] | self.lfFaceName=name.decode('utf-8').encode('utf-16le') | def __init__(self,height=0,width=0,escapement=0,orientation=0, weight=FW_NORMAL,italic=0,underline=0,strike_out=0, charset=ANSI_CHARSET,out_precision=OUT_DEFAULT_PRECIS, clip_precision=CLIP_DEFAULT_PRECIS, quality=DEFAULT_QUALITY, pitch_family=DEFAULT_PITCH|FF_DONTCARE,name='Times New Roman'): _EMR_UNKNOWN.__init__(self) self.lfHeight=height self.lfWidth=width self.lfEscapement=escapement self.lfOrientation=orientation self.lfWeight=weight self.lfItalic=italic self.lfUnderline=underline self.lfStrikeOut=strike_out self.lfCharSet=charset self.lfOutPrecision=out_precision self.lfClipPrecision=clip_precision self.lfQuality=quality self.lfPitchAndFamily=pitch_family | 660dd103e698699ffa7b5b4096ca6838969cc3a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/660dd103e698699ffa7b5b4096ca6838969cc3a8/pyemf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4210,
33,
20,
16,
2819,
33,
20,
16,
6939,
475,
33,
20,
16,
19235,
33,
20,
16,
3119,
33,
29753,
67,
15480,
16,
7053,
335,
33,
20,
16,
9341,
1369,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4210,
33,
20,
16,
2819,
33,
20,
16,
6939,
475,
33,
20,
16,
19235,
33,
20,
16,
3119,
33,
29753,
67,
15480,
16,
7053,
335,
33,
20,
16,
9341,
1369,
33,
... |
headers = req.headers.copy() body = req.data if sys.version_info >= (2, 4): headers.update(req.unredirected_hdrs) | def _start_transaction(self, h, req): headers = req.headers.copy() body = req.data if sys.version_info >= (2, 4): headers.update(req.unredirected_hdrs) try: h.request(req.get_method(), req.get_selector(), body, headers) except socket.error, err: # XXX what error? raise urllib2.URLError(err) | d9972835929014ea3c164d173e2d69d505e46bc5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/d9972835929014ea3c164d173e2d69d505e46bc5/keepalive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1937,
67,
7958,
12,
2890,
16,
366,
16,
1111,
4672,
775,
30,
366,
18,
2293,
12,
3658,
18,
588,
67,
2039,
9334,
1111,
18,
588,
67,
9663,
9334,
1417,
16,
1607,
13,
1335,
2987,
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,
389,
1937,
67,
7958,
12,
2890,
16,
366,
16,
1111,
4672,
775,
30,
366,
18,
2293,
12,
3658,
18,
588,
67,
2039,
9334,
1111,
18,
588,
67,
9663,
9334,
1417,
16,
1607,
13,
1335,
2987,
18,
... | |
base64_hash, data = string[4:].split('?', 1) | base64_hash, data = string.split('?', 1) | def unserialize(cls, string, secret_key): """Load the secure cookie from a serialized string.""" if isinstance(string, unicode): string = string.encode('utf-8', 'ignore') salt = string[:4] try: base64_hash, data = string[4:].split('?', 1) except (ValueError, IndexError): items = () else: items = {} hash = sha1(secret_key + salt) for item in data.split('&'): hash.update('|' + item) if not '=' in item: items = None break key, value = item.split('=', 1) items[url_unquote_plus(key)] = value | 3b1cb999459f564c8d2cc15063f878e381d0d355 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14437/3b1cb999459f564c8d2cc15063f878e381d0d355/securecookie.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10954,
12,
6429,
16,
533,
16,
4001,
67,
856,
4672,
3536,
2563,
326,
8177,
3878,
628,
279,
5343,
533,
12123,
309,
1549,
12,
1080,
16,
5252,
4672,
533,
273,
533,
18,
3015,
2668,
3158,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10954,
12,
6429,
16,
533,
16,
4001,
67,
856,
4672,
3536,
2563,
326,
8177,
3878,
628,
279,
5343,
533,
12123,
309,
1549,
12,
1080,
16,
5252,
4672,
533,
273,
533,
18,
3015,
2668,
3158,
17... |
self.explorerStore, self.explorer, self.explorerPageIdx = self.addExplorerPage() EditorHelper.initExtMap() | self.explorer, self.explorerPageIdx = self.addExplorerPage() | def __init__(self, parent, id, inspector, newMenu, componentPalette, app, palette): self._created = false self._init_ctrls(parent) | 8acfeea1c62c0c3510b8867f1ab03614f7f76be9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/8acfeea1c62c0c3510b8867f1ab03614f7f76be9/Editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
22700,
16,
394,
4599,
16,
1794,
25863,
16,
595,
16,
12127,
4672,
365,
6315,
4824,
273,
629,
365,
6315,
2738,
67,
16277,
87,
12,
2938,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
982,
16,
612,
16,
22700,
16,
394,
4599,
16,
1794,
25863,
16,
595,
16,
12127,
4672,
365,
6315,
4824,
273,
629,
365,
6315,
2738,
67,
16277,
87,
12,
2938,
... |
filedata = StringIO.StringIO(a['thedata'].tostring()) | filedata = StringIO.StringIO(a['thedata']) | def addAttachment(self, author, a): description = a['description'].encode('utf-8') id = a['bug_id'] filename = a['filename'].encode('utf-8') filedata = StringIO.StringIO(a['thedata'].tostring()) filesize = len(filedata.getvalue()) time = a['creation_ts'] print " ->inserting attachment '%s' for ticket %s -- %s" % \ (filename, id, description) | 96cc24322ea11500094f96e7b8dc5b0c7e85d253 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/96cc24322ea11500094f96e7b8dc5b0c7e85d253/bugzilla2trac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
6803,
12,
2890,
16,
2869,
16,
279,
4672,
2477,
273,
279,
3292,
3384,
29489,
3015,
2668,
3158,
17,
28,
6134,
612,
273,
279,
3292,
925,
67,
350,
3546,
1544,
273,
279,
3292,
3459,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
6803,
12,
2890,
16,
2869,
16,
279,
4672,
2477,
273,
279,
3292,
3384,
29489,
3015,
2668,
3158,
17,
28,
6134,
612,
273,
279,
3292,
925,
67,
350,
3546,
1544,
273,
279,
3292,
3459,
29... |
handler.schema = {'name': Unicode, 'date': Date(index=True)} handler.load_state(resource) | handler.schema = {'name': Unicode, 'date': Date(index='keyword')} handler.load_state_from_string(data) | def test_indexes_hit_in_many_rows(self): data = 'house,2005-10-10\nwindow,2005-05-10\ncomputer,2005-10-10' resource = memory.File(data) handler = CSV() handler.columns = ['name', 'date'] handler.schema = {'name': Unicode, 'date': Date(index=True)} handler.load_state(resource) self.assertEqual(handler.search(date=Date.decode('2005-01-01')), []) self.assertEqual(handler.search(date=Date.decode('2005-10-10')), [0,2]) | 7404f7e83f01f05f84fa82ab4b9b9fcd644b8aa8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/7404f7e83f01f05f84fa82ab4b9b9fcd644b8aa8/test_csv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
11265,
67,
15989,
67,
267,
67,
9353,
67,
3870,
12,
2890,
4672,
501,
273,
296,
13028,
16,
6976,
25,
17,
2163,
17,
2163,
64,
82,
5668,
16,
6976,
25,
17,
6260,
17,
2163,
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,
1842,
67,
11265,
67,
15989,
67,
267,
67,
9353,
67,
3870,
12,
2890,
4672,
501,
273,
296,
13028,
16,
6976,
25,
17,
2163,
17,
2163,
64,
82,
5668,
16,
6976,
25,
17,
6260,
17,
2163,
64,
... |
emailmatch = re.search(r'''(([a-zA-Z0-9\_\-\.\+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))(\?subject=\S+)?''', author) if emailmatch: email = emailmatch.group(0) author = author.replace(email, '') author = author.replace('()', '') author = author.replace('<>', '') author = author.replace('<>', '') author = author.strip() if author and (author[0] == '('): author = author[1:] if author and (author[-1] == ')'): author = author[:-1] author = author.strip() if author or email: context.setdefault('%s_detail' % key, FeedParserDict()) if author: context['%s_detail' % key]['name'] = author if email: context['%s_detail' % key]['email'] = email | emailmatch = re.search(r'''(([a-zA-Z0-9\_\-\.\+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))''', author) if not emailmatch: return email = emailmatch.group(0) author = author.replace(email, '') author = author.replace('()', '') author = author.strip() if author and (author[0] == '('): author = author[1:] if author and (author[-1] == ')'): author = author[:-1] author = author.strip() context.setdefault('%s_detail' % key, FeedParserDict()) context['%s_detail' % key]['name'] = author context['%s_detail' % key]['email'] = email | def _sync_author_detail(self, key='author'): context = self._getContext() detail = context.get('%s_detail' % key) if detail: name = detail.get('name') email = detail.get('email') if name and email: context[key] = '%s (%s)' % (name, email) elif name: context[key] = name elif email: context[key] = email else: author, email = context.get(key), None if not author: return emailmatch = re.search(r'''(([a-zA-Z0-9\_\-\.\+]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?))(\?subject=\S+)?''', author) if emailmatch: email = emailmatch.group(0) # probably a better way to do the following, but it passes all the tests author = author.replace(email, '') author = author.replace('()', '') author = author.replace('<>', '') author = author.replace('<>', '') author = author.strip() if author and (author[0] == '('): author = author[1:] if author and (author[-1] == ')'): author = author[:-1] author = author.strip() if author or email: context.setdefault('%s_detail' % key, FeedParserDict()) if author: context['%s_detail' % key]['name'] = author if email: context['%s_detail' % key]['email'] = email | b46d7e4f5773873813bf0c2abf7f311d20f6ee9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10695/b46d7e4f5773873813bf0c2abf7f311d20f6ee9d/feedparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8389,
67,
4161,
67,
8992,
12,
2890,
16,
498,
2218,
4161,
11,
4672,
819,
273,
365,
6315,
29120,
1435,
7664,
273,
819,
18,
588,
29909,
87,
67,
8992,
11,
738,
498,
13,
309,
7664,
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,
8389,
67,
4161,
67,
8992,
12,
2890,
16,
498,
2218,
4161,
11,
4672,
819,
273,
365,
6315,
29120,
1435,
7664,
273,
819,
18,
588,
29909,
87,
67,
8992,
11,
738,
498,
13,
309,
7664,
3... |
'[\x93]', '"', gutils.regextrim(self.page, 'showcover.php[^>]*>', '</td>')))) | u'[\x93]', '"', gutils.regextrim(self.page, '[0-9 ]+Views', '</td>'))) | def get_plot(self): self.plot = re.sub( '[0-9 ]+Views', '', re.sub( '[]', '-', re.sub( '[\x93]', '"', gutils.regextrim(self.page, 'showcover.php[^>]*>', '</td>')))) | 4e79410ce5d887cd424c1c433596d3849bfd1dba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2687/4e79410ce5d887cd424c1c433596d3849bfd1dba/PluginMovieDVDPalace.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4032,
12,
2890,
4672,
365,
18,
4032,
273,
283,
18,
1717,
12,
5271,
20,
17,
29,
308,
15,
9959,
2187,
10226,
283,
18,
1717,
12,
5271,
131,
249,
65,
2187,
2400,
2187,
283,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4032,
12,
2890,
4672,
365,
18,
4032,
273,
283,
18,
1717,
12,
5271,
20,
17,
29,
308,
15,
9959,
2187,
10226,
283,
18,
1717,
12,
5271,
131,
249,
65,
2187,
2400,
2187,
283,
18,
... |
buff.select_range(start, self.last_search_iter) | buff.select_range(start, buff.get_iter_at_mark(buff.search_mark)) | def dialog_response_callback(dialog, response_id): if response_id == gtk.RESPONSE_CLOSE: dialog.destroy() return if response_id == RESPONSE_FORWARD: self._search(search_text.get_text(), self.last_search_iter) return if response_id == RESPONSE_REPLACE: if not self._search(search_text.get_text(), self.last_search_iter): return start, end = buff.get_selection_bounds() buff.delete(start, end) buff.insert(start, replace_text.get_text()) self.last_search_iter = buff.get_iter_at_mark(buff.get_insert()) start = buff.get_iter_at_mark(buff.get_insert()) start.backward_chars(len(replace_text.get_text())) buff.select_range(start, self.last_search_iter) if response_id == RESPONSE_REPLACE_ALL: current_iter = buff.get_iter_at_mark(buff.get_insert()) while self._search(search_text.get_text(), self.last_search_iter, False): start, end = buff.get_selection_bounds() buff.delete(start, end) buff.insert(start, replace_text.get_text()) self.last_search_iter = buff.get_iter_at_mark(buff.get_insert()) start = buff.get_iter_at_mark(buff.get_insert()) start.backward_chars(len(replace_text.get_text())) buff.select_range(start, self.last_search_iter) buff.place_cursor(current_iter) | a718cf2af7a92f5271f218a3cfa71b84805d0ace /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/a718cf2af7a92f5271f218a3cfa71b84805d0ace/edit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6176,
67,
2740,
67,
3394,
12,
12730,
16,
766,
67,
350,
4672,
309,
766,
67,
350,
422,
22718,
18,
14508,
67,
13384,
30,
6176,
18,
11662,
1435,
327,
309,
766,
67,
350,
422,
20645,
67,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6176,
67,
2740,
67,
3394,
12,
12730,
16,
766,
67,
350,
4672,
309,
766,
67,
350,
422,
22718,
18,
14508,
67,
13384,
30,
6176,
18,
11662,
1435,
327,
309,
766,
67,
350,
422,
20645,
67,
7... |
if self.env.execute(["bibtex", "-terse", self.env.src_base], env): | if self.env.execute(["bibtex", self.env.src_base], env): | def run (self): """ This method actually runs BibTeX. """ self.msg(0, _("running BibTeX...")) if self.env.src_path != "": env = { "BIBINPUTS": "%s:%s" % (self.env.src_path, os.getenv("BIBINPUTS", "")) } else: env = {} if self.env.execute(["bibtex", "-terse", self.env.src_base], env): self.env.msg(0, _( "There were errors running BibTeX (see %s for details)." ) % (self.env.src_base + ".blg")) return 1 self.run_needed = 0 self.env.must_compile = 1 return 0 | 9c5450cdf085e5012e7ba2134cc6281f3471b3a1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/9c5450cdf085e5012e7ba2134cc6281f3471b3a1/bibtex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
3536,
1220,
707,
6013,
7597,
605,
495,
21575,
60,
18,
3536,
365,
18,
3576,
12,
20,
16,
389,
2932,
8704,
605,
495,
21575,
60,
7070,
3719,
309,
365,
18,
3074,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
3536,
1220,
707,
6013,
7597,
605,
495,
21575,
60,
18,
3536,
365,
18,
3576,
12,
20,
16,
389,
2932,
8704,
605,
495,
21575,
60,
7070,
3719,
309,
365,
18,
3074,
18,
... |
d['texml:conditional'] = Nodes.TexmlConditionalNode | d['sdocml:conditional'] = Nodes.SDocMLConditionalNode | ' <def m="endtag" n="1"><d></{{0}}></d></def>', | afae488c3b50ffe3de9546b4210b9d1a3bfc48fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4638/afae488c3b50ffe3de9546b4210b9d1a3bfc48fa/sdoc2xml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
296,
540,
411,
536,
312,
1546,
409,
2692,
6,
290,
1546,
21,
14050,
72,
22393,
5618,
31,
4938,
95,
20,
9090,
10,
4521,
27922,
72,
4695,
536,
1870,
16,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
296,
540,
411,
536,
312,
1546,
409,
2692,
6,
290,
1546,
21,
14050,
72,
22393,
5618,
31,
4938,
95,
20,
9090,
10,
4521,
27922,
72,
4695,
536,
1870,
16,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return S_ERROR('Could not get site CE mapping') | return S_ERROR( 'Could not get site CE mapping' ) | def __checkSiteIsValid(self,site): """Internal function to check that a site name is valid. """ sites = getSiteCEMapping() if not sites['OK']: return S_ERROR('Could not get site CE mapping') siteList = sites['Value'].keys() if not site in siteList: return S_ERROR('Specified site %s is not in list of defined sites' %site) | 50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
4956,
20536,
12,
2890,
16,
4256,
4672,
3536,
3061,
445,
358,
866,
716,
279,
2834,
508,
353,
923,
18,
3536,
9180,
273,
11021,
1441,
3233,
1435,
309,
486,
9180,
3292,
3141,
354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
4956,
20536,
12,
2890,
16,
4256,
4672,
3536,
3061,
445,
358,
866,
716,
279,
2834,
508,
353,
923,
18,
3536,
9180,
273,
11021,
1441,
3233,
1435,
309,
486,
9180,
3292,
3141,
354... |
if len(args > 1): | if len(args) > 1: | def connect(self, *args, **kwargs): newkargs = {} newargs = args for key in self.kwargs: if key == 'path_prefix': if len(args > 1): newargs = (args[0], self.kwargs[key] + args[1]) else: newargs = (self.kwargs[key] + args[0],) elif key in kwargs: newkargs[key] = self.kwargs[key] + kwargs[key] else: newkargs[key] = self.kwargs[key] for key in kwargs: if key not in self.kwargs: newkargs[key] = kwargs[key] return self.obj.connect(*newargs, **newkargs) | fbcdba2abf7d1571057cb6006c5b7c016bc61205 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12081/fbcdba2abf7d1571057cb6006c5b7c016bc61205/mapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
394,
79,
1968,
273,
2618,
394,
1968,
273,
833,
364,
498,
316,
365,
18,
4333,
30,
309,
498,
422,
296,
803,
67,
3239,
4278,
309,
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,
3077,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
394,
79,
1968,
273,
2618,
394,
1968,
273,
833,
364,
498,
316,
365,
18,
4333,
30,
309,
498,
422,
296,
803,
67,
3239,
4278,
309,
56... |
plugin_config["P3D_PLUGIN_DOWNLOAD"] = "file://C:\\p3dstage" | plugin_config["P3D_PLUGIN_DOWNLOAD"] = "file://C:\\p3dstage/" | def WriteConfigSettings(): dtool_config={} prc_parameters={} plugin_config={} if (sys.platform.startswith("win")): for key,win,unix in DTOOL_CONFIG: dtool_config[key] = win for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = win else: for key,win,unix in DTOOL_CONFIG: dtool_config[key] = unix for key,win,unix in PRC_PARAMETERS: prc_parameters[key] = unix for x in PkgListGet(): if ("HAVE_"+x in dtool_config): if (PkgSkip(x)==0): dtool_config["HAVE_"+x] = '1' else: dtool_config["HAVE_"+x] = 'UNDEF' dtool_config["HAVE_NET"] = '1' # On Windows, there's still an ancient ffmpeg version in thirdparty. if (PkgSkip("FFMPEG")==0 and not sys.platform.startswith("win")): dtool_config["HAVE_SWSCALE"] = '1' if (PkgSkip("NVIDIACG")==0): dtool_config["HAVE_CG"] = '1' dtool_config["HAVE_CGGL"] = '1' dtool_config["HAVE_CGDX9"] = '1' if (not sys.platform.startswith("linux")): dtool_config["HAVE_PROC_SELF_EXE"] = 'UNDEF' dtool_config["HAVE_PROC_SELF_MAPS"] = 'UNDEF' dtool_config["HAVE_PROC_SELF_CMDLINE"] = 'UNDEF' dtool_config["HAVE_PROC_SELF_ENVIRON"] = 'UNDEF' if (sys.platform == "darwin"): dtool_config["PYTHON_FRAMEWORK"] = 'Python' dtool_config["HAVE_MALLOC_H"] = 'UNDEF' dtool_config["HAVE_SYS_MALLOC_H"] = '1' dtool_config["HAVE_OPENAL_FRAMEWORK"] = '1' dtool_config["HAVE_X11"] = 'UNDEF' # We might have X11, but we don't need it. dtool_config["HAVE_XF86DGA"] = 'UNDEF' dtool_config["IS_LINUX"] = 'UNDEF' dtool_config["IS_OSX"] = '1' if (sys.platform.startswith("freebsd")): dtool_config["IS_LINUX"] = 'UNDEF' dtool_config["IS_FREEBSD"] = '1' dtool_config["HAVE_ALLOCA_H"] = 'UNDEF' dtool_config["HAVE_MALLOC_H"] = 'UNDEF' dtool_config["HAVE_LINUX_INPUT_H"] = 'UNDEF' dtool_config["HAVE_PROC_CURPROC_FILE"] = '1' dtool_config["HAVE_PROC_CURPROC_MAP"] = '1' dtool_config["HAVE_PROC_CURPROC_CMDLINE"] = '1' if (OPTIMIZE <= 3): if (dtool_config["HAVE_NET"] != 'UNDEF'): dtool_config["DO_PSTATS"] = '1' if (OPTIMIZE <= 3): dtool_config["DO_COLLISION_RECORDING"] = '1' #if (OPTIMIZE <= 2): # dtool_config["TRACK_IN_INTERPRETER"] = '1' if (OPTIMIZE <= 3): dtool_config["DO_MEMORY_USAGE"] = '1' #if (OPTIMIZE <= 1): # dtool_config["DO_PIPELINING"] = '1' if (OPTIMIZE <= 3): dtool_config["NOTIFY_DEBUG"] = '1' if (sys.platform.startswith('win') and platform.architecture()[0] == '64bit'): dtool_config["SIMPLE_THREADS"] = 'UNDEF' if (PkgSkip("PLUGIN")==0): #FIXME: do this at runtime or so. if (sys.platform.startswith("win")): plugin_config["P3D_PLUGIN_DOWNLOAD"] = "file://C:\\p3dstage" else: plugin_config["P3D_PLUGIN_DOWNLOAD"] = "file:///p3dstage" plugin_config["P3D_PLUGIN_LOGFILE1"] = "" plugin_config["P3D_PLUGIN_LOGFILE2"] = "" plugin_config["P3D_PLUGIN_P3D_PLUGIN"] = "" plugin_config["P3D_PLUGIN_P3DPYTHON"] = "" plugin_config["P3D_PLUGIN_PLATFORM"] = RUNTIME_PLATFORM conf = "/* prc_parameters.h. Generated automatically by makepanda.py */\n" for key in prc_parameters.keys(): if ((key == "DEFAULT_PRC_DIR") or (key[:4]=="PRC_")): val = prc_parameters[key] if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n" else: conf = conf + "#define " + key + " " + val + "\n" del prc_parameters[key] ConditionalWriteFile(GetOutputDir() + '/include/prc_parameters.h', conf) conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n" for key in dtool_config.keys(): val = dtool_config[key] if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n" else: conf = conf + "#define " + key + " " + val + "\n" del dtool_config[key] ConditionalWriteFile(GetOutputDir() + '/include/dtool_config.h', conf) if (PkgSkip("PLUGIN")==0): conf = "/* p3d_plugin_config.h. Generated automatically by makepanda.py */\n" for key in plugin_config.keys(): val = plugin_config[key] if (val != 'UNDEF' and not val.endswith("/")): val += "/" if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n" else: conf = conf + "#define " + key + " \"" + val.replace("\\", "\\\\") + "\"\n" del plugin_config[key] ConditionalWriteFile(GetOutputDir() + '/include/p3d_plugin_config.h', conf) for x in PkgListGet(): if (PkgSkip(x)): ConditionalWriteFile(GetOutputDir() + '/tmp/dtool_have_'+x.lower()+'.dat',"0\n") else: ConditionalWriteFile(GetOutputDir() + '/tmp/dtool_have_'+x.lower()+'.dat',"1\n") | c8fde7ebd8f7cf8076bf7b1a53a45660bab0d9f0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/c8fde7ebd8f7cf8076bf7b1a53a45660bab0d9f0/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
809,
2628,
13332,
302,
6738,
67,
1425,
12938,
846,
71,
67,
3977,
12938,
1909,
67,
1425,
12938,
225,
309,
261,
9499,
18,
9898,
18,
17514,
1918,
2932,
8082,
6,
3719,
30,
364,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
809,
2628,
13332,
302,
6738,
67,
1425,
12938,
846,
71,
67,
3977,
12938,
1909,
67,
1425,
12938,
225,
309,
261,
9499,
18,
9898,
18,
17514,
1918,
2932,
8082,
6,
3719,
30,
364,
498,
... |
user = None profile = None if user: if user.is_active: return HttpResponseRedirect(reverse('reviewapp.password_reset')+'?email='+email) else: | return render_to_response('reviewapp/resend_activation_email.html', {'user_exist': False, 'email': email}, context_instance=RequestContext(request)) if user.is_active: return HttpResponseRedirect(reverse('reviewapp.password_reset')+'?email='+email) else: profiles = RegistrationProfile.objects.filter(user=user) if len(profiles) > 0: profile = profiles[0] | def resend_activation_email(request): email = request.GET.get('email', '') users = User.objects.filter(email=email) if len(users) > 0: user = users[0] profile = RegistrationProfile.objects.get(user=user) else: user = None profile = None if user: if user.is_active: return HttpResponseRedirect(reverse('reviewapp.password_reset')+'?email='+email) #form = PasswordResetForm() #return render_to_response('reviewapp/password_reset_form.html', # {'form': form}, # context_instance=RequestContext(request)) else: if Site._meta.installed: site = Site.objects.get_current() else: site = RequestSite(request) user.date_joined = datetime.now() user.last_login = datetime.now() user.save() profile.send_activation_email(site) return render_to_response('reviewapp/resend_activation_email.html', {'user_exist': True}, context_instance=RequestContext(request)) else: return render_to_response('reviewapp/resend_activation_email.html', {'user_exist': False, 'email': email}, context_instance=RequestContext(request)) | 9510fd9f224115e7cda074ad072a629c2a18440f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12441/9510fd9f224115e7cda074ad072a629c2a18440f/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31972,
67,
16908,
67,
3652,
12,
2293,
4672,
225,
2699,
273,
590,
18,
3264,
18,
588,
2668,
3652,
2187,
28707,
3677,
273,
2177,
18,
6911,
18,
2188,
12,
3652,
33,
3652,
13,
225,
309,
562,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31972,
67,
16908,
67,
3652,
12,
2293,
4672,
225,
2699,
273,
590,
18,
3264,
18,
588,
2668,
3652,
2187,
28707,
3677,
273,
2177,
18,
6911,
18,
2188,
12,
3652,
33,
3652,
13,
225,
309,
562,... |
out = output.write(packet.bytes, 88) assert (out == 88) | n_out = output.write(packet.bytes, 42) assert (n_out == 42) packet_in = input.read() assert (n_out == len(packet_in)) | def test_icmpv4_ping(self): ip = ipv4() ip.version = 4 ip.hlen = 5 ip.tos = 0 ip.length = 84 ip.id = 1234 ip.flags = 0 ip.offset = 0 ip.ttl = 64 ip.protocol = IPPROTO_ICMP ip.src = inet_atol("127.0.0.1") ip.dst = inet_atol("127.0.0.1") | 1b9c113436714ef740f07a190debb88532218206 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/1b9c113436714ef740f07a190debb88532218206/icmpv4test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
335,
1291,
90,
24,
67,
1382,
12,
2890,
4672,
2359,
273,
9205,
24,
1435,
2359,
18,
1589,
273,
1059,
2359,
18,
76,
1897,
273,
1381,
2359,
18,
14627,
273,
374,
2359,
18,
2469,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
335,
1291,
90,
24,
67,
1382,
12,
2890,
4672,
2359,
273,
9205,
24,
1435,
2359,
18,
1589,
273,
1059,
2359,
18,
76,
1897,
273,
1381,
2359,
18,
14627,
273,
374,
2359,
18,
2469,
... |
'comment_begin': [ | TOKEN_COMMENT_BEGIN: [ | def __init__(self, environment): # shortcuts c = lambda x: re.compile(x, re.M | re.S) e = re.escape | b3b5802349723ab864cc3531ac9b72a230cb841e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14446/b3b5802349723ab864cc3531ac9b72a230cb841e/lexer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3330,
4672,
468,
25641,
276,
273,
3195,
619,
30,
283,
18,
11100,
12,
92,
16,
283,
18,
49,
571,
283,
18,
55,
13,
425,
273,
283,
18,
6939,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3330,
4672,
468,
25641,
276,
273,
3195,
619,
30,
283,
18,
11100,
12,
92,
16,
283,
18,
49,
571,
283,
18,
55,
13,
425,
273,
283,
18,
6939,
2,
-100,
-10... |
if total_nr > 1: | if not options.unrelated and total_nr > 1: | def __build_message(tmpl, patch, patch_nr, total_nr, msg_id, ref_id, options): """Build the message to be sent via SMTP """ p = crt_series.get_patch(patch) descr = p.get_description().strip() descr_lines = descr.split('\n') short_descr = descr_lines[0].rstrip() long_descr = '\n'.join(descr_lines[1:]).lstrip() authname = p.get_authname(); authemail = p.get_authemail(); commname = p.get_commname(); commemail = p.get_commemail(); sender = __get_sender() fromauth = '%s <%s>' % (authname, authemail) if fromauth != sender: fromauth = 'From: %s\n\n' % fromauth else: fromauth = '' if options.version: version_str = ' %s' % options.version else: version_str = '' if options.prefix: prefix_str = options.prefix + ' ' else: confprefix = config.get('stgit.mail.prefix') if confprefix: prefix_str = confprefix + ' ' else: prefix_str = '' if options.diff_opts: diff_flags = options.diff_opts.split() else: diff_flags = [] total_nr_str = str(total_nr) patch_nr_str = str(patch_nr).zfill(len(total_nr_str)) if total_nr > 1: number_str = ' %s/%s' % (patch_nr_str, total_nr_str) else: number_str = '' tmpl_dict = {'patch': patch, 'sender': sender, # for backward template compatibility 'maintainer': sender, 'shortdescr': short_descr, 'longdescr': long_descr, # for backward template compatibility 'endofheaders': '', 'diff': git.diff(rev1 = git_id('%s//bottom' % patch), rev2 = git_id('%s//top' % patch), diff_flags = diff_flags ), 'diffstat': git.diffstat(rev1 = git_id('%s//bottom'%patch), rev2 = git_id('%s//top' % patch)), # for backward template compatibility 'date': '', 'version': version_str, 'prefix': prefix_str, 'patchnr': patch_nr_str, 'totalnr': total_nr_str, 'number': number_str, 'fromauth': fromauth, 'authname': authname, 'authemail': authemail, 'authdate': p.get_authdate(), 'commname': commname, 'commemail': commemail} # change None to '' for key in tmpl_dict: if not tmpl_dict[key]: tmpl_dict[key] = '' try: msg_string = tmpl % tmpl_dict except KeyError, err: raise CmdException, 'Unknown patch template variable: %s' \ % err except TypeError: raise CmdException, 'Only "%(name)s" variables are ' \ 'supported in the patch template' if options.edit_patches: msg_string = __edit_message(msg_string) # The Python email message try: msg = email.message_from_string(msg_string) except Exception, ex: raise CmdException, 'template parsing error: %s' % str(ex) if options.auto: extra_cc = __get_signers_list(descr) else: extra_cc = [] __build_address_headers(msg, options, extra_cc) __build_extra_headers(msg, msg_id, ref_id) __encode_message(msg) return msg | c2a8af1d63280cf5d00574e3e059735a61fd64c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12366/c2a8af1d63280cf5d00574e3e059735a61fd64c9/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3510,
67,
2150,
12,
24717,
16,
4729,
16,
4729,
67,
11611,
16,
2078,
67,
11611,
16,
1234,
67,
350,
16,
1278,
67,
350,
16,
702,
4672,
3536,
3116,
326,
883,
358,
506,
3271,
3970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
3510,
67,
2150,
12,
24717,
16,
4729,
16,
4729,
67,
11611,
16,
2078,
67,
11611,
16,
1234,
67,
350,
16,
1278,
67,
350,
16,
702,
4672,
3536,
3116,
326,
883,
358,
506,
3271,
3970,
... |
def sendMessage(self, receiver, message): | def sendMessage(self, message, receiver): | def sendMessage(self, receiver, message): """ Sends a message to another agent. @param receiver: ID of the agent who will receive the message. @type receiver: C{int} @param message: Message to send. @type message: C{L{Message}} """ if self.kernel != None: message.sender = self.id message.receiver = receiver self.kernel.sendMessage(message) | 378f0775cd8a38d8a8b84bd4da3dffdd9cf1e185 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2208/378f0775cd8a38d8a8b84bd4da3dffdd9cf1e185/agent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15399,
12,
2890,
16,
883,
16,
5971,
4672,
3536,
2479,
87,
279,
883,
358,
4042,
4040,
18,
632,
891,
5971,
30,
1599,
434,
326,
4040,
10354,
903,
6798,
326,
883,
18,
632,
723,
5971,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15399,
12,
2890,
16,
883,
16,
5971,
4672,
3536,
2479,
87,
279,
883,
358,
4042,
4040,
18,
632,
891,
5971,
30,
1599,
434,
326,
4040,
10354,
903,
6798,
326,
883,
18,
632,
723,
5971,
30,
... |
AUTHORS: - Golam Mortuza Hossain (2009-06-15) | def _limit_latex_(self, f, x, a): r""" Return latex expression for limit of a symbolic function. EXAMPLES:: sage: from sage.calculus.calculus import _limit_latex_ sage: var('x,a') (x, a) sage: f = function('f',x) sage: _limit_latex_(0, f, x, a) '\\lim_{x \\to a}\\, f\\left(x\\right)' sage: latex(limit(f, x=oo)) \lim_{x \to +\infty}\, f\left(x\right) AUTHORS: - Golam Mortuza Hossain (2009-06-15) """ return "\\lim_{%s \\to %s}\\, %s"%(latex(x), latex(a), latex(f)) | 0a0e429270801a1da449dbfadc03256a8892b43a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0a0e429270801a1da449dbfadc03256a8892b43a/calculus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
12,
2890,
16,
284,
16,
619,
16,
279,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3595,
67,
26264,
67,
12,
2890,
16,
284,
16,
619,
16,
279,
4672,
436,
8395,
2000,
25079,
2652,
364,
1800,
434,
279,
16754,
445,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,... | |
def __init__(self, opts, cp, dir='', tag_base='QSCAN'): | def __init__(self, opts, cp, dir='', tag_base=''): | def __init__(self, opts, cp, dir='', tag_base='QSCAN'): """ """ self.__executable = string.strip(cp.get('fu-condor','qscan')) self.__universe = "vanilla" pipeline.CondorDAGJob.__init__(self,self.__universe,self.__executable) self.setupJob(tag_base,dir=dir,cp=cp,tag_base=tag_base) self.setup_checkForDir() self.setup_rm_lock() | e7dc96264f8fa6761fca7488785053e6db4d6c14 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/e7dc96264f8fa6761fca7488785053e6db4d6c14/stfu_pipe.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1500,
16,
3283,
16,
1577,
2218,
2187,
1047,
67,
1969,
2218,
11,
4672,
3536,
3536,
365,
16186,
17751,
273,
533,
18,
6406,
12,
4057,
18,
588,
2668,
27074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1500,
16,
3283,
16,
1577,
2218,
2187,
1047,
67,
1969,
2218,
11,
4672,
3536,
3536,
365,
16186,
17751,
273,
533,
18,
6406,
12,
4057,
18,
588,
2668,
27074,
... |
if rstk>0.0: forecefield.SetRestraint(rstk) | def rigidXstd_vector(rigid, mat_std): #create a 4x4 matrix from a linear std_vector_double mat=[] for iline in range(4): line=[] for icol in range(4): line.append(mat_std[iline*4+icol]) mat.append(line) out=Rigidbody(rigid) for i in range(rigid.Size()): coords=rigid.GetCoords(i) coords2=Coord3D() coords2.x = mat[0][0]*coords.x + mat[0][1]*coords.y + mat[0][2]*coords.z + mat[0][3] coords2.y = mat[1][0]*coords.x + mat[1][1]*coords.y + mat[1][2]*coords.z + mat[1][3] coords2.z = mat[2][0]*coords.x + mat[2][1]*coords.y + mat[2][2]*coords.z + mat[2][3] out.SetCoords(i, coords2) return out | b71bf692f1ebdba0a019cbdc1d4d14809d50d1ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11088/b71bf692f1ebdba0a019cbdc1d4d14809d50d1ab/Attract.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
28542,
60,
5084,
67,
7737,
12,
86,
28542,
16,
4834,
67,
5084,
4672,
225,
468,
2640,
279,
1059,
92,
24,
3148,
628,
279,
9103,
2044,
67,
7737,
67,
9056,
4834,
33,
8526,
364,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
28542,
60,
5084,
67,
7737,
12,
86,
28542,
16,
4834,
67,
5084,
4672,
225,
468,
2640,
279,
1059,
92,
24,
3148,
628,
279,
9103,
2044,
67,
7737,
67,
9056,
4834,
33,
8526,
364,
277,
... | |
(?:[ ]+|$) | ([ ]+|$) | def comment(self, match): if not match.string[match.end():].strip() \ and self.state_machine.is_next_line_blank(): # an empty comment? return [nodes.comment()], 1 # "A tiny but practical wart." indented, indent, offset, blank_finish = \ self.state_machine.get_first_known_indented(match.end()) text = '\n'.join(indented) return [nodes.comment(text, text)], blank_finish | 72a0c19a34dcc90353f2d799116ebcadd510f22a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/72a0c19a34dcc90353f2d799116ebcadd510f22a/states.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2879,
12,
2890,
16,
845,
4672,
309,
486,
845,
18,
1080,
63,
1916,
18,
409,
13332,
8009,
6406,
1435,
521,
471,
365,
18,
2019,
67,
9149,
18,
291,
67,
4285,
67,
1369,
67,
12111,
13332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2879,
12,
2890,
16,
845,
4672,
309,
486,
845,
18,
1080,
63,
1916,
18,
409,
13332,
8009,
6406,
1435,
521,
471,
365,
18,
2019,
67,
9149,
18,
291,
67,
4285,
67,
1369,
67,
12111,
13332,
... |
mapSelector(locus = 0, fitness = {'0-0':1,'0-1':1,'1-1':.8}, subPops=[1]), pyOperator(func=testFitness, param=([0, 2],)), | mapSelector(locus = 1, fitness = {'0-0':1.,'0-1':1.,'1-1':.8}, subPops=[1]), pyOperator(func=testFitness, stage=PreMating, param=([0, 2],)), | def testFitness(pop, params): for sp in params[0]: for ind in pop.individuals(sp): self.assertEqual(ind.info('fitness'), 0.) | f71d1f8d69af42fbb0ebe3b021e806b0dd8cea6a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/401/f71d1f8d69af42fbb0ebe3b021e806b0dd8cea6a/test_15_selection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
42,
9746,
12,
5120,
16,
859,
4672,
364,
1694,
316,
859,
63,
20,
14542,
364,
1547,
316,
1843,
18,
22032,
30910,
12,
1752,
4672,
365,
18,
11231,
5812,
12,
728,
18,
1376,
2668,
7216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
42,
9746,
12,
5120,
16,
859,
4672,
364,
1694,
316,
859,
63,
20,
14542,
364,
1547,
316,
1843,
18,
22032,
30910,
12,
1752,
4672,
365,
18,
11231,
5812,
12,
728,
18,
1376,
2668,
7216... |
DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many ProbeName entities") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue | [jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Warning: too many ProbeName entities in " + jobIdType + " " + jobId + "(" + xmlFilename + ")") | def SendXMLFiles(fileDir, removeOriginal = False, resourceType = None): global Config global failedSendCount global suppressedCount global successfulSendCount path = os.path.join(fileDir, "*") files = glob.glob(path) responseString = "" for xmlFilename in files: DebugPrint(0, "***********************************************************") DebugPrint(1,"xmlFilename: ",xmlFilename) if (failedSendCount + len(OutstandingRecord)) >= Config.get_MaxPendingFiles(): responseString = "Fatal Error: too many pending files" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString # Open the XML file xmlDoc = xml.dom.minidom.parse(xmlFilename) if not xmlDoc: DebugPrint(0, "Unable to parse XML in file " + xmlFilename) xmlDoc.unlink() continue xmlDoc.normalize() # Local namespace namespace = xmlDoc.documentElement.namespaceURI # Loop over (posibly multiple) jobUsageRecords for usageRecord in getUsageRecords(xmlDoc): # Local prefix, if any prefix = "" for child in usageRecord.childNodes: if child.nodeType == xml.dom.minidom.Node.ELEMENT_NODE and \ child.prefix: prefix = child.prefix + ":" break # ProbeName and SiteName? ProbeNameNodes = usageRecord.getElementsByTagNameNS(namespace, 'ProbeName') if not ProbeNameNodes: node = xmlDoc.createElementNS(namespace, prefix + 'ProbeName') textNode = xmlDoc.createTextNode(Config.get_MeterName()) node.appendChild(textNode) usageRecord.appendChild(node) elif len(ProbeNameNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many ProbeName entities") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue SiteNameNodes = usageRecord.getElementsByTagNameNS(namespace, 'SiteName') if not SiteNameNodes: node = xmlDoc.createElementNS(namespace, prefix + 'SiteName') textNode = xmlDoc.createTextNode(Config.get_SiteName()) node.appendChild(textNode) usageRecord.appendChild(node) elif len(SiteNameNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many SiteName entities") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue # VOName, ReportableVOName UserIdentityNodes = usageRecord.getElementsByTagNameNS(namespace, 'UserIdentity') if not UserIdentityNodes: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": no UserIdentity block") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue elif len(UserIdentityNodes) > 1: DebugPrint(0, "Badly formed XML in " + xmlFilename + ": too many UserIdentity blocks") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue [VOName, ReportableVOName] = \ CheckAndExtendUserIdentity(xmlDoc, UserIdentityNodes[0], namespace, prefix) # If we are trying to handle only GRID jobs, suppress records # with a null or unknown VOName if Config.get_SuppressUnknownVORecords() and \ ((not VOName) or VOName == "Unknown"): [jobIdType, jobId] = FindBestJobId(usageRecord, namespace, prefix) DebugPrint(0, "Suppressing record with " + jobIdType + " " + jobId + "due to unknown or null VOName") usageRecord.parentNode.removeChild(usageRecord) usageRecord.unlink() continue # Add ResourceType if appropriate if resourceType != None: UpdateResource(xmlDoc, usageRecord, namespace, prefix, 'ResourceType', resourceType) if not len(getUsageRecords(xmlDoc)): xmlDoc.unlink() DebugPrint(0, "No unsuppressed usage records in " + \ xmlFilename + ": not sending") suppressedCount += 1 continue # Generate the XML xmlData = safeEncodeXML(xmlDoc) # Close and clean up the document xmlDoc.unlink() # Open the back up file # fill the back up file dirIndex = 0 recordIndex = 0 success = False ind = 0 f = 0 while not success: (f,dirIndex,recordIndex) = OpenNewRecordFile(dirIndex,recordIndex) DebugPrint(1,"Will save in the record in:",f.name) DebugPrint(3,"DirIndex=",dirIndex," RecordIndex=",recordIndex) if f.name == "<stdout>": responseString = "Fatal Error: unable to save record prior to send attempt" DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString else: try: for line in xmlData: f.write(line) f.flush() if f.tell() > 0: success = True DebugPrint(3,"suceeded to fill: ",f.name) else: DebugPrint(0,"failed to fill: ",f.name) if f.name != "<stdout>": os.remove(f.name) except: DebugPrint(0,"failed to fill with exception: ",f.name,"--", sys.exc_info(),"--",sys.exc_info()[0],"++",sys.exc_info()[1]) if f.name != "<stdout>": os.remove(f.name) if removeOriginal and f.name != "<stdout>": os.remove(xmlFilename) DebugPrint(0, 'Saved record to ' + f.name) # Currently, the recordXml is in a list format, with each # item being a line of xml. The collector web service # requires the xml to be sent as a string. This logic here # turns the xml list into a single xml string. usageXmlString = "" for line in xmlData: usageXmlString = usageXmlString + line DebugPrint(3, 'UsageXml: ' + usageXmlString) # Attempt to send the record to the collector response = __sendUsageXML(Config.get_MeterName(), usageXmlString) DebugPrint(0, 'Response code: ' + str(response.get_code())) DebugPrint(0, 'Response message: ' + response.get_message()) # Determine if the call was successful based on the # response code. Currently, 0 = success if response.get_code() == 0: DebugPrint(1, 'Response indicates success, ' + f.name + ' will be deleted') successfulSendCount += 1 os.remove(f.name) else: failedSendCount += 1 DebugPrint(1, 'Response indicates failure, ' + f.name + ' will not be deleted') DebugPrint(0, responseString) DebugPrint(0, "***********************************************************") return responseString | 82362dc0c1d2f5f0727670c6ff01b444853b1602 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/637/82362dc0c1d2f5f0727670c6ff01b444853b1602/Gratia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2479,
4201,
2697,
12,
768,
1621,
16,
1206,
8176,
273,
1083,
16,
14110,
273,
599,
4672,
2552,
1903,
2552,
2535,
3826,
1380,
2552,
24448,
1380,
2552,
6873,
3826,
1380,
225,
589,
273,
1140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2479,
4201,
2697,
12,
768,
1621,
16,
1206,
8176,
273,
1083,
16,
14110,
273,
599,
4672,
2552,
1903,
2552,
2535,
3826,
1380,
2552,
24448,
1380,
2552,
6873,
3826,
1380,
225,
589,
273,
1140,
... |
args += ['-partition-size', '128'] | args += ['-partition-size', '330'] | def StartEmulator(exe_name='emulator', kernel=None, ramdisk=None, image=None, userdata=None, system=None): """Runs the emulator with the specified arguments. Args: exe_name: The name of the emulator to run. May be absolute, relative, or unqualified (and left to exec() to find). kernel: If set, passed to the emulator as "-kernel". ramdisk: If set, passed to the emulator as "-ramdisk". image: If set, passed to the emulator as "-system". userdata: If set, passed to the emulator as "-initdata" and "-data". system: If set, passed to the emulator as "-sysdir". Returns: A subprocess.Popen that refers to the emulator process, or None if a problem occurred. """ #exe_name = './stuff' args = [exe_name] if kernel: args += ['-kernel', kernel] if ramdisk: args += ['-ramdisk', ramdisk] if image: args += ['-system', image] if userdata: args += ['-initdata', userdata, '-data', userdata] if system: args += ['-sysdir', system] args += ['-partition-size', '128'] args += ['-no-window', '-netfast', '-noaudio'] _USE_PIPE = True if _USE_PIPE: # Use dedicated fds instead of stdin/out to talk to the # emulator so that the emulator doesn't try to tty-cook # the data. em_stdin_r, em_stdin_w = posix.pipe() em_stdout_r, em_stdout_w = posix.pipe() args += ['-shell-serial', 'fdpair:%d:%d' % (em_stdin_r, em_stdout_w)] else: args += ['-shell'] # Ensure that this environment variable isn't set; # if it is, the emulator will print the log to stdout. if os.environ.get('ANDROID_LOG_TAGS'): del os.environ['ANDROID_LOG_TAGS'] try: # bufsize=1 line-buffered, =0 unbuffered, # <0 system default (fully buffered) Trace('Running emulator: %s' % ' '.join(args)) if _USE_PIPE: ep = subprocess.Popen(args) else: ep = subprocess.Popen(args, close_fds=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if ep: if _USE_PIPE: # Hijack the Popen.stdin/.stdout fields to point to our # pipes. These are the same fields that would have been set # if we called Popen() with stdin=subprocess.PIPE, etc. # Note that these names are from the point of view of the # child process. # # Since we'll be using select.select() to read data a byte # at a time, it's important that these files are unbuffered # (bufsize=0). If Popen() took care of the pipes, they're # already unbuffered. ep.stdin = os.fdopen(em_stdin_w, 'w', 0) ep.stdout = os.fdopen(em_stdout_r, 'r', 0) return ep except OSError, e: print >>sys.stderr, 'Could not start emulator:', e return None | 1bf1fe02cedeec686a9c585385c3f872ae6aba86 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4824/1bf1fe02cedeec686a9c585385c3f872ae6aba86/dexpreopt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
1514,
11775,
12,
14880,
67,
529,
2218,
351,
11775,
2187,
5536,
33,
7036,
16,
24975,
10863,
33,
7036,
16,
1316,
33,
7036,
16,
21518,
33,
7036,
16,
2619,
33,
7036,
4672,
3536,
9361,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
1514,
11775,
12,
14880,
67,
529,
2218,
351,
11775,
2187,
5536,
33,
7036,
16,
24975,
10863,
33,
7036,
16,
1316,
33,
7036,
16,
21518,
33,
7036,
16,
2619,
33,
7036,
4672,
3536,
9361,
... |
h = Hork() | h = Hork().getArbiter('ROOT') | def bar_changed(self, tag, model, old, new): output.append(('bar', old, new, tag)) | aaec1b3c6b4a0e495e447cec7ada7c320474b1c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/aaec1b3c6b4a0e495e447cec7ada7c320474b1c1/mvc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4653,
67,
6703,
12,
2890,
16,
1047,
16,
938,
16,
1592,
16,
394,
4672,
876,
18,
6923,
12,
2668,
3215,
2187,
1592,
16,
394,
16,
1047,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4653,
67,
6703,
12,
2890,
16,
1047,
16,
938,
16,
1592,
16,
394,
4672,
876,
18,
6923,
12,
2668,
3215,
2187,
1592,
16,
394,
16,
1047,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
raise error.TestFail("Could not extract % on guest") | raise error.TestFail("Could not extract %s on guest" % basename) | def extract(vm, remote_path, dest_dir="."): """ Extract a .tar.bz2 file on the guest. | 65c26f4ec088b3ff7340931b1e23ba33dd084a57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/65c26f4ec088b3ff7340931b1e23ba33dd084a57/kvm_test_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
3489,
16,
2632,
67,
803,
16,
1570,
67,
1214,
1546,
1199,
4672,
3536,
8152,
279,
263,
11718,
18,
25292,
22,
585,
603,
326,
13051,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
3489,
16,
2632,
67,
803,
16,
1570,
67,
1214,
1546,
1199,
4672,
3536,
8152,
279,
263,
11718,
18,
25292,
22,
585,
603,
326,
13051,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
elif not self.has_section(section): | elif section not in self.__sections: | def has_option(self, section, option): """Check for the existence of a given option in a given section.""" if not section or section == "DEFAULT": return option in self.__defaults elif not self.has_section(section): return 0 else: option = self.optionxform(option) return option in self.__sections[section] | 92ed640936b92665295d98ba8eae84e2874ec357 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/92ed640936b92665295d98ba8eae84e2874ec357/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
1564,
364,
326,
15782,
434,
279,
864,
1456,
316,
279,
864,
2442,
12123,
309,
486,
2442,
578,
2442,
422,
315,
5280,
6877,
327,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
711,
67,
3482,
12,
2890,
16,
2442,
16,
1456,
4672,
3536,
1564,
364,
326,
15782,
434,
279,
864,
1456,
316,
279,
864,
2442,
12123,
309,
486,
2442,
578,
2442,
422,
315,
5280,
6877,
327,
1... |
self._owner.RegisterHandler('features',self.FeaturesHandler) | if self._owner.Dispatcher.Stream.features: self.FeaturesHandler(self._owner.Dispatcher,self._owner.Dispatcher.Stream.features) else: self._owner.RegisterHandler('features',self.FeaturesHandler) | def PlugIn(self,owner): self._owner=owner owner.debug_flags.append(DBG_SASL) owner.DEBUG(DBG_SASL,'Plugging into %s'%owner,'start') self._owner.SASL=self self._owner.RegisterHandler('features',self.FeaturesHandler) | e8defae5f6aeebdb10b563c4466ad10a06fe6c00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7194/e8defae5f6aeebdb10b563c4466ad10a06fe6c00/auth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3008,
637,
382,
12,
2890,
16,
8443,
4672,
365,
6315,
8443,
33,
8443,
3410,
18,
4148,
67,
7133,
18,
6923,
12,
2290,
43,
67,
55,
3033,
48,
13,
3410,
18,
9394,
12,
2290,
43,
67,
55,
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,
3008,
637,
382,
12,
2890,
16,
8443,
4672,
365,
6315,
8443,
33,
8443,
3410,
18,
4148,
67,
7133,
18,
6923,
12,
2290,
43,
67,
55,
3033,
48,
13,
3410,
18,
9394,
12,
2290,
43,
67,
55,
3... |
"""<html xmlns="http://www.w3.org/1999/xhtml"> <head><title>XLINK</title></head> <body> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> <defs xmlns:l="http://www.w3.org/1999/xlink"> <radialGradient id="s1" fx=".4" fy=".2" r=".7"> <stop stop-color=" <stop stop-color=" </radialGradient> <radialGradient id="s2" fx=".8" fy=".5" l:href=" <radialGradient id="s3" fx=".5" fy=".9" l:href=" <radialGradient id="s4" fx=".1" fy=".5" l:href=" </defs> <g stroke=" <path d="M73,29c-37-40-62-24-52,4l6-7c-8-16,7-26,42,9z" fill="url( <path d="M47,8c33-16,48,21,9,47l-6-5c38-27,20-44,5-37z" fill="url( <path d="M77,32c22,30,10,57-39,51l-1-8c3,3,67,5,36-36z" fill="url( | '<html xmlns="http://www.w3.org/1999/xhtml">' + '<head><title>XLINK</title></head>' + '<body>' + '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">' + '<defs xmlns:l="http://www.w3.org/1999/xlink">' + '<radialGradient id="s1" fx=".4" fy=".2" r=".7">' + '<stop stop-color=" '<stop stop-color=" '</radialGradient>' + '<radialGradient id="s2" fx=".8" fy=".5" l:href=" '<radialGradient id="s3" fx=".5" fy=".9" l:href=" '<radialGradient id="s4" fx=".1" fy=".5" l:href=" '</defs>' + '<g stroke=" '<path d="M73,29c-37-40-62-24-52,4l6-7c-8-16,7-26,42,9z" fill="url( '<path d="M47,8c33-16,48,21,9,47l-6-5c38-27,20-44,5-37z" fill="url( '<path d="M77,32c22,30,10,57-39,51l-1-8c3,3,67,5,36-36z" fill="url( | def test_ns(self): self.saxdiff( | 3cc4aee4ce5f0fef4d0b3a9ec8433d161589cc81 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/3cc4aee4ce5f0fef4d0b3a9ec8433d161589cc81/test_sax.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
2387,
12,
2890,
4672,
365,
18,
87,
651,
5413,
12,
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,
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,
1842,
67,
2387,
12,
2890,
4672,
365,
18,
87,
651,
5413,
12,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
elif node.type == "ne": | elif node.type == "ne" or node.type == "strict_ne": | def __checkCondition(node): if node.type == "false": return False elif node.type == "true": return True elif node.type == "eq": return __compareNodes(node[0], node[1]) elif node.type == "ne": return __invertResult(__compareNodes(node[0], node[1])) elif node.type == "not": return __invertResult(__checkCondition(node[0])) elif node.type == "and": first = __checkCondition(node[0]) second = __checkCondition(node[1]) if first != None and second != None: return first and second elif node.type == "or": first = __checkCondition(node[0]) second = __checkCondition(node[1]) if first != None and second != None: return first or second return None | 51ae61a45eae9851c4fba9fe407f6f2c2258de5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/51ae61a45eae9851c4fba9fe407f6f2c2258de5a/DeadCode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1893,
3418,
12,
2159,
4672,
309,
756,
18,
723,
422,
315,
5743,
6877,
327,
1083,
1327,
756,
18,
723,
422,
315,
3767,
6877,
327,
1053,
225,
1327,
756,
18,
723,
422,
315,
11253,
687... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1893,
3418,
12,
2159,
4672,
309,
756,
18,
723,
422,
315,
5743,
6877,
327,
1083,
1327,
756,
18,
723,
422,
315,
3767,
6877,
327,
1053,
225,
1327,
756,
18,
723,
422,
315,
11253,
687... |
''' | """ | def is_S_integral(self,S): r''' Returns True if the ideal is an unit with respect to the | 6227df91d1b5dd35f4012cf80c2dec37f6aa4d01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6227df91d1b5dd35f4012cf80c2dec37f6aa4d01/number_field_ideal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
55,
67,
14970,
23811,
12,
2890,
16,
55,
4672,
436,
8395,
2860,
1053,
309,
326,
23349,
353,
392,
2836,
598,
8762,
358,
326,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
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,
353,
67,
55,
67,
14970,
23811,
12,
2890,
16,
55,
4672,
436,
8395,
2860,
1053,
309,
326,
23349,
353,
392,
2836,
598,
8762,
358,
326,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
dry_run=0): CCompiler.__init__ (self, verbose, dry_run) | dry_run=0, force=0): CCompiler.__init__ (self, verbose, dry_run, force) | def __init__ (self, verbose=0, dry_run=0): | 89089094993f673017e085d63a0b45c2950b389b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/89089094993f673017e085d63a0b45c2950b389b/unixccompiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
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,
... | [
1,
1,
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,
1001,
2738,
972,
261,
2890,
16,
3988,
33,
20,
16,
10299,
67,
2681,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
help="URL of DOM inspector repository to pull from (default: use hg default in mozilla/extensions/inspector/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULT_INSPECTOR_REPO + "\".)") | help="URL of DOM Inspector repository to pull from (default: use hg default in mozilla/extensions/inspector/.hg/hgrc; or if that file doesn't exist, use \"" + DEFAULT_INSPECTOR_REPO + "\".)") | def do_cvs_checkout(modules, tag, cvsroot, cvs, checkoutdir): """Check out a CVS directory into the checkoutdir subdirectory. modules is a list of directories to check out, e.g. ['extensions/irc'] """ for module in modules: (parent, leaf) = os.path.split(module) print "CVS checkout begin: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC") if tag == 'HEAD': check_call_noisy([cvs, '-d', cvsroot, '-q', 'checkout', '-P', '-A', '-d', leaf, 'mozilla/%s' % module], cwd=os.path.join(topsrcdir, checkoutdir, parent)) else: check_call_noisy([cvs, '-d', cvsroot, '-q', 'checkout', '-P', '-r', tag, '-d', leaf, 'mozilla/%s' % module], cwd=os.path.join(topsrcdir, checkoutdir, parent)) print "CVS checkout end: " + datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC") | ffe6fd8ce73d2006ebf656f80d3ff9a6a95d26a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/ffe6fd8ce73d2006ebf656f80d3ff9a6a95d26a1/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
67,
71,
6904,
67,
17300,
12,
6400,
16,
1047,
16,
276,
6904,
3085,
16,
276,
6904,
16,
13926,
1214,
4672,
3536,
1564,
596,
279,
385,
14640,
1867,
1368,
326,
13926,
1214,
29869,
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,
741,
67,
71,
6904,
67,
17300,
12,
6400,
16,
1047,
16,
276,
6904,
3085,
16,
276,
6904,
16,
13926,
1214,
4672,
3536,
1564,
596,
279,
385,
14640,
1867,
1368,
326,
13926,
1214,
29869,
18,
... |
raise SharingError(_(u"Collection already exists on server.")) | raise errors.SharingError(_(u"Collection already exists on server.")) | def publish(self, collection, displayName=None, activity=None, filters=None, overwrite=False, options=None): | b2e4e82bf5fbba33695f3859f0b7d53f9c517e34 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/b2e4e82bf5fbba33695f3859f0b7d53f9c517e34/accounts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
12,
2890,
16,
1849,
16,
16218,
33,
7036,
16,
5728,
33,
7036,
16,
3415,
33,
7036,
16,
6156,
33,
8381,
16,
702,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3808,
12,
2890,
16,
1849,
16,
16218,
33,
7036,
16,
5728,
33,
7036,
16,
3415,
33,
7036,
16,
6156,
33,
8381,
16,
702,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
dlg = wx.MessageDialog(self, DV.l('A new version (') + info['updateinfo']['main'] + DV.l(') is available! You are running DamnVid ') + DV.version + '.\n' + DV.l('Want to go to the download page and download the update?'), DV.l('Update available!'), wx.YES | wx.NO | wx.YES_DEFAULT | wx.ICON_INFORMATION) dlg.SetIcon(DV.icon) if dlg.ShowModal() == wx.ID_YES: webbrowser.open(DV.url_download, 2) dlg.Destroy() | if DV.os != 'posix': dlg = wx.MessageDialog(self, DV.l('A new version (') + info['updateinfo']['main'] + DV.l(') is available! You are running DamnVid ') + DV.version + '.\n' + DV.l('Want to go to the download page and download the update?'), DV.l('Update available!'), wx.YES | wx.NO | wx.YES_DEFAULT | wx.ICON_INFORMATION) dlg.SetIcon(DV.icon) if dlg.ShowModal() == wx.ID_YES: webbrowser.open(DV.url_download, 2) dlg.Destroy() | def onLoading(self, event): info = event.GetInfo() if info.has_key('show'): if info['show']: self.droptarget.LoadFile(DV.images_path + 'droptargetloading.gif') self.droptarget.Play() else: self.droptarget.Stop() self.droptarget.LoadFile(DV.images_path + 'droptarget.gif') if info.has_key('status'): self.SetStatusText(info['status']) if info.has_key('dialog'): dlg = wx.MessageDialog(self, info['dialog'][1], info['dialog'][0], info['dialog'][2]) dlg.SetIcon(DV.icon) dlg.ShowModal() dlg.Destroy() if info.has_key('meta'): self.addValid(info['meta']) if info.has_key('go') and self.converting == -1: if info['go']: self.onGo() if info.has_key('updateinfo'): if info['updateinfo'].has_key('verbose'): verbose = info['updateinfo']['verbose'] else: verbose = True if info['updateinfo'].has_key('main'): if info['updateinfo']['main'] is not None: msg = None if DamnVersionCompare(info['updateinfo']['main'], DV.version) == 1 and type(info['updateinfo']['main']) is type(''): dlg = wx.MessageDialog(self, DV.l('A new version (') + info['updateinfo']['main'] + DV.l(') is available! You are running DamnVid ') + DV.version + '.\n' + DV.l('Want to go to the download page and download the update?'), DV.l('Update available!'), wx.YES | wx.NO | wx.YES_DEFAULT | wx.ICON_INFORMATION) dlg.SetIcon(DV.icon) if dlg.ShowModal() == wx.ID_YES: webbrowser.open(DV.url_download, 2) dlg.Destroy() elif verbose and type(info['updateinfo']['main']) is type(''): if DV.version != info['updateinfo']['main']: versionwarning = DV.l(' However, your version (') + DV.version + DV.l(') seems different than the latest version available online. Where would you get that?') else: versionwarning = '' msg = (DV.l('DamnVid is up-to-date.'), DV.l('DamnVid is up-to-date! The latest version is ') + info['updateinfo']['main'] + '.' + versionwarning, wx.ICON_INFORMATION) elif verbose: msg = (DV.l('Error!'), DV.l('There was a problem while checking for updates. You are running DamnVid ') + DV.version + '.\n' + DV.l('Make sure you are connected to the Internet, and that no firewall is blocking DamnVid.'), wx.ICON_INFORMATION) if msg is not None: dlg = wx.MessageDialog(self, msg[1], msg[0], msg[2]) dlg.SetIcon(DV.icon) dlg.ShowModal() dlg.Destroy() if info['updateinfo'].has_key('modules'): msg = [] for i in info['updateinfo']['modules'].iterkeys(): if type(info['updateinfo']['modules'][i]) is type(()): msg.append((True, DV.modules[i]['title'] + DV.l(' was updated to version ') + info['updateinfo']['modules'][i][0] + '.')) elif type(info['updateinfo']['modules'][i]) is type('') and verbose: if info['updateinfo']['modules'][i] == 'error': msg.append((False, DV.modules[i]['title'] + DV.l(' is up-to-date (version ') + DV.modules[i]['version'] + ').')) if len(msg): msgs = [] for i in msg: if i[0]: msgs.append(i[1]) if not len(msg) and verbose: msgs = msg if len(msgs): msg = DV.l('DamnVid also checked for updates to its modules.') + '\n' for i in msgs: msg += '\n' + i dlg = wx.MessageDialog(self, msg, DV.l('Module updates'), wx.ICON_INFORMATION) dlg.SetIcon(DV.icon) dlg.ShowModal() dlg.Destroy() | 681ae9a60cc3cb054ceea4959c2dc48d981d9825 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11142/681ae9a60cc3cb054ceea4959c2dc48d981d9825/DamnVid.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
10515,
12,
2890,
16,
871,
4672,
1123,
273,
871,
18,
967,
966,
1435,
309,
1123,
18,
5332,
67,
856,
2668,
4500,
11,
4672,
309,
1123,
3292,
4500,
3546,
30,
365,
18,
9005,
337,
826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
10515,
12,
2890,
16,
871,
4672,
1123,
273,
871,
18,
967,
966,
1435,
309,
1123,
18,
5332,
67,
856,
2668,
4500,
11,
4672,
309,
1123,
3292,
4500,
3546,
30,
365,
18,
9005,
337,
826,
... |
self.file.read( calcsize( pattern ) ) ) | self.file.read( calcsize( self.byte_order + pattern ) ) ) | def read( self, pattern, untuple=True ): rval = unpack( self.byte_order + pattern, self.file.read( calcsize( pattern ) ) ) if untuple and len( rval ) == 1: return rval[0] return rval | 2fdbae11044ba9ac5b269fd9538f99c2cf4d69f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2104/2fdbae11044ba9ac5b269fd9538f99c2cf4d69f7/twobit.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
365,
16,
1936,
16,
640,
8052,
33,
5510,
262,
30,
14267,
273,
6167,
12,
365,
18,
7229,
67,
1019,
397,
1936,
16,
365,
18,
768,
18,
896,
12,
7029,
1467,
12,
365,
18,
7229,
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,
855,
12,
365,
16,
1936,
16,
640,
8052,
33,
5510,
262,
30,
14267,
273,
6167,
12,
365,
18,
7229,
67,
1019,
397,
1936,
16,
365,
18,
768,
18,
896,
12,
7029,
1467,
12,
365,
18,
7229,
67... |
import pywin.debugger, pywin.debugger.dbgcon | def _HandleException_(self): """ Invoke the debugger post mortem capability """ # Save details away. typ, val, tb = exc_info() import pywin.debugger, pywin.debugger.dbgcon debug = 0 try: raise typ, val except Exception: # AARG - What is this Exception??? # Use some inside knowledge to borrow a Debugger option which dictates if we # stop at "expected" exceptions. debug = pywin.debugger.GetDebugger().get_option(pywin.debugger.dbgcon.OPT_STOP_EXCEPTIONS) except: debug = 1 if debug: try: pywin.debugger.post_mortem(tb, typ, val) # The original exception except: traceback.print_exc() | 2e6cb41223eccdeebbaa9a93a22b0d7528d0621a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/2e6cb41223eccdeebbaa9a93a22b0d7528d0621a/dispatcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3259,
503,
67,
12,
2890,
4672,
3536,
14373,
326,
19977,
1603,
312,
499,
351,
12593,
3536,
468,
7074,
3189,
10804,
18,
3815,
16,
1244,
16,
8739,
273,
3533,
67,
1376,
1435,
225,
1198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3259,
503,
67,
12,
2890,
4672,
3536,
14373,
326,
19977,
1603,
312,
499,
351,
12593,
3536,
468,
7074,
3189,
10804,
18,
3815,
16,
1244,
16,
8739,
273,
3533,
67,
1376,
1435,
225,
1198,... | |
@param ids: the ID or list of IDs @param context: A standard dictionary @return: A dictionary which of fields with values. """ | @param ids: the ID or list of IDs @param context: A standard dictionary @return: A dictionary which of fields with values. """ | def make_invoices(self, cr, uid, ids, context): """ To make invoices. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs @param context: A standard dictionary @return: A dictionary which of fields with values. """ | 06ae11efd0f151a77ff6935b78493ba7a9d05913 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/06ae11efd0f151a77ff6935b78493ba7a9d05913/sale_line_invoice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
5768,
17725,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
3536,
2974,
1221,
2198,
17725,
18,
225,
632,
891,
365,
30,
1021,
733,
4407,
18,
632,
891,
4422,
30,
432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
5768,
17725,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
4672,
3536,
2974,
1221,
2198,
17725,
18,
225,
632,
891,
365,
30,
1021,
733,
4407,
18,
632,
891,
4422,
30,
432,
... |
self = MapArea.from_maparea(cls, maparea, owner) | self = super(PolygonMapArea, cls).from_maparea(maparea, owner) | def from_maparea(cls, maparea, owner): self = MapArea.from_maparea(cls, maparea, owner) if isinstance(maparea, PolygonMapArea): self._coords = maparea.coordinates else: self._set_rect(maparea.rect) return self | 177069627cf6f54fedc8e31f8f30fb7e4350827d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3683/177069627cf6f54fedc8e31f8f30fb7e4350827d/annotations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
1458,
5036,
12,
6429,
16,
852,
5036,
16,
3410,
4672,
365,
273,
2240,
12,
11787,
863,
5484,
16,
2028,
2934,
2080,
67,
1458,
5036,
12,
1458,
5036,
16,
3410,
13,
309,
1549,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
67,
1458,
5036,
12,
6429,
16,
852,
5036,
16,
3410,
4672,
365,
273,
2240,
12,
11787,
863,
5484,
16,
2028,
2934,
2080,
67,
1458,
5036,
12,
1458,
5036,
16,
3410,
13,
309,
1549,
12,
... |
return '' | viewStr = cPickle.dumps(objectList) return base64.encodestring(viewStr) | def EncodeObjectList(self, objectList): return '' | d9eb3d1a306977a8a3bccfd879cf38f7c0b4088d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d9eb3d1a306977a8a3bccfd879cf38f7c0b4088d/ChandlerJabber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6240,
25979,
12,
2890,
16,
733,
682,
4672,
1476,
1585,
273,
276,
17968,
298,
18,
13302,
1121,
12,
1612,
682,
13,
327,
1026,
1105,
18,
1331,
1145,
371,
12,
1945,
1585,
13,
225,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6240,
25979,
12,
2890,
16,
733,
682,
4672,
1476,
1585,
273,
276,
17968,
298,
18,
13302,
1121,
12,
1612,
682,
13,
327,
1026,
1105,
18,
1331,
1145,
371,
12,
1945,
1585,
13,
225,
2,
-100,... |
if ord(unich) == 0xfffd or unich in urt_wa: | if unich == u'\ufffd' or unich in urt_wa: | def _test_mapping_file_plain(self): unichrs = lambda s: u''.join(map(unichr, map(eval, s.split('+')))) urt_wa = {} | 2fb914cf2ecafe8b394fc2e53ac26ada8f9841b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/2fb914cf2ecafe8b394fc2e53ac26ada8f9841b5/test_multibytecodec_support.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
6770,
67,
768,
67,
7446,
12,
2890,
4672,
640,
1354,
5453,
273,
3195,
272,
30,
582,
6309,
18,
5701,
12,
1458,
12,
318,
1354,
86,
16,
852,
12,
8622,
16,
272,
18,
4939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3813,
67,
6770,
67,
768,
67,
7446,
12,
2890,
4672,
640,
1354,
5453,
273,
3195,
272,
30,
582,
6309,
18,
5701,
12,
1458,
12,
318,
1354,
86,
16,
852,
12,
8622,
16,
272,
18,
4939,
... |
previous_completion = self.completions[cursel - 1] while cursel > 0 and selstart[:i] <= previous_completion: i += 1 if selstart == previous_completion: break | def _selection_changed(self): """Should be called when the selection of the Listbox has changed. Updates the Listbox display and calls _change_start.""" cursel = int(self.listbox.curselection()[0]) | 60d9f8df383cfc89bb1f927c06393cfcb12fe7d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/60d9f8df383cfc89bb1f927c06393cfcb12fe7d6/AutoCompleteWindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10705,
67,
6703,
12,
2890,
4672,
3536,
14309,
506,
2566,
1347,
326,
4421,
434,
326,
987,
2147,
711,
3550,
18,
15419,
326,
987,
2147,
2562,
471,
4097,
389,
3427,
67,
1937,
12123,
662... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10705,
67,
6703,
12,
2890,
4672,
3536,
14309,
506,
2566,
1347,
326,
4421,
434,
326,
987,
2147,
711,
3550,
18,
15419,
326,
987,
2147,
2562,
471,
4097,
389,
3427,
67,
1937,
12123,
662... | |
while cur < b: yield cur cur += step | if step > 0: while cur < b: yield cur cur += step elif step < 0: while cur > b: yield cur cur += step | def _xsrange(a,b=None,step=1): if b is None: b = a try: a = b.parent()(0) except AttributeError: a = type(b)(0) cur = a while cur < b: yield cur cur += step return | 0b8571c401328ded1c7f14273af454e463f94551 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/0b8571c401328ded1c7f14273af454e463f94551/misc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
13713,
3676,
12,
69,
16,
70,
33,
7036,
16,
4119,
33,
21,
4672,
309,
324,
353,
599,
30,
324,
273,
279,
775,
30,
279,
273,
324,
18,
2938,
1435,
12,
20,
13,
1335,
6394,
30,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
13713,
3676,
12,
69,
16,
70,
33,
7036,
16,
4119,
33,
21,
4672,
309,
324,
353,
599,
30,
324,
273,
279,
775,
30,
279,
273,
324,
18,
2938,
1435,
12,
20,
13,
1335,
6394,
30,
279,
... |
self.handle_input() | def extract_header(self, name, default=None): name = name.lower() for line in headers: if not line.count(':'): continue key, value = line.split(':', 1) if key.lower() == name: return value.strip() return default self.handle_input() | 3af32c91e21dbc44aa1c2a4936fe641fe10e1f63 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3111/3af32c91e21dbc44aa1c2a4936fe641fe10e1f63/throxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
3374,
12,
2890,
16,
508,
16,
805,
33,
7036,
4672,
508,
273,
508,
18,
8167,
1435,
364,
980,
316,
1607,
30,
309,
486,
980,
18,
1883,
2668,
2497,
4672,
1324,
498,
16,
460,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
3374,
12,
2890,
16,
508,
16,
805,
33,
7036,
4672,
508,
273,
508,
18,
8167,
1435,
364,
980,
316,
1607,
30,
309,
486,
980,
18,
1883,
2668,
2497,
4672,
1324,
498,
16,
460,
273... | |
self.authz.assert_permission(os.path.join(self.scope, path)) | self.authz.assert_permission(posixpath.join(self.scope, path)) | def get_node(self, path, rev=None): self.authz.assert_permission(os.path.join(self.scope, path)) if path and path[-1] == '/': path = path[:-1] | c4558858367bdbb42bab5c65c45740dc94663d2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/c4558858367bdbb42bab5c65c45740dc94663d2e/svn_fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2159,
12,
2890,
16,
589,
16,
5588,
33,
7036,
4672,
365,
18,
1944,
94,
18,
11231,
67,
9827,
12,
24463,
803,
18,
5701,
12,
2890,
18,
4887,
16,
589,
3719,
309,
589,
471,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
2159,
12,
2890,
16,
589,
16,
5588,
33,
7036,
4672,
365,
18,
1944,
94,
18,
11231,
67,
9827,
12,
24463,
803,
18,
5701,
12,
2890,
18,
4887,
16,
589,
3719,
309,
589,
471,
589,
... |
print "User: ", self.username print "Name: ", name print "Server: ", self.server['Server'], path print "Response: ", statuscode, statusmessage print "Headers: ", header | msg = "User: %s" % self.username msg += "\nName: %s" % name msg += "\nServer: %s%s" % (self.server['Server'], path) msg += "\nResponse: %s %s" % (statuscode, statusmessage) msg += "\nHeader:" msg += "\n%s" % str(header).strip() appendTextview(self.textviewStdOut, msg) else: err = "Warning/Error: Got HTTP status code 201!?!" appendTextview(self.textviewStdErr, err) | def uploadSeishub(self): """ Upload xml file to seishub """ userid = "admin" passwd = "admin" | b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3617,
1761,
1468,
373,
12,
2890,
4672,
3536,
9414,
2025,
585,
358,
695,
1468,
373,
3536,
6709,
273,
315,
3666,
6,
19093,
273,
315,
3666,
6,
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,
3617,
1761,
1468,
373,
12,
2890,
4672,
3536,
9414,
2025,
585,
358,
695,
1468,
373,
3536,
6709,
273,
315,
3666,
6,
19093,
273,
315,
3666,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
% random.choice(('t_arctic', 't_guerilla', 't_leet', 't_phoenix')) | % choice(('t_arctic', 't_guerilla', 't_leet', 't_phoenix')) | def __setattr__(self, name, value): # First, we execute the custom attribute callbacks if CustomAttributeCallbacks().has_key(name): for function in CustomAttributeCallbacks()[name].values(): function(name, value, self) | 0b4d08c09575e3ee97ac770df60ceb7ee57b0113 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4555/0b4d08c09575e3ee97ac770df60ceb7ee57b0113/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1747,
972,
12,
2890,
16,
508,
16,
460,
4672,
468,
5783,
16,
732,
1836,
326,
1679,
1566,
6689,
309,
6082,
1499,
10617,
7675,
5332,
67,
856,
12,
529,
4672,
364,
445,
316,
6082... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
542,
1747,
972,
12,
2890,
16,
508,
16,
460,
4672,
468,
5783,
16,
732,
1836,
326,
1679,
1566,
6689,
309,
6082,
1499,
10617,
7675,
5332,
67,
856,
12,
529,
4672,
364,
445,
316,
6082... |
max_dt = max([t[0] for t in thresholds.itervalues()]) | max_dt = max([abs(dt) for dt, kappa, epsilon in thresholds.itervalues()]) | def StringMaxSegmentGap(xmldoc, thresholds): """ Determine the maximum allowed segment gap for use with the string coincidence test. """ # loosest threshold max_dt = max([t[0] for t in thresholds.itervalues()]) # double for safety return 2 * max_dt | 3f8fb549ae9763f47ebeb2b800d315751f8a732e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/3f8fb549ae9763f47ebeb2b800d315751f8a732e/ligolw_burca.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
514,
2747,
4131,
14001,
12,
2902,
2434,
16,
19983,
4672,
3536,
10229,
326,
4207,
2935,
3267,
9300,
364,
999,
598,
326,
533,
13170,
71,
10328,
1842,
18,
3536,
468,
437,
538,
395,
5573,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
514,
2747,
4131,
14001,
12,
2902,
2434,
16,
19983,
4672,
3536,
10229,
326,
4207,
2935,
3267,
9300,
364,
999,
598,
326,
533,
13170,
71,
10328,
1842,
18,
3536,
468,
437,
538,
395,
5573,
94... |
self.oldfilenames.setdefault(f, []).append(pkg) | self.oldfilenames.setdefault(f, [ ]).append(pkg) | def addPkg(self, pkg): """Add all files from RpmPackage pkg to self.""" | e0106769fd056a3d2a869a4070f727b30e66fa80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/e0106769fd056a3d2a869a4070f727b30e66fa80/lists.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
11264,
12,
2890,
16,
3475,
4672,
3536,
986,
777,
1390,
628,
534,
7755,
2261,
3475,
358,
365,
12123,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
11264,
12,
2890,
16,
3475,
4672,
3536,
986,
777,
1390,
628,
534,
7755,
2261,
3475,
358,
365,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if anAttribute[0] == 0: | if anAttribute[1] == 0: | def __saveStepper( self , anEml ): """stepper loader""" | 9e42673f462c6275456e25098e6f9ca468a388a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/9e42673f462c6275456e25098e6f9ca468a388a2/Session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
5688,
4160,
457,
12,
365,
269,
392,
41,
781,
262,
30,
3536,
4119,
457,
4088,
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,
... | [
1,
1,
1,
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,
1001,
5688,
4160,
457,
12,
365,
269,
392,
41,
781,
262,
30,
3536,
4119,
457,
4088,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.package_dir = self.distribution.package_dir | self.package_dir = {} if self.distribution.package_dir: for name, path in self.distribution.package_dir.items(): self.package_dir[name] = convert_path(path) | def finalize_options (self): self.set_undefined_options('build', ('build_lib', 'build_lib'), ('force', 'force')) | ec8613fc50f880af299bf5bd4f6b3b36873220f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ec8613fc50f880af299bf5bd4f6b3b36873220f3/build_py.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
365,
18,
542,
67,
5978,
67,
2116,
2668,
3510,
2187,
7707,
3510,
67,
2941,
2187,
296,
3510,
67,
2941,
19899,
7707,
5734,
2187,
296,
5734,
26112,
2,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12409,
67,
2116,
261,
2890,
4672,
365,
18,
542,
67,
5978,
67,
2116,
2668,
3510,
2187,
7707,
3510,
67,
2941,
2187,
296,
3510,
67,
2941,
19899,
7707,
5734,
2187,
296,
5734,
26112,
2,
-100,... |
actionGroup = gtk.ActionGroup("Actions") actionGroup.add_actions(actions) self.uiManager.insert_action_group(actionGroup, 0) | self.actiongroup = gtk.ActionGroup("Actions") self.actiongroup.add_actions(actions) self.uiManager.insert_action_group(self.actiongroup, 0) | def build_interface(self): actions = ( ("New", gtk.STOCK_NEW, None, None, _("Create a new contact"), self.newButton_click), ("Open", gtk.STOCK_OPEN, None, None, _("Open and import contacts"), self.openButton_click), ("Delete", gtk.STOCK_DELETE, None, None, _("Delete the selected contact"), self.deleteButton_click), ("CopyName", gtk.STOCK_COPY, _("_Copy Fullname"), None, None, lambda w: self.copy_click(w, "fn")), ("CopyEmail", None, _("Copy E_mail"), None, None, lambda w: self.copy_click(w, "email")), ("CopyNumber", None, _("Copy N_umber"), None, None, lambda w: self.copy_click(w, "tel")), ("Preferences", gtk.STOCK_PREFERENCES, None, None, _("Configure the application"), None), ("About", gtk.STOCK_ABOUT, None, None, None, self.aboutButton_click), ("Quit", gtk.STOCK_QUIT, None, None, None, self.delete_event) ) | a8a4c6ca09f6afe3062c9a37ce6363c545145985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/a8a4c6ca09f6afe3062c9a37ce6363c545145985/arkadas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
5831,
12,
2890,
4672,
4209,
273,
261,
7566,
1908,
3113,
22718,
18,
31487,
3507,
67,
12917,
16,
599,
16,
599,
16,
389,
2932,
1684,
279,
394,
5388,
6,
3631,
365,
18,
2704,
3616... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
5831,
12,
2890,
4672,
4209,
273,
261,
7566,
1908,
3113,
22718,
18,
31487,
3507,
67,
12917,
16,
599,
16,
599,
16,
389,
2932,
1684,
279,
394,
5388,
6,
3631,
365,
18,
2704,
3616... |
elif type(paths) == types.ListType: | elif type(path) == types.ListType: | def listDirectory(self, path): if type(path) == types.StringType: paths = [path] elif type(paths) == types.ListType: paths = path else: return S_ERROR('LFCClient.removeDirectory: Must supply a path or list of paths') # If we have less than three lfns to query a session doesn't make sense if len(lfns) > 2: self.__openSession() failed = {} successful = {} for path in paths: res = self.__getDirectoryContents(path) if res['OK']: successful[path] = res['Value']['Files'].keys() else: failed[path] = res['Message'] if self.session: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) | 24878006a97fc6c0a40ff01095f00d930f79b1e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/24878006a97fc6c0a40ff01095f00d930f79b1e6/LcgFileCatalogClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
2853,
12,
2890,
16,
589,
4672,
309,
618,
12,
803,
13,
422,
1953,
18,
780,
559,
30,
2953,
273,
306,
803,
65,
1327,
618,
12,
803,
13,
422,
1953,
18,
19366,
30,
2953,
273,
589,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
666,
2853,
12,
2890,
16,
589,
4672,
309,
618,
12,
803,
13,
422,
1953,
18,
780,
559,
30,
2953,
273,
306,
803,
65,
1327,
618,
12,
803,
13,
422,
1953,
18,
19366,
30,
2953,
273,
589,
4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.