rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
twoDKdePath=os.path.join(margdir,par1_name+'-'+par2_name+'_2Dkernel.png')
figname=par1_name+'-'+par2_name+'_2Dkernel.png' twoDKdePath=os.path.join(margdir,figname)
def cbcBayesPostProc(outdir,data,oneDMenu,twoDGreedyMenu,GreedyRes,confidence_levels,twoDplots,injfile=None,eventnum=None,skyres=None,bayesfactornoise=None,bayesfactorcoherent=None): """ This is a demonstration script for using the functionality/data structures contained in pylal.bayespputils . It will produce a webpage from a file containing posterior samples generated by the parameter estimation codes with 1D/2D plots and stats from the marginal posteriors for each parameter/set of parameters. """ if eventnum is not None and injfile is None: print "You specified an event number but no injection file. Ignoring!" if data is None: print 'You must specify an input data file' exit(1) # if outdir is None: print "You must specify an output directory." exit(1) if not os.path.isdir(outdir): os.makedirs(outdir) # commonOutputFileObj=open(data[0]) #Select injections using tc +/- 0.1s if it exists or eventnum from the injection file if injfile: import itertools injections = SimInspiralUtils.ReadSimInspiralFromFiles([injfile]) if(eventnum is not None): if(len(injections)<eventnum): print "Error: You asked for event %d, but %s contains only %d injections" %(eventnum,injfile,len(injections)) sys.exit(1) else: injection=injections[eventnum] else: if(len(injections)<1): print 'Warning: Cannot find injection with end time %f' %(means[2]) else: injection = itertools.ifilter(lambda a: abs(a.get_end() - means[2]) < 0.1, injections).next() ## Load Bayes factors ## # Add Bayes factor information to summary file # if bayesfactornoise is not None: bfile=open(bayesfactornoise,'r') BSN=bfile.read() bfile.close() print 'BSN: %s'%BSN if bayesfactorcoherent is not None: bfile=open(bayesfactorcoherent,'r') BCI=bfile.read() bfile.close() print 'BCI: %s'%BCI #Create an instance of the posterior class using the posterior values loaded #from the file and any injection information (if given). pos = bppu.Posterior(commonOutputFileObj,SimInspiralTableEntry=injection) if ('mc' in pos.names or 'mchirp' in pos.names) and \ 'eta' in pos.names and \ ('mass1' not in pos.names or 'm1' not in pos.names) and\ ('m2' not in pos.names or 'm2' not in pos.names): if 'mc' in pos.names: mchirp_name='mc' else: mchirp_name='mchirp' if injection: inj_mass1,inj_mass2=bppu.mc2ms(injection.mchirp,injection.eta) mass1_samps,mass2_samps=bppu.mc2ms(pos[mchirp_name].samples,pos['eta'].samples) mass1_pos=bppu.OneDPosterior('m1',mass1_samps,injected_value=inj_mass1) mass2_pos=bppu.OneDPosterior('m2',mass2_samps,injected_value=inj_mass2) pos.append(mass1_pos) pos.append(mass2_pos) ##Print some summary stats for the user...## #Number of samples print "Number of posterior samples: %i"%len(pos) # Means print 'Means:' print str(pos.means) #Median print 'Median:' print str(pos.medians) #maxL print 'maxL:' max_pos,max_pos_co=pos.maxL print max_pos_co #==================================================================# #Create web page #==================================================================# html=bppu.htmlPage('Posterior PDFs') #Create a section for meta-data/run information html_meta=html.add_section('Summary') html_meta.p('Produced from '+str(len(pos))+' posterior samples.') html_meta.p('Samples read from %s'%(data[0])) #Create a section for model selection results (if they exist) if bayesfactornoise is not None: html_model=html.add_section('Model selection') html_model.p('log Bayes factor ( coherent vs gaussian noise) = %s, Bayes factor=%f'%(BSN,exp(float(BSN)))) if bayesfactorcoherent is not None: html_model.p('log Bayes factor ( coherent vs incoherent OR noise ) = %s, Bayes factor=%f'%(BCI,exp(float(BCI)))) #Create a section for summary statistics html_stats=html.add_section('Summary statistics') html_stats.write(str(pos)) #==================================================================# #Generate sky map #==================================================================# #If sky resolution parameter has been specified try and create sky map... skyreses=None sky_injection_cl=None if skyres is not None and 'ra' in pos.names and 'dec' in pos.names: #Greedy bin sky samples (ra,dec) into a grid on the sky which preserves #? top_ranked_sky_pixels,sky_injection_cl,skyreses,injection_area=bppu.greedy_bin_sky(pos,skyres,confidence_levels) print "BCI for sky area:" print skyreses #Create sky map in outdir bppu.plot_sky_map(top_ranked_sky_pixels,outdir) #Create a web page section for sky localization results/plots html_sky=html.add_section('Sky Localization') if injection: if sky_injection_cl: html_sky.p('Injection found at confidence interval %f in sky location'%(sky_injection_cl)) else: html_sky.p('Injection not found in posterior bins in sky location!') html_sky.write('<img width="35%" src="skymap.png"/>') if skyres is not None: html_sky_write='<table border="1"><tr><th>Confidence region</th><th>size (sq. deg)</th></tr>' fracs=skyreses.keys() fracs.sort() skysizes=[skyreses[frac] for frac in fracs] for frac,skysize in zip(fracs,skysizes): html_sky_write+=('<tr><td>%f</td><td>%f</td></tr>'%(frac,skysize)) html_sky_write+=('</table>') html_sky.write(html_sky_write) #==================================================================# #2D posteriors #==================================================================# #Loop over parameter pairs in twoDGreedyMenu and bin the sample pairs #using a greedy algorithm . The ranked pixels (toppoints) are used #to plot 2D histograms and evaluate Bayesian confidence intervals. #Make a folder for the 2D kde plots margdir=os.path.join(outdir,'2Dkde') if not os.path.isdir(margdir): os.makedirs(margdir) twobinsdir=os.path.join(outdir,'2Dbins') if not os.path.isdir(twobinsdir): os.makedirs(twobinsdir) #Add a section to the webpage for a table of the confidence interval #results. html_tcig=html.add_section('2D confidence intervals (greedy binning)') #Generate the top part of the table html_tcig_write='<table width="100%" border="1"><tr><th/>' confidence_levels.sort() for cl in confidence_levels: html_tcig_write+='<th>%f</th>'%cl if injection: html_tcig_write+='<th>Injection Confidence Level</th>' html_tcig_write+='<th>Injection Confidence Interval</th>' html_tcig_write+='</tr>' #= Add a section for a table of 2D marginal PDFs (kde) html_tcmp=html.add_section('2D Marginal PDFs') html_tcmp.br() #Table matter html_tcmp_write='<table border="1" width="100%">' row_count=0 for par1_name,par2_name in twoDGreedyMenu: par1_name=par1_name.lower() par2_name=par2_name.lower() print "Binning %s-%s to determine confidence levels ..."%(par1_name,par2_name) try: pos[par1_name.lower()] except KeyError: print "No input chain for %s, skipping binning."%par1_name continue try: pos[par2_name.lower()] except KeyError: print "No input chain for %s, skipping binning."%par2_name continue #Bin sizes try: par1_bin=GreedyRes[par1_name] except KeyError: print "Bin size is not set for %s, skipping %s/%s binning."%(par1_name,par1_name,par2_name) continue try: par2_bin=GreedyRes[par2_name] except KeyError: print "Bin size is not set for %s, skipping %s/%s binning."%(par2_name,par1_name,par2_name) continue #Form greedy binning input structure greedy2Params={par1_name:par1_bin,par2_name:par2_bin} #Greedy bin the posterior samples toppoints,injection_cl,reses,injection_area=\ bppu.greedy_bin_two_param(pos,greedy2Params,confidence_levels) print "BCI %s-%s:"%(par1_name,par2_name) print reses #Generate new BCI html table row BCItableline='<tr><td>%s-%s</td>'%(par1_name,par2_name) cls=reses.keys() cls.sort() for cl in cls: BCItableline+='<td>%f</td>'%reses[cl] if injection is not None and injection_cl is not None: BCItableline+='<td>%f</td>'%injection_cl BCItableline+='<td>%f</td>'%injection_area BCItableline+='</tr>' #Append new table line to section html html_tcig_write+=BCItableline #= Plot 2D histograms of greedily binned points =# #greedy2PlotFig=bppu.plot_two_param_greedy_bins(np.array(toppoints),pos,greedy2Params) #greedy2PlotFig.savefig(os.path.join(twobinsdir,'%s-%s_greedy2.png'%(par1_name,par2_name))) #= Generate 2D kde plots =# print 'Generating %s-%s plot'%(par1_name,par2_name) par1_pos=pos[par1_name].samples par2_pos=pos[par2_name].samples if (size(np.unique(par1_pos))<2 or size(np.unique(par2_pos))<2): continue plot2DkdeParams={par1_name:50,par2_name:50} myfig=bppu.plot_two_param_kde(pos,plot2DkdeParams) twoDKdePath=os.path.join(margdir,par1_name+'-'+par2_name+'_2Dkernel.png') if row_count==0: html_tcmp_write+='<tr>' html_tcmp_write+='<td width="30%"><img width="100%" src="'+twoDKdePath+'"/></td>' row_count+=1 if row_count==3: html_tcmp_write+='</tr>' row_count=0 myfig.savefig(twoDKdePath) #Finish off the BCI table and write it into the etree html_tcig_write+='</table>' html_tcig.write(html_tcig_write) #Finish off the 2D kde plot table while row_count!=0: html_tcmp_write+='<td/>' row_count+=1 if row_count==3: row_count=0 html_tcmp_write+='</tr>' html_tcmp_write+='</table>' html_tcmp.write(html_tcmp_write) #Add a link to all plots html_tcmp.br() html_tcmp.a("2D/",'All 2D Marginal PDFs') html_tcmp.hr() #==================================================================# #1D posteriors #==================================================================# #Loop over each parameter and determine the contigious and greedy #confidence levels and some statistics. #Add section for 1D confidence intervals html_ogci=html.add_section('1D confidence intervals (greedy binning)') #Generate the top part of the table html_ogci_write='<table width="100%" border="1"><tr><th/>' confidence_levels.sort() for cl in confidence_levels: html_ogci_write+='<th>%f</th>'%cl if injection: html_ogci_write+='<th>Injection Confidence Level</th>' html_ogci_write+='<th>Injection Confidence Interval</th>' html_ogci_write+='</tr>' #Add section for 1D marginal PDFs and sample plots html_ompdf=html.add_section('1D marginal posterior PDFs') html_ompdf.br() #Table matter html_ompdf_write= '<table><tr><th>Histogram and Kernel Density Estimate</th><th>Samples used</th></tr>' onepdfdir=os.path.join(outdir,'1Dpdf') if not os.path.isdir(onepdfdir): os.makedirs(onepdfdir) sampsdir=os.path.join(outdir,'1Dsamps') if not os.path.isdir(sampsdir): os.makedirs(sampsdir) for par_name in oneDMenu: par_name=par_name.lower() print "Binning %s to determine confidence levels ..."%par_name try: pos[par_name.lower()] except KeyError: print "No input chain for %s, skipping binning."%par_name continue try: par_bin=GreedyRes[par_name] except KeyError: print "Bin size is not set for %s, skipping binning."%par_name continue binParams={par_name:par_bin} toppoints,injectionconfidence,reses,injection_area=bppu.greedy_bin_one_param(pos,binParams,confidence_levels) oneDContCL,oneDContInj = bppu.contigious_interval_one_param(pos,binParams,confidence_levels) #Generate new BCI html table row BCItableline='<tr><td>%s</td>'%(par_name) cls=reses.keys() cls.sort() for cl in cls: BCItableline+='<td>%f</td>'%reses[cl] if injection is not None and injectionconfidence is not None and injection_area is not None: BCItableline+='<td>%f</td>'%injectionconfidence BCItableline+='<td>%f</td>'%injection_area BCItableline+='</tr>' #Append new table line to section html html_ogci_write+=BCItableline #Generate 1D histogram/kde plots print "Generating 1D plot for %s."%par_name oneDPDFParams={par_name:50} rbins,plotFig=bppu.plot_one_param_pdf(pos,oneDPDFParams) figname=par_name+'.png' oneDplotPath=os.path.join(onepdfdir,figname) plotFig.savefig(oneDplotPath) if rbins: print "r of injected value of %s (bins) = %f"%(par_name, rbins) ##Produce plot of raw samples myfig=plt.figure(figsize=(4,3.5),dpi=80) pos_samps=pos[par_name].samples plt.plot(pos_samps,'.',figure=myfig) injpar=pos[par_name].injval if injpar: if min(pos_samps)<injpar and max(pos_samps)>injpar: plt.plot([0,len(pos_samps)],[injpar,injpar],'r-.') myfig.savefig(os.path.join(sampsdir,figname.replace('.png','_samps.png'))) html_ompdf_write+='<tr><td><img src="1Dpdf/'+figname+'"/></td><td><img src="1Dsamps/'+figname.replace('.png','_samps.png')+'"/></td></tr>' html_ompdf_write+='</table>' html_ompdf.write(html_ompdf_write) html_ogci_write+='</table>' html_ogci.write(html_ogci_write) html_ogci.hr() html_ogci.br() html_ompdf.hr() html_ompdf.br() html_footer=html.add_section('') html_footer.p('Produced using cbcBayesPostProc.py at '+strftime("%Y-%m-%d %H:%M:%S")+' .') html_footer.p(git_version.verbose_msg) #Save results page resultspage=open(os.path.join(outdir,'posplots.html'),'w') resultspage.write(str(html)) # Save posterior samples too... posfilename=os.path.join(outdir,'posterior_samples.dat') posfile=open(posfilename,'w') input_file=open(data[0]) posfile.write(input_file.read()) # posfilename2=os.path.join(outdir,'posterior_samples2.dat') pos.write_to_file(posfilename2) #Close files input_file.close() posfile.close() resultspage.close()
25081af9755dc3b90ae7c9418d3526e51860c233 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/25081af9755dc3b90ae7c9418d3526e51860c233/cbcBayesPostProc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 71, 38, 528, 281, 3349, 15417, 12, 659, 1214, 16, 892, 16, 476, 40, 4599, 16, 15415, 40, 43, 15656, 93, 4599, 16, 43, 15656, 93, 607, 16, 27911, 67, 12095, 16, 15415, 40, 13214...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 71, 38, 528, 281, 3349, 15417, 12, 659, 1214, 16, 892, 16, 476, 40, 4599, 16, 15415, 40, 43, 15656, 93, 4599, 16, 43, 15656, 93, 607, 16, 27911, 67, 12095, 16, 15415, 40, 13214...
MelBase('POBA', 'marker'),
MelBase('POBA', 'marker', ''),
def mapFids(self,record,function,save=False): """Applies function to fids. If save is true, then fid is set to result of function.""" if self.subType == 'PLDT' and record.locType != 5: result = function(record.locId) if save: record.locId = result elif self.subType == 'PLD2' and record.locType2 != 5: result = function(record.locId2) if save: record.locId2 = result elif self.subType == 'PTDT' and record.targetType != 2: result = function(record.targetId) if save: record.targetId = result elif self.subType == 'PTD2' and record.targetType2 != 2: result = function(record.targetId2) if save: record.targetId2 = result
3cb29fe41b42e40986b283421ccc6eb3772146d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3cb29fe41b42e40986b283421ccc6eb3772146d6/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 42, 2232, 12, 2890, 16, 3366, 16, 915, 16, 5688, 33, 8381, 4672, 3536, 13029, 445, 358, 284, 2232, 18, 971, 1923, 353, 638, 16, 1508, 13444, 353, 444, 358, 563, 434, 445, 12123, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 42, 2232, 12, 2890, 16, 3366, 16, 915, 16, 5688, 33, 8381, 4672, 3536, 13029, 445, 358, 284, 2232, 18, 971, 1923, 353, 638, 16, 1508, 13444, 353, 444, 358, 563, 434, 445, 12123, ...
return self.CALL_FUNCTION(argc)+1
return self.CALL_FUNCTION(argc)-1
def CALL_FUNCTION_VAR(self, argc): return self.CALL_FUNCTION(argc)+1
ff22a17528570ea77a7832f497e0214ff24c7d85 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9633/ff22a17528570ea77a7832f497e0214ff24c7d85/pyassem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22753, 67, 7788, 67, 7716, 12, 2890, 16, 1501, 71, 4672, 327, 365, 18, 13730, 67, 7788, 12, 3175, 71, 27921, 21, 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, 22753, 67, 7788, 67, 7716, 12, 2890, 16, 1501, 71, 4672, 327, 365, 18, 13730, 67, 7788, 12, 3175, 71, 27921, 21, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if _n == n and _D == D and _prec <= prec:
if _n == n and _D == D and _prec >= prec:
def _get_series_from_cache(self, n, prec, D): try: return self.__series[(n,prec,D)] except AttributeError: self.__series = {} except KeyError: for _n, _prec, _D in self.__series.keys(): if _n == n and _D == D and _prec <= prec: return self.__series[(_n,_prec,_D)].add_bigoh(prec) return None
8c00511699daf5bd778962710cac3e4846fd617e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/8c00511699daf5bd778962710cac3e4846fd617e/padic_lseries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10222, 67, 2080, 67, 2493, 12, 2890, 16, 290, 16, 13382, 16, 463, 4672, 775, 30, 327, 365, 16186, 10222, 63, 12, 82, 16, 4036, 16, 40, 25887, 1335, 6394, 30, 365, 16186...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 10222, 67, 2080, 67, 2493, 12, 2890, 16, 290, 16, 13382, 16, 463, 4672, 775, 30, 327, 365, 16186, 10222, 63, 12, 82, 16, 4036, 16, 40, 25887, 1335, 6394, 30, 365, 16186...
Return False if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return StringCuspSnglCompare(sim, burst) or (sim.frequency not in burst.get_band())
Return False (injection matches event) if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return (SimBurstUtils.time_at_instrument(sim, burst.ifo) not in burst.get_period()) or (sim.frequency not in burst.get_band())
def ExcessPowerSnglCompare(sim, burst): """ Return False if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return StringCuspSnglCompare(sim, burst) or (sim.frequency not in burst.get_band())
1126ecd32ca491514cbed02a89dd809841dce610 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/1126ecd32ca491514cbed02a89dd809841dce610/ligolw_binjfind.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1312, 614, 13788, 55, 3368, 80, 8583, 12, 9812, 16, 27966, 4672, 3536, 2000, 1083, 261, 31969, 1885, 871, 13, 309, 326, 11148, 813, 471, 8301, 266, 8670, 434, 3142, 328, 1385, 3470, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1312, 614, 13788, 55, 3368, 80, 8583, 12, 9812, 16, 27966, 4672, 3536, 2000, 1083, 261, 31969, 1885, 871, 13, 309, 326, 11148, 813, 471, 8301, 266, 8670, 434, 3142, 328, 1385, 3470, 326,...
>>> writer.persistent_id(bob)
>>> writer.persistent_id(bob) ...
... def db(self):
1a888ac390dbb0980c84d3c548017ebe2f960715 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10048/1a888ac390dbb0980c84d3c548017ebe2f960715/serialize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1319, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1319, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
graph.FillComplete()
if complete: graph.FillComplete() def fillGraphLocal(self,graph,complete=True): n = self.size o = 0 if self.myPID > 0: o = 1 for lrid in range(graph.NumMyRows()): grid = graph.GRID(lrid) if grid == 0 : indices = [0,1] elif grid == n-1: indices = [lrid+o-1,lrid+o] else : indices = [lrid+o-1,lrid+o,lrid+o+1] graph.InsertMyIndices(lrid,indices) if complete: graph.FillComplete()
def fillGraph(self,graph): n = self.size for lrid in range(graph.NumMyRows()): grid = graph.GRID(lrid) if grid == 0 : indices = [0,1] elif grid == n-1: indices = [n-2,n-1] else : indices = [grid-1,grid,grid+1] graph.InsertGlobalIndices(grid,indices) graph.FillComplete()
7928fa16e7b9d8eee42608c0e751e7d6f795dbf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1130/7928fa16e7b9d8eee42608c0e751e7d6f795dbf8/testCrsGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 4137, 12, 2890, 16, 4660, 4672, 290, 273, 365, 18, 1467, 364, 328, 1691, 316, 1048, 12, 4660, 18, 2578, 12062, 4300, 1435, 4672, 3068, 273, 2667, 18, 6997, 734, 12, 80, 1691, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 4137, 12, 2890, 16, 4660, 4672, 290, 273, 365, 18, 1467, 364, 328, 1691, 316, 1048, 12, 4660, 18, 2578, 12062, 4300, 1435, 4672, 3068, 273, 2667, 18, 6997, 734, 12, 80, 1691, 13,...
cmd = [hg, 'pull', '-R', fulldir, '-r', 'tip' ] + hgopts
cmd = [hg, 'pull', '-R', fulldir] + hgopts
def do_hg_pull(dir, repository, hg, rev): fulldir = os.path.join(topsrcdir, dir) # clone if the dir doesn't exist, pull if it does hgopts = [] if options.hgopts: hgopts = options.hgopts.split() if not os.path.exists(fulldir): fulldir = os.path.join(topsrcdir, dir) check_call_noisy([hg, 'clone'] + hgopts + [repository, fulldir]) else: cmd = [hg, 'pull', '-R', fulldir, '-r', 'tip' ] + hgopts if repository is not None: cmd.append(repository) check_call_noisy(cmd) # update to specific revision if options.verbose: cmd = [hg, 'update', '-v', '-r', rev, '-R', fulldir ] + hgopts else: cmd = [hg, 'update', '-r', rev, '-R', fulldir ] + hgopts check_call_noisy(cmd) check_call([hg, 'parent', '-R', fulldir, '--template=Updated to revision {node}.\n'])
dc5e4f26e206f846d2bd4d78ea83372dc617febb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/dc5e4f26e206f846d2bd4d78ea83372dc617febb/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 26981, 67, 13469, 12, 1214, 16, 3352, 16, 22576, 16, 5588, 4672, 1983, 1214, 273, 1140, 18, 803, 18, 5701, 12, 3669, 4816, 1214, 16, 1577, 13, 468, 3236, 309, 326, 1577, 3302,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26981, 67, 13469, 12, 1214, 16, 3352, 16, 22576, 16, 5588, 4672, 1983, 1214, 273, 1140, 18, 803, 18, 5701, 12, 3669, 4816, 1214, 16, 1577, 13, 468, 3236, 309, 326, 1577, 3302,...
Set the verbosity of printing of output by the 2-descent and
Set the verbosity of printing of output by the :meth:`two_descent()` and
def set_verbose(self, verbose): """ Set the verbosity of printing of output by the 2-descent and other functions.
8b53e056cc765e689493ec9632c441ee03a3206a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/8b53e056cc765e689493ec9632c441ee03a3206a/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 11369, 12, 2890, 16, 3988, 4672, 3536, 1000, 326, 11561, 434, 19171, 434, 876, 635, 326, 294, 27305, 28288, 15415, 67, 5569, 319, 20338, 471, 1308, 4186, 18, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 11369, 12, 2890, 16, 3988, 4672, 3536, 1000, 326, 11561, 434, 19171, 434, 876, 635, 326, 294, 27305, 28288, 15415, 67, 5569, 319, 20338, 471, 1308, 4186, 18, 2, -100, -100, -100...
def registerDoc(self, source_path, to_cache, suffix=None):
def registerDoc(self, source_path, to_cache):
def registerDoc(self, source_path, to_cache, suffix=None): """Store to_cache in bucket. """ md5_digest = self.getHash(source_path) bucket = self.getBucketFromHash(md5_digest) bucket_marker = bucket.storeResult(source_path, to_cache, suffix) return self._getMarker(md5_digest, bucket_marker, suffix)
f13ff57422757e5cfff1d526db0f597bd0f8efe7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9481/f13ff57422757e5cfff1d526db0f597bd0f8efe7/cachemanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 1759, 12, 2890, 16, 1084, 67, 803, 16, 358, 67, 2493, 4672, 3536, 2257, 358, 67, 2493, 316, 2783, 18, 3536, 3481, 25, 67, 10171, 273, 365, 18, 588, 2310, 12, 3168, 67, 803, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 1759, 12, 2890, 16, 1084, 67, 803, 16, 358, 67, 2493, 4672, 3536, 2257, 358, 67, 2493, 316, 2783, 18, 3536, 3481, 25, 67, 10171, 273, 365, 18, 588, 2310, 12, 3168, 67, 803, 13,...
targets.append((target, (realtarget, conf.get_msvc_version('msvc', version, target, os.path.join(path, 'VC', 'vcvarsall.bat')))))
targets.append((target, (realtarget, conf.get_msvc_version('msvc', version+vcvar, target, os.path.join(path, 'VC', 'vcvarsall.bat')))))
def gather_msvc_versions(conf, versions): # checks SmartPhones SDKs try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Windows CE Tools\\SDKs') except WindowsError: try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows CE Tools\\SDKs') except WindowsError: ce_sdk = '' if ce_sdk: supported_wince_platforms = [] ce_index = 0 while 1: try: sdk_device = _winreg.EnumKey(ce_sdk, ce_index) except WindowsError: break ce_index = ce_index + 1 sdk = _winreg.OpenKey(ce_sdk, sdk_device) path,type = _winreg.QueryValueEx(sdk, 'SDKRootDir') path=str(path) path,device = os.path.split(path) if not device: path,device = os.path.split(path) for arch,compiler in all_wince_platforms: platforms = [] if os.path.isdir(os.path.join(path, device, 'Lib', arch)): platforms.append((arch, compiler, os.path.join(path, device, 'Include'), os.path.join(path, device, 'Lib', arch))) if platforms: supported_wince_platforms.append((device, platforms)) # checks MSVC version_pattern = re.compile('^..?\...?') for vcver,vcvar in [('VCExpress','exp'), ('VisualStudio','')]: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\'+vcver) except WindowsError: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\'+vcver) except WindowsError: continue index = 0 while 1: try: version = _winreg.EnumKey(all_versions, index) except WindowsError: break index = index + 1 if not version_pattern.match(version): continue try: msvc_version = _winreg.OpenKey(all_versions, version + "\\Setup\\VS") path,type = _winreg.QueryValueEx(msvc_version, 'ProductDir') path=str(path) targets = [] if os.path.isfile(os.path.join(path, 'VC', 'vcvarsall.bat')): for target,realtarget in all_msvc_platforms[::-1]: try: targets.append((target, (realtarget, conf.get_msvc_version('msvc', version, target, os.path.join(path, 'VC', 'vcvarsall.bat'))))) except: pass elif os.path.isfile(os.path.join(path, 'Common7', 'Tools', 'vsvars32.bat')): try: targets.append(('x86', ('x86', conf.get_msvc_version('msvc', version, 'x86', os.path.join(path, 'Common7', 'Tools', 'vsvars32.bat'))))) except Configure.ConfigurationError: pass versions.append(('msvc '+version, targets)) if ce_sdk: for device,platforms in supported_wince_platforms: cetargets = [] for platform,compiler,include,lib in platforms: winCEpath = os.path.join(path, 'VC', 'ce') if os.path.isdir(winCEpath): common_bindirs,_1,_2 = conf.get_msvc_version('msvc', version, 'x86', os.path.join(path, 'Common7', 'Tools', 'vsvars32.bat')) if os.path.isdir(os.path.join(winCEpath, 'lib', platform)): bindirs = [os.path.join(winCEpath, 'bin', compiler), os.path.join(winCEpath, 'bin', 'x86_'+compiler)] + common_bindirs incdirs = [include, os.path.join(winCEpath, 'include'), os.path.join(winCEpath, 'atlmfc', 'include')] libdirs = [lib, os.path.join(winCEpath, 'lib', platform), os.path.join(winCEpath, 'atlmfc', 'lib', platform)] cetargets.append((platform, (platform, (bindirs,incdirs,libdirs)))) versions.append((device+' '+version, cetargets)) except WindowsError: continue
05495af483649bfc6f90e3fef7d4b6f6cdb27e4d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7302/05495af483649bfc6f90e3fef7d4b6f6cdb27e4d/msvc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11090, 67, 959, 4227, 67, 10169, 12, 3923, 16, 5244, 4672, 468, 4271, 19656, 3731, 5322, 3881, 87, 775, 30, 5898, 67, 20907, 273, 389, 8082, 1574, 18, 3678, 653, 24899, 8082, 1574, 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, 11090, 67, 959, 4227, 67, 10169, 12, 3923, 16, 5244, 4672, 468, 4271, 19656, 3731, 5322, 3881, 87, 775, 30, 5898, 67, 20907, 273, 389, 8082, 1574, 18, 3678, 653, 24899, 8082, 1574, 18, ...
metadata_table = tree.cssselect('table.NoBorder [cellspacing="0"]')[0]
metadata_table = tree.cssselect('table.NoBorder[cellspacing="0"]')[0]
def view_bug_table2dict(tree): # Find the big table that contains the bug data metadata_table = tree.cssselect('table.NoBorder [cellspacing="0"]')[0] ret = {} # Extract it out thrillingly for row in metadata_table.cssselect('tr'): key_elt, value_elt = row.cssselect('td') key = key_elt.text_content().strip() value = value_elt.text_content().strip() ret[key] = value return ret
c00260ac81868e7adc045a6e04e7f008854fc661 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11976/c00260ac81868e7adc045a6e04e7f008854fc661/opensolaris.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 925, 67, 2121, 22, 1576, 12, 3413, 4672, 468, 4163, 326, 5446, 1014, 716, 1914, 326, 7934, 501, 1982, 67, 2121, 273, 2151, 18, 5212, 4025, 2668, 2121, 18, 2279, 8107, 63, 385...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 925, 67, 2121, 22, 1576, 12, 3413, 4672, 468, 4163, 326, 5446, 1014, 716, 1914, 326, 7934, 501, 1982, 67, 2121, 273, 2151, 18, 5212, 4025, 2668, 2121, 18, 2279, 8107, 63, 385...
def getCellHeight(self): if self.SquareCells: return self.CellWidth else: return self.CellHeight
def getItemFromPos(self, i): if (len(self.distanceMap.elementIndices)==0): j = i else: j = self.distanceMap.elementIndices[i]
9dec2648a439fbcedb4a6e19f89488c157b33964 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9dec2648a439fbcedb4a6e19f89488c157b33964/OWDistanceMap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8143, 1265, 1616, 12, 2890, 16, 277, 4672, 309, 261, 1897, 12, 2890, 18, 8969, 863, 18, 2956, 8776, 13, 631, 20, 4672, 525, 273, 277, 469, 30, 525, 273, 365, 18, 8969, 863, 18, 2956,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8143, 1265, 1616, 12, 2890, 16, 277, 4672, 309, 261, 1897, 12, 2890, 18, 8969, 863, 18, 2956, 8776, 13, 631, 20, 4672, 525, 273, 277, 469, 30, 525, 273, 365, 18, 8969, 863, 18, 2956,...
sysvals = SystemValues() data = Data()
class TestRun: ftrace_line_fmt_fg = \ '^ *(?P<time>[0-9\.]*) *\| *(?P<cpu>[0-9]*)\)'+\ ' *(?P<proc>.*)-(?P<pid>[0-9]*) *\|'+\ '[ +!]*(?P<dur>[0-9\.]*) .*\| (?P<msg>.*)' ftrace_line_fmt_nop = \ ' *(?P<proc>.*)-(?P<pid>[0-9]*) *\[(?P<cpu>[0-9]*)\] *'+\ '(?P<flags>.{4}) *(?P<time>[0-9\.]*): *'+\ '(?P<msg>.*)' ftrace_line_fmt = ftrace_line_fmt_nop cgformat = False ftemp = dict() ttemp = dict() inthepipe = False tracertype = '' data = 0 def __init__(self, dataobj): self.data = dataobj self.ftemp = dict() self.ttemp = dict() def isReady(self): if(tracertype == '' or not data): return False return True def setTracerType(self, tracer): self.tracertype = tracer if(tracer == 'function_graph'): self.cgformat = True self.ftrace_line_fmt = self.ftrace_line_fmt_fg elif(tracer == 'nop'): self.ftrace_line_fmt = self.ftrace_line_fmt_nop else: doError('Invalid tracer format: [%s]' % tracer, False) def vprint(msg): global sysvals if(sysvals.verbose): print(msg)
def setRows(self, rows): self.maxrows = int(rows) self.scaleH = 100.0/float(self.maxrows) self.height = self.maxrows*self.row_height_pixels r = float(self.maxrows - 1) if(r < 1.0): r = 1.0 self.rowH = (100.0 - self.scaleH)/r
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, 444, 4300, 12, 2890, 16, 2595, 4672, 365, 18, 1896, 3870, 273, 509, 12, 3870, 13, 365, 18, 5864, 44, 273, 2130, 18, 20, 19, 5659, 12, 2890, 18, 1896, 3870, 13, 365, 18, 4210, 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, 444, 4300, 12, 2890, 16, 2595, 4672, 365, 18, 1896, 3870, 273, 509, 12, 3870, 13, 365, 18, 5864, 44, 273, 2130, 18, 20, 19, 5659, 12, 2890, 18, 1896, 3870, 13, 365, 18, 4210, 273, ...
decorated = [ (self.get_bare_user_info(jid, "presence_weight"), jid.domain == my_domain, jid) for jid in jids ]
def get_weight(jid): weight = self.get_user_info(jid, "weight") if weight: return weight return -sys.maxint decorated = [ (get_weight(jid), jid.domain == my_domain, jid) for jid in jids ]
def get_best_user(self,name): jids=self.get_users(name) if not jids: return None if len(jids)==1: return jids[0] my_jid = self.settings.get("jid").domain if my_jid: my_domain = pyxmpp.JID(my_jid).domain else: my_domain = None decorated = [ (self.get_bare_user_info(jid, "presence_weight"), jid.domain == my_domain, jid) for jid in jids ] decorated.sort() return decorated[-1][2]
1bcc70b587cab230c751e081a32b82ab2bf5ac65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/1bcc70b587cab230c751e081a32b82ab2bf5ac65/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12729, 67, 1355, 12, 2890, 16, 529, 4672, 525, 2232, 33, 2890, 18, 588, 67, 5577, 12, 529, 13, 309, 486, 525, 2232, 30, 327, 599, 309, 562, 12, 78, 2232, 13, 631, 21, 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, 336, 67, 12729, 67, 1355, 12, 2890, 16, 529, 4672, 525, 2232, 33, 2890, 18, 588, 67, 5577, 12, 529, 13, 309, 486, 525, 2232, 30, 327, 599, 309, 562, 12, 78, 2232, 13, 631, 21, 30, ...
if pot_updated: pot_updated.sort() ipkg = pot_updated[-1]
if pot_updated and self.allowedMultipleInstalls(available_pkg): pot_updated = sorted(pot_updated)[-1:] for ipkg in pot_updated:
def update(self, po=None, requiringPo=None, **kwargs): """try to mark for update the item(s) specified. po is a package object - if that is there, mark it for update, if possible else use **kwargs to match the package needing update if nothing is specified at all then attempt to update everything returns the list of txmbr of the items it marked for update""" # check for args - if no po nor kwargs, do them all # if po, do it, ignore all else # if no po do kwargs # uninstalled pkgs called for update get returned with errors in a list, maybe?
5dfaee0c5f86e427be0244ea231fab1595c98363 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/5dfaee0c5f86e427be0244ea231fab1595c98363/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 8275, 33, 7036, 16, 29468, 29198, 33, 7036, 16, 2826, 4333, 4672, 3536, 698, 358, 2267, 364, 1089, 326, 761, 12, 87, 13, 1269, 18, 8275, 353, 279, 2181, 733, 300, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 16, 8275, 33, 7036, 16, 29468, 29198, 33, 7036, 16, 2826, 4333, 4672, 3536, 698, 358, 2267, 364, 1089, 326, 761, 12, 87, 13, 1269, 18, 8275, 353, 279, 2181, 733, 300, ...
'timezone': time.timezone()[0],
'timezone': time.tzname[0],
def confirm(self, event): if not event.addressed: return
23ec0b0ecfe9c94aef197011e1b86d45ea2bde74 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/23ec0b0ecfe9c94aef197011e1b86d45ea2bde74/games.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 12, 2890, 16, 871, 4672, 309, 486, 871, 18, 1289, 4638, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 12, 2890, 16, 871, 4672, 309, 486, 871, 18, 1289, 4638, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses.
Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses.
def __iter__(self): r""" Returns an iterator for Dyck words with ``k1`` opening and ``k2`` closing parentheses.
7e1334f768dfbfef3881c254af52ae022484f92b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/7e1334f768dfbfef3881c254af52ae022484f92b/dyck_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 436, 8395, 2860, 392, 2775, 364, 463, 93, 363, 4511, 598, 12176, 79, 21, 10335, 10890, 471, 12176, 79, 22, 10335, 7647, 27888, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2165, 972, 12, 2890, 4672, 436, 8395, 2860, 392, 2775, 364, 463, 93, 363, 4511, 598, 12176, 79, 21, 10335, 10890, 471, 12176, 79, 22, 10335, 7647, 27888, 18, 2, -100, -100, -100, ...
prefix = p + util.normpath(prefix)
if prefix: prefix = p + util.normpath(prefix) else: prefix = p
def scache(s): "return a shared version of a string" return _scache.setdefault(s, s)
8c5f727c08ea72c5865297bc10957c3ca2298981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/8c5f727c08ea72c5865297bc10957c3ca2298981/cvsps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 888, 807, 12, 87, 4672, 315, 2463, 279, 5116, 1177, 434, 279, 533, 6, 327, 389, 1017, 807, 18, 542, 1886, 12, 87, 16, 272, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 888, 807, 12, 87, 4672, 315, 2463, 279, 5116, 1177, 434, 279, 533, 6, 327, 389, 1017, 807, 18, 542, 1886, 12, 87, 16, 272, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
widgets["fics_logon"].hide() icLounge.show()
glock.acquire() try: widgets["fics_logon"].hide() icLounge.show() finally: glock.release()
def callback (client, signal): if signal == IC_CONNECTED: widgets["fics_logon"].hide() icLounge.show()
67feed3d284bdd45913816fbdc32193d3211c4d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5339/67feed3d284bdd45913816fbdc32193d3211c4d3/icLogOn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 261, 2625, 16, 4277, 4672, 309, 4277, 422, 26899, 67, 29011, 30, 10965, 9614, 74, 2102, 67, 1330, 265, 6, 8009, 11248, 1435, 13579, 48, 465, 908, 18, 4500, 1435, 2, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1348, 261, 2625, 16, 4277, 4672, 309, 4277, 422, 26899, 67, 29011, 30, 10965, 9614, 74, 2102, 67, 1330, 265, 6, 8009, 11248, 1435, 13579, 48, 465, 908, 18, 4500, 1435, 2, -100, -100, -...
print ret
def obfuscated_email(self): ret = self.email if self.email: ret = self.email.replace('@', ' at ') print ret return ret
fbb5b9165afdeb762637d8362cf780dd6d648a52 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/fbb5b9165afdeb762637d8362cf780dd6d648a52/expert_item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29004, 690, 67, 3652, 12, 2890, 4672, 325, 273, 365, 18, 3652, 309, 365, 18, 3652, 30, 325, 273, 365, 18, 3652, 18, 2079, 2668, 36, 2187, 296, 622, 8624, 327, 325, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29004, 690, 67, 3652, 12, 2890, 4672, 325, 273, 365, 18, 3652, 309, 365, 18, 3652, 30, 325, 273, 365, 18, 3652, 18, 2079, 2668, 36, 2187, 296, 622, 8624, 327, 325, 2, -100, -100, -10...
@bigmemtest(minsize=_2G // 5 + 10, memuse=8*5)
@bigmemtest(minsize=_2G // 5 + 10, memuse=8 * 5)
def test_inplace_concat_large(self, size): return self.basic_test_inplace_concat(size)
2b6fe565c924c2484fedcdb9e497475584b0716e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2b6fe565c924c2484fedcdb9e497475584b0716e/test_bigmem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 267, 964, 67, 16426, 67, 14095, 12, 2890, 16, 963, 4672, 327, 365, 18, 13240, 67, 3813, 67, 267, 964, 67, 16426, 12, 1467, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 267, 964, 67, 16426, 67, 14095, 12, 2890, 16, 963, 4672, 327, 365, 18, 13240, 67, 3813, 67, 267, 964, 67, 16426, 12, 1467, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
return []
self._list = [] return self._list
def _comp_list(self): if self.degree() == -1 and self._valbase == infinity: return [] polylist = self._poly.list() polylen = len(polylist) self._list = [self.base_ring()(polylist[i], absprec = self._relprecs[i]) << self._valbase for i in range(polylen)] \ + [self.base_ring()(0, absprec = self._relprecs[i] + self._valbase) for i in range(polylen, len(self._relprecs))]
8fc4322b45563183cd4769595ba491dc2bef7643 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/8fc4322b45563183cd4769595ba491dc2bef7643/polynomial_padic_capped_relative_dense.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2919, 67, 1098, 12, 2890, 4672, 309, 365, 18, 21361, 1435, 422, 300, 21, 471, 365, 6315, 1125, 1969, 422, 27272, 30, 365, 6315, 1098, 273, 5378, 327, 365, 6315, 1098, 7573, 1098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2919, 67, 1098, 12, 2890, 4672, 309, 365, 18, 21361, 1435, 422, 300, 21, 471, 365, 6315, 1125, 1969, 422, 27272, 30, 365, 6315, 1098, 273, 5378, 327, 365, 6315, 1098, 7573, 1098, ...
if inspect.isroutine(object): returnself.docroutine(*args)
if inspect.isroutine(object): return self.docroutine(*args)
def document(self, object, name=None, *args): """Generate documentation for an object.""" args = (object, name) + args if inspect.ismodule(object): return self.docmodule(*args) if inspect.isclass(object): return self.docclass(*args) if inspect.isroutine(object): returnself.docroutine(*args) return self.docother(*args)
9cb21503b1a42cf097a62ee0882b2338e91c7b36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9cb21503b1a42cf097a62ee0882b2338e91c7b36/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 380, 1968, 4672, 3536, 4625, 7323, 364, 392, 733, 12123, 833, 273, 261, 1612, 16, 508, 13, 397, 833, 309, 5334, 18, 291, 2978, 12, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 380, 1968, 4672, 3536, 4625, 7323, 364, 392, 733, 12123, 833, 273, 261, 1612, 16, 508, 13, 397, 833, 309, 5334, 18, 291, 2978, 12, 161...
proxy = os.environ.get('http_proxy') if url.protocol == 'http' and proxy: return url.to_string() else: return url.get_request_uri()
return url.to_string()
def _get_access_url(self, url): proxy = os.environ.get('http_proxy') if url.protocol == 'http' and proxy: return url.to_string() else: return url.get_request_uri()
a3458cba5623d5de68669fd4a72299abccc48cc5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5609/a3458cba5623d5de68669fd4a72299abccc48cc5/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3860, 67, 718, 12, 2890, 16, 880, 4672, 2889, 273, 1140, 18, 28684, 18, 588, 2668, 2505, 67, 5656, 6134, 309, 880, 18, 8373, 422, 296, 2505, 11, 471, 2889, 30, 327, 880...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3860, 67, 718, 12, 2890, 16, 880, 4672, 2889, 273, 1140, 18, 28684, 18, 588, 2668, 2505, 67, 5656, 6134, 309, 880, 18, 8373, 422, 296, 2505, 11, 471, 2889, 30, 327, 880...
self.obj = self.obj[1:]
def open(self): """ Opens a connection to OpenObject Database. """ import xmlrpclib from etl import etl_socket connector = False super(openobject_connector, self).open() if self.con_type == 'xmlrpc': connector = xmlrpclib.ServerProxy(self.uri + self.obj) elif self.con_type == 'socket': connector = etl_socket.etl_socket() self.obj = self.obj[1:] else: raise Exception('Not Supported') self.uid = self.login(self.user_login, self.passwd) return connector
3f526c844d56142c653f66febe7279727fce9bb0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/3f526c844d56142c653f66febe7279727fce9bb0/openobject_connector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 4672, 3536, 6066, 773, 279, 1459, 358, 3502, 921, 5130, 18, 3536, 1930, 2025, 13832, 830, 495, 628, 3393, 80, 1930, 3393, 80, 67, 7814, 8703, 273, 1083, 2240, 12, 3190, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 4672, 3536, 6066, 773, 279, 1459, 358, 3502, 921, 5130, 18, 3536, 1930, 2025, 13832, 830, 495, 628, 3393, 80, 1930, 3393, 80, 67, 7814, 8703, 273, 1083, 2240, 12, 3190, ...
filename = self.filename if filename: internalname = canv._doc.hasForm(filename) if not internalname: canv.beginForm(filename) canv.saveState() x, y = self.x, self.y w, h = self.width, self.height canv.drawInlineImage(filename, x, y, w, h) canv.restoreState() canv.endForm() canv.doForm(filename) else: canv.doForm(filename)
if self.filename: x, y = self.x, self.y w, h = self.width, self.height canv.drawInlineImage(self.filename, x, y, w, h)
def drawOn(self, canv): filename = self.filename if filename: internalname = canv._doc.hasForm(filename) if not internalname: canv.beginForm(filename) canv.saveState() x, y = self.x, self.y w, h = self.width, self.height canv.drawInlineImage(filename, x, y, w, h) canv.restoreState() canv.endForm() canv.doForm(filename) else: canv.doForm(filename)
c23c3ba4f6106b1783082b8b71e1ddbf16a6ddf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/c23c3ba4f6106b1783082b8b71e1ddbf16a6ddf3/pythonpoint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1398, 12, 2890, 16, 848, 90, 4672, 1544, 273, 365, 18, 3459, 309, 1544, 30, 2713, 529, 273, 848, 90, 6315, 2434, 18, 5332, 1204, 12, 3459, 13, 309, 486, 2713, 529, 30, 848, 90,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1398, 12, 2890, 16, 848, 90, 4672, 1544, 273, 365, 18, 3459, 309, 1544, 30, 2713, 529, 273, 848, 90, 6315, 2434, 18, 5332, 1204, 12, 3459, 13, 309, 486, 2713, 529, 30, 848, 90,...
if 'general' in siteinfo and siteinfo['general'].get('server').endswith(".wikipedia.org") and 'interwikimap' in siteinfo:
if 'general' in siteinfo and siteinfo['general'].get('server', '').endswith(".wikipedia.org") and 'interwikimap' in siteinfo:
def __init__(self, siteinfo): assert siteinfo is not None
30abcf25f5cb36666693f606019941057ecbf2f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12391/30abcf25f5cb36666693f606019941057ecbf2f8/nshandling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2834, 1376, 4672, 1815, 2834, 1376, 353, 486, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2834, 1376, 4672, 1815, 2834, 1376, 353, 486, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
r = self.pool.get(r._table_name).name_get(cr, uid, [r.id])
r = self.pool.get(r._table_name).name_get(cr, uid, [r.id], context=context)
def selection_field(in_field): col_obj = self.pool.get(in_field.keys()[0]) if f[i] in col_obj._columns.keys(): return col_obj._columns[f[i]] elif f[i] in col_obj._inherits.keys(): selection_field(col_obj._inherits) else: return False
41382b99106bb7be58c4133724ea1e6d5936e6d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/41382b99106bb7be58c4133724ea1e6d5936e6d7/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4421, 67, 1518, 12, 267, 67, 1518, 4672, 645, 67, 2603, 273, 365, 18, 6011, 18, 588, 12, 267, 67, 1518, 18, 2452, 1435, 63, 20, 5717, 309, 284, 63, 77, 65, 316, 645, 67, 2603, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4421, 67, 1518, 12, 267, 67, 1518, 4672, 645, 67, 2603, 273, 365, 18, 6011, 18, 588, 12, 267, 67, 1518, 18, 2452, 1435, 63, 20, 5717, 309, 284, 63, 77, 65, 316, 645, 67, 2603, 6315...
table.attach(button,2,3,3,4)
table.attach(button, 2, 3, 3, 4)
def validedChanges(*args): """Check for a least one selected kana portion (display of a message if not the case), catch parameters, then close the window.
64cfb9e0b60a3a976c72fa9d5d722987641133b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/64cfb9e0b60a3a976c72fa9d5d722987641133b9/gtk_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1244, 13898, 7173, 30857, 1968, 4672, 3536, 1564, 364, 279, 4520, 1245, 3170, 417, 13848, 14769, 261, 5417, 434, 279, 883, 309, 486, 326, 648, 3631, 1044, 1472, 16, 1508, 1746, 326, 2742, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1244, 13898, 7173, 30857, 1968, 4672, 3536, 1564, 364, 279, 4520, 1245, 3170, 417, 13848, 14769, 261, 5417, 434, 279, 883, 309, 486, 326, 648, 3631, 1044, 1472, 16, 1508, 1746, 326, 2742, ...
0.601907230197235 sage: bessel_K(1,1,500) 0.601907230197234574737540001535617339261586889968106456017767959168553582946237840168863706958258215354644099783140050908469292813493294605655726961996 """
0.60190723019... sage: bessel_K(1,1,"pari",10) 0.60 sage: bessel_K(1,1,"pari",100) 0.60190723019723457473754000154 """ if alg=="scipy": import scipy.special ans = str(scipy.special.kv(float(nu),float(z))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans)
def bessel_K(nu,z,prec=53): r""" Implements the "K-Bessel function", or "modified Bessel function, 2nd kind", with index (or "order") nu and argument z. Defn:
eb789e32fdf1f64e23f2531a18e92c7ff5995df6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/eb789e32fdf1f64e23f2531a18e92c7ff5995df6/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 47, 12, 13053, 16, 94, 16, 4036, 33, 8643, 4672, 436, 8395, 29704, 326, 315, 47, 17, 38, 403, 292, 445, 3113, 578, 315, 7342, 605, 403, 292, 445, 16, 576, 4880, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 403, 292, 67, 47, 12, 13053, 16, 94, 16, 4036, 33, 8643, 4672, 436, 8395, 29704, 326, 315, 47, 17, 38, 403, 292, 445, 3113, 578, 315, 7342, 605, 403, 292, 445, 16, 576, 4880, ...
raise forms.ValidationError(_(u'The username %(username)s is already taken.') % {'username': self.cleaned_data['username']})
raise forms.ValidationError(ugettext(u'The username %(username)s is already taken.') % {'username': self.cleaned_data['username']})
def clean_username(self): if User.objects.filter( username__exact = self.cleaned_data['username'] ).count() != 0: raise forms.ValidationError(_(u'The username %(username)s is already taken.') % {'username': self.cleaned_data['username']}) return self.cleaned_data['username']
4928be0229899927d1ff0f031f89b71d54fb646c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11563/4928be0229899927d1ff0f031f89b71d54fb646c/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5053, 12, 2890, 4672, 309, 2177, 18, 6911, 18, 2188, 12, 2718, 972, 17165, 273, 365, 18, 6200, 329, 67, 892, 3292, 5053, 3546, 262, 18, 1883, 1435, 480, 374, 30, 1002, 10138,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 5053, 12, 2890, 4672, 309, 2177, 18, 6911, 18, 2188, 12, 2718, 972, 17165, 273, 365, 18, 6200, 329, 67, 892, 3292, 5053, 3546, 262, 18, 1883, 1435, 480, 374, 30, 1002, 10138,...
logStatusMsg( u"\tFilename: %s%s\tDirectory: %s%s\tFrom Thread: %s%s" % ( filename, os.linesep, directory, os.linesep, threadName, os.linesep ), 3 )
logStatusMsg( u"\tFilename: %s%s\tDirectory: %s%s\tFrom Thread: %s%s" % ( filename, os.linesep, directory, os.linesep, threadName, os.linesep ),3)
def downloadFile(link=None, threadName=None, rssItemNode=None, downItemConfig=None): u"""tries to download data at URL. returns None if it was not supposed to, False if it failed, and a tuple of arguments for userFunct""" try: data = downloader(link) except (urllib2.HTTPError, urllib2.URLError, httplib.HTTPException), m: logStatusMsg( unicodeC(m) + os.linesep + u'error grabbing url: %s' % link, 1 ) return False dataInfo = data.info() dataUrl = data.geturl() # could try to grab filename from ppage item title attribute, but this seems safer for file extension assurance # could use url from attempted grab, but it won't be properly encoded. when python network stuff works properly with unicode # use dataUrl here? filename = getFilenameFromHTTP(dataInfo, link) if not filename: return False size, data2 = getFileSize(dataInfo, data) # check size against configuration options if size and not checkFileSize(size, threadName, downItemConfig): # size is outside range, don't need the data, but want to report that we succeeded in getting data del data, data2, dataInfo, dataUrl return None if downItemConfig['Dir']: directory = downItemConfig['Dir'] elif getConfig()['threads'][threadName]['directory']: directory = getConfig()['threads'][threadName]['directory'] else: directory = getConfig()['global']['downloadDir'] try: filename = writeNewFile( filename, directory, data2 ) except IOError: logStatusMsg( u"write to disk failed", 1 ) return False logStatusMsg( u"\tFilename: %s%s\tDirectory: %s%s\tFrom Thread: %s%s" % ( filename, os.linesep, directory, os.linesep, threadName, os.linesep ), 3 ) if rss: logStatusMsg( u"generating rss item", 5) if 'description' in rssItemNode: description = rssItemNode['description'] else: description = None if 'title' in rssItemNode: title = rssItemNode['title'] else: title = None pubdate = time.strftime(u"%a, %d %b %Y %H:%M:%S GMT", time.gmtime()) itemLoad = {'title':title , 'description':description , 'pubDate':pubdate } rss.addItem( itemLoad ) userFunctArgs = directory, filename, rssItemNode, dataUrl, downItemConfig, threadName return userFunctArgs
633e00b171a777d923e4aead2f2717108d53a3b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/633e00b171a777d923e4aead2f2717108d53a3b9/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 812, 12, 1232, 33, 7036, 16, 2650, 461, 33, 7036, 16, 18817, 1180, 907, 33, 7036, 16, 2588, 1180, 809, 33, 7036, 4672, 582, 8395, 2007, 358, 4224, 501, 622, 1976, 18, 1135, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 812, 12, 1232, 33, 7036, 16, 2650, 461, 33, 7036, 16, 18817, 1180, 907, 33, 7036, 16, 2588, 1180, 809, 33, 7036, 4672, 582, 8395, 2007, 358, 4224, 501, 622, 1976, 18, 1135, 599, ...
if flr not in filelinkrevs.get(f, []):
if flr < 0 or (havecl and flr not in filelinkrevs.get(f, [])):
def checkversion(obj, name): if obj.version != revlog.REVLOGV0: if not revlogv1: warn(_("warning: `%s' uses revlog format 1") % name) elif revlogv1: warn(_("warning: `%s' uses revlog format 0") % name)
81ab121d11413401b817b66dfac2aab4c2762a61 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/81ab121d11413401b817b66dfac2aab4c2762a61/verify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1589, 12, 2603, 16, 508, 4672, 309, 1081, 18, 1589, 480, 5588, 1330, 18, 862, 58, 4842, 58, 20, 30, 309, 486, 5588, 1330, 90, 21, 30, 1894, 24899, 2932, 8551, 30, 12430, 87, 11,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1589, 12, 2603, 16, 508, 4672, 309, 1081, 18, 1589, 480, 5588, 1330, 18, 862, 58, 4842, 58, 20, 30, 309, 486, 5588, 1330, 90, 21, 30, 1894, 24899, 2932, 8551, 30, 12430, 87, 11,...
completedFileIDs.append(fileID)
completedFileIDs.append( fileID )
def monitorTransfer(self,ftsReqDict): """ Monitors transfer obtained from TransferDB """
75f9ff3f5f046181ee9f2e9b6a6d0d0b668c1251 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/75f9ff3f5f046181ee9f2e9b6a6d0d0b668c1251/FTSMonitorAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6438, 5912, 12, 2890, 16, 1222, 87, 6113, 5014, 4672, 3536, 9041, 13704, 7412, 225, 12700, 628, 12279, 2290, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 6438, 5912, 12, 2890, 16, 1222, 87, 6113, 5014, 4672, 3536, 9041, 13704, 7412, 225, 12700, 628, 12279, 2290, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pythonwin_extensions = []
pythonwin_extensions = [ WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], pch_header="stdafx.h", base_address=dll_base_address), WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), ]
def finalize_options(self): if self.install_dir is None: installobj = self.distribution.get_command_obj('install') self.install_dir = installobj.install_lib print 'Installing data files to %s' % self.install_dir install_data.finalize_options(self)
746f2b4682be6bafbd81f62f0951d0487af47470 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/992/746f2b4682be6bafbd81f62f0951d0487af47470/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12409, 67, 2116, 12, 2890, 4672, 309, 365, 18, 5425, 67, 1214, 353, 599, 30, 1804, 287, 383, 441, 273, 365, 18, 16279, 18, 588, 67, 3076, 67, 2603, 2668, 5425, 6134, 365, 18, 5425, 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, 12409, 67, 2116, 12, 2890, 4672, 309, 365, 18, 5425, 67, 1214, 353, 599, 30, 1804, 287, 383, 441, 273, 365, 18, 16279, 18, 588, 67, 3076, 67, 2603, 2668, 5425, 6134, 365, 18, 5425, 6...
cxx.Type('IDMap<Channel::Listener>'), 'mActorMap')))
cxx.Type('IDMap<ChannelListener>'), 'mActorMap')))
def addDispatcher(mdefn, dispatchMethod, params): mdefn.addstmt(cxx.StmtDecl(cxx.Decl(cxx.Type('int'), '__route'))) routevar = cxx.ExprVar('__route') mdefn.addstmt(cxx.StmtExpr(cxx.ExprAssn( routevar, cxx.ExprCall(cxx.ExprSelect(cxx.ExprVar('msg'), '.', 'routing_id'))))) routeif = cxx.StmtIf(cxx.ExprBinary( cxx.ExprVar('MSG_ROUTING_CONTROL'), '!=', routevar)) routeif.ifb.addstmt(cxx.StmtDecl(cxx.Decl( cxx.Type('Channel::Listener', ptr=1), '__routed'))) routedvar = cxx.ExprVar('__routed') routeif.ifb.addstmt(cxx.StmtExpr(cxx.ExprAssn( routedvar, cxx.ExprCall(cxx.ExprVar('Lookup'), [ routevar ]))))
47e714eabd12f0fda557e26a352efa7fd722e1bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/47e714eabd12f0fda557e26a352efa7fd722e1bf/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6681, 12, 81, 536, 82, 16, 3435, 1305, 16, 859, 4672, 312, 536, 82, 18, 1289, 10589, 12, 71, 5279, 18, 8952, 3456, 12, 71, 5279, 18, 3456, 12, 71, 5279, 18, 559, 2668, 474, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6681, 12, 81, 536, 82, 16, 3435, 1305, 16, 859, 4672, 312, 536, 82, 18, 1289, 10589, 12, 71, 5279, 18, 8952, 3456, 12, 71, 5279, 18, 3456, 12, 71, 5279, 18, 559, 2668, 474, 19...
gfalDict['nbfiles'] = len(dict['surls'])
gfalDict['nbfiles'] = len(urls)
def getTransportURL(self,path,protocols=False): """ Obtain the TURLs for the supplied path and protocols """ if type(path) == types.StringType: urls = [path] elif type(path) == types.ListType: urls = path else: return S_ERROR("SRM2Storage.getTransportURL: Supplied path must be string or list of strings")
c729d1016adac008ed3fa514541b061de05759d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/c729d1016adac008ed3fa514541b061de05759d3/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29801, 1785, 12, 2890, 16, 803, 16, 31018, 33, 8381, 4672, 3536, 24850, 326, 399, 15749, 364, 326, 4580, 589, 471, 16534, 3536, 309, 618, 12, 803, 13, 422, 1953, 18, 780, 559, 30, 6903...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29801, 1785, 12, 2890, 16, 803, 16, 31018, 33, 8381, 4672, 3536, 24850, 326, 399, 15749, 364, 326, 4580, 589, 471, 16534, 3536, 309, 618, 12, 803, 13, 422, 1953, 18, 780, 559, 30, 6903...
key = event.KeyCode()
key = event.GetKeyCode()
def OnKeyPressed(self, event): key = event.KeyCode() if key == 13: self.OnOpen(event) else: event.Skip()
d7d566042ba1a8304a241f721b8119d223d12011 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/d7d566042ba1a8304a241f721b8119d223d12011/Explorer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 653, 24624, 12, 2890, 16, 871, 4672, 498, 273, 871, 18, 967, 653, 1085, 1435, 309, 498, 422, 5958, 30, 365, 18, 1398, 3678, 12, 2575, 13, 469, 30, 871, 18, 6368, 1435, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2755, 653, 24624, 12, 2890, 16, 871, 4672, 498, 273, 871, 18, 967, 653, 1085, 1435, 309, 498, 422, 5958, 30, 365, 18, 1398, 3678, 12, 2575, 13, 469, 30, 871, 18, 6368, 1435, 2, -100,...
export_dir = choose_dir(self, 'Export Catalog Directory', 'Select destination for %s.%s' % (job.catalog_title, job.fmt.lower()))
export_dir = choose_dir(self, _('Export Catalog Directory'), _('Select destination for %s.%s') % (job.catalog_title, job.fmt.lower()))
def catalog_generated(self, job): if job.failed: return self.job_exception(job) id = self.library_view.model().add_catalog(job.catalog_file_path, job.catalog_title) self.library_view.model().reset() if job.catalog_sync: sync = dynamic.get('catalogs_to_be_synced', set([])) sync.add(id) dynamic.set('catalogs_to_be_synced', sync) self.status_bar.showMessage(_('Catalog generated.'), 3000) self.sync_catalogs()
13fbcfeb00a7ff21b11bc5856e1292dbdb37f111 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/13fbcfeb00a7ff21b11bc5856e1292dbdb37f111/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6222, 67, 11168, 12, 2890, 16, 1719, 4672, 309, 1719, 18, 7307, 30, 327, 365, 18, 4688, 67, 4064, 12, 4688, 13, 612, 273, 365, 18, 12083, 67, 1945, 18, 2284, 7675, 1289, 67, 7199, 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, 6222, 67, 11168, 12, 2890, 16, 1719, 4672, 309, 1719, 18, 7307, 30, 327, 365, 18, 4688, 67, 4064, 12, 4688, 13, 612, 273, 365, 18, 12083, 67, 1945, 18, 2284, 7675, 1289, 67, 7199, 12...
return unicode(s,errors='ignore')
try: return unicode(s) except: try: return unicode(s.decode('windows-1252')) except: return unicode(s,errors='ignore')
def DamnUnicode(s): if type(s) is type(u''): return s if type(s) is type(''): return unicode(s,errors='ignore') try: return unicode(s) except: return s
18d91d3a382ccc85706a20ab0defe4fb663ef94f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11142/18d91d3a382ccc85706a20ab0defe4fb663ef94f/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 301, 82, 16532, 12, 87, 4672, 309, 618, 12, 87, 13, 353, 618, 12, 89, 6309, 4672, 327, 272, 309, 618, 12, 87, 13, 353, 618, 2668, 11, 4672, 775, 30, 327, 5252, 12, 87, 13, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 301, 82, 16532, 12, 87, 4672, 309, 618, 12, 87, 13, 353, 618, 12, 89, 6309, 4672, 327, 272, 309, 618, 12, 87, 13, 353, 618, 2668, 11, 4672, 775, 30, 327, 5252, 12, 87, 13, 1...
approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is then told to compute the result using `0.8k` of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polyomial is not found then ``None`` wil be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library algdep command otherwise.
approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits of `z` with ``known_bits=k`` or ``known_digits=k``. PARI is then told to compute the result using `0.8k` of these bits/digits. Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may be specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polynomial is not found, then ``None`` will be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library ``algdep`` command otherwise.
def algdep(z, degree, known_bits=None, use_bits=None, known_digits=None, use_digits=None, height_bound=None, proof=False): """ Returns a polynomial of degree at most `degree` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `degree`. You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is then told to compute the result using `0.8k` of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value. A height bound may specified to indicate the maximum coefficient size of the returned polynomial; if a sufficiently small polyomial is not found then ``None`` wil be returned. If ``proof=True`` then the result is returned only if it can be proved correct (i.e. the only possible minimal polynomial satisfying the height bound, or no such polynomial exists). Otherwise a ``ValueError`` is raised indicating that higher precision is required. ALGORITHM: Uses LLL for real/complex inputs, PARI C-library algdep command otherwise. Note that ``algebraic_dependency`` is a synonym for ``algdep``. INPUT: - ``z`` - real, complex, or `p`-adic number - ``degree`` - an integer - ``height_bound`` - an integer (default ``None``) specifying the maximum coefficient size for the returned polynomial - ``proof`` - a boolean (default ``False``), requres height_bound to be set EXAMPLES:: sage: algdep(1.888888888888888, 1) 9*x - 17 sage: algdep(0.12121212121212,1) 33*x - 4 sage: algdep(sqrt(2),2) x^2 - 2 This example involves a complex number. :: sage: z = (1/2)*(1 + RDF(sqrt(3)) *CC.0); z 0.500000000000000 + 0.866025403784439*I sage: p = algdep(z, 6); p x^3 + 1 sage: p.factor() (x + 1) * (x^2 - x + 1) sage: z^2 - z + 1 0 This example involves a `p`-adic number. :: sage: K = Qp(3, print_mode = 'series') sage: a = K(7/19); a 1 + 2*3 + 3^2 + 3^3 + 2*3^4 + 2*3^5 + 3^8 + 2*3^9 + 3^11 + 3^12 + 2*3^15 + 2*3^16 + 3^17 + 2*3^19 + O(3^20) sage: algdep(a, 1) 19*x - 7 These examples show the importance of proper precision control. We compute a 200-bit approximation to sqrt(2) which is wrong in the 33'rd bit. :: sage: z = sqrt(RealField(200)(2)) + (1/2)^33 sage: p = algdep(z, 4); p 227004321085*x^4 - 216947902586*x^3 - 99411220986*x^2 + 82234881648*x - 211871195088 sage: factor(p) 227004321085*x^4 - 216947902586*x^3 - 99411220986*x^2 + 82234881648*x - 211871195088 sage: algdep(z, 4, known_bits=32) x^2 - 2 sage: algdep(z, 4, known_digits=10) x^2 - 2 sage: algdep(z, 4, use_bits=25) x^2 - 2 sage: algdep(z, 4, use_digits=8) x^2 - 2 Using the ``height_bound`` and ``proof`` parameters, we can see that `pi` is not the root of an integer polynomial of degree at most 5 and coefficients bounded above by 10. :: sage: algdep(pi.n(), 5, height_bound=10, proof=True) is None True For stronger results, we need more precicion. :: sage: algdep(pi.n(), 5, height_bound=100, proof=True) is None Traceback (most recent call last): ... ValueError: insufficient precision for non-existence proof sage: algdep(pi.n(200), 5, height_bound=100, proof=True) is None True sage: algdep(pi.n(), 10, height_bound=10, proof=True) is None Traceback (most recent call last): ... ValueError: insufficient precision for non-existence proof sage: algdep(pi.n(200), 10, height_bound=10, proof=True) is None True We can also use ``proof=True`` to get positive results. :: sage: a = sqrt(2) + sqrt(3) + sqrt(5) sage: algdep(a.n(), 8, height_bound=1000, proof=True) Traceback (most recent call last): ... ValueError: insufficient precision for uniqueness proof sage: f = algdep(a.n(1000), 8, height_bound=1000, proof=True); f x^8 - 40*x^6 + 352*x^4 - 960*x^2 + 576 sage: f(a).expand() 0 """ if proof and not height_bound: raise ValueError, "height_bound must be given for proof=True" x = ZZ['x'].gen() if isinstance(z, (int, long, integer.Integer)): if height_bound and abs(z) >= height_bound: return None return x - ZZ(z) degree = ZZ(degree) if isinstance(z, (sage.rings.rational.Rational)): if height_bound and max(abs(z.denominator()), abs(z.numerator())) >= height_bound: return None return z.denominator()*x - z.numerator() if isinstance(z, float): z = sage.rings.real_mpfr.RR(z) elif isinstance(z, complex): z = sage.rings.complex_field.CC(z) if isinstance(z, (sage.rings.real_mpfr.RealNumber, sage.rings.complex_number.ComplexNumber)): log2_10 = 3.32192809488736 prec = z.prec() - 6 if known_digits is not None: known_bits = known_digits * log2_10 if known_bits is not None: use_bits = known_bits * 0.8 if use_digits is not None: use_bits = use_digits * log2_10 if use_bits is not None: prec = int(use_bits) is_complex = isinstance(z, sage.rings.complex_number.ComplexNumber) n = degree+1 from sage.matrix.all import matrix M = matrix(ZZ, n, n+1+int(is_complex)) r = ZZ(1) << prec M[0, 0] = 1 M[0,-1] = r for k in range(1, degree+1): M[k,k] = 1 r *= z if is_complex: M[k, -1] = r.real().round() M[k, -2] = r.imag().round() else: M[k, -1] = r.round() LLL = M.LLL(delta=.75) coeffs = LLL[0][:n] if height_bound: def norm(v): # norm on an integer vector invokes Integer.sqrt() which tries to factor... from sage.rings.real_mpfi import RIF return v.change_ring(RIF).norm() if max(abs(a) for a in coeffs) > height_bound: if proof: # Given an LLL reduced basis $b_1, ..., b_n$, we only # know that $|b_1| <= 2^((n-1)/2) |x|$ for non-zero $x \in L$. if norm(LLL[0]) <= 2**((n-1)/2) * n.sqrt() * height_bound: raise ValueError, "insufficient precision for non-existence proof" return None elif proof and norm(LLL[1]) < 2**((n-1)/2) * max(norm(LLL[0]), n.sqrt()*height_bound): raise ValueError, "insufficient precision for uniqueness proof" if coeffs[degree] < 0: coeffs = -coeffs f = list(coeffs) elif proof or height_bound: raise NotImplementedError, "proof and height bound only implemented for real and complex numbers" else: y = pari(z) f = y.algdep(degree) return x.parent()(f)
77a54f69e28a7333c3cd3eba5214f2a668319f2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/77a54f69e28a7333c3cd3eba5214f2a668319f2c/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11989, 15037, 12, 94, 16, 10782, 16, 4846, 67, 6789, 33, 7036, 16, 999, 67, 6789, 33, 7036, 16, 4846, 67, 16649, 33, 7036, 16, 999, 67, 16649, 33, 7036, 16, 2072, 67, 3653, 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, 11989, 15037, 12, 94, 16, 10782, 16, 4846, 67, 6789, 33, 7036, 16, 999, 67, 6789, 33, 7036, 16, 4846, 67, 16649, 33, 7036, 16, 999, 67, 16649, 33, 7036, 16, 2072, 67, 3653, 33, 7036,...
if self.cars[-i-1] == old_car : del self.cars[-i-1]
if self.cars[i] == old_car : del self.cars[i]
def del_car(self, old_car): """ Deletes a car on the road """ queue_length = len((self.cars)) for i in range(queue_length): if self.cars[-i-1] == old_car : del self.cars[-i-1] # break; - not useful here, as it removes duplicates, if any
15308c61ed9be74e6e85e2f18e576ada7e58954b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4798/15308c61ed9be74e6e85e2f18e576ada7e58954b/init.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 67, 9815, 12, 2890, 16, 1592, 67, 9815, 4672, 3536, 17973, 279, 5926, 603, 326, 721, 361, 3536, 2389, 67, 2469, 273, 562, 12443, 2890, 18, 71, 5913, 3719, 225, 364, 277, 316, 104...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 67, 9815, 12, 2890, 16, 1592, 67, 9815, 4672, 3536, 17973, 279, 5926, 603, 326, 721, 361, 3536, 2389, 67, 2469, 273, 562, 12443, 2890, 18, 71, 5913, 3719, 225, 364, 277, 316, 104...
def __neg__(self): if self.sign == 1: return _WorkRep( (-1, self.int, self.exp) ) else: return _WorkRep( (1, self.int, self.exp) ) def __abs__(self): if self.sign == -1: return -self else: return self def __cmp__(self, other): if self.exp != other.exp: raise ValueError("Operands not normalized: %r, %r" % (self, other)) if self.sign != other.sign: if self.sign == -1: return -1 else: return 1 if self.sign == -1: direction = -1 else: direction = 1 int1 = self.int int2 = other.int if int1 > int2: return direction * 1 if int1 < int2: return direction * -1 return 0
def __repr__(self): return "(%r, %r, %r)" % (self.sign, self.int, self.exp)
b7ed2df9f8b3eaa226b68d6c2ebfcb1ddb522d57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/b7ed2df9f8b3eaa226b68d6c2ebfcb1ddb522d57/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 7751, 9, 86, 16, 738, 86, 16, 738, 86, 2225, 738, 261, 2890, 18, 2977, 16, 365, 18, 474, 16, 365, 18, 2749, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 7751, 9, 86, 16, 738, 86, 16, 738, 86, 2225, 738, 261, 2890, 18, 2977, 16, 365, 18, 474, 16, 365, 18, 2749, 13, 2, -100, -100, -100, -100, -1...
filetype = infile['content-type'] filename = infile['filename'] raw = infile['content']
filetype = infile.content_type filename = infile.name raw = infile.read()
def import_from(self, infile, maxsize=10000000): errors = [] results = [] filetype = infile['content-type'] filename = infile['filename'] raw = infile['content'] # filelen = len(raw) # if filelen > maxsize: # errors.append(_('Import too large, must be smaller than %i bytes.' % maxsize )) format = os.path.splitext(filename)[1] if format and format.startswith('.'): format = format[1:] if not format: errors.append(_('Could not parse format from filename: %s') % filename) if format == 'zip': zf = zipfile.ZipFile(StringIO(raw), 'r') files = zf.namelist() image_dir = config_value('PRODUCT', 'IMAGE_DIR') other_image_dir = None export_file = None if 'VARS' in files: config = zf.read('VARS') lines = [line.split('=') for line in config.split('\n')] for key, val in lines: if key == 'PRODUCT.IMAGE_DIR': other_image_dir = val elif key == 'EXPORT_FILE': export_file = val if other_image_dir is None or export_file is None: errors.append(_('Bad VARS file in import zipfile.')) else: # save out all the files which start with other_image_dr rename = image_dir == other_image_dir for f in files: if f.startswith(other_image_dir): buf = zf.read(f) if rename: f = f[len(other_image_dir):] if f[0] in ('/', '\\'): f = f[1:] f = os.path.join(settings.MEDIA_ROOT, image_dir, f) outf = open(f, 'w') outf.write(buf) outf.close() results.append('Imported image: %s' % f) infile = zf.read(export_file) zf.close() format = os.path.splitext(export_file)[1] if format and format.startswith('.'): format = format[1:] if not format: errors.append(_('Could not parse format from filename: %s') % filename) else: raw = infile else: errors.append(_('Missing VARS in import zipfile.')) else: raw = StringIO(str(raw)) if not format in serializers.get_serializer_formats(): errors.append(_('Unknown file format: %s') % format) if not errors: serializer = serializers.get_serializer(format) from django.db import connection, transaction transaction.commit_unless_managed() transaction.enter_transaction_management() transaction.managed(True) try: objects = serializers.deserialize(format, raw) ct = 0 models = set() for obj in objects: obj.save() models.add(obj.object.__class__) ct += 1 if ct>0: style=no_style() sequence_sql = connection.ops.sequence_reset_sql(style, models) if sequence_sql: cursor = connection.cursor() for line in sequence_sql: cursor.execute(line) results.append(_('Added %(count)i objects from %(filename)s') % {'count': ct, 'filename': filename}) transaction.commit() #label_found = True except Exception, e: #fixture.close() errors.append(_("Problem installing fixture '%(filename)s': %(error_msg)s\n") % {'filename': filename, 'error_msg': str(e)}) errors.append("Raw: %s" % raw) transaction.rollback() transaction.leave_transaction_management() return results, errors
f236f54dab28758965fb8b8cebfe67ea3ddc866d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/f236f54dab28758965fb8b8cebfe67ea3ddc866d/forms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 2080, 12, 2890, 16, 14568, 16, 22959, 33, 21, 17877, 4672, 1334, 273, 5378, 1686, 273, 5378, 225, 18902, 273, 14568, 18, 1745, 67, 723, 1544, 273, 14568, 18, 529, 1831, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 2080, 12, 2890, 16, 14568, 16, 22959, 33, 21, 17877, 4672, 1334, 273, 5378, 1686, 273, 5378, 225, 18902, 273, 14568, 18, 1745, 67, 723, 1544, 273, 14568, 18, 529, 1831, 273, ...
if os.path.exists(cover_path) is True: print "cover found:", cover_path album.cover = cover_path else: def got_it(f,a): print "cover saved:",f, a.title a.cover = f aws_key = '1XHSE4FQJ0RK0X3S9WR2' CoverGetter(cover_path,aws_key, callback=(got_it,(album)), artist=album.artist.name, title=album.title)
if os.path.exists(cover_path) is True: print "cover found:", cover_path album.cover = cover_path else: def got_it(f,a): print "cover saved:",f, a.title a.cover = f aws_key = '1XHSE4FQJ0RK0X3S9WR2' CoverGetter(cover_path,aws_key, callback=(got_it,(album)), artist=album.artist.name, title=album.title)
def get_album_covers(self): for album in list(self.db.query(Album, Album.cover == u'')): print "missing cover for:", album.artist.name, album.title filename = "%s - %s" % ( album.artist.name, album.title) filename = sanitize(filename)
024b15053c2afcba305faab95ada27c30fece917 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11626/024b15053c2afcba305faab95ada27c30fece917/mediadb_storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 25090, 67, 14014, 414, 12, 2890, 4672, 364, 14844, 316, 666, 12, 2890, 18, 1966, 18, 2271, 12, 30330, 16, 2262, 10293, 18, 3165, 422, 582, 6309, 3719, 30, 1172, 315, 7337, 559...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25090, 67, 14014, 414, 12, 2890, 4672, 364, 14844, 316, 666, 12, 2890, 18, 1966, 18, 2271, 12, 30330, 16, 2262, 10293, 18, 3165, 422, 582, 6309, 3719, 30, 1172, 315, 7337, 559...
__slots__ = ["identity"]
__slots__ = ["identity", "on_loopback"]
def __del__(self): # Clean up global resources on garbage collection. self.close()
cdc73d35527f2e8ba9aecc2ad1a44f2831f9c68c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7263/cdc73d35527f2e8ba9aecc2ad1a44f2831f9c68c/emulcomm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 468, 9645, 731, 2552, 2703, 603, 15340, 1849, 18, 365, 18, 4412, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 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, 1001, 3771, 972, 12, 2890, 4672, 468, 9645, 731, 2552, 2703, 603, 15340, 1849, 18, 365, 18, 4412, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if hasattr(productp, '__import_error__'): ie=productp.__import_error__
if hasattr(productp, 'import_error_'): ie=productp.import_error_
def initializeProduct(productp, name, home, app): # Initialize a levered product products=app.Control_Panel.Products if hasattr(productp, '__import_error__'): ie=productp.__import_error__ else: ie=None try: fver=strip(open(home+'/version.txt').read()) except: fver='' old=None try: if ihasattr(products,name): old=getattr(products, name) if (ihasattr(old,'version') and old.version==fver and hasattr(old, '__import_error__') and old.__import_error__==ie): return except: pass try: f=CompressedInputFile(open(home+'/product.dat'),name+' shshsh') meta=cPickle.Unpickler(f).load() product=Globals.Bobobase._jar.import_file(f) product._objects=meta['_objects'] except: f=fver and (" (%s)" % fver) product=Product(name, 'Installed product %s%s' % (name,f)) if old is not None: products._delObject(name) products._setObject(name, product) product.__of__(products)._postCopy(products) product.manage_options=Folder.manage_options product.icon='p_/InstalledProduct_icon' product.version=fver product._distribution=None product.manage_distribution=None product.thisIsAnInstalledProduct=1 if ie: product.import_error_=ie product.title='Broken product %s' % name product.icon='p_/BrokenProduct_icon' product.manage_options=( {'label':'Traceback', 'action':'manage_traceback'}, ) if os.path.exists(os.path.join(home, 'README.txt')): product.manage_options=product.manage_options+( {'label':'README', 'action':'manage_readme'}, )
4467942d44ddb03545adf92a2151069efb0f9e20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4467942d44ddb03545adf92a2151069efb0f9e20/Product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 4133, 12, 5896, 84, 16, 508, 16, 6382, 16, 595, 4672, 468, 9190, 279, 884, 502, 329, 3017, 225, 10406, 33, 2910, 18, 3367, 67, 5537, 18, 13344, 225, 309, 3859, 12, 5896, 84, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 4133, 12, 5896, 84, 16, 508, 16, 6382, 16, 595, 4672, 468, 9190, 279, 884, 502, 329, 3017, 225, 10406, 33, 2910, 18, 3367, 67, 5537, 18, 13344, 225, 309, 3859, 12, 5896, 84, 16...
idx_path = self.releaseFile[self.releaseFile.find('_dists_')-6:].replace('_','/')[:-7] + 'main/binary-i386/Packages.bz2'
idx_path = '/' + self.releaseFile[self.releaseFile.find('_dists_')+1:].replace('_','/')[:-7] + 'main/binary-i386/Packages.bz2'
def test_findIndexHash(self): lastDefer = defer.Deferred() idx_hash = os.popen('grep -A 3000 -E "^SHA1:" ' + '/var/lib/apt/lists/' + self.releaseFile + ' | grep -E " main/binary-i386/Packages.bz2$"' ' | head -n 1 | cut -d\ -f 2').read().rstrip('\n') idx_path = self.releaseFile[self.releaseFile.find('_dists_')-6:].replace('_','/')[:-7] + 'main/binary-i386/Packages.bz2'
53607bdd5893956a70875b6468a609eecb518300 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/665/53607bdd5893956a70875b6468a609eecb518300/AptPackages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4720, 1016, 2310, 12, 2890, 4672, 1142, 758, 586, 273, 2220, 18, 16886, 1435, 225, 2067, 67, 2816, 273, 1140, 18, 84, 3190, 2668, 11556, 84, 300, 37, 29839, 300, 41, 15017, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4720, 1016, 2310, 12, 2890, 4672, 1142, 758, 586, 273, 2220, 18, 16886, 1435, 225, 2067, 67, 2816, 273, 1140, 18, 84, 3190, 2668, 11556, 84, 300, 37, 29839, 300, 41, 15017, 8...
_getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
rc = [] _getElementsByTagNameNSHelper(self, namespaceURI, localName, rc) return rc
def getElementsByTagNameNS(self, namespaceURI, localName): _getElementsByTagNameNSHelper(self, namespaceURI, localName, [])
ed525fb0dfa45595e8e93cbde3d5b05838bf993a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ed525fb0dfa45595e8e93cbde3d5b05838bf993a/minidom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11034, 3156, 12, 2890, 16, 19421, 16, 11927, 4672, 389, 588, 3471, 10401, 3156, 2276, 12, 2890, 16, 19421, 16, 11927, 16, 5378, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 11034, 3156, 12, 2890, 16, 19421, 16, 11927, 4672, 389, 588, 3471, 10401, 3156, 2276, 12, 2890, 16, 19421, 16, 11927, 16, 5378, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -10...
""":trace sip|pjsip|notifications \t Remove the stream from the current session"""
""":trace sip|pjsip|notifications \t Toggle the debug messages of given category"""
def cmd_trace(self, *args): """:trace sip|pjsip|notifications \t Remove the stream from the current session""" if not args: raise UserCommandError('Please provide an argument\n%s' % self.cmd_trace.__doc__) args = [complete_word(x, ['sip', 'pjsip', 'msrp', 'notifications']) for x in args] for arg in args: if arg == 'sip': self.logger.sip_to_stdout = not self.logger.sip_to_stdout settings = SIPSimpleSettings() self.engine.trace_sip = self.logger.sip_to_stdout or settings.logging.trace_sip print "SIP tracing to console is now %s" % ("activated" if self.logger.sip_to_stdout else "deactivated") elif arg == 'pjsip': self.logger.pjsip_to_stdout = not self.logger.pjsip_to_stdout settings = SIPSimpleSettings() self.engine.log_level = settings.logging.pjsip_level if (self.logger.pjsip_to_stdout or settings.logging.trace_pjsip) else 0 print "PJSIP tracing to console is now %s" % ("activated, log level=%s" % self.engine.log_level if self.logger.pjsip_to_stdout else "deactivated") elif arg == 'notifications': logstate.EngineTracer().toggle() print "Notifications tracing to console is now %s" % ("activated" if logstate.EngineTracer().started() else "deactivated")
e5891b0f374123b112260ff1f65d02820b4843a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/e5891b0f374123b112260ff1f65d02820b4843a7/sip_session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 5129, 12, 2890, 16, 380, 1968, 4672, 3536, 30, 5129, 10341, 96, 84, 2924, 625, 96, 15286, 521, 88, 399, 9891, 326, 1198, 2743, 434, 864, 3150, 8395, 309, 486, 833, 30, 1002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 5129, 12, 2890, 16, 380, 1968, 4672, 3536, 30, 5129, 10341, 96, 84, 2924, 625, 96, 15286, 521, 88, 399, 9891, 326, 1198, 2743, 434, 864, 3150, 8395, 309, 486, 833, 30, 1002, ...
print label_name, self.last_checked_label
print "ButtonArea:", label_name, self.last_checked_label
def clickedLabelButton(self): button = self.get_checked_label_button() label_name = str(button.text()) if label_name != self.last_checked_label: print label_name, self.last_checked_label self.last_checked_label = label_name self.update_buttons()
142f548695693cef661e597f3671d76c6a78dea0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/142f548695693cef661e597f3671d76c6a78dea0/buttonarea.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17688, 2224, 3616, 12, 2890, 4672, 3568, 273, 365, 18, 588, 67, 4532, 67, 1925, 67, 5391, 1435, 1433, 67, 529, 273, 609, 12, 5391, 18, 955, 10756, 309, 1433, 67, 529, 480, 365, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17688, 2224, 3616, 12, 2890, 4672, 3568, 273, 365, 18, 588, 67, 4532, 67, 1925, 67, 5391, 1435, 1433, 67, 529, 273, 609, 12, 5391, 18, 955, 10756, 309, 1433, 67, 529, 480, 365, 18, 2...
if sys.platform == 'linux':
if sys.platform in ('linux', 'linux2'):
def LoadTargetBuildFile(build_file_path, data, aux_data, variables, includes, depth): # If depth is set, predefine the DEPTH variable to be a relative path from # this build file's directory to the directory identified by depth. if depth: variables['DEPTH'] = \ gyp.common.RelativePath(depth, os.path.dirname(build_file_path)) if sys.platform == 'linux': # TODO(mmentovai): replace this block with the real fix. build_file_path = os.path.abspath(build_file_path) if build_file_path in data: # Already loaded. return build_file_data = LoadOneBuildFile(build_file_path, data, aux_data, variables, includes, True) # Set up the included_files key indicating which .gyp files contributed to # this target dict. if 'included_files' in build_file_data: raise KeyError, build_file_path + ' must not contain included_files key' included = GetIncludedBuildFiles(build_file_path, aux_data) build_file_data['included_files'] = [] for included_file in included: # included_file is relative to the current directory, but it needs to # be made relative to build_file_path's directory. included_relative = \ gyp.common.RelativePath(included_file, os.path.dirname(build_file_path)) build_file_data['included_files'].append(included_relative) # Apply "pre"/"early" variable expansions and condition evaluations. ProcessVariablesAndConditionsInDict(build_file_data, False, variables.copy(), build_file_path) # Look at each project's target_defaults dict, and merge settings into # targets. if 'target_defaults' in build_file_data: index = 0 while index < len(build_file_data['targets']): # This procedure needs to give the impression that target_defaults is # used as defaults, and the individual targets inherit from that. # The individual targets need to be merged into the defaults. Make # a deep copy of the defaults for each target, merge the target dict # as found in the input file into that copy, and then hook up the # copy with the target-specific data merged into it as the replacement # target dict. old_target_dict = build_file_data['targets'][index] new_target_dict = copy.deepcopy(build_file_data['target_defaults']) MergeDicts(new_target_dict, old_target_dict, build_file_path, build_file_path) build_file_data['targets'][index] = new_target_dict index = index + 1 # No longer needed. del build_file_data['target_defaults'] # Look for dependencies. This means that dependency resolution occurs # after "pre" conditionals and variable expansion, but before "post" - # in other words, you can't put a "dependencies" section inside a "post" # conditional within a target. if 'targets' in build_file_data: for target_dict in build_file_data['targets']: if 'dependencies' not in target_dict: continue for dependency in target_dict['dependencies']: other_build_file = \ gyp.common.BuildFileAndTarget(build_file_path, dependency)[0] LoadTargetBuildFile(other_build_file, data, aux_data, variables, includes, depth) return data
6cfaba9004258281bfc1eb6cec481efaee19ee09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/6cfaba9004258281bfc1eb6cec481efaee19ee09/input.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4444, 2326, 3116, 812, 12, 3510, 67, 768, 67, 803, 16, 501, 16, 9397, 67, 892, 16, 3152, 16, 6104, 16, 3598, 4672, 468, 971, 3598, 353, 444, 16, 675, 11255, 326, 2030, 22561, 2190, 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, 4444, 2326, 3116, 812, 12, 3510, 67, 768, 67, 803, 16, 501, 16, 9397, 67, 892, 16, 3152, 16, 6104, 16, 3598, 4672, 468, 971, 3598, 353, 444, 16, 675, 11255, 326, 2030, 22561, 2190, 3...
self.set_trigger_continuous(True)
def set_defaults(self): ''' Set to driver defaults: Output=data only Mode=Volt:DC Digits=7 Trigger=Continous Range=10 V NPLC=1 Averaging=off '''
265cb1c56ac1702dce5e8f50264061e28ac6bc97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6471/265cb1c56ac1702dce5e8f50264061e28ac6bc97/Keithley_2100.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7606, 12, 2890, 4672, 9163, 1000, 358, 3419, 3467, 30, 3633, 33, 892, 1338, 8126, 33, 58, 4397, 30, 5528, 11678, 1282, 33, 27, 11321, 33, 660, 267, 1481, 8086, 33, 2163, 776, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 7606, 12, 2890, 4672, 9163, 1000, 358, 3419, 3467, 30, 3633, 33, 892, 1338, 8126, 33, 58, 4397, 30, 5528, 11678, 1282, 33, 27, 11321, 33, 660, 267, 1481, 8086, 33, 2163, 776, ...
flags = select.POLLERR | select.POLLHUP | select.POLLNVAL
flags = 0
def poll2(timeout=0.0, map=None): # Use the poll() support added to the select module in Python 2.0 if map is None: map = socket_map if timeout is not None: # timeout is in milliseconds timeout = int(timeout*1000) pollster = select.poll() if map: for fd, obj in map.items(): flags = select.POLLERR | select.POLLHUP | select.POLLNVAL if obj.readable(): flags |= select.POLLIN | select.POLLPRI if obj.writable(): flags |= select.POLLOUT if flags: pollster.register(fd, flags) try: r = pollster.poll(timeout) except select.error, err: if err[0] != EINTR: raise r = [] for fd, flags in r: obj = map.get(fd) if obj is None: continue readwrite(obj, flags)
c70cb147d7316ce5ff7f1c88b9fa80b25376daad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c70cb147d7316ce5ff7f1c88b9fa80b25376daad/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7672, 22, 12, 4538, 33, 20, 18, 20, 16, 852, 33, 7036, 4672, 468, 2672, 326, 7672, 1435, 2865, 3096, 358, 326, 2027, 1605, 316, 6600, 576, 18, 20, 309, 852, 353, 599, 30, 852, 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, 7672, 22, 12, 4538, 33, 20, 18, 20, 16, 852, 33, 7036, 4672, 468, 2672, 326, 7672, 1435, 2865, 3096, 358, 326, 2027, 1605, 316, 6600, 576, 18, 20, 309, 852, 353, 599, 30, 852, 273, ...
fp = open(name, '*rb')
fp = openrf(name, '*rb')
def getfileinfo(name):
d9300e7ae7f704ad263013ec13346104b4bba7ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d9300e7ae7f704ad263013ec13346104b4bba7ba/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 768, 1376, 12, 529, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 768, 1376, 12, 529, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for bug_id in RoundupBugTracker.csv_url2bugs(url):
for bug_id in mysite.customs.models.RoundupBugTracker.csv_url2bugs(url):
def run(self, **kwargs): logger = self.get_logger(**kwargs) logger.info("Started to grab the list of Python easy bugs.") url = 'http://bugs.python.org/issue?status=1%2C3&%40sort=activity&%40columns=id&%40startwith=0&%40group=priority&%40filter=status%2Ckeywords&keywords=6&%40action=export_csv' for bug_id in RoundupBugTracker.csv_url2bugs(url): # enqueue a task to examine this bug task = LookAtOneBugInPython() task.delay(bug_id=bug_id) logger.info("Finished grabbing the list of Python easy bugs.")
e55be7688b3c4d9f07e356c74f02e3a521a4e360 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11976/e55be7688b3c4d9f07e356c74f02e3a521a4e360/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 2826, 4333, 4672, 1194, 273, 365, 18, 588, 67, 4901, 12, 636, 4333, 13, 1194, 18, 1376, 2932, 9217, 358, 11086, 326, 666, 434, 6600, 12779, 22398, 1199, 13, 880, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 2826, 4333, 4672, 1194, 273, 365, 18, 588, 67, 4901, 12, 636, 4333, 13, 1194, 18, 1376, 2932, 9217, 358, 11086, 326, 666, 434, 6600, 12779, 22398, 1199, 13, 880, 27...
def weave_ext(mod): d = mod.setup_extension().__dict__ n = d['name']; del(d['name']) s = d['sources']; del(d['sources']) return n, s, d
def configuration(parent_package='',top_path=None, package_name='models'): from numpy.distutils.misc_util import Configuration config = Configuration(package_name,parent_package,top_path) config.add_subpackage('*') config.add_data_dir('tests') try: from scipy.stats.models.bspline_module import mod n, s, d = weave_ext(mod) config.add_extension(n, s, **d) except ImportError: pass return config
f032188f011d0b0a70691edd0032af9dd5e24f22 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/f032188f011d0b0a70691edd0032af9dd5e24f22/setupscons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 16, 2181, 67, 529, 2218, 7665, 11, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 642, 273, 4659, 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, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 16, 2181, 67, 529, 2218, 7665, 11, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 642, 273, 4659, 12, ...
the appropriate JOIN for linking the current model to the one referenced in model_name.
the appropriate JOIN for linking the current model to the one referenced in model_name.
def _apply_ir_rules(self, cr, uid, where_clause, where_clause_params, tables, mode='read', model_name=None, context=None): """Add what's missing in ``where_clause``, ``where_params``, ``tables`` to implement all appropriate ir.rules (on the current object but also from it's _inherits parents)
c7c382e8e1a8f28046a1e0e1b4eb198df66079b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/c7c382e8e1a8f28046a1e0e1b4eb198df66079b0/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 67, 481, 67, 7482, 12, 2890, 16, 4422, 16, 4555, 16, 1625, 67, 18128, 16, 1625, 67, 18128, 67, 2010, 16, 4606, 16, 1965, 2218, 896, 2187, 938, 67, 529, 33, 7036, 16, 819, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9010, 67, 481, 67, 7482, 12, 2890, 16, 4422, 16, 4555, 16, 1625, 67, 18128, 16, 1625, 67, 18128, 67, 2010, 16, 4606, 16, 1965, 2218, 896, 2187, 938, 67, 529, 33, 7036, 16, 819, ...
pid = test_one_disk_chunk(chunk_mb, disk, chunk)
pid = self.test_one_disk_chunk(disk, i)
def execute(self, disks, gigabytes = 100, chunk_mb = 1024): os.chdir(self.srcdir + '/disktest')
6d36c93217690c43df20b69f32ad964f5fe488a1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/6d36c93217690c43df20b69f32ad964f5fe488a1/disktest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 17164, 16, 314, 360, 24383, 1078, 273, 2130, 16, 2441, 67, 1627, 273, 6250, 4672, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 397, 1173, 10863, 3813, 6134, 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, 1836, 12, 2890, 16, 17164, 16, 314, 360, 24383, 1078, 273, 2130, 16, 2441, 67, 1627, 273, 6250, 4672, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 397, 1173, 10863, 3813, 6134, 2, -1...
return farray([strain_matrix[1,1], strain_matrix[2,2], strain_matrix[3,3],
return farray([strain_matrix[1,1] - 1.0, strain_matrix[2,2] - 1.0, strain_matrix[3,3] - 1.0,
def strain_vector(strain_matrix): return farray([strain_matrix[1,1], strain_matrix[2,2], strain_matrix[3,3], 2.0*strain_matrix[2,3], 2.0*strain_matrix[1,3], 2.0*strain_matrix[1,2]])
cbc1d87d9c4d7bab0f45ba886168bf964ae5c16e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/cbc1d87d9c4d7bab0f45ba886168bf964ae5c16e/elastic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16853, 67, 7737, 12, 27568, 67, 5667, 4672, 327, 284, 1126, 3816, 27568, 67, 5667, 63, 21, 16, 21, 65, 300, 404, 18, 20, 16, 16853, 67, 5667, 63, 22, 16, 22, 65, 300, 404, 18, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16853, 67, 7737, 12, 27568, 67, 5667, 4672, 327, 284, 1126, 3816, 27568, 67, 5667, 63, 21, 16, 21, 65, 300, 404, 18, 20, 16, 16853, 67, 5667, 63, 22, 16, 22, 65, 300, 404, 18, 20, ...
'ORDER BY DATE DESC LIMIT 100', (self.id, date))
'ORDER BY DATE DESC LIMIT 100', (self.id, to_timestamp(date)))
def prepare_subject_for_compare(subject): if len(subject) > 2 and subject[2] == ':': subject = subject[3:].lstrip() subject = subject.replace(" ","") return subject
f6dd0d69e9b3d0ccb4abc9d58743f222a7278e90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/662/f6dd0d69e9b3d0ccb4abc9d58743f222a7278e90/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 7857, 67, 1884, 67, 9877, 12, 7857, 4672, 309, 562, 12, 7857, 13, 405, 576, 471, 3221, 63, 22, 65, 422, 3921, 30, 3221, 273, 3221, 63, 23, 30, 8009, 80, 6406, 1435, 3221, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 67, 7857, 67, 1884, 67, 9877, 12, 7857, 4672, 309, 562, 12, 7857, 13, 405, 576, 471, 3221, 63, 22, 65, 422, 3921, 30, 3221, 273, 3221, 63, 23, 30, 8009, 80, 6406, 1435, 3221, ...
f = GzipFile(filename="", mode="rb", fileobj=sys.stdin) g = sys.stdout
f = GzipFile(filename="", mode="rb", fileobj=sys.stdin.buffer) g = sys.stdout.buffer
def _test(): # Act like gzip; with -d, act like gunzip. # The input file is not deleted, however, nor are any other gzip # options or features supported. args = sys.argv[1:] decompress = args and args[0] == "-d" if decompress: args = args[1:] if not args: args = ["-"] for arg in args: if decompress: if arg == "-": f = GzipFile(filename="", mode="rb", fileobj=sys.stdin) g = sys.stdout else: if arg[-3:] != ".gz": print("filename doesn't end in .gz:", repr(arg)) continue f = open(arg, "rb") g = builtins.open(arg[:-3], "wb") else: if arg == "-": f = sys.stdin g = GzipFile(filename="", mode="wb", fileobj=sys.stdout) else: f = builtins.open(arg, "rb") g = open(arg + ".gz", "wb") while True: chunk = f.read(1024) if not chunk: break g.write(chunk) if g is not sys.stdout: g.close() if f is not sys.stdin: f.close()
9b39d50dab84e3efb7c2a053e049f74c697e29da /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/9b39d50dab84e3efb7c2a053e049f74c697e29da/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 468, 4603, 3007, 10331, 31, 598, 300, 72, 16, 1328, 3007, 31475, 4450, 18, 468, 1021, 810, 585, 353, 486, 4282, 16, 14025, 16, 12517, 854, 1281, 1308, 10331, 468, 702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 468, 4603, 3007, 10331, 31, 598, 300, 72, 16, 1328, 3007, 31475, 4450, 18, 468, 1021, 810, 585, 353, 486, 4282, 16, 14025, 16, 12517, 854, 1281, 1308, 10331, 468, 702, ...
print "WARNING:",str(node.sources[0]),": missing tagfile url for",tagfile
print "WARNING:",source[0].abspath, ": missing tagfile url for", tagfile
def DoxyGenerator(source, target, env, for_signature): data = DoxyfileParse(source[0].get_contents(), str(source[0].dir)) actions = [ env.Action("cd ${SOURCE.dir} && ${DOXYGEN} ${SOURCE.file}") ] # This will add automatic 'installdox' calls. # # For every referenced tagfile, the generator first checks for the # existence of a construction variable '<name>_DOXY_URL' where # '<name>' is the uppercased name of the tagfile sans extension # (e.g. 'Utils.tag' -> 'UTILS_DOXY_URL'). If this variable exists, # it must contain the url or path to the installed documentation # corresponding to the tag file. # # Is the variable is not found and if a referenced tag file is a # target within this same build, the generator will parse the # 'Doxyfile' from which the tag file is built. It will # automatically create the html directory from the information in # that 'Doxyfile'. # # If for any referenced tagfile no url can be found, 'installdox' # will *not* be called and a warning about the missing url is # generated. if data.get('GENERATE_HTML','YES') == "YES": output_dir = os.path.normpath(os.path.join( str(source[0].dir), data.get("OUTPUT_DIRECTORY","."), data.get("HTML_OUTPUT","html") )) args = [] for tagfile in data.get('TAGFILES',[]): url = env.get(os.path.splitext(os.path.basename(tagfile))[0].upper()+"_DOXY_URL", None) if not url: url = doxyNodeHtmlDir( env.File(os.path.normpath(os.path.join( str(source[0].dir), tagfile )))) if url : url = relpath(output_dir, url) if not url: print "WARNING:",str(node.sources[0]),": missing tagfile url for",tagfile args = None if args is not None and url: args.append("-l %s@%s" % ( os.path.basename(tagfile), url )) if args: actions.append(env.Action('cd %s && ./installdox %s' % (output_dir, " ".join(args)))) actions.append(env.Action([ "touch $TARGETS" ])) return actions
1be18a2af8b3880d492f80349c68c4d9cf1ae16a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2548/1be18a2af8b3880d492f80349c68c4d9cf1ae16a/Doxygen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 1698, 3908, 12, 3168, 16, 1018, 16, 1550, 16, 364, 67, 8195, 4672, 225, 501, 273, 2256, 1698, 768, 3201, 12, 3168, 63, 20, 8009, 588, 67, 3980, 9334, 609, 12, 3168, 63, 20, 800...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 1698, 3908, 12, 3168, 16, 1018, 16, 1550, 16, 364, 67, 8195, 4672, 225, 501, 273, 2256, 1698, 768, 3201, 12, 3168, 63, 20, 8009, 588, 67, 3980, 9334, 609, 12, 3168, 63, 20, 800...
rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"')
rx = re.compile('[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', re.I)
def find_user_password(self, realm, authuri): user, password = HTTPPasswordMgr.find_user_password(self,realm,authuri) if user is not None: return user, password return HTTPPasswordMgr.find_user_password(self, None, authuri)
9e6896504f6621b865fbea34a8f1a4729e837c4a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9e6896504f6621b865fbea34a8f1a4729e837c4a/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1355, 67, 3664, 12, 2890, 16, 11319, 16, 1357, 1650, 4672, 729, 16, 2201, 273, 2239, 3913, 9455, 18, 4720, 67, 1355, 67, 3664, 12, 2890, 16, 24056, 16, 1944, 1650, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1355, 67, 3664, 12, 2890, 16, 11319, 16, 1357, 1650, 4672, 729, 16, 2201, 273, 2239, 3913, 9455, 18, 4720, 67, 1355, 67, 3664, 12, 2890, 16, 24056, 16, 1944, 1650, 13, 309, ...
def __init__(self, path=None, fileobj=None): assert bool(path) ^ bool(fileobj) if path: self.f = open(path, "r+b") else: self.f = fileobj self.f.seek(0)
def __init__(self, path): self.f = open(path, "r+b")
def __init__(self, path=None, fileobj=None): assert bool(path) ^ bool(fileobj) if path: self.f = open(path, "r+b") else: self.f = fileobj self.f.seek(0) br = BootRecord.from_fileobj(self.f) assert br["ident"].rstrip("\0") == "clfs", repr(br["ident"]) assert br["version"] == 1 self.cluster_size = br["clrsize"] self.master_region_cluster_count = br["mstrclrs"] self.allocation_table_cluster_count = br["atabclrs"] self.data_region_cluster_count = br["dataclrs"] self.filesystem_cluster_count = \ self.master_region_cluster_count + \ self.allocation_table_cluster_count + \ self.data_region_cluster_count
a2d8f4bc0f5dd94eba8767e5d77b1beb78415227 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4811/a2d8f4bc0f5dd94eba8767e5d77b1beb78415227/clfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 365, 18, 74, 273, 1696, 12, 803, 16, 315, 86, 15, 70, 7923, 5186, 273, 26254, 2115, 18, 2080, 67, 768, 2603, 12, 2890, 18, 74, 13, 1815, 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, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 365, 18, 74, 273, 1696, 12, 803, 16, 315, 86, 15, 70, 7923, 5186, 273, 26254, 2115, 18, 2080, 67, 768, 2603, 12, 2890, 18, 74, 13, 1815, 5...
if when.startswith('W'):
if self.when.startswith('W'):
def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None, delay=0, utc=0): BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay) self.when = string.upper(when) self.backupCount = backupCount self.utc = utc # Calculate the real rollover interval, which is just the number of # seconds between rollovers. Also set the filename suffix used when # a rollover occurs. Current 'when' events supported: # S - Seconds # M - Minutes # H - Hours # D - Days # midnight - roll over at midnight # W{0-6} - roll over on a certain day; 0 - Monday # # Case of the 'when' specifier is not important; lower or upper case # will work. currentTime = int(time.time()) if self.when == 'S': self.interval = 1 # one second self.suffix = "%Y-%m-%d_%H-%M-%S" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}$" elif self.when == 'M': self.interval = 60 # one minute self.suffix = "%Y-%m-%d_%H-%M" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}$" elif self.when == 'H': self.interval = 60 * 60 # one hour self.suffix = "%Y-%m-%d_%H" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}$" elif self.when == 'D' or self.when == 'MIDNIGHT': self.interval = 60 * 60 * 24 # one day self.suffix = "%Y-%m-%d" self.extMatch = r"^\d{4}-\d{2}-\d{2}$" elif self.when.startswith('W'): self.interval = 60 * 60 * 24 * 7 # one week if len(self.when) != 2: raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when) if self.when[1] < '0' or self.when[1] > '6': raise ValueError("Invalid day specified for weekly rollover: %s" % self.when) self.dayOfWeek = int(self.when[1]) self.suffix = "%Y-%m-%d" self.extMatch = r"^\d{4}-\d{2}-\d{2}$" else: raise ValueError("Invalid rollover interval specified: %s" % self.when)
b6b55f914cab157fc22a2fd66d9cfc33a233507b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/b6b55f914cab157fc22a2fd66d9cfc33a233507b/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 16, 2688, 33, 7036, 16, 4624, 33, 20, 16, 9439, 33, 20, 4672, 3360, 8570, 1776, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 16, 2688, 33, 7036, 16, 4624, 33, 20, 16, 9439, 33, 20, 4672, 3360, 8570, 1776, ...
ctype, gp = patches[f] if ctype == 'RENAME':
gp = patches[f] if not gp: continue if gp.op == 'RENAME':
def updatedir(ui, repo, patches): '''Update dirstate after patch application according to metadata''' if not patches: return copies = [] removes = {} cfiles = patches.keys() cwd = repo.getcwd() if cwd: cfiles = [util.pathto(repo.root, cwd, f) for f in patches.keys()] for f in patches: ctype, gp = patches[f] if ctype == 'RENAME': copies.append((gp.oldpath, gp.path)) removes[gp.oldpath] = 1 elif ctype == 'COPY': copies.append((gp.oldpath, gp.path)) elif ctype == 'DELETE': removes[gp.path] = 1 for src, dst in copies: repo.copy(src, dst) removes = removes.keys() if removes: repo.remove(util.sort(removes), True) for f in patches: ctype, gp = patches[f] if gp and gp.mode: islink, isexec = gp.mode dst = os.path.join(repo.root, gp.path) # patch won't create empty files if ctype == 'ADD' and not os.path.exists(dst): flags = (isexec and 'x' or '') + (islink and 'l' or '') repo.wwrite(gp.path, '', flags) else: util.set_flags(dst, islink, isexec) cmdutil.addremove(repo, cfiles) files = patches.keys() files.extend([r for r in removes if r not in files]) return util.sort(files)
545f4d8d558fec3c96fc1546200fe77944791dac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/545f4d8d558fec3c96fc1546200fe77944791dac/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3526, 481, 12, 4881, 16, 3538, 16, 16482, 4672, 9163, 1891, 302, 920, 340, 1839, 4729, 2521, 4888, 358, 1982, 26418, 309, 486, 16482, 30, 327, 13200, 273, 5378, 7157, 273, 2618, 276, 235...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3526, 481, 12, 4881, 16, 3538, 16, 16482, 4672, 9163, 1891, 302, 920, 340, 1839, 4729, 2521, 4888, 358, 1982, 26418, 309, 486, 16482, 30, 327, 13200, 273, 5378, 7157, 273, 2618, 276, 235...
self.enableHistBtns()
self.enableHistButtons()
def updFiles(self, fileData, isCurrent, keyVar): """Handle files keyword """ #print "%s updFiles(fileData=%r; isCurrent=%r)" % (self.actor, fileData, isCurrent) if not isCurrent: return cmdChar, isNew, baseDir, imageName, maskName = fileData[0:5] msgDict = keyVar.getMsgDict() cmdr = msgDict["cmdr"] cmdID = msgDict["cmdID"] imageName = baseDir + imageName if maskName: maskName = baseDir + maskName
d1909c3750f356969ac52bbe45612907850f17e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6354/d1909c3750f356969ac52bbe45612907850f17e7/GuideWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2166, 2697, 12, 2890, 16, 23111, 16, 25694, 16, 498, 1537, 4672, 3536, 3259, 1390, 4932, 3536, 468, 1188, 2213, 87, 2166, 2697, 12, 768, 751, 5095, 86, 31, 25694, 5095, 86, 2225, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2166, 2697, 12, 2890, 16, 23111, 16, 25694, 16, 498, 1537, 4672, 3536, 3259, 1390, 4932, 3536, 468, 1188, 2213, 87, 2166, 2697, 12, 768, 751, 5095, 86, 31, 25694, 5095, 86, 2225, 738, ...
self.assertEquals('Date', typename('var_time'))
self.assertEquals('Date', typename('var_time'))
def testExactConverter(self): class MyInteger(int, JSClass): pass class MyString(str, JSClass): pass class MyUnicode(unicode, JSClass): pass class MyDateTime(datetime.time, JSClass): pass class Global(JSClass): var_bool = True var_int = 1 var_float = 1.0 var_str = 'str' var_unicode = u'unicode' var_datetime = datetime.datetime.now() var_date = datetime.date.today() var_time = datetime.time() var_myint = MyInteger() var_mystr = MyString('mystr') var_myunicode = MyUnicode('myunicode') var_mytime = MyDateTime() with JSContext(Global()) as ctxt: typename = ctxt.eval("(function (name) { return this[name].constructor.name; })") typeof = ctxt.eval("(function (name) { return typeof(this[name]); })") self.assertEquals('Boolean', typename('var_bool')) self.assertEquals('Number', typename('var_int')) self.assertEquals('Number', typename('var_float')) self.assertEquals('String', typename('var_str')) self.assertEquals('String', typename('var_unicode')) self.assertEquals('Date', typename('var_datetime')) self.assertEquals('Date', typename('var_date')) self.assertEquals('Date', typename('var_time')) self.assertEquals('MyInteger', typename('var_myint')) self.assertEquals('MyString', typename('var_mystr')) self.assertEquals('MyUnicode', typename('var_myunicode')) self.assertEquals('MyDateTime', typename('var_mytime')) self.assertEquals('object', typeof('var_myint')) self.assertEquals('object', typeof('var_mystr')) self.assertEquals('object', typeof('var_myunicode')) self.assertEquals('object', typeof('var_mytime'))
d76ea3f452d147f051e65b20fdab9b87a8b84413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2065/d76ea3f452d147f051e65b20fdab9b87a8b84413/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 14332, 5072, 12, 2890, 4672, 667, 8005, 4522, 12, 474, 16, 6756, 797, 4672, 1342, 225, 667, 8005, 780, 12, 701, 16, 6756, 797, 4672, 1342, 225, 667, 8005, 16532, 12, 9124, 16, 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, 1842, 14332, 5072, 12, 2890, 4672, 667, 8005, 4522, 12, 474, 16, 6756, 797, 4672, 1342, 225, 667, 8005, 780, 12, 701, 16, 6756, 797, 4672, 1342, 225, 667, 8005, 16532, 12, 9124, 16, 67...
dc.SetPen(wx.Pen(styles.blockItem.getEventOutlineColor(item))) dc.SetBrush(styles.selectionBrush)
eventColors = styles.blockItem.getEventColors(item) dc.SetPen(wx.Pen(eventColors.selectedOutlineColor)) brush = styles.GetGradientBrush(eventColors.selectedGradientLeft, eventColors.selectedGradientRight) dc.SetBrush(brush) dc.SetTextForeground(eventColors.selectedTextColor)
def DrawCells(self, dc): styles = self.parent # Set up fonts and brushes for drawing the events dc.SetTextForeground(wx.BLACK) dc.SetBrush(wx.WHITE_BRUSH)
25ddad0361cdcff8c6c9b1849cc3d6061261e934 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/25ddad0361cdcff8c6c9b1849cc3d6061261e934/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 10505, 12, 2890, 16, 6744, 4672, 5687, 273, 365, 18, 2938, 225, 468, 1000, 731, 16450, 471, 5186, 1218, 281, 364, 16327, 326, 2641, 6744, 18, 694, 1528, 23206, 12, 27226, 18, 1461...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 10505, 12, 2890, 16, 6744, 4672, 5687, 273, 365, 18, 2938, 225, 468, 1000, 731, 16450, 471, 5186, 1218, 281, 364, 16327, 326, 2641, 6744, 18, 694, 1528, 23206, 12, 27226, 18, 1461...
new_url='http://foo/?bar=true&q=%s')
new_url='http://localhost/?bar=true&q=%s')
def testEditSearchEngine(self): """Test editing a search engine's properties.""" self.AddSearchEngine(title='foo', keyword='foo.com', url='http://foo/?q=%s') self.EditSearchEngine(keyword='foo.com', new_title='bar', new_keyword='bar.com', new_url='http://foo/?bar=true&q=%s') self.assertTrue(self._GetSearchEngineWithKeyword('bar.com')) self.assertFalse(self._GetSearchEngineWithKeyword('foo.com')) self.SetOmniboxText('bar.com foobar') self.OmniboxAcceptInput() self.assertEqual('http://foo/?bar=true&q=foobar', self.GetActiveTabURL().spec())
40f5b584d9cf573c0f6d6bd40834978291f1a640 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/40f5b584d9cf573c0f6d6bd40834978291f1a640/search_engines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4666, 2979, 4410, 12, 2890, 4672, 3536, 4709, 15755, 279, 1623, 4073, 1807, 1790, 12123, 365, 18, 986, 2979, 4410, 12, 2649, 2218, 11351, 2187, 4932, 2218, 11351, 18, 832, 2187, 880,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4666, 2979, 4410, 12, 2890, 4672, 3536, 4709, 15755, 279, 1623, 4073, 1807, 1790, 12123, 365, 18, 986, 2979, 4410, 12, 2649, 2218, 11351, 2187, 4932, 2218, 11351, 18, 832, 2187, 880,...
def fl_set_input_topline(ob, top): """ fl_set_input_topline(ob, top) """ _fl_set_input_topline(ob, top)
def fl_set_input_topline(pObject, top): """ fl_set_input_topline(pObject, top) """ _fl_set_input_topline(pObject, top)
def fl_set_input_topline(ob, top): """ fl_set_input_topline(ob, top) """ _fl_set_input_topline(ob, top)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 2630, 67, 869, 412, 558, 12, 84, 921, 16, 1760, 4672, 3536, 1183, 67, 542, 67, 2630, 67, 869, 412, 558, 12, 84, 921, 16, 1760, 13, 3536, 225, 389, 2242, 67, 542,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 2630, 67, 869, 412, 558, 12, 84, 921, 16, 1760, 4672, 3536, 1183, 67, 542, 67, 2630, 67, 869, 412, 558, 12, 84, 921, 16, 1760, 13, 3536, 225, 389, 2242, 67, 542,...
for residue in groel.residueRange()[80:-80]: groel[residue].clearAtoms()
def tempZoomDialog(seqView, scrollArea): plusButton=QtGui.QPushButton('+') plusButton.setMaximumWidth(50) plusButton.connect(plusButton, QtCore.SIGNAL("clicked()"), seqView.incrementPointSize) plusButton.connect(plusButton, QtCore.SIGNAL("clicked()"), scrollArea.updateHeight) minusButton=QtGui.QPushButton('-') minusButton.setMaximumWidth(50) minusButton.connect(minusButton, QtCore.SIGNAL("clicked()"), seqView.decrementPointSize) minusButton.connect(minusButton, QtCore.SIGNAL("clicked()"), scrollArea.updateHeight) minusButton.emit(QtCore.SIGNAL("clicked()")) # There is some bug with the scroll widget. If I don't use the minusButton or plusButton once (e.g. previous line), then the scrollbar is wrong size. layout=QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight) layout.addWidget(plusButton) layout.addWidget(minusButton) dialog=QtGui.QDialog() dialog.resize(QtCore.QSize(150,40)) dialog.setModal(False) dialog.setLayout(layout) dialog.setWindowTitle(QtCore.QString('Zoom Dialog')) return dialog
4ecf390c875fd81dec418b7fa16e2af45d5d01fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/4ecf390c875fd81dec418b7fa16e2af45d5d01fb/SequenceView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1906, 11497, 6353, 12, 5436, 1767, 16, 5532, 5484, 4672, 8737, 3616, 33, 23310, 18070, 18, 53, 7621, 3616, 2668, 15, 6134, 8737, 3616, 18, 542, 13528, 2384, 12, 3361, 13, 8737, 3616, 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, 1906, 11497, 6353, 12, 5436, 1767, 16, 5532, 5484, 4672, 8737, 3616, 33, 23310, 18070, 18, 53, 7621, 3616, 2668, 15, 6134, 8737, 3616, 18, 542, 13528, 2384, 12, 3361, 13, 8737, 3616, 18,...
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
version = '2.0.7'
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
6a679c1f40f634dc12966bc89d339368bc9c5594 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10421/6a679c1f40f634dc12966bc89d339368bc9c5594/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
return def load(self, file):
def load(self, fname):
def __init__(self, scene): """ Initialises the BmpImage class object
c44140bd3d918f82e3b4fb0f16f6949f4d7b003e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/c44140bd3d918f82e3b4fb0f16f6949f4d7b003e/image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 6141, 326, 605, 1291, 2040, 667, 733, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 6141, 326, 605, 1291, 2040, 667, 733, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return True
return not self.killed()
def _f_move_to_live_atompair_step1(self): # rewritten 080311 ### RENAME, no step1 @@@ """ [friend method, called from dna_updater]
72d6e6688d9d687c6f7ac1b6f3caab87967b3a9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/72d6e6688d9d687c6f7ac1b6f3caab87967b3a9a/DnaMarker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 74, 67, 8501, 67, 869, 67, 16472, 67, 7466, 6017, 67, 4119, 21, 12, 2890, 4672, 468, 26768, 374, 3672, 23, 2499, 11849, 534, 21150, 16, 1158, 2235, 21, 22175, 36, 3536, 306, 74, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 74, 67, 8501, 67, 869, 67, 16472, 67, 7466, 6017, 67, 4119, 21, 12, 2890, 4672, 468, 26768, 374, 3672, 23, 2499, 11849, 534, 21150, 16, 1158, 2235, 21, 22175, 36, 3536, 306, 74, ...
quick_dispatch = {}
def save_reduce(self, callable, arg_tup, state = None): write = self.write save = self.save
971792dafe584efc723c3014ded6af302d155a6f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/971792dafe584efc723c3014ded6af302d155a6f/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 12498, 12, 2890, 16, 4140, 16, 1501, 67, 88, 416, 16, 919, 273, 599, 4672, 1045, 273, 365, 18, 2626, 1923, 273, 365, 18, 5688, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1923, 67, 12498, 12, 2890, 16, 4140, 16, 1501, 67, 88, 416, 16, 919, 273, 599, 4672, 1045, 273, 365, 18, 2626, 1923, 273, 365, 18, 5688, 2, -100, -100, -100, -100, -100, -100, -100, ...
return http.Response(stream = message("Successfully deleted '%s'"%filename,
return HTMLResponse(stream = message("Successfully deleted '%s'"%filename,
def render(self, ctx): dir = os.path.abspath(self.worksheet.data_directory()) filename = ctx.args['name'][0] if ctx.args.has_key('action'): if ctx.args['action'][0] == 'delete': path = '%s/%s'%(self.worksheet.data_directory(), filename) os.unlink(path) return http.Response(stream = message("Successfully deleted '%s'"%filename, '/home/' + self.worksheet.filename())) s = notebook.html_download_or_delete_datafile(self.worksheet, self.username, filename) return http.Response(stream=s)
2c1a5997a8830efcfb475993e5f1efb45ed121ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2c1a5997a8830efcfb475993e5f1efb45ed121ea/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 1577, 273, 1140, 18, 803, 18, 5113, 803, 12, 2890, 18, 1252, 8118, 18, 892, 67, 5149, 10756, 1544, 273, 1103, 18, 1968, 3292, 529, 3546, 63, 20, 65, 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, 1743, 12, 2890, 16, 1103, 4672, 1577, 273, 1140, 18, 803, 18, 5113, 803, 12, 2890, 18, 1252, 8118, 18, 892, 67, 5149, 10756, 1544, 273, 1103, 18, 1968, 3292, 529, 3546, 63, 20, 65, 3...
totalevents = totalevents + subjob.application.stats['totalevents']
if subjob.application.stats['totalevents']: totalevents = totalevents + subjob.application.stats['totalevents']
def postprocess(self): """Determine outputdata and outputsandbox locations of finished jobs and fill output variable""" from Ganga.GPIDev.Lib.Job import Job job = self.getJobObject() if not job.backend.__class__.__name__ in [ 'NG', 'Panda' ]: if job.outputdata: try: job.outputdata.fill() except: logger.warning('An ERROR occured during job.outputdata.fill() call !') pass if not job.outputdata.output: job.updateStatus('failed') # collect athena job statistics if self.collect_stats and job.backend.__class__.__name__ in [ 'LCG', 'NG', 'Panda' ]: self.collectStats() # collect statistics for master job if not job.master and job.subjobs: numfiles = 0 numfiles2 = 0 totalevents = 0 for subjob in job.subjobs: if subjob.application.stats.has_key('numfiles'): numfiles = numfiles + subjob.application.stats['numfiles'] if subjob.application.stats.has_key('numfiles2'): numfiles2 = numfiles2 + subjob.application.stats['numfiles2'] if subjob.application.stats.has_key('totalevents'): totalevents = totalevents + subjob.application.stats['totalevents'] self.stats['numfiles']=numfiles self.stats['numfiles2']=numfiles2 self.stats['totalevents']=totalevents
dee4b0da2a540939708a09dab2bc22aa6956b22e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/dee4b0da2a540939708a09dab2bc22aa6956b22e/Athena.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 2567, 12, 2890, 4672, 3536, 8519, 876, 892, 471, 6729, 9069, 7838, 434, 6708, 6550, 471, 3636, 876, 2190, 8395, 628, 611, 539, 69, 18, 9681, 734, 14965, 18, 5664, 18, 2278, 1930, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 2567, 12, 2890, 4672, 3536, 8519, 876, 892, 471, 6729, 9069, 7838, 434, 6708, 6550, 471, 3636, 876, 2190, 8395, 628, 611, 539, 69, 18, 9681, 734, 14965, 18, 5664, 18, 2278, 1930, ...
if field_detail['type'] in ('one2many', 'many2many') and i != len(self.arg) - 1:
if field_detail['type'] in ('one2many', 'many2many'):
def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name res = {}.fromkeys(ids, False) objlst = obj.browse(cr, uid, ids) for data in objlst: if not data: continue t_data = data relation = obj._name for i in range(len(self.arg)): field_detail = self._relations[i] relation = field_detail['object'] try: if not t_data[self.arg[i]]: t_data = False break except: t_data = False break if field_detail['type'] in ('one2many', 'many2many') and i != len(self.arg) - 1: t_data = t_data[self.arg[i]][0] else: t_data = t_data[self.arg[i]] if type(t_data) == type(objlst[0]): res[data.id] = t_data.id else: res[data.id] = t_data
e30c95b48347ca1dd0ee4c5d7ff421fc08311fcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/e30c95b48347ca1dd0ee4c5d7ff421fc08311fcd/fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 896, 12, 2890, 16, 1081, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 833, 16, 819, 33, 7036, 4672, 365, 6315, 1518, 67, 588, 22, 12, 3353, 16, 4555, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4293, 299, 67, 896, 12, 2890, 16, 1081, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 529, 16, 833, 16, 819, 33, 7036, 4672, 365, 6315, 1518, 67, 588, 22, 12, 3353, 16, 4555, 16,...
constraints.append("---------------------------------------------------------------------------") constraints.append(const.name) constraints.append(const.constraint)
if pline.campaign_id.country_id in const.country_ids or not const.country_ids: constraints.append("---------------------------------------------------------------------------") constraints.append(const.name) constraints.append(const.constraint)
def po_generate(self,cr, uid, ids, *args): plines = self.browse(cr, uid ,ids) if not plines: raise osv.except_osv('Warning', "There's no purchase lines defined for this campaign") for pline in plines: if pline.state != 'done': if not pline.product_id.seller_ids: raise osv.except_osv('Warning', "There's no supplier defined for this product : %s" % (pline.product_id.name,) )
69c8954d987167cad030faf89e21c8ebbb6cb792 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/69c8954d987167cad030faf89e21c8ebbb6cb792/campaign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8275, 67, 7163, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 886, 1465, 273, 365, 18, 25731, 12, 3353, 16, 4555, 269, 2232, 13, 309, 486, 886, 1465, 30, 1002, 225, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8275, 67, 7163, 12, 2890, 16, 3353, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 886, 1465, 273, 365, 18, 25731, 12, 3353, 16, 4555, 269, 2232, 13, 309, 486, 886, 1465, 30, 1002, 225, 11...
raise TALError("Bad syntax in z:insert/z:replace: " + `arg`)
raise TALError("Bad syntax in insert/replace: " + `arg`)
def emitSubstitution(self, arg, attrDict={}): key, expr = parseSubstitution(arg) if not key: raise TALError("Bad syntax in z:insert/z:replace: " + `arg`) cexpr = self.compileExpression(expr) program = self.popProgram() if key == "text": self.emit("insertText", cexpr, program) else: assert key == "structure" self.emit("insertStructure", cexpr, attrDict, program)
be82517174cba087c9d9be7c22b930a94d28ef72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/be82517174cba087c9d9be7c22b930a94d28ef72/TALGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 23798, 12, 2890, 16, 1501, 16, 1604, 5014, 12938, 4672, 498, 16, 3065, 273, 1109, 23798, 12, 3175, 13, 309, 486, 498, 30, 1002, 399, 1013, 668, 2932, 6434, 6279, 316, 2243, 19, 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, 3626, 23798, 12, 2890, 16, 1501, 16, 1604, 5014, 12938, 4672, 498, 16, 3065, 273, 1109, 23798, 12, 3175, 13, 309, 486, 498, 30, 1002, 399, 1013, 668, 2932, 6434, 6279, 316, 2243, 19, 2...
fd.write('constraint_relaxation %s\n' % 'xyz'[n])
fd.write('constrain_relaxation %s\n' % 'xyz'[n])
def write_aims(filename, atoms): """Method to write FHI-aims geometry files. Writes the atoms positions and constraints (only FixAtoms is supported at the moment). """ from ase.constraints import FixAtoms, FixCartesian import numpy as np fd = open(filename, 'w') i = 0 if atoms.get_pbc().any(): for n, vector in enumerate(atoms.get_cell()): fd.write('lattice_vector ') for i in range(3): fd.write('%16.16f ' % vector[i]) fd.write('\n') fix_cart = np.zeros([len(atoms),3]) if atoms.constraints: for constr in atoms.constraints: if isinstance(constr, FixAtoms): fix_cart[constr.index] = [1,1,1] elif isinstance(constr, FixCartesian): fix_cart[constr.a] = -constr.mask+1 for i, atom in enumerate(atoms): fd.write('atom ') for pos in atom.get_position(): fd.write('%16.16f ' % pos) fd.write(atom.symbol) fd.write('\n')
d198929bb57201827af5cdbdf09481247550707f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/d198929bb57201827af5cdbdf09481247550707f/aims.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4581, 87, 12, 3459, 16, 9006, 4672, 3536, 1305, 358, 1045, 28705, 45, 17, 4581, 87, 5316, 1390, 18, 225, 30053, 326, 9006, 6865, 471, 6237, 261, 3700, 12139, 14280, 353, 3260, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 4581, 87, 12, 3459, 16, 9006, 4672, 3536, 1305, 358, 1045, 28705, 45, 17, 4581, 87, 5316, 1390, 18, 225, 30053, 326, 9006, 6865, 471, 6237, 261, 3700, 12139, 14280, 353, 3260, ...
self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1), key2: os.path.join('new', key2)})
self.assertEqual(self._box._toc, {key0: os.path.join('new', key0), key1: os.path.join('new', key1), key2: os.path.join('new', key2)})
def test_refresh(self): # Update the table of contents self.assertEqual(self._box._toc, {}) key0 = self._box.add(self._template % 0) key1 = self._box.add(self._template % 1) self.assertEqual(self._box._toc, {}) self._box._refresh() self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) key2 = self._box.add(self._template % 2) self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1)}) self._box._refresh() self.assert_(self._box._toc == {key0: os.path.join('new', key0), key1: os.path.join('new', key1), key2: os.path.join('new', key2)})
ea8344797e1a0ebd0b419ce14e16ab25af771fcc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ea8344797e1a0ebd0b419ce14e16ab25af771fcc/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9144, 12, 2890, 4672, 468, 2315, 326, 1014, 434, 2939, 365, 18, 11231, 5812, 12, 2890, 6315, 2147, 6315, 1391, 16, 2618, 13, 498, 20, 273, 365, 6315, 2147, 18, 1289, 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, 1842, 67, 9144, 12, 2890, 4672, 468, 2315, 326, 1014, 434, 2939, 365, 18, 11231, 5812, 12, 2890, 6315, 2147, 6315, 1391, 16, 2618, 13, 498, 20, 273, 365, 6315, 2147, 18, 1289, 12, 2890...
edit_meta(request, page, oldMeta, newMeta)) else: msgs.append(request.getText('No pages changed'))
edit_meta(request, page, oldMeta, newMeta)) else: msgs.append(request.getText('No pages changed'))
def wr(fmt, *args): args = tuple(map(form_escape, args)) request.write(fmt % args)
3ecc02cae48fe755fc019f6e525b294c0198e16b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/3ecc02cae48fe755fc019f6e525b294c0198e16b/MetaEdit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12408, 12, 8666, 16, 380, 1968, 4672, 833, 273, 3193, 12, 1458, 12, 687, 67, 6939, 16, 833, 3719, 590, 18, 2626, 12, 8666, 738, 833, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12408, 12, 8666, 16, 380, 1968, 4672, 833, 273, 3193, 12, 1458, 12, 687, 67, 6939, 16, 833, 3719, 590, 18, 2626, 12, 8666, 738, 833, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
p.appendLrfTag(LrfTag("ObjectList", pageContent))
def toLrf(self, lrfWriter): # tags: # ObjectList # Link to pagestyle # Parent page tree id # stream of tags p = LrfObject("Page", self.objId) lrfWriter.append(p) pageContent = set() self.stream = LrfTagStream(0) for content in self.contents: content.toLrfContainer(lrfWriter, self) if hasattr(content, "getReferencedObjIds"): pageContent.update(content.getReferencedObjIds())
99bf65e171fa4c7747d6be6d19c8063add9448c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/99bf65e171fa4c7747d6be6d19c8063add9448c2/pylrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 48, 5809, 12, 2890, 16, 328, 5809, 2289, 4672, 468, 2342, 30, 468, 1033, 682, 468, 4048, 358, 4262, 19706, 468, 9520, 1363, 2151, 612, 468, 1407, 434, 2342, 225, 293, 273, 511, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 48, 5809, 12, 2890, 16, 328, 5809, 2289, 4672, 468, 2342, 30, 468, 1033, 682, 468, 4048, 358, 4262, 19706, 468, 9520, 1363, 2151, 612, 468, 1407, 434, 2342, 225, 293, 273, 511, 58...
def testNativeExtension(self):
def testNativeExtension(self):
def testNativeExtension(self): extSrc = "native function hello();" extPy = JSExtension("hello/python", extSrc, lambda func: lambda name: "hello " + name + " from python", register=False) self.assert_(extPy) self.assertEqual("hello/python", extPy.name) self.assertEqual(extSrc, extPy.source) self.assertFalse(extPy.autoEnable) self.assertFalse(extPy.registered) extPy.register() self.assertTrue(extPy.registered) TestEngine.extPy = extPy with JSContext(extensions=['hello/python']) as ctxt: self.assertEqual("hello flier from python", ctxt.eval("hello('flier')"))
550f86f8e1997ee990877076421feaf1936da8eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5451/550f86f8e1997ee990877076421feaf1936da8eb/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9220, 3625, 12, 2890, 4672, 1110, 7740, 273, 315, 13635, 445, 19439, 26994, 1110, 9413, 273, 6756, 3625, 2932, 23711, 19, 8103, 3113, 1110, 7740, 16, 3195, 1326, 30, 3195, 508, 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, 1842, 9220, 3625, 12, 2890, 4672, 1110, 7740, 273, 315, 13635, 445, 19439, 26994, 1110, 9413, 273, 6756, 3625, 2932, 23711, 19, 8103, 3113, 1110, 7740, 16, 3195, 1326, 30, 3195, 508, 30, ...
pass
self.w_newlines_dict = { SEEN_CR: space.wrap("\r"), SEEN_LF: space.wrap("\n"), SEEN_CRLF: space.wrap("\r\n"), SEEN_CR | SEEN_LF: space.newtuple( [space.wrap("\r"), space.wrap("\n")]), SEEN_CR | SEEN_CRLF: space.newtuple( [space.wrap("\r"), space.wrap("\r\n")]), SEEN_LF | SEEN_CRLF: space.newtuple( [space.wrap("\n"), space.wrap("\r\n")]), SEEN_CR | SEEN_LF | SEEN_CRLF: space.newtuple( [space.wrap("\r"), space.wrap("\n"), space.wrap("\r\n")]), }
def __init__(self, space): pass
125ca800cb3e1cefcb6367bef94a5f60a49da995 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/125ca800cb3e1cefcb6367bef94a5f60a49da995/interp_textio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3476, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3476, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
gLogger.error("ReplicationScheduler._execute: Failed to get metadata for all files.")
gLogger.error( "ReplicationScheduler._execute: Failed to get metadata for all files." )
def execute(self): """ The main agent execution method """ # This allows dynamic changing of the throughput timescale self.throughputTimescale = self.am_getOption('ThroughputTimescale',3600) self.throughputTimescale = 60*60*1 #print 'ThroughputTimescale:',self.throughputTimescale ###################################################################################### # # Obtain information on the current state of the channel queues # res = self.TransferDB.getChannelQueues() if not res['OK']: errStr = "ReplicationScheduler._execute: Failed to get channel queues from TransferDB." gLogger.error(errStr, res['Message']) return S_OK() if not res['Value']: gLogger.info("ReplicationScheduler._execute: No active channels found for replication.") return S_OK() channels = res['Value'] res = self.TransferDB.getChannelObservedThroughput(self.throughputTimescale) if not res['OK']: errStr = "ReplicationScheduler._execute: Failed to get observed throughput from TransferDB." gLogger.error(errStr,res['Message']) return S_OK() if not res['Value']: gLogger.info("ReplicationScheduler._execute: No active channels found for replication.") return S_OK() bandwidths = res['Value'] self.strategyHandler = StrategyHandler(bandwidths,channels,self.section) requestsPresent = True while requestsPresent: ###################################################################################### # # The first step is to obtain a transfer request from the RequestDB which should be scheduled. # gLogger.info("ReplicationScheduler._execute: Contacting RequestDB for suitable requests.") res = self.RequestDB.getRequest('transfer') if not res['OK']: gLogger.error("ReplicationScheduler._execute: Failed to get a request list from RequestDB.", res['Message']) continue if not res['Value']: gLogger.info("ReplicationScheduler._execute: No requests found in RequestDB.") requestsPresent = False return S_OK() requestString = res['Value']['RequestString'] requestName = res['Value']['RequestName'] gLogger.info("ReplicationScheduler._execute: Obtained Request %s from RequestDB." % (requestName))
9005c0a96ba1bc0698c543bcb4c1886f4eeee344 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9005c0a96ba1bc0698c543bcb4c1886f4eeee344/ReplicationScheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 225, 468, 1220, 5360, 5976, 12770, 434, 326, 24677, 1658, 31402, 365, 18, 10064, 458, 10178, 31402, 273, 365, 18, 301, 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, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 225, 468, 1220, 5360, 5976, 12770, 434, 326, 24677, 1658, 31402, 365, 18, 10064, 458, 10178, 31402, 273, 365, 18, 301, 67, ...
e = os.environ[k]
e = os.environ[varname]
def fix_path(k, v, prepend, unload): if unload: s1 = "remove" s2 = "from" else: s2 = "to" if prepend: s1 = "prepend" else: s1 = "append" debug("%s '%s' %s %s" % (s1, v, s2, k)) try: e = os.environ[k] except KeyError: e = '' if unload: p = e.split(':') p.remove(v) os.environ[k] = ':'.join(p) else: if prepend: os.environ[k] = (v + ':' + e).strip(':') else: os.environ[k] = (e + ':' + v).strip(':') debug("%s=%s" % (k, os.environ[k]))
5b9f92737b361bc1ba3adc34361d05066de7689a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5963/5b9f92737b361bc1ba3adc34361d05066de7689a/build_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 803, 12, 79, 16, 331, 16, 8254, 16, 27060, 4672, 309, 27060, 30, 272, 21, 273, 315, 4479, 6, 272, 22, 273, 315, 2080, 6, 469, 30, 272, 22, 273, 315, 869, 6, 309, 8254, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 803, 12, 79, 16, 331, 16, 8254, 16, 27060, 4672, 309, 27060, 30, 272, 21, 273, 315, 4479, 6, 272, 22, 273, 315, 2080, 6, 469, 30, 272, 22, 273, 315, 869, 6, 309, 8254, ...
if not host: return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl)
if not host: return addinfourl(open(url2pathname(file), 'r'), noheaders(), 'file:'+file)
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl) raise IOError, ('local file error', 'not on local host')
f821614d209481982caa874557b68bcf26e1ed41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f821614d209481982caa874557b68bcf26e1ed41/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 3190, 12, 718, 22, 28336, 12, 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, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 3190, 12, 718, 22, 28336, 12, 7...
blockname = match.group(0)
blockname = match.group(1)
def template(self, name): if isinstance(name, document.Document) or callable(name): return name shortname = name prefix = None providers = None if isinstance(name, str): template = self.BLOCKS.get(name) if template: return template for blocks in self.BLKSTACK: if blocks: template = blocks.get(name) if template: return template regex = "\w{%d,}:" % (int(os.name == "nt") + 1) match = re.match(regex, name) if match: prefix = match.group(1) if prefix is not None: providers = self.PREFIX_MAP.get(prefix) if not providers: self.throw(constants.ERROR_FILE, "no providers for template prefix '%s'" % prefix) if not providers: providers = self.PREFIX_MAP.get("default") or self.LOAD_TEMPLATES
ee91d8fafaaeb0531affcff79e64c250f94fe3ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1390/ee91d8fafaaeb0531affcff79e64c250f94fe3ad/context.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 12, 2890, 16, 508, 4672, 309, 1549, 12, 529, 16, 1668, 18, 2519, 13, 578, 4140, 12, 529, 4672, 327, 508, 23879, 273, 508, 1633, 273, 599, 9165, 273, 599, 309, 1549, 12, 529, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1542, 12, 2890, 16, 508, 4672, 309, 1549, 12, 529, 16, 1668, 18, 2519, 13, 578, 4140, 12, 529, 4672, 327, 508, 23879, 273, 508, 1633, 273, 599, 9165, 273, 599, 309, 1549, 12, 529, 16...
for l in a.readlines(): b.write(l.replace('@install_dir@', npymath_install_dir))
b = open(filename, 'w') try: for l in a.readlines(): b.write(l.replace('@install_dir@', npymath_install_dir)) finally: b.close()
def floupi(ext, build_dir): from numpy.distutils.misc_util import get_cmd install_dir = get_cmd('install').install_libbase npymath_install_dir = os.path.join(install_dir, 'numpy', 'core') npymath_install_dir = os.path.abspath(npymath_install_dir)
ce55f14c83259b6ce3ba0d91c0128324a330e2aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/ce55f14c83259b6ce3ba0d91c0128324a330e2aa/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20802, 416, 77, 12, 408, 16, 1361, 67, 1214, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 336, 67, 4172, 3799, 67, 1214, 273, 336, 67, 4172, 2668, 5425, 16063, 5425, 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, 20802, 416, 77, 12, 408, 16, 1361, 67, 1214, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 336, 67, 4172, 3799, 67, 1214, 273, 336, 67, 4172, 2668, 5425, 16063, 5425, 67,...
return (False, path_info, script_name)
return (None, script_name, path_info)
def match_path_info(self, path_info, script_name): for path in self.apps: if path_info == path or path_info.startswith(path+'/'): script_name += path path_info = path_info[len(path):] assert not path_info or path_info.startswith('/') return (self.apps[path], path_info, script_name)
c1e37dd6338d9182f4a043ba04e0ea9e391c21ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12795/c1e37dd6338d9182f4a043ba04e0ea9e391c21ef/wsgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 803, 67, 1376, 12, 2890, 16, 589, 67, 1376, 16, 2728, 67, 529, 4672, 364, 589, 316, 365, 18, 11411, 30, 309, 589, 67, 1376, 422, 589, 578, 589, 67, 1376, 18, 17514, 1918, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 803, 67, 1376, 12, 2890, 16, 589, 67, 1376, 16, 2728, 67, 529, 4672, 364, 589, 316, 365, 18, 11411, 30, 309, 589, 67, 1376, 422, 589, 578, 589, 67, 1376, 18, 17514, 1918, ...
rpmarchlist = archwork.availablearchs(rpmnevral,name)
rpmarchlist = archwork.availablearchs(rpmnevral, name)
def getupdatedhdrlist(headernevral, rpmnevral): "returns (name, arch) tuples of updated and uninstalled pkgs" uplist = [] newlist = [] uplist_archdict = {} for (name, arch) in headernevral.NAkeys(): # this is all hard and goofy to deal with pkgs changing arch # if we have the package installed # check to see if we have that specific arch # if so compare that name,arch vs the bestarch in the rpmdb # this deals with us having 2.4.9-31.i686 kernels installed AND 2.4.18-4.athlon kernels installed # b/c a 2.4.18-4.i686 would constantly showed up on an athlon # if its newer then mark it as updateable # if we don't have that specific arch, then if its the best arch in the headernevral, compare # it to what we have, if its newer then mark it as updateable if rpmnevral.exists(name): if rpmnevral.exists(name,arch): archlist = archwork.availablearchs(rpmnevral,name) bestarch = archwork.bestarch(archlist) rc = compareEVR(headernevral.evr(name, arch), rpmnevral.evr(name, bestarch)) if (rc > 0): if not uplist_archdict.has_key(name): uplist_archdict[name]=bestarch else: rc = compareEVR(headernevral.evr(name, bestarch), headernevral.evr(name, uplist_archdict[name])) if (rc > 0): finalarch = archwork.bestarch([bestarch, uplist_archdict[name]]) if finalarch == bestarch: uplist_archdict[name]=bestarch else: archlist = archwork.availablearchs(headernevral, name) bestarch = archwork.bestarch(archlist) if arch == bestarch: rpmarchlist = archwork.availablearchs(rpmnevral,name) bestrpmarch = archwork.bestarch(rpmarchlist) rc = compareEVR(headernevral.evr(name, arch), rpmnevral.evr(name, bestrpmarch)) if (rc > 0): if not uplist_archdict.has_key(name): uplist_archdict[name]=bestarch else: rc = compareEVR(headernevral.evr(name, bestarch), headernevral.evr(name, uplist_archdict[name])) if (rc > 0): finalarch = archwork.bestarch([bestarch, uplist_archdict[name]]) if finalarch == bestarch: uplist_archdict[name]=bestarch else: newlist.append((name, arch)) for name in uplist_archdict.keys(): uplist.append((name,uplist_archdict[name])) nulist=uplist+newlist return (uplist, newlist, nulist)
e7852c63a5b8d228ffcaf8685bd9ef2f040a51ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/e7852c63a5b8d228ffcaf8685bd9ef2f040a51ef/clientStuff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7007, 16587, 1098, 12, 3374, 4644, 18090, 287, 16, 25228, 4644, 18090, 287, 4672, 315, 6154, 261, 529, 16, 6637, 13, 10384, 434, 3526, 471, 640, 13435, 16922, 6, 582, 17842, 273, 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, 336, 7007, 16587, 1098, 12, 3374, 4644, 18090, 287, 16, 25228, 4644, 18090, 287, 4672, 315, 6154, 261, 529, 16, 6637, 13, 10384, 434, 3526, 471, 640, 13435, 16922, 6, 582, 17842, 273, 53...
self.price = price or item.price
self.price = price is None and item.price or price
def __init__(self, item, price=None): self.item = item self.price = price or item.price
05ac1efe0d83a16e5a9ce235f2fec5d3b6765282 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/05ac1efe0d83a16e5a9ce235f2fec5d3b6765282/proxied_association.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 761, 16, 6205, 33, 7036, 4672, 365, 18, 1726, 273, 761, 365, 18, 8694, 273, 6205, 578, 761, 18, 8694, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 761, 16, 6205, 33, 7036, 4672, 365, 18, 1726, 273, 761, 365, 18, 8694, 273, 6205, 578, 761, 18, 8694, 225, 2, -100, -100, -100, -100, -100, -100, -100, ...
print " ... indexed as", title.encode('utf-8')
print u'('+title.encode('utf-8')+u')'
def indexDocument(self, filename, title, text, fileSize, lastModTime, content_hash, mime_type, state, file_state=FileInfo.CREATED_FILE_STATE): if self.verbose: print "Requesting indexation of %s" % filename try: title = removeControlChar(title) text = removeControlChar(text) if self.verbose: print " ... indexed as", title.encode('utf-8') self.serverProxy.indexDocument(self.cnxId, filename, title, text, fileSize, lastModTime, content_hash, mime_type, state, file_state) except (Fault, ProtocolError), exc: if self.verbose: print "An error occured on the server while indexing %s" % filename.encode('iso-8859-1') print exc print "See server log for details" else: print "Error indexing %s: %s" % (filename.encode('iso-8859-1'), exc)
ae7e63b9902b177662b00b63dc2b55ff0645c4d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/ae7e63b9902b177662b00b63dc2b55ff0645c4d2/indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 2519, 12, 2890, 16, 1544, 16, 2077, 16, 977, 16, 18984, 16, 1142, 1739, 950, 16, 913, 67, 2816, 16, 4892, 67, 723, 16, 919, 16, 585, 67, 2019, 33, 11995, 18, 18546, 67, 3776, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 2519, 12, 2890, 16, 1544, 16, 2077, 16, 977, 16, 18984, 16, 1142, 1739, 950, 16, 913, 67, 2816, 16, 4892, 67, 723, 16, 919, 16, 585, 67, 2019, 33, 11995, 18, 18546, 67, 3776, ...
time.sleep(0.001)
time.sleep(0.01)
def sendKey(keyPress): """Sends a key press through to the operating system.
89c78b4dbd46f19515a1bc47d9721ac91ea7206e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/89c78b4dbd46f19515a1bc47d9721ac91ea7206e/keyUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 653, 12, 856, 11840, 4672, 3536, 10501, 279, 498, 11779, 3059, 358, 326, 16929, 2619, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1366, 653, 12, 856, 11840, 4672, 3536, 10501, 279, 498, 11779, 3059, 358, 326, 16929, 2619, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
newline = newline + line[:res.start(0)] + res.group(1) + \ '=?' + CHARSET + '?Q?' + \ mime_encode(res.group(2), 1) + \ '?=' + res.group(3) line = line[res.end(0):] return newline + line
newline = '%s%s%s=?%s?Q?%s?=%s' % \ (newline, line[pos:res.start(0)], res.group(1), CHARSET, mime_encode(res.group(2), 1), res.group(3)) pos = res.end(0) return newline + line[pos:]
def mime_encode_header(line): '''Code a single header line as quoted-printable.''' newline = '' while 1: res = mime_header.search(line) if res is None: break newline = newline + line[:res.start(0)] + res.group(1) + \ '=?' + CHARSET + '?Q?' + \ mime_encode(res.group(2), 1) + \ '?=' + res.group(3) line = line[res.end(0):] return newline + line
2e8ba6ce911f3ef7f45e05220f4eee09973936a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2e8ba6ce911f3ef7f45e05220f4eee09973936a7/mimify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4892, 67, 3015, 67, 3374, 12, 1369, 4672, 9163, 1085, 279, 2202, 1446, 980, 487, 9298, 17, 1188, 429, 1093, 6309, 9472, 273, 875, 1323, 404, 30, 400, 273, 4892, 67, 3374, 18, 3072, 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, 4892, 67, 3015, 67, 3374, 12, 1369, 4672, 9163, 1085, 279, 2202, 1446, 980, 487, 9298, 17, 1188, 429, 1093, 6309, 9472, 273, 875, 1323, 404, 30, 400, 273, 4892, 67, 3374, 18, 3072, 12,...