rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
_Switch(["--6merpair", "6merpair"], ["input"],
_Switch(["--6merpair", "6merpair", "sixmerpair"], ["input"],
def __init__(self, cmd="mafft", **kwargs): BLOSUM_MATRICES = ["30","45","62","80"] self.parameters = \ [ #**** Algorithm **** #Automatically selects an appropriate strategy from L-INS-i, FFT-NS- #i and FFT-NS-2, according to data size. Default: off (always FFT-NS-2) _Switch(["--auto", "auto"], ["input"], "Automatically select strategy. Default off."), #Distance is calculated based on the number of shared 6mers. Default: on _Switch(["--6merpair", "6merpair"], ["input"], "Distance is calculated based on the number of shared " + \ "6mers. Default: on"), #All pairwise alignments are computed with the Needleman-Wunsch #algorithm. More accurate but slower than --6merpair. Suitable for a #set of globally alignable sequences. Applicable to up to ~200 #sequences. A combination with --maxiterate 1000 is recommended (G- #INS-i). Default: off (6mer distance is used) _Switch(["--globalpair", "globalpair"], ["input"], "All pairwise alignments are computed with the " + \ "Needleman-Wunsch algorithm. Default: off"), #All pairwise alignments are computed with the Smith-Waterman #algorithm. More accurate but slower than --6merpair. Suitable for a #set of locally alignable sequences. Applicable to up to ~200 #sequences. A combination with --maxiterate 1000 is recommended (L- #INS-i). Default: off (6mer distance is used) _Switch(["--localpair", "localpair"], ["input"], "All pairwise alignments are computed with the " + \ "Smith-Waterman algorithm. Default: off"), #All pairwise alignments are computed with a local algorithm with #the generalized affine gap cost (Altschul 1998). More accurate but #slower than --6merpair. Suitable when large internal gaps are #expected. Applicable to up to ~200 sequences. A combination with -- #maxiterate 1000 is recommended (E-INS-i). Default: off (6mer #distance is used) _Switch(["--genafpair", "genafpair"], ["input"], "All pairwise alignments are computed with a local " + \ "algorithm with the generalized affine gap cost " + \ "(Altschul 1998). Default: off"), #All pairwise alignments are computed with FASTA (Pearson and Lipman #1988). FASTA is required. Default: off (6mer distance is used) _Switch(["--fastapair", "fastapair"], ["input"], "All pairwise alignments are computed with FASTA " + \ "(Pearson and Lipman 1988). Default: off"), #Weighting factor for the consistency term calculated from pairwise #alignments. Valid when either of --blobalpair, --localpair, -- #genafpair, --fastapair or --blastpair is selected. Default: 2.7 _Option(["--weighti", "weighti"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Weighting factor for the consistency term calculated " + \ "from pairwise alignments. Default: 2.7", 0), #Guide tree is built number times in the progressive stage. Valid #with 6mer distance. Default: 2 _Option(["--retree", "retree"], ["input"], lambda x: isinstance(x, types.IntType), 0, "Guide tree is built number times in the progressive " + \ "stage. Valid with 6mer distance. Default: 2", 0), #Number cycles of iterative refinement are performed. Default: 0 _Option(["--maxiterate", "maxiterate"], ["input"], lambda x: isinstance(x, types.IntType), 0, "Number cycles of iterative refinement are performed. " + \ "Default: 0", 0), #Use FFT approximation in group-to-group alignment. Default: on _Switch(["--fft", "fft"], ["input"], "Use FFT approximation in group-to-group alignment. " + \ "Default: on"), #Do not use FFT approximation in group-to-group alignment. Default: #off _Switch(["--nofft", "nofft"], ["input"], "Do not use FFT approximation in group-to-group " + \ "alignment. Default: off"), #Alignment score is not checked in the iterative refinement stage. #Default: off (score is checked) _Switch(["--noscore", "noscore"], ["input"], "Alignment score is not checked in the iterative " + \ "refinement stage. Default: off (score is checked)"), #Use the Myers-Miller (1988) algorithm. Default: automatically #turned on when the alignment length exceeds 10,000 (aa/nt). _Switch(["--memsave", "memsave"], ["input"], "Use the Myers-Miller (1988) algorithm. Default: " + \ "automatically turned on when the alignment length " + \ "exceeds 10,000 (aa/nt)."), #Use a fast tree-building method (PartTree, Katoh and Toh 2007) with #the 6mer distance. Recommended for a large number (> ~10,000) of #sequences are input. Default: off _Switch(["--parttree", "parttree"], ["input"], "Use a fast tree-building method with the 6mer " + \ "distance. Default: off"), #The PartTree algorithm is used with distances based on DP. Slightly #more accurate and slower than --parttree. Recommended for a large #number (> ~10,000) of sequences are input. Default: off _Switch(["--dpparttree", "dpparttree"], ["input"], "The PartTree algorithm is used with distances " + \ "based on DP. Default: off"), #The PartTree algorithm is used with distances based on FASTA. #Slightly more accurate and slower than --parttree. Recommended for #a large number (> ~10,000) of sequences are input. FASTA is #required. Default: off _Switch(["--fastaparttree", "fastaparttree"], ["input"], "The PartTree algorithm is used with distances based " + \ "on FASTA. Default: off"), #The number of partitions in the PartTree algorithm. Default: 50 _Option(["--partsize", "partsize"], ["input"], lambda x: isinstance(x, types.IntType), 0, "The number of partitions in the PartTree algorithm. " + \ "Default: 50", 0), #Do not make alignment larger than number sequences. Valid only with #the --*parttree options. Default: the number of input sequences _Switch(["--groupsize", "groupsize"], ["input"], "Do not make alignment larger than number sequences. " + \ "Default: the number of input sequences"), #**** Parameter **** #Gap opening penalty at group-to-group alignment. Default: 1.53 _Option(["--op", "op"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Gap opening penalty at group-to-group alignment. " + \ "Default: 1.53", 0), #Offset value, which works like gap extension penalty, for group-to- #group alignment. Deafult: 0.123 _Option(["--ep", "ep"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Offset value, which works like gap extension penalty, " + \ "for group-to- group alignment. Default: 0.123", 0), #Gap opening penalty at local pairwise alignment. Valid when the -- #localpair or --genafpair option is selected. Default: -2.00 _Option(["--lop", "lop"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Gap opening penalty at local pairwise alignment. " + \ "Default: 0.123", 0), #Offset value at local pairwise alignment. Valid when the -- #localpair or --genafpair option is selected. Default: 0.1 _Option(["--lep", "lep"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Offset value at local pairwise alignment. " + \ "Default: 0.1", 0), #Gap extension penalty at local pairwise alignment. Valid when the - #-localpair or --genafpair option is selected. Default: -0.1 _Option(["--lexp", "lexp"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Gap extension penalty at local pairwise alignment. " + \ "Default: -0.1", 0), #Gap opening penalty to skip the alignment. Valid when the -- #genafpair option is selected. Default: -6.00 _Option(["--LOP", "LOP"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Gap opening penalty to skip the alignment. " + \ "Default: -6.00", 0), #Gap extension penalty to skip the alignment. Valid when the -- #genafpair option is selected. Default: 0.00 _Option(["--LEXP", "LEXP"], ["input"], lambda x: isinstance(x, types.FloatType), 0, "Gap extension penalty to skip the alignment. " + \ "Default: 0.00", 0),
08184d1dcfb598d0608c87d8b44934608b1ccc7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7167/08184d1dcfb598d0608c87d8b44934608b1ccc7e/_Mafft.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1797, 1546, 81, 1727, 1222, 3113, 2826, 4333, 4672, 605, 1502, 14020, 67, 24571, 2259, 1441, 55, 273, 8247, 5082, 15937, 7950, 15937, 8898, 15937, 3672, 1192...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1797, 1546, 81, 1727, 1222, 3113, 2826, 4333, 4672, 605, 1502, 14020, 67, 24571, 2259, 1441, 55, 273, 8247, 5082, 15937, 7950, 15937, 8898, 15937, 3672, 1192...
j = int(random() * n)
j = _int(random() * n)
def sample(self, population, k, int=int): """Chooses k unique random elements from a population sequence.
5412d81bade133739ec19f25961c05fd7a296bf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5412d81bade133739ec19f25961c05fd7a296bf2/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 11209, 16, 417, 16, 509, 33, 474, 4672, 3536, 9636, 538, 281, 417, 3089, 2744, 2186, 628, 279, 11209, 3102, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 11209, 16, 417, 16, 509, 33, 474, 4672, 3536, 9636, 538, 281, 417, 3089, 2744, 2186, 628, 279, 11209, 3102, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
if self.oldformat: oldformat1, oldformat2 = self.oldformat self.formatMenu.SetStringSelection(oldformat1) self.outputFormat.SetStringSelection(oldformat2)
if self.defformat: defformat1, defformat2 = self.defformat self.formatMenu.SetSelection(defformat1) self.outputFormat.SetSelection(defformat2) self.frameSize.SetLabel("%d x %d"%self.encoder.getSize()) self.frameRate.SetLabel("%.2f"%self.encoder.getFPS()) self.durationInSecs = self.frames / self.encoder.getFPS() self.duration.SetLabel(self.createDuration(self.durationInSecs)) def createDuration(self, durationInSecs): """ Create duration presentation from secs """ t = durationInSecs h = t / 3600 m = t / 60 s = t % 60 t = "%.2d:%.2d:%.2d" % (h, m, s) return t
def onUpdatePreset(self, event = None): """ Update the GUI based on the selected preset """ sel = self.preset.GetSelection() flag = (sel == 0) self.formatMenu.Enable(flag) self.outputFormat.Enable(flag) self.encoder.setPreset(sel) if not flag: oldformat1 = self.formatMenu.GetStringSelection() oldformat2 = self.outputFormat.GetStringSelection() self.oldformat = (oldformat1, oldformat2) self.formatMenu.SetStringSelection("Video") self.outputFormat.SetStringSelection("MPEG2") else: if self.oldformat: oldformat1, oldformat2 = self.oldformat self.formatMenu.SetStringSelection(oldformat1) self.outputFormat.SetStringSelection(oldformat2)
9804318c9256b2a84b102aa79469825f7234a484 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2877/9804318c9256b2a84b102aa79469825f7234a484/VideoGeneration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 18385, 12, 2890, 16, 871, 273, 599, 4672, 3536, 2315, 326, 10978, 2511, 603, 326, 3170, 12313, 3536, 357, 273, 365, 18, 27524, 18, 967, 6233, 1435, 2982, 273, 261, 1786, 422, 374,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27728, 18385, 12, 2890, 16, 871, 273, 599, 4672, 3536, 2315, 326, 10978, 2511, 603, 326, 3170, 12313, 3536, 357, 273, 365, 18, 27524, 18, 967, 6233, 1435, 2982, 273, 261, 1786, 422, 374,...
f[boundaryDofs[marker]] += value
f[boundaryDofs[marker]-1] += value
def applyforce(boundaryDofs, f, marker, value=0.0, dimension=0): """ Apply boundary condition to bcPresc and bcVal matrices. Parameters: boundaryDofs Dictionary with boundary dofs. f force matrix. marker Boundary marker to assign boundary condition. value Value to assign boundary condition. If not giben 0.0 is assigned. dimension dimension to apply force. 0 - all, 1 - x, 2 - y """ if boundaryDofs.has_key(marker): if dimension == 0: f[boundaryDofs[marker]] += value elif dimension == 1: f[boundaryDofs[marker][(dimension-1)::2]] += value print boundaryDofs[marker][(dimension-1)::2] elif dimension == 2: f[boundaryDofs[marker][(dimension-1)::2]] += value print boundaryDofs[marker][(dimension-1)::2] else: print "Error: Boundary marker", marker, "does not exist."
ab96978d1f94098c7ebd09c0da932a9a89e3a3f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1235/ab96978d1f94098c7ebd09c0da932a9a89e3a3f2/pycalfem_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 5734, 12, 16604, 40, 792, 87, 16, 284, 16, 5373, 16, 460, 33, 20, 18, 20, 16, 4968, 33, 20, 4672, 3536, 5534, 7679, 2269, 358, 6533, 12236, 71, 471, 6533, 3053, 16415, 18, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 5734, 12, 16604, 40, 792, 87, 16, 284, 16, 5373, 16, 460, 33, 20, 18, 20, 16, 4968, 33, 20, 4672, 3536, 5534, 7679, 2269, 358, 6533, 12236, 71, 471, 6533, 3053, 16415, 18, 225,...
return _float(s)
return _float(s)
def atof(s): """atof(s) -> float Return the floating point number represented by the string s. """ if type(s) == _StringType: return _float(s) else: raise TypeError('argument 1: expected string, %s found' % type(s).__name__)
41e1b79f8a54a22203727f5ced66902108fda7d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/41e1b79f8a54a22203727f5ced66902108fda7d7/string.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 622, 792, 12, 87, 4672, 3536, 270, 792, 12, 87, 13, 317, 1431, 225, 2000, 326, 13861, 1634, 1300, 10584, 635, 326, 533, 272, 18, 225, 3536, 309, 618, 12, 87, 13, 422, 389, 780, 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, 622, 792, 12, 87, 4672, 3536, 270, 792, 12, 87, 13, 317, 1431, 225, 2000, 326, 13861, 1634, 1300, 10584, 635, 326, 533, 272, 18, 225, 3536, 309, 618, 12, 87, 13, 422, 389, 780, 559, ...
_fl_share_canvas_colormap = cfuncproto( load_so_libforms(), "fl_share_canvas_colormap", None, [cty.POINTER(FL_OBJECT), Colormap], """void fl_share_canvas_colormap(FL_OBJECT * ob, Colormap colormap) """)
def fl_hide_canvas(pObject): """ fl_hide_canvas(pObject) """ keep_elem_refs(pObject) _fl_hide_canvas(pObject)
70db52a63a290ce6588b39cd296ac3185a4d5c20 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/70db52a63a290ce6588b39cd296ac3185a4d5c20/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 11248, 67, 15424, 12, 84, 921, 4672, 3536, 1183, 67, 11248, 67, 15424, 12, 84, 921, 13, 3536, 225, 3455, 67, 10037, 67, 9316, 12, 84, 921, 13, 389, 2242, 67, 11248, 67, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 11248, 67, 15424, 12, 84, 921, 4672, 3536, 1183, 67, 11248, 67, 15424, 12, 84, 921, 13, 3536, 225, 3455, 67, 10037, 67, 9316, 12, 84, 921, 13, 389, 2242, 67, 11248, 67, 154...
self.status_idx[s[0]] = s[0]
self.status_idx[s[1]] = s[0]
def __init__(self, debug = False): self.debug = debug
c3c34d5b5ffb445e8043457e8a47100de55babf2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/c3c34d5b5ffb445e8043457e8a47100de55babf2/db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1198, 273, 1083, 4672, 365, 18, 4148, 273, 1198, 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,...
[ 1, 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, 1198, 273, 1083, 4672, 365, 18, 4148, 273, 1198, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
data['nevra'] = '%s-%s:%s-%s.%s' % (n, e, v, r, a)
data['nevra'] = '%s-%s:%s-%s.%s' % (data['n'], e, v, r, a)
def _excluder_match(excluder, match, regexp_match, data, e,v,r,a): if False: pass elif excluder in ('eq', 'match'): if _parse_pkg(match, regexp_match, data, e,v,r,a): return True elif excluder in ('name.eq', 'name.match'): if _parse_pkg_n(match, regexp_match, data['n']): return True elif excluder in ('arch.eq', 'arch.match'): if _parse_pkg_n(match, regexp_match, a): return True elif excluder == 'nevr.eq': if 'nevr' not in data: data['nevr'] = '%s-%s:%s-%s' % (n, e, v, r) if match == data['nevr']: return True elif excluder in ('nevra.eq', 'nevra.match'): if 'nevra' not in data: data['nevra'] = '%s-%s:%s-%s.%s' % (n, e, v, r, a) if _parse_pkg_n(match, regexp_match, data['nevra']): return True elif excluder == 'name.in': if data['n'] in match: return True elif excluder == 'nevr.in': if 'nevr' not in data: data['nevr'] = '%s-%s:%s-%s' % (n, e, v, r) if data['nevr'] in match: return True elif excluder == 'nevra.in': if 'nevra' not in data: data['nevra'] = '%s-%s:%s-%s.%s' % (n, e, v, r, a) if data['nevra'] in match: return True elif excluder == 'pkgtup.eq': if 'pkgtup' not in data: data['pkgtup'] = (n, a, e, v, r) if match == data['pkgtup']: return True elif excluder == 'pkgtup.in': if 'pkgtup' not in data: data['pkgtup'] = (n, a, e, v, r) if data['pkgtup'] in match: return True elif excluder == 'marked': if data['marked']: return True elif excluder == 'washed': if not data['marked']: return True elif excluder == '*': return True else: assert False, 'Bad excluder: ' + excluder return None return False
12eb1aa0566abcc4eb8897823a664ed592d41247 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/12eb1aa0566abcc4eb8897823a664ed592d41247/sqlitesack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 338, 830, 89, 765, 67, 1916, 12, 338, 830, 89, 765, 16, 845, 16, 7195, 67, 1916, 16, 501, 16, 425, 16, 90, 16, 86, 16, 69, 4672, 309, 1083, 30, 1342, 1327, 4687, 89, 765, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 338, 830, 89, 765, 67, 1916, 12, 338, 830, 89, 765, 16, 845, 16, 7195, 67, 1916, 16, 501, 16, 425, 16, 90, 16, 86, 16, 69, 4672, 309, 1083, 30, 1342, 1327, 4687, 89, 765, 31...
db[loopaddr + '\0'] = loopmbox + '\0'
def addlist(mlist, db, fp): # Set up the mailman-loop address loopaddr = Utils.ParseEmail(Utils.get_site_email(extra='loop'))[0] loopmbox = os.path.join(mm_cfg.DATA_DIR, 'owner-bounces.mbox') # Seek to the end of the text file, but if it's empty write the standard # disclaimer, and the loop catch address. fp.seek(0, 2) if not fp.tell(): print >> fp, """\
d8d3d0e580cb1a2fb47a8454c25e13ad444faeb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d8d3d0e580cb1a2fb47a8454c25e13ad444faeb5/Postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1098, 12, 781, 376, 16, 1319, 16, 4253, 4672, 468, 1000, 731, 326, 4791, 4728, 17, 6498, 1758, 2798, 4793, 273, 6091, 18, 3201, 4134, 12, 1989, 18, 588, 67, 4256, 67, 3652, 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, 527, 1098, 12, 781, 376, 16, 1319, 16, 4253, 4672, 468, 1000, 731, 326, 4791, 4728, 17, 6498, 1758, 2798, 4793, 273, 6091, 18, 3201, 4134, 12, 1989, 18, 588, 67, 4256, 67, 3652, 12, ...
title = TextLine(title=u"Title", description=u"Title of the group.") description = Text(title=u"Description",
title = TextLine( title=_("Title"), description=_("Title of the group.")) description = Text( title=_("Description"),
def setPassword(password): """Set the password in a hashed form, so it can be verified later.
4e2ef6797bab9d75607b3490573ef52269c2649b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/4e2ef6797bab9d75607b3490573ef52269c2649b/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23753, 12, 3664, 4672, 3536, 694, 326, 2201, 316, 279, 14242, 646, 16, 1427, 518, 848, 506, 13808, 5137, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23753, 12, 3664, 4672, 3536, 694, 326, 2201, 316, 279, 14242, 646, 16, 1427, 518, 848, 506, 13808, 5137, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
except IOError, err:
except IOError: err = sys.exc_info()[1]
def _checkListSetGet(self, item, symlink=False, use_ns=False): """check list, set, get operations against an item""" self.failUnlessEqual(xattr.list(item, symlink), []) self.failUnlessRaises(EnvironmentError, xattr.set, item, self.USER_ATTR, self.USER_VAL, flags=XATTR_REPLACE) self.failUnlessRaises(EnvironmentError, xattr.set, item, self.USER_NN, self.USER_VAL, flags=XATTR_REPLACE, namespace=NS_USER) try: if use_ns: xattr.set(item, self.USER_NN, self.USER_VAL, namespace=NS_USER, nofollow=symlink) else: xattr.set(item, self.USER_ATTR, self.USER_VAL, nofollow=symlink) except IOError, err: if err.errno == errno.EPERM and symlink: # symlinks may fail, in which case we abort the rest # of the test for this case return raise self.failUnlessRaises(EnvironmentError, xattr.set, item, self.USER_ATTR, self.USER_VAL, flags=XATTR_CREATE) self.failUnlessRaises(EnvironmentError, xattr.set, item, self.USER_NN, self.USER_VAL, flags=XATTR_CREATE, namespace=NS_USER) self.failUnlessEqual(xattr.list(item, nofollow=symlink), [self.USER_ATTR]) self.failUnlessEqual(xattr.list(item, namespace=NS_USER, nofollow=symlink), [self.USER_NN]) self.failUnlessEqual(xattr.get(item, self.USER_ATTR, nofollow=symlink), self.USER_VAL) self.failUnlessEqual(xattr.get(item, self.USER_NN, nofollow=symlink, namespace=NS_USER), self.USER_VAL) self.failUnlessEqual(xattr.get_all(item, nofollow=symlink), [(self.USER_ATTR, self.USER_VAL)]) self.failUnlessEqual(xattr.get_all(item, nofollow=symlink, namespace=NS_USER), [(self.USER_NN, self.USER_VAL)]) if use_ns: xattr.remove(item, self.USER_NN, namespace=NS_USER) else: xattr.remove(item, self.USER_ATTR) self.failUnlessEqual(xattr.list(item, symlink), []) self.failUnlessEqual(xattr.get_all(item, nofollow=symlink), []) self.failUnlessRaises(EnvironmentError, xattr.remove, item, self.USER_ATTR, nofollow=symlink) self.failUnlessRaises(EnvironmentError, xattr.remove, item, self.USER_NN, namespace=NS_USER, nofollow=symlink)
cc84e466f63906d32ec1bf4a4fcae6a7bce9a4c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11150/cc84e466f63906d32ec1bf4a4fcae6a7bce9a4c8/test_xattr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 682, 694, 967, 12, 2890, 16, 761, 16, 10563, 33, 8381, 16, 999, 67, 2387, 33, 8381, 4672, 3536, 1893, 666, 16, 444, 16, 336, 5295, 5314, 392, 761, 8395, 365, 18, 6870, 984...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1893, 682, 694, 967, 12, 2890, 16, 761, 16, 10563, 33, 8381, 16, 999, 67, 2387, 33, 8381, 4672, 3536, 1893, 666, 16, 444, 16, 336, 5295, 5314, 392, 761, 8395, 365, 18, 6870, 984...
subject = models.CharField(maxlength=32, choices = self.SAT_SUBJECTS)
subject = models.CharField(maxlength=32, choices = SAT_SUBJECTS)
def __str__(self): return 'Credit Card Ext. for %s' % str(self.module)
7e01587a343a49e80ba784440c917d2264267b92 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12041/7e01587a343a49e80ba784440c917d2264267b92/module_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 296, 16520, 14338, 6419, 18, 364, 738, 87, 11, 738, 609, 12, 2890, 18, 2978, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 296, 16520, 14338, 6419, 18, 364, 738, 87, 11, 738, 609, 12, 2890, 18, 2978, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
log.info(u"Added feed '%s' by %s/%s (%s): %s", name, event.account, event.identity, event.sender, url)
log.info(u"Added feed '%s' by %s/%s (%s): %s (Found %s entries)", name, event.account, event.identity, event.sender, url, len(feed.entries)) else: event.addresponse(u"Sorry, I could not add the %s feed. %s is not a valid feed" % (name,url))
def add(self, event, url, name): session = ibid.databases.ibid() feed = session.query(Feed).filter(func.lower(Feed.name)==name.lower()).first()
26553d6626a75f69220508a2eb8571bda939e5cf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/26553d6626a75f69220508a2eb8571bda939e5cf/feeds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 871, 16, 880, 16, 508, 4672, 1339, 273, 9834, 350, 18, 3404, 19684, 18, 495, 350, 1435, 4746, 273, 1339, 18, 2271, 12, 8141, 2934, 2188, 12, 644, 18, 8167, 12, 814...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 871, 16, 880, 16, 508, 4672, 1339, 273, 9834, 350, 18, 3404, 19684, 18, 495, 350, 1435, 4746, 273, 1339, 18, 2271, 12, 8141, 2934, 2188, 12, 644, 18, 8167, 12, 814...
env.Append(CCFLAGS = '-O%d' % int(env['opt']))
env.Append(CCFLAGS = ['-O%d' % int(env['opt'])])
def IsGcc(context): context.Message("Checking if CC is really gcc...") result = context.TryAction(["%s --help | grep gcc" % env['CC']])[0] context.Result(result) return result
50ba4e889e3d144aba422fb2a117a16bf0be3173 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6561/50ba4e889e3d144aba422fb2a117a16bf0be3173/SConsUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2585, 43, 952, 12, 2472, 4672, 819, 18, 1079, 2932, 14294, 309, 225, 16525, 353, 8654, 314, 952, 7070, 13, 563, 273, 819, 18, 7833, 1803, 3816, 28385, 87, 1493, 5201, 571, 23366, 314, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2585, 43, 952, 12, 2472, 4672, 819, 18, 1079, 2932, 14294, 309, 225, 16525, 353, 8654, 314, 952, 7070, 13, 563, 273, 819, 18, 7833, 1803, 3816, 28385, 87, 1493, 5201, 571, 23366, 314, ...
sum=sum+ord(str[len(str)-1]) sum=sum & 0xffffffffL sum=(sum >> 16) + (sum & 0xffff) sum=sum+(sum >> 16) answer=~sum answer=answer & 0xffff
csum+=ord(str[len(str)-1]) csum&=0xffffffffL csum=(csum >> 16) + (csum & 0xffff) csum+=csum >> 16 answer=~csum answer&=0xffff
def in_cksum(str): """Calculate the Internet checksum of str. (Note, when packing for a packet, use the <H format specifier.)""" sum=0 countTo=(len(str)/2)*2 count=0 while count<countTo: thisVal=ord(str[count+1])*256+ord(str[count]) sum=sum+thisVal sum=sum & 0xffffffffL # Necessary? count=count+2 if countTo<len(str): sum=sum+ord(str[len(str)-1]) sum=sum & 0xffffffffL # Necessary? sum=(sum >> 16) + (sum & 0xffff) sum=sum+(sum >> 16) answer=~sum answer=answer & 0xffff # 0x0000 and 0xffff are equivalent in 1's complement arithmetic, # but the latter must be used for UDP checksums as 0 indicates no checksum. if answer==0: return 0xffff return answer
70d16121d30ba988d5b58d360835248a53501bdd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2496/70d16121d30ba988d5b58d360835248a53501bdd/sumiserv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 67, 363, 1364, 12, 701, 4672, 3536, 8695, 326, 21352, 6697, 434, 609, 18, 261, 8067, 16, 1347, 2298, 310, 364, 279, 4414, 16, 999, 326, 411, 44, 740, 24562, 18, 15574, 2142, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 316, 67, 363, 1364, 12, 701, 4672, 3536, 8695, 326, 21352, 6697, 434, 609, 18, 261, 8067, 16, 1347, 2298, 310, 364, 279, 4414, 16, 999, 326, 411, 44, 740, 24562, 18, 15574, 2142, 33, ...
return _check_result(req, module_globals[possible_handler](req, **dict(req.form)))
return _check_result(req, module_globals[possible_handler](req, **form))
def mp_legacy_publisher(req, possible_module, possible_handler): """ mod_python legacy publisher minimum implementation. """ the_module = open(possible_module).read() module_globals = {} exec(the_module, module_globals) if possible_handler in module_globals and callable(module_globals[possible_handler]): from invenio.webinterface_handler import _check_result ## the req.form must be casted to dict because of Python 2.4 and earlier ## otherwise any object exposing the mapping interface can be ## used with the magic ** try: return _check_result(req, module_globals[possible_handler](req, **dict(req.form))) except TypeError, err: if ("%s() got an unexpected keyword argument" % possible_handler) in str(err) or ('%s() takes at least' % possible_handler) in str(err): import inspect expected_args = inspect.getargspec(module_globals[possible_handler])[0] register_exception(req=req, prefix="Wrong GET parameter set in calling a legacy publisher handler for %s: expected_args=%s, found_args=%s" % (possible_handler, repr(expected_args), repr(req.form.keys())), alert_admin=CFG_DEVEL_SITE) cleaned_form = {} for arg in expected_args: if arg == 'req': continue cleaned_form[arg] = req.form.get(arg, None) return _check_result(req, module_globals[possible_handler](req, **cleaned_form)) else: raise else: raise SERVER_RETURN, HTTP_NOT_FOUND
c12125684f88ca584afd08d5cfc119e2b276aa58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2111/c12125684f88ca584afd08d5cfc119e2b276aa58/webinterface_handler_wsgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6749, 67, 17386, 67, 26018, 12, 3658, 16, 3323, 67, 2978, 16, 3323, 67, 4176, 4672, 3536, 681, 67, 8103, 8866, 12855, 5224, 4471, 18, 3536, 326, 67, 2978, 273, 1696, 12, 12708, 67, 297...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6749, 67, 17386, 67, 26018, 12, 3658, 16, 3323, 67, 2978, 16, 3323, 67, 4176, 4672, 3536, 681, 67, 8103, 8866, 12855, 5224, 4471, 18, 3536, 326, 67, 2978, 273, 1696, 12, 12708, 67, 297...
def fl_set_browser_fontstyle(ob, style): """ fl_set_browser_fontstyle(ob, style) """ _fl_set_browser_fontstyle(ob, style) _fl_set_browser_specialkey = cfuncproto(so_libforms, "fl_set_browser_specialkey", None, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_browser_fontstyle(pObject, style): """ fl_set_browser_fontstyle(pObject, style) """ _fl_set_browser_fontstyle(pObject, style) _fl_set_browser_specialkey = cfuncproto(so_libforms, "fl_set_browser_specialkey", None, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_browser_fontstyle(ob, style): """ fl_set_browser_fontstyle(ob, style) """ _fl_set_browser_fontstyle(ob, style)
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, 11213, 67, 5776, 4060, 12, 947, 16, 2154, 4672, 3536, 1183, 67, 542, 67, 11213, 67, 5776, 4060, 12, 947, 16, 2154, 13, 3536, 225, 389, 2242, 67, 542, 67, 11213, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11213, 67, 5776, 4060, 12, 947, 16, 2154, 4672, 3536, 1183, 67, 542, 67, 11213, 67, 5776, 4060, 12, 947, 16, 2154, 13, 3536, 225, 389, 2242, 67, 542, 67, 11213, 67...
key = user, host, port, string.join(dirs, '/')
key = user, host, port, '/'.join(dirs)
def open_ftp(self, url): """Use FTP protocol.""" host, path = splithost(url) if not host: raise IOError, ('ftp error', 'no host given') host, port = splitport(host) user, host = splituser(host) if user: user, passwd = splitpasswd(user) else: passwd = None host = unquote(host) user = unquote(user or '') passwd = unquote(passwd or '') host = socket.gethostbyname(host) if not port: import ftplib port = ftplib.FTP_PORT else: port = int(port) path, attrs = splitattr(path) path = unquote(path) dirs = string.splitfields(path, '/') dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:] if dirs and not dirs[0]: dirs[0] = '/' key = user, host, port, string.join(dirs, '/') # XXX thread unsafe! if len(self.ftpcache) > MAXFTPCACHE: # Prune the cache, rather arbitrarily for k in self.ftpcache.keys(): if k != key: v = self.ftpcache[k] del self.ftpcache[k] v.close() try: if not self.ftpcache.has_key(key): self.ftpcache[key] = \ ftpwrapper(user, passwd, host, port, dirs) if not file: type = 'D' else: type = 'I' for attr in attrs: attr, value = splitvalue(attr) if string.lower(attr) == 'type' and \ value in ('a', 'A', 'i', 'I', 'd', 'D'): type = string.upper(value) (fp, retrlen) = self.ftpcache[key].retrfile(file, type) if retrlen is not None and retrlen >= 0: import mimetools, StringIO headers = mimetools.Message(StringIO.StringIO( 'Content-Length: %d\n' % retrlen)) else: headers = noheaders() return addinfourl(fp, headers, "ftp:" + url) except ftperrors(), msg: raise IOError, ('ftp error', msg), sys.exc_info()[2]
2aa671823938e593ea9dedd33b3cc4194fde8a0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2aa671823938e593ea9dedd33b3cc4194fde8a0a/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 11727, 12, 2890, 16, 880, 4672, 3536, 3727, 19324, 1771, 12123, 1479, 16, 589, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 1002, 8340, 16, 7707, 11727, 555, 2187, 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, 1696, 67, 11727, 12, 2890, 16, 880, 4672, 3536, 3727, 19324, 1771, 12123, 1479, 16, 589, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 1002, 8340, 16, 7707, 11727, 555, 2187, 2...
if interwikiname and pagename == text:
if interwikiname and pagename == text:
def process_a(self, node): scriptname = self.request.getScriptname() if scriptname == "": scriptname = "/" # can either be a link (with href) or an anchor (with e.g. id) href = node.attributes.get("href", None) if href: href = wikiutil.url_unquote(href.nodeValue) id = node.attributes.get("id", None) if id: id = id.nodeValue if href: title = class_ = interwikiname = None
42c78e4bf66225ded0ec258e0428aa13ac54679b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/42c78e4bf66225ded0ec258e0428aa13ac54679b/text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 69, 12, 2890, 16, 756, 4672, 2728, 529, 273, 365, 18, 2293, 18, 588, 3651, 529, 1435, 309, 2728, 529, 422, 1408, 30, 2728, 529, 273, 4016, 468, 848, 3344, 506, 279, 1692, 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, 1207, 67, 69, 12, 2890, 16, 756, 4672, 2728, 529, 273, 365, 18, 2293, 18, 588, 3651, 529, 1435, 309, 2728, 529, 422, 1408, 30, 2728, 529, 273, 4016, 468, 848, 3344, 506, 279, 1692, 2...
@unittest2.expectedFailure
def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find the line number to break inside main(). self.line = line_number('main.c', '// Set break point at this line.')
cffd450610eb8330b39d9ee7a607beb19529cf02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11986/cffd450610eb8330b39d9ee7a607beb19529cf02/TestUniversal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 468, 3049, 2240, 1807, 24292, 7675, 7766, 2171, 18, 542, 1211, 12, 2890, 13, 468, 4163, 326, 980, 1300, 358, 898, 4832, 2774, 7675, 365, 18, 1369, 273, 980, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 468, 3049, 2240, 1807, 24292, 7675, 7766, 2171, 18, 542, 1211, 12, 2890, 13, 468, 4163, 326, 980, 1300, 358, 898, 4832, 2774, 7675, 365, 18, 1369, 273, 980, 67, ...
self.tag_completion.set_text_column(2)
self.tag_completion.set_text_column(1) self.tag_completion.set_match_func(self.tag_match_func, 1)
def _init_tag_completion(self): self.tag_completion = gtk.EntryCompletion() self.tag_completion.set_model(self.tag_model) self.tag_completion.set_text_column(2) self.tag_completion.set_inline_completion(True) self.tag_completion.set_inline_selection(True)
f1f2bada1b6e4c06481ab632a528cae5cac0a1ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/f1f2bada1b6e4c06481ab632a528cae5cac0a1ec/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 2692, 67, 11469, 12, 2890, 4672, 365, 18, 2692, 67, 11469, 273, 22718, 18, 1622, 11238, 1435, 365, 18, 2692, 67, 11469, 18, 542, 67, 2284, 12, 2890, 18, 2692, 67, 2284, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 67, 2692, 67, 11469, 12, 2890, 4672, 365, 18, 2692, 67, 11469, 273, 22718, 18, 1622, 11238, 1435, 365, 18, 2692, 67, 11469, 18, 542, 67, 2284, 12, 2890, 18, 2692, 67, 2284, ...
interpolate = 'off'
interpolate = False
def amin(a): m=sys.maxint for i in a: if not i == None and i < m: m=i return m
1710b00e2ce74686ebb0575e08b329fa86e4d048 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3323/1710b00e2ce74686ebb0575e08b329fa86e4d048/chart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 1154, 12, 69, 4672, 312, 33, 9499, 18, 1896, 474, 364, 277, 316, 279, 30, 309, 486, 277, 422, 599, 471, 277, 411, 312, 30, 312, 33, 77, 327, 312, 225, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 279, 1154, 12, 69, 4672, 312, 33, 9499, 18, 1896, 474, 364, 277, 316, 279, 30, 309, 486, 277, 422, 599, 471, 277, 411, 312, 30, 312, 33, 77, 327, 312, 225, 2, -100, -100, -100, -10...
anInstance[anInstance.__class__.__name__].destroy()
if anInstance[anInstance.__class__.__name__] != None: anInstance[anInstance.__class__.__name__].destroy()
def removeInstance( self, anInstance ):
e5ad1c153ab872b0eb480201d4af420e9867cc7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/e5ad1c153ab872b0eb480201d4af420e9867cc7a/OsogoPluginManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1442, 12, 365, 16, 392, 1442, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 1442, 12, 365, 16, 392, 1442, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if type(p) == Integer:
if type(p) == Integer or type(p) == int:
def isotopism(p): """ Returns a Permutation object that represents an isotopism (for rows, columns or symbols of a partial latin square). Since matrices in Sage are indexed from 0, this function translates +1 to agree with the Permutation class. We also handle PermutationGroupElements: EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: isotopism(5) # identity on 5 points [1, 2, 3, 4, 5] sage: G = PermutationGroup(['(1,2,3)(4,5)']) sage: g = G.gen(0) sage: isotopism(g) [2, 3, 1, 5, 4] sage: isotopism([0,3,2,1]) # 0 goes to 0, 1 goes to 3, etc. [1, 4, 3, 2] sage: isotopism( (0,1,2) ) # single cycle, presented as a tuple [2, 3, 1] sage: x = isotopism( ((0,1,2), (3,4)) ) # tuple of cycles sage: print x [2, 3, 1, 5, 4] sage: x.to_cycles() [(1, 2, 3), (4, 5)] """ # Identity isotopism on p points: if type(p) == Integer: return Permutation(range(1, p+1)) if type(p) == PermutationGroupElement: # fixme Ask the Sage mailing list about the tuple/list issue! return Permutation(list(p.tuple())) if type(p) == list: # We expect a list like [0,3,2,1] which means # that 0 goes to 0, 1 goes to 3, etc. return Permutation(map(lambda x: x+1, p)) if type(p) == tuple: # We have a single cycle: if type(p[0]) == Integer: return Permutation(tuple(map(lambda x: x+1, p))) # We have a tuple of cycles: if type(p[0]) == tuple: x = isotopism(p[0]) for i in range(1, len(p)): x = x * isotopism(p[i]) return x # Not sure what we got! raise NotImplemented
0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29677, 556, 6228, 12, 84, 4672, 3536, 2860, 279, 13813, 9245, 733, 716, 8686, 392, 29677, 556, 6228, 261, 1884, 2595, 16, 2168, 578, 7963, 434, 279, 4702, 30486, 8576, 2934, 7897, 16415, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29677, 556, 6228, 12, 84, 4672, 3536, 2860, 279, 13813, 9245, 733, 716, 8686, 392, 29677, 556, 6228, 261, 1884, 2595, 16, 2168, 578, 7963, 434, 279, 4702, 30486, 8576, 2934, 7897, 16415, ...
if find(arg, os.sep) >= 0 and os.path.isfile(arg):
if ispath(arg) and os.path.isfile(arg):
def ready(server): print 'server ready at %s' % server.url
37f7b38eb6247564c00c8a355ab12268e8486c4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/37f7b38eb6247564c00c8a355ab12268e8486c4e/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5695, 12, 3567, 4672, 1172, 296, 3567, 5695, 622, 738, 87, 11, 738, 1438, 18, 718, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5695, 12, 3567, 4672, 1172, 296, 3567, 5695, 622, 738, 87, 11, 738, 1438, 18, 718, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))).strip() req.add_header('Proxy-authorization', 'Basic ' + user_pass)
if not type or r_type.isdigit(): type = orig_type host = proxy else: host, r_host = splithost(r_type) user_pass, host = splituser(host) user, password = splitpasswd(user_pass) if user and password: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))).strip() req.add_header('Proxy-authorization', 'Basic ' + user_pass)
def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))).strip() req.add_header('Proxy-authorization', 'Basic ' + user_pass) host = unquote(host) req.set_proxy(host, type) if orig_type == type: # let other handlers take care of it # XXX this only makes sense if the proxy is before the # other handlers return None else: # need to start over, because the other handlers don't # grok the proxy's URL type return self.parent.open(req)
0ad5445d432c3a8a059bea614705456f9de80f00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0ad5445d432c3a8a059bea614705456f9de80f00/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 618, 16, 436, 67, 723, 273, 1416, 723, 12, 5656, 13, 309, 486, 618, 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, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 618, 16, 436, 67, 723, 273, 1416, 723, 12, 5656, 13, 309, 486, 618, 5...
pass
self.conn = self.connect()
def rollback(self): """ __rollback__ The operation rollback discards all operations in the current transaction.
f6d38da4b0910650112bd5df8a6e148fb35b760b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/f6d38da4b0910650112bd5df8a6e148fb35b760b/MergeSensorDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8006, 12, 2890, 4672, 3536, 1001, 20050, 972, 225, 1021, 1674, 8006, 10388, 87, 777, 5295, 316, 326, 783, 2492, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8006, 12, 2890, 4672, 3536, 1001, 20050, 972, 225, 1021, 1674, 8006, 10388, 87, 777, 5295, 316, 326, 783, 2492, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
common = filter(big._data.has_key, little._data)
common = ifilter(big._data.has_key, little)
def __and__(self, other): """Return the intersection of two sets as a new set.
bb04f603aeaa1c68e92eeaad9a385781f20ea68b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bb04f603aeaa1c68e92eeaad9a385781f20ea68b/sets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 464, 972, 12, 2890, 16, 1308, 4672, 3536, 990, 326, 7619, 434, 2795, 1678, 487, 279, 394, 444, 18, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 464, 972, 12, 2890, 16, 1308, 4672, 3536, 990, 326, 7619, 434, 2795, 1678, 487, 279, 394, 444, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
""" Returns all the Notices for a User. If archived is True, it includes archived Notices. """ return Notice.objects.filter(user=user)
''' Returns Notice objects for a certain User. If archived is False, it only includes the ones that were not archived. If archived is True, it returns all Notice objects. Superusers recive all Notices. ''' if user.is_superuser: q = Q() else: q = Q(user=user) if archived: return Notice.objects.filter(q) else: return Notice.objects.filter(q, archived=archived)
def notices_for(user, archived=False): """ Returns all the Notices for a User. If archived is True, it includes archived Notices. """ return Notice.objects.filter(user=user)
f424eaa442a1df72bbef94d4cabbc4dacdd89502 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11515/f424eaa442a1df72bbef94d4cabbc4dacdd89502/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 486, 1242, 67, 1884, 12, 1355, 16, 23276, 33, 8381, 4672, 9163, 2860, 24914, 2184, 364, 279, 8626, 2177, 18, 971, 23276, 353, 1083, 16, 518, 1338, 6104, 326, 5945, 716, 4591, 486, 23276,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 486, 1242, 67, 1884, 12, 1355, 16, 23276, 33, 8381, 4672, 9163, 2860, 24914, 2184, 364, 279, 8626, 2177, 18, 971, 23276, 353, 1083, 16, 518, 1338, 6104, 326, 5945, 716, 4591, 486, 23276,...
is_ray.__doc__ = Vrepresentation.is_ray.__doc__
def is_ray(self): """ Tests if this object is a ray. Always True by construction.
58a962fefc201dcfd3e2e47df0f7b0e2cedced92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/58a962fefc201dcfd3e2e47df0f7b0e2cedced92/polyhedra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 435, 12, 2890, 4672, 3536, 7766, 87, 309, 333, 733, 353, 279, 14961, 18, 225, 14178, 1053, 635, 16171, 18, 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, 353, 67, 435, 12, 2890, 4672, 3536, 7766, 87, 309, 333, 733, 353, 279, 14961, 18, 225, 14178, 1053, 635, 16171, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not self.selected_chunk: return self.find_bondable_pairs() self.o.gl_update()
if self.selected_chunk: self.find_bondable_pairs() self.o.gl_update() else: tol_str = fusechunks_lambda_tol_nbonds(self.tol, 0) self.w.toleranceLB.setText(tol_str)
def tolerance_changed(self, val): self.tol = val * .01 if not self.selected_chunk: return self.find_bondable_pairs() # Find bondable pairs of singlets self.o.gl_update()
bbb7e6efcf31d9718acda8efdc5aea1e1aab6aa9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/bbb7e6efcf31d9718acda8efdc5aea1e1aab6aa9/fusechunksMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10673, 67, 6703, 12, 2890, 16, 1244, 4672, 365, 18, 3490, 273, 1244, 380, 263, 1611, 309, 486, 365, 18, 8109, 67, 6551, 30, 327, 365, 18, 4720, 67, 26425, 429, 67, 11545, 1435, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10673, 67, 6703, 12, 2890, 16, 1244, 4672, 365, 18, 3490, 273, 1244, 380, 263, 1611, 309, 486, 365, 18, 8109, 67, 6551, 30, 327, 365, 18, 4720, 67, 26425, 429, 67, 11545, 1435, 468, ...
"Store a file with a unique name"
"""Store a file on the server with a unique name."""
def ftp_STOU(self, line): "Store a file with a unique name" # - Note 1: RFC 959 prohibited STOU parameters, but this prohibition is # obsolete.
367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 26556, 12, 2890, 16, 980, 4672, 3536, 2257, 279, 585, 603, 326, 1438, 598, 279, 3089, 508, 12123, 225, 468, 300, 3609, 404, 30, 8372, 2468, 6162, 450, 29993, 2347, 26556,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 882, 26556, 12, 2890, 16, 980, 4672, 3536, 2257, 279, 585, 603, 326, 1438, 598, 279, 3089, 508, 12123, 225, 468, 300, 3609, 404, 30, 8372, 2468, 6162, 450, 29993, 2347, 26556,...
roots1=[0, 3],
roots1=[0, 2],
def __init__(O, art, n_vertices, edge_list, clusters1, hinge_edges1, roots1, tree_ids1, loop_edges1=[], loop_edge_bendings1=[]): assert art[0] == "\n" O.art = art[1:] O.n_vertices = n_vertices O.edge_list = edge_list O.clusters1 = clusters1 O.hinge_edges1 = hinge_edges1 O.roots1 = roots1 O.tree_ids1 = tree_ids1 O.loop_edges1 = loop_edges1 O.loop_edge_bendings1 = loop_edge_bendings1
beddc70ddde613989d5a4013061df0cc6823058f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/beddc70ddde613989d5a4013061df0cc6823058f/tst_tardy_tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 51, 16, 3688, 16, 290, 67, 17476, 16, 3591, 67, 1098, 16, 9566, 21, 16, 366, 30391, 67, 8746, 21, 16, 12876, 21, 16, 2151, 67, 2232, 21, 16, 2798, 67, 8746, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 51, 16, 3688, 16, 290, 67, 17476, 16, 3591, 67, 1098, 16, 9566, 21, 16, 366, 30391, 67, 8746, 21, 16, 12876, 21, 16, 2151, 67, 2232, 21, 16, 2798, 67, 8746, 21...
while obj and obj.windowClassName!="TPanel":
while obj and obj.previous and obj.windowClassName!="TPanel":
def event_gainFocus(self): global oldActivePannel if oldActivePannel !=self.windowControlID: oldActivePannel=self.windowControlID obj=self while obj and obj.parent.windowClassName!="TTOTAL_CMD": obj=obj.parent counter=0 while obj and obj.windowClassName!="TPanel": obj=obj.previous if obj.windowClassName!="TDrivePanel": counter+=1 if counter==2: speech.speakMessage(_("left")) else: speech.speakMessage(_("right")) super(TCList,self).event_gainFocus()
261c423938a53d6879987dc6fb84f0444422a5f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/261c423938a53d6879987dc6fb84f0444422a5f8/totalcmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 2552, 1592, 3896, 52, 1238, 309, 1592, 3896, 52, 1238, 480, 2890, 18, 5668, 3367, 734, 30, 1592, 3896, 52, 1238, 33, 2890, 18, 5668, 3367, 734, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 2552, 1592, 3896, 52, 1238, 309, 1592, 3896, 52, 1238, 480, 2890, 18, 5668, 3367, 734, 30, 1592, 3896, 52, 1238, 33, 2890, 18, 5668, 3367, 734, 10...
print "FAIL"
print "FAIL"; failures = failures + 1
def __eq__(self, other): if isinstance(other, FooStruct): return self.bar == other.bar return 0
14105f5c7b7349c63655b5a3c3785fe12d84aa68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11935/14105f5c7b7349c63655b5a3c3785fe12d84aa68/memcache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 23077, 3823, 4672, 327, 365, 18, 3215, 422, 1308, 18, 3215, 327, 374, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 2890, 16, 1308, 4672, 309, 1549, 12, 3011, 16, 23077, 3823, 4672, 327, 365, 18, 3215, 422, 1308, 18, 3215, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, ...
args = func.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode(file) bucket_arg.WriteGetCode(file) id_arg.WriteValidationCode(file) file.Write(" GLint len = 0;\n") file.Write(" %s(%s, %s, &len);\n" % ( func.GetInfo('get_len_func'), id_arg.name, func.GetInfo('get_len_enum'))) file.Write(" Bucket* bucket = CreateBucket(%s);\n" % bucket_arg.name) file.Write(" bucket->SetSize(len + 1);\n");
args = func.GetOriginalArgs() all_but_last_2_args = args[:-2] for arg in all_but_last_2_args: arg.WriteGetCode(file) self.WriteGetDataSizeCode(func, file) size_arg = args[-2] file.Write(" uint32 size_shm_id = c.%s_shm_id;\n" % size_arg.name) file.Write(" uint32 size_shm_offset = c.%s_shm_offset;\n" % size_arg.name) file.Write(" GLsizei* length = NULL;\n") file.Write(" if (size_shm_id != 0 || size_shm_offset != 0) {\n" " length = GetSharedMemoryAs<GLsizei*>(\n" " size_shm_id, size_shm_offset, sizeof(*length));\n" " if (!length) {\n" " return error::kOutOfBounds;\n" " }\n" " }\n") dest_arg = args[-1] bufsize_arg = args[-3]
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " uint32 immediate_data_size, const gles2::%s& c) {\n" % func.name) args = func.GetCmdArgs() id_arg = args[0] bucket_arg = args[1] id_arg.WriteGetCode(file) bucket_arg.WriteGetCode(file) id_arg.WriteValidationCode(file) file.Write(" GLint len = 0;\n") file.Write(" %s(%s, %s, &len);\n" % ( func.GetInfo('get_len_func'), id_arg.name, func.GetInfo('get_len_enum'))) file.Write(" Bucket* bucket = CreateBucket(%s);\n" % bucket_arg.name) file.Write(" bucket->SetSize(len + 1);\n"); file.Write( " %s(%s, len + 1, &len, bucket->GetDataAs<GLchar*>(0, len + 1));\n" % (func.GetGLFunctionName(), id_arg.name)) file.Write(" return error::kNoError;\n") file.Write("}\n") file.Write("\n")
85c6d6739a81098c35cb35c3430f038ed4f5ddab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85c6d6739a81098c35cb35c3430f038ed4f5ddab/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 1636, 2866, 668, 611, 11386, 22, 7975, 2828, 2866, 3259, 9, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 1636, 2866, 668, 611, 11386, 22, 7975, 2828, 2866, 3259, 9, ...
coinc_tables = CoincTables(xmldoc, coinc_definer_rows)
coinc_tables = CoincTables(xmldoc, {None: coinc_definer_row})
def ligolw_thinca( xmldoc, program, process_id, EventListType, CoincTables, coinc_definer_rows, event_comparefunc, thresholds, ntuple_comparefunc = lambda events: False, get_max_segment_gap = lambda xmldoc, thresholds: float("inf"), verbose = False
ea536f42621c173d30a66a3e1607f5c4827025df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/ea536f42621c173d30a66a3e1607f5c4827025df/ligolw_thinca.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16917, 355, 91, 67, 451, 267, 5353, 12, 2025, 2434, 16, 5402, 16, 1207, 67, 350, 16, 2587, 19366, 16, 28932, 71, 6905, 16, 13170, 71, 67, 5649, 264, 67, 3870, 16, 871, 67, 9877, 644,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16917, 355, 91, 67, 451, 267, 5353, 12, 2025, 2434, 16, 5402, 16, 1207, 67, 350, 16, 2587, 19366, 16, 28932, 71, 6905, 16, 13170, 71, 67, 5649, 264, 67, 3870, 16, 871, 67, 9877, 644,...
class ChainedTargetResolver(nodes.SparseNodeVisitor): """ Copy reference attributes up the length of a hyperlink target chain. "Chained targets" are multiple adjacent internal hyperlink targets which "point to" an external or indirect target. After the transform, all chained targets will effectively point to the same place. Given the following ``document`` as input:: <document> <target id="a" name="a"> <target id="b" name="b"> <target id="c" name="c" refuri="http://chained.external.targets"> <target id="d" name="d"> <paragraph> I'm known as "d". <target id="e" name="e"> <target id="id1"> <target id="f" name="f" refname="d"> ``ChainedTargetResolver(document).walk()`` will transform the above into:: <document> <target id="a" name="a" refuri="http://chained.external.targets"> <target id="b" name="b" refuri="http://chained.external.targets"> <target id="c" name="c" refuri="http://chained.external.targets"> <target id="d" name="d"> <paragraph> I'm known as "d". <target id="e" name="e" refname="d"> <target id="id1" refname="d"> <target id="f" name="f" refname="d"> """ def unknown_visit(self, node): pass def visit_target(self, node): if node.hasattr('refuri'): attname = 'refuri' call_if_named = self.document.note_external_target elif node.hasattr('refname'): attname = 'refname' call_if_named = self.document.note_indirect_target elif node.hasattr('refid'): attname = 'refid' call_if_named = None else: return attval = node[attname] index = node.parent.index(node) for i in range(index - 1, -1, -1): sibling = node.parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ or sibling.hasattr('refname') \ or sibling.hasattr('refid'): break sibling[attname] = attval if sibling.hasattr('name') and call_if_named: call_if_named(sibling)
def resolve_internal_targets(self): """ Given::
6e8a47c861efb09c2916f5c6494703c2497717ae /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/6e8a47c861efb09c2916f5c6494703c2497717ae/references.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 7236, 67, 11358, 12, 2890, 4672, 3536, 16803, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 67, 7236, 67, 11358, 12, 2890, 4672, 3536, 16803, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
cal = LocaleHTMLCalendar(locale=options.locale)
cal = LocaleHTMLCalendar(locale=locale)
def main(args): import optparse parser = optparse.OptionParser(usage="usage: %prog [options] [year [month]]") parser.add_option( "-w", "--width", dest="width", type="int", default=2, help="width of date column (default 2, text only)" ) parser.add_option( "-l", "--lines", dest="lines", type="int", default=1, help="number of lines for each week (default 1, text only)" ) parser.add_option( "-s", "--spacing", dest="spacing", type="int", default=6, help="spacing between months (default 6, text only)" ) parser.add_option( "-m", "--months", dest="months", type="int", default=3, help="months per row (default 3, text only)" ) parser.add_option( "-c", "--css", dest="css", default="calendar.css", help="CSS to use for page (html only)" ) parser.add_option( "-L", "--locale", dest="locale", default=None, help="locale to be used from month and weekday names" ) parser.add_option( "-e", "--encoding", dest="encoding", default=None, help="Encoding to use for output" ) parser.add_option( "-t", "--type", dest="type", default="text", choices=("text", "html"), help="output type (text or html)" ) (options, args) = parser.parse_args(args) if options.locale and not options.encoding: parser.error("if --locale is specified --encoding is required") sys.exit(1) if options.type == "html": if options.locale: cal = LocaleHTMLCalendar(locale=options.locale) else: cal = HTMLCalendar() encoding = options.encoding if encoding is None: encoding = sys.getdefaultencoding() optdict = dict(encoding=encoding, css=options.css) if len(args) == 1: print cal.formatyearpage(datetime.date.today().year, **optdict) elif len(args) == 2: print cal.formatyearpage(int(args[1]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) else: if options.locale: cal = LocaleTextCalendar(locale=options.locale) else: cal = TextCalendar() optdict = dict(w=options.width, l=options.lines) if len(args) != 3: optdict["c"] = options.spacing optdict["m"] = options.months if len(args) == 1: result = cal.formatyear(datetime.date.today().year, **optdict) elif len(args) == 2: result = cal.formatyear(int(args[1]), **optdict) elif len(args) == 3: result = cal.formatmonth(int(args[1]), int(args[2]), **optdict) else: parser.error("incorrect number of arguments") sys.exit(1) if options.encoding: result = result.encode(options.encoding) print result
443898e53b73ecfa96872d6e9839c30b8792b83c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/443898e53b73ecfa96872d6e9839c30b8792b83c/calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 1930, 2153, 2670, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 306, 6874, 306, 7496, 65, 4279, 13, 2082, 18, 1289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1968, 4672, 1930, 2153, 2670, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 1546, 9167, 30, 738, 14654, 306, 2116, 65, 306, 6874, 306, 7496, 65, 4279, 13, 2082, 18, 1289, ...
def WriteGLES2ImplementationImpl(self, func, file): """Overrriden from TypeHandler.""" pass
def WriteGLES2ImplementationHeader(self, func, file): """Overrriden from TypeHandler.""" file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) all_but_last_args = func.GetOriginalArgs()[:-1] arg_string = ( ", ".join(["%s" % arg.name for arg in all_but_last_args])) file.Write(" helper_->%s(%s, result_shm_id(), result_shm_offset());\n" % (func.name, arg_string)) file.Write(" WaitForCmd();\n") file.Write(" GLsizei num_values = util_.GLGetNumValuesReturned(pname);\n") file.Write( " DCHECK_LE(num_values * sizeof(*params), kMaxSizeOfSimpleResult);\n") file.Write( " memcpy(params, result_buffer_, num_values * sizeof(*params));\n") file.Write("}\n") file.Write("\n")
b4a937e280d5e05e48c8a7abf6caf1fdf5448b1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b4a937e280d5e05e48c8a7abf6caf1fdf5448b1b/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 27188, 87, 738, 87, 9275, 87, 13, 18890, 82, 6, 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, 2598, 43, 11386, 22, 13621, 1864, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 27188, 87, 738, 87, 9275, 87, 13, 18890, 82, 6, 738,...
return tar_file
return (targz, hexlify(sha_image.digest()))
def tarzip_image( self, prefix, file, path, ): Util().check_prerequisite_command('tar')
ae7d9b2ec3a9eb66d32cee0ec2b18d182167148c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/ae7d9b2ec3a9eb66d32cee0ec2b18d182167148c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8232, 4450, 67, 2730, 12, 365, 16, 1633, 16, 585, 16, 589, 16, 262, 30, 3564, 7675, 1893, 67, 683, 822, 16608, 1137, 67, 3076, 2668, 11718, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8232, 4450, 67, 2730, 12, 365, 16, 1633, 16, 585, 16, 589, 16, 262, 30, 3564, 7675, 1893, 67, 683, 822, 16608, 1137, 67, 3076, 2668, 11718, 6134, 2, -100, -100, -100, -100, -100, -100,...
if context is None: context = getcontext()
self = object.__new__(cls) self._is_special = False if isinstance(value, _WorkRep): if value.sign == 1: self._sign = 0 else: self._sign = 1 self._int = tuple(map(int, str(value.int))) self._exp = int(value.exp) return self if isinstance(value, Decimal): self._exp = value._exp self._sign = value._sign self._int = value._int self._is_special = value._is_special return self
def __init__(self, value="0", context=None): """Create a decimal point instance.
636a6b100fe6083388bc5315758326078abe65b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/636a6b100fe6083388bc5315758326078abe65b4/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 460, 1546, 20, 3113, 819, 33, 7036, 4672, 3536, 1684, 279, 6970, 1634, 791, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 460, 1546, 20, 3113, 819, 33, 7036, 4672, 3536, 1684, 279, 6970, 1634, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
suffix = ['.html', '.txt'][self.format=="html"]
suffix = ['.txt', '.html'][self.format=="html"]
def handle(self, info=None): info = info or sys.exc_info() if self.format == "html": self.file.write(reset())
d97b9c8ad3940fcb543d8cd4d99687b5d311fc87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d97b9c8ad3940fcb543d8cd4d99687b5d311fc87/cgitb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 1123, 33, 7036, 4672, 1123, 273, 1123, 578, 2589, 18, 10075, 67, 1376, 1435, 309, 365, 18, 2139, 422, 315, 2620, 6877, 365, 18, 768, 18, 2626, 12, 6208, 10756, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 1123, 33, 7036, 4672, 1123, 273, 1123, 578, 2589, 18, 10075, 67, 1376, 1435, 309, 365, 18, 2139, 422, 315, 2620, 6877, 365, 18, 768, 18, 2626, 12, 6208, 10756, 2, ...
if 'EXIF MakerNote' in hdr.tags and detailed:
if 'EXIF MakerNote' in hdr.tags and 'Image Make' in hdr.tags and detailed:
def process_file(f, stop_tag='UNDEF', details=True, debug=False): # yah it's cheesy... global detailed detailed = details # by default do not fake an EXIF beginning fake_exif = 0 # determine whether it's a JPEG or TIFF data = f.read(12) if data[0:4] in ['II*\x00', 'MM\x00*']: # it's a TIFF file f.seek(0) endian = f.read(1) f.read(1) offset = 0 elif data[0:2] == '\xFF\xD8': # it's a JPEG file while data[2] == '\xFF' and data[6:10] in ('JFIF', 'JFXX', 'OLYM', 'Phot'): length = ord(data[4])*256+ord(data[5]) f.read(length-8) # fake an EXIF beginning of file data = '\xFF\x00'+f.read(10) fake_exif = 1 if data[2] == '\xFF' and data[6:10] == 'Exif': # detected EXIF header offset = f.tell() endian = f.read(1) else: # no EXIF information return {} else: # file format not recognized return {} # deal with the EXIF info we found if debug: print {'I': 'Intel', 'M': 'Motorola'}[endian], 'format' hdr = EXIF_header(f, endian, offset, fake_exif, debug) ifd_list = hdr.list_IFDs() ctr = 0 for i in ifd_list: if ctr == 0: IFD_name = 'Image' elif ctr == 1: IFD_name = 'Thumbnail' thumb_ifd = i else: IFD_name = 'IFD %d' % ctr if debug: print ' IFD %d (%s) at offset %d:' % (ctr, IFD_name, i) hdr.dump_IFD(i, IFD_name, stop_tag=stop_tag) # EXIF IFD exif_off = hdr.tags.get(IFD_name+' ExifOffset') if exif_off: if debug: print ' EXIF SubIFD at offset %d:' % exif_off.values[0] hdr.dump_IFD(exif_off.values[0], 'EXIF', stop_tag=stop_tag) # Interoperability IFD contained in EXIF IFD intr_off = hdr.tags.get('EXIF SubIFD InteroperabilityOffset') if intr_off: if debug: print ' EXIF Interoperability SubSubIFD at offset %d:' \ % intr_off.values[0] hdr.dump_IFD(intr_off.values[0], 'EXIF Interoperability', dict=INTR_TAGS, stop_tag=stop_tag) # GPS IFD gps_off = hdr.tags.get(IFD_name+' GPSInfo') if gps_off: if debug: print ' GPS SubIFD at offset %d:' % gps_off.values[0] hdr.dump_IFD(gps_off.values[0], 'GPS', dict=GPS_TAGS, stop_tag=stop_tag) ctr += 1 # extract uncompressed TIFF thumbnail thumb = hdr.tags.get('Thumbnail Compression') if thumb and thumb.printable == 'Uncompressed TIFF': hdr.extract_TIFF_thumbnail(thumb_ifd) # JPEG thumbnail (thankfully the JPEG data is stored as a unit) thumb_off = hdr.tags.get('Thumbnail JPEGInterchangeFormat') if thumb_off: f.seek(offset+thumb_off.values[0]) size = hdr.tags['Thumbnail JPEGInterchangeFormatLength'].values[0] hdr.tags['JPEGThumbnail'] = f.read(size) # deal with MakerNote contained in EXIF IFD if 'EXIF MakerNote' in hdr.tags and detailed: hdr.decode_maker_note() # Sometimes in a TIFF file, a JPEG thumbnail is hidden in the MakerNote # since it's not allowed in a uncompressed TIFF IFD if 'JPEGThumbnail' not in hdr.tags: thumb_off=hdr.tags.get('MakerNote JPEGThumbnail') if thumb_off: f.seek(offset+thumb_off.values[0]) hdr.tags['JPEGThumbnail']=file.read(thumb_off.field_length) return hdr.tags
ea5873c44e2e030e5889d040ffe763f60f0e8b21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11721/ea5873c44e2e030e5889d040ffe763f60f0e8b21/EXIF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 74, 16, 2132, 67, 2692, 2218, 2124, 12904, 2187, 3189, 33, 5510, 16, 1198, 33, 8381, 4672, 468, 677, 9795, 518, 1807, 19315, 281, 93, 2777, 2552, 6864, 6864, 273, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 74, 16, 2132, 67, 2692, 2218, 2124, 12904, 2187, 3189, 33, 5510, 16, 1198, 33, 8381, 4672, 468, 677, 9795, 518, 1807, 19315, 281, 93, 2777, 2552, 6864, 6864, 273, 31...
SyntaxError: assignment to None (<doctest test.test_syntax[1]>, line 1)
SyntaxError: cannot assign to None (<doctest test.test_syntax[1]>, line 1)
>>> def f(x):
e7d524049acbf7c2d2371803865b17b2724dc3f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/e7d524049acbf7c2d2371803865b17b2724dc3f5/test_syntax.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.replace_fetch_restore_operations(block)
self.replace_fetch_restore_operations(graph, block)
def create_exception_handling(self, graph, always_exc_clear=False): """After an exception in a direct_call (or indirect_call), that is not caught by an explicit except statement, we need to reraise the exception. So after this direct_call we need to test if an exception had occurred. If so, we return from the current graph with a special value (False/-1/-1.0/null). Because of the added exitswitch we need an additional block. """ if hasattr(graph, 'exceptiontransformed'): assert self.same_obj(self.exc_data_ptr, graph.exceptiontransformed) return else: self.raise_analyzer.analyze_direct_call(graph) graph.exceptiontransformed = self.exc_data_ptr
aa4d471c339ecd57c2b01e68edb42939090a5bca /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/aa4d471c339ecd57c2b01e68edb42939090a5bca/exceptiontransform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4064, 67, 26822, 12, 2890, 16, 2667, 16, 3712, 67, 10075, 67, 8507, 33, 8381, 4672, 3536, 4436, 392, 1520, 316, 279, 2657, 67, 1991, 261, 280, 16807, 67, 1991, 3631, 716, 353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4064, 67, 26822, 12, 2890, 16, 2667, 16, 3712, 67, 10075, 67, 8507, 33, 8381, 4672, 3536, 4436, 392, 1520, 316, 279, 2657, 67, 1991, 261, 280, 16807, 67, 1991, 3631, 716, 353,...
output of this method
output of this method. This is a list of lists with fields 0 GPS Start 1 GPS Stop 2 Start F 3 Stop F 4 GPS Bright 5 Freq Bright 6 Pow Bright 7 Mean Pow 8 Std Pow 9 Length 10 Integrated Power
def dumpCandidateKurveSummary(self): """ This method creates a variable object that contains the summary associated with all the elements in the input structure self.curves. This output can be used to write the summary information to a .summary text file. This method is closely related to createSummaryStructure method. We have as output of this method """ summary=[] for lineInfo in self.curves: curveID,l,p=lineInfo.getKurveHeader() #See notes in methods below for explaination #Offsets in d,F are likely wrong...Tina-Thu-Oct-04-2007:200710041448 d=lineInfo.getCandidateDuration()+self.gpsWidth.getAsFloat() F=lineInfo.getCandidateBandwidth()+self.freqWidth t=float(lineInfo.printStartGPS()) s=float(lineInfo.printStopGPS()) f=float(lineInfo.printStartFreq()) g=float(lineInfo.printStopFreq()) tmp=lineInfo.getBrightPixelAndStats() v=tmp[0][3] #Freq of Bright Pixel h=tmp[0][2].getAsFloat() #GPS time of Bright Pixel j=tmp[0][4] #The pixel power value for brightest pixel m=tmp[1] #Mean power of pixels in curve s=tmp[2] #stddev^2 of pixel power in curve #summary.append([t,s,f,g,l,p,d,F]) summary.append([t,s,f,g,l,p,d,F,v,h,m,s,j]) return summary
f8356864ebd3e4f4c62944a76ace8501c23ac979 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/f8356864ebd3e4f4c62944a76ace8501c23ac979/tracksearchutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 11910, 47, 295, 537, 4733, 12, 2890, 4672, 3536, 1220, 707, 3414, 279, 2190, 733, 716, 1914, 326, 4916, 3627, 598, 777, 326, 2186, 316, 326, 810, 3695, 365, 18, 1397, 3324, 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, 4657, 11910, 47, 295, 537, 4733, 12, 2890, 4672, 3536, 1220, 707, 3414, 279, 2190, 733, 716, 1914, 326, 4916, 3627, 598, 777, 326, 2186, 316, 326, 810, 3695, 365, 18, 1397, 3324, 18, 2...
Abelian variety factor of dimension 1 of J0(389), Abelian variety factor of dimension 2 of J0(389), Abelian variety factor of dimension 3 of J0(389), Abelian variety factor of dimension 6 of J0(389), Abelian variety factor of dimension 20 of J0(389)
Simple abelian subvariety 389a(1,389) of dimension 1 of J0(389), Simple abelian subvariety 389b(1,389) of dimension 2 of J0(389), Simple abelian subvariety 389c(1,389) of dimension 3 of J0(389), Simple abelian subvariety 389d(1,389) of dimension 6 of J0(389), Simple abelian subvariety 389e(1,389) of dimension 20 of J0(389)
def __getitem__(self, i): """ Return the i-th decomposition factor of self. EXAMPLES: sage: J = J0(389) sage: J.decomposition() [ Abelian variety factor of dimension 1 of J0(389), Abelian variety factor of dimension 2 of J0(389), Abelian variety factor of dimension 3 of J0(389), Abelian variety factor of dimension 6 of J0(389), Abelian variety factor of dimension 20 of J0(389) ] sage: J[2] Abelian variety factor of dimension 3 of J0(389) sage: J[-1] Abelian variety factor of dimension 20 of J0(389) """ return self.decomposition()[i]
62147d82541f9aed0900f78cd10df5f262f228f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62147d82541f9aed0900f78cd10df5f262f228f5/abvar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 277, 4672, 3536, 2000, 326, 277, 17, 451, 26288, 5578, 434, 365, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 804, 273, 804, 20, 12, 23, 6675, 13, 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, 1001, 31571, 972, 12, 2890, 16, 277, 4672, 3536, 2000, 326, 277, 17, 451, 26288, 5578, 434, 365, 18, 225, 5675, 8900, 11386, 30, 272, 410, 30, 804, 273, 804, 20, 12, 23, 6675, 13, 27...
type=self._label[0].lower()))
type=label[0].lower()))
def _render_admin_panel(self, req, cat, page, path_info): data = {'label_singular': gettext(self._label[0]), 'label_plural': gettext(self._label[1])}
9551c6f0906637670276f4f30356edd2f0c9f6f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/9551c6f0906637670276f4f30356edd2f0c9f6f1/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 501, 273, 13666, 1925, 67, 17835, 4278, 24972, 12, 2890, 6315, 1925, 63, 20, 65, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 501, 273, 13666, 1925, 67, 17835, 4278, 24972, 12, 2890, 6315, 1925, 63, 20, 65, 3631, ...
self.UIManager.get_widget('/MainToolbar/In').set_sensitive(enable)
self.UIManager.get_widget('/MainToolbar/In').set_sensitive(enable)
def set_zoom_in_sensitivities(self, enable): self.UIManager.get_widget('/MainMenu/ViewMenu/In').set_sensitive(enable) self.UIManager.get_widget('/MainToolbar/In').set_sensitive(enable) self.UIManager.get_widget('/Popup/In').set_sensitive(enable)
f4fb8573b027b21956ca815c0edbf66e6ae6e39e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/f4fb8573b027b21956ca815c0edbf66e6ae6e39e/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 14932, 67, 267, 67, 87, 773, 305, 427, 1961, 12, 2890, 16, 4237, 4672, 365, 18, 5370, 1318, 18, 588, 67, 6587, 2668, 19, 6376, 4599, 19, 1767, 4599, 19, 382, 16063, 542, 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, 444, 67, 14932, 67, 267, 67, 87, 773, 305, 427, 1961, 12, 2890, 16, 4237, 4672, 365, 18, 5370, 1318, 18, 588, 67, 6587, 2668, 19, 6376, 4599, 19, 1767, 4599, 19, 382, 16063, 542, 67,...
vList.append( Violation(self, line.number) )
vList.append( Violation(self, line, name) )
def apply(self, lines): vList = [] if (self.getFiletype() in self.getTypeList()): for line in lines: templateNameList = getTemplateNames(line.stripped) for name in templateNameList: if re.search("^[a-z]", name): vList.append( Violation(self, line.number) ) return vList
cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6529/cb6d1c1b9da3a15f55b42e7ffc55f274aee325d2/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 2362, 4672, 331, 682, 273, 5378, 309, 261, 2890, 18, 588, 25579, 5872, 1435, 316, 365, 18, 588, 559, 682, 1435, 4672, 364, 980, 316, 2362, 30, 15523, 682, 273, 1064...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 2890, 16, 2362, 4672, 331, 682, 273, 5378, 309, 261, 2890, 18, 588, 25579, 5872, 1435, 316, 365, 18, 588, 559, 682, 1435, 4672, 364, 980, 316, 2362, 30, 15523, 682, 273, 1064...
def randFloat(a, b, rng=random.random): """returns a random float in [a,b]"""
def randFloat(a, b=0., rng=random.random): """returns a random float in [a,b] call with single argument to generate random float between arg and zero """
def randFloat(a, b, rng=random.random): """returns a random float in [a,b]""" return lerp(a,b,rng())
dd7f64586085255ec585b7a0dd4832b071cbf8ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/dd7f64586085255ec585b7a0dd4832b071cbf8ca/PythonUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5605, 4723, 12, 69, 16, 324, 33, 20, 12990, 11418, 33, 9188, 18, 9188, 4672, 3536, 6154, 279, 2744, 1431, 316, 306, 69, 16, 70, 65, 745, 598, 2202, 1237, 358, 2103, 2744, 1431, 3086, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5605, 4723, 12, 69, 16, 324, 33, 20, 12990, 11418, 33, 9188, 18, 9188, 4672, 3536, 6154, 279, 2744, 1431, 316, 306, 69, 16, 70, 65, 745, 598, 2202, 1237, 358, 2103, 2744, 1431, 3086, ...
notification_center = NotificationCenter()
def _browse_cb(self, file, flags, interface_index, error_code, service_name, regtype, reply_domain): notification_center = NotificationCenter() if error_code != bonjour.kDNSServiceErr_NoError: self._discover_timer = reactor.callLater(1, self._command_channel.send, Command('discover')) return if not (flags & bonjour.kDNSServiceFlagsAdd): uri = FrozenSIPURI.parse(service_name.strip('<>').encode('utf-8')) if uri != self.account.contact[uri.parameters.get('transport', 'udp')] and uri in self._neighbours: self._neighbours.remove(uri) notification_center.post_notification('BonjourAccountDidRemoveNeighbour', sender=self.account, data=TimestampedNotificationData(uri=uri)) return try: file = bonjour.DNSServiceResolve(0, interface_index, service_name, regtype, reply_domain, self._resolve_cb) except bonjour.BonjourError: # Maybe we should log the error, but how? -Luci pass else: bonjour_file = BonjourFile(file, 'resolution') self._files.append(bonjour_file) self._select_proc.kill(RestartSelect)
dee5c0545c8ca1bc3f9219ea078ee0dca8662a2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/dee5c0545c8ca1bc3f9219ea078ee0dca8662a2c/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 25731, 67, 7358, 12, 2890, 16, 585, 16, 2943, 16, 1560, 67, 1615, 16, 555, 67, 710, 16, 1156, 67, 529, 16, 960, 723, 16, 4332, 67, 4308, 4672, 309, 555, 67, 710, 480, 324, 265...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25731, 67, 7358, 12, 2890, 16, 585, 16, 2943, 16, 1560, 67, 1615, 16, 555, 67, 710, 16, 1156, 67, 529, 16, 960, 723, 16, 4332, 67, 4308, 4672, 309, 555, 67, 710, 480, 324, 265...
cc.descripcion, c.monto
cc.codigo as Codigo, cc.descripcion as Nombre, c.monto as Monto
def updateModels(self):
874b6d5efd407a40438246e28019332bf2770ea1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11009/874b6d5efd407a40438246e28019332bf2770ea1/cheques.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 8430, 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, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 8430, 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, -100, -...
FakeProxyHandler.digest_auth_handler.set_qop("auth")
self.digest_auth_handler.set_qop("auth")
def test_proxy_qop_auth_works(self): self._digest_auth_handler.add_password(self.REALM, self.URL, self.USER, self.PASSWD) FakeProxyHandler.digest_auth_handler.set_qop("auth") result = self.opener.open(self.URL) while result.read(): pass result.close()
5ca1d2f6c2e5d52b6cfc2a93de4179cc0779e42a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/5ca1d2f6c2e5d52b6cfc2a93de4179cc0779e42a/test_urllib2_localnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5656, 67, 85, 556, 67, 1944, 67, 18597, 12, 2890, 4672, 365, 6315, 10171, 67, 1944, 67, 4176, 18, 1289, 67, 3664, 12, 2890, 18, 31052, 49, 16, 365, 18, 1785, 16, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5656, 67, 85, 556, 67, 1944, 67, 18597, 12, 2890, 4672, 365, 6315, 10171, 67, 1944, 67, 4176, 18, 1289, 67, 3664, 12, 2890, 18, 31052, 49, 16, 365, 18, 1785, 16, 365, 18, ...
raise UnimplementedDigestAuthOption( _("Unsupported value for algorithm: %s." % self.challenge['algorithm']))
raise UnimplementedDigestAuthOptionError( _("Unsupported value for algorithm: %s." % self.challenge['algorithm']))
def __init__(self, credentials, host, request_uri, headers, response, content): Authentication.__init__(self, credentials, host, request_uri, headers, response, content) challenge = _parse_www_authenticate(response, 'www-authenticate') self.challenge = challenge['digest'] qop = self.challenge.get('qop') self.challenge['qop'] = ('auth' in [x.strip() for x in qop.split()]) and 'auth' or None if self.challenge['qop'] is None: raise UnimplementedDigestAuthOption( _("Unsupported value for qop: %s." % qop)) self.challenge['algorithm'] = self.challenge.get('algorithm', 'MD5') if self.challenge['algorithm'] != 'MD5': raise UnimplementedDigestAuthOption( _("Unsupported value for algorithm: %s." % self.challenge['algorithm'])) self.A1 = "".join([self.credentials[0], ":", self.challenge['realm'], ":", self.credentials[1]]) self.challenge['nc'] = 1
13d650191ac45c96b1ea5981ed6514f67f1c8788 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13138/13d650191ac45c96b1ea5981ed6514f67f1c8788/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4448, 16, 1479, 16, 590, 67, 1650, 16, 1607, 16, 766, 16, 913, 4672, 8665, 16186, 2738, 972, 12, 2890, 16, 4448, 16, 1479, 16, 590, 67, 1650, 16, 1607,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4448, 16, 1479, 16, 590, 67, 1650, 16, 1607, 16, 766, 16, 913, 4672, 8665, 16186, 2738, 972, 12, 2890, 16, 4448, 16, 1479, 16, 590, 67, 1650, 16, 1607,...
task_dismiss = self.builder.get_object('task_dismiss')
self.dismiss_mi = self.builder.get_object('task_dismiss')
def _init_accelerators(self):
75a4f8fc4331cc720e9d8c18e303ddad24d6afbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/75a4f8fc4331cc720e9d8c18e303ddad24d6afbc/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 8981, 22990, 3062, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 8981, 22990, 3062, 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, -10...
if exc_info and isinstance(exc_info[1], TestError):
if exc_info and not isinstance(exc_info[1], TestError):
def run_group(self, function, *args, **dargs): """\ function: subroutine to run *args: arguments for the function """
3e28d4271e18440cc60f3bd63524e1ef999d928a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/3e28d4271e18440cc60f3bd63524e1ef999d928a/job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1655, 12, 2890, 16, 445, 16, 380, 1968, 16, 2826, 72, 1968, 4672, 3536, 64, 445, 30, 720, 22640, 358, 1086, 380, 1968, 30, 1775, 364, 326, 445, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1655, 12, 2890, 16, 445, 16, 380, 1968, 16, 2826, 72, 1968, 4672, 3536, 64, 445, 30, 720, 22640, 358, 1086, 380, 1968, 30, 1775, 364, 326, 445, 3536, 2, -100, -100, -100, -...
self.natcon.clientDataLock.acquire()
self.natcon.clientDataLock.acquire()
def close(self): """ <Purpose> Closes the socket. This will close the client connection if possible. <Side effects> The socket will no longer be usable. Socket behavior is undefined after calling this method, and most likely Runtime Errors will be encountered. """ # If the NATConnection is still initialized, then lets send a close message if self.natcon.connectionInit: # Tell the forwarder to terminate the client connection self.natcon.sendFrame(NATFrame().initAsConnTermMsg(self.clientMac)) # Clean-up self.natcon.clientDataLock.acquire() # Get the main lock self.natcon.clientDataBuffer[self.clientMac]["lock"].acquire() # Probably not necessary, but oh well self.natcon.clientDataBuffer[self.clientMac]["data"] = "" # Clear the buffer del self.natcon.clientDataBuffer[self.clientMac] # Remove the entry self.natcon.clientDataLock.release()
0a45b1efbe673e71d80ab30f62127a732c1ae414 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/0a45b1efbe673e71d80ab30f62127a732c1ae414/NATLayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 22442, 2420, 326, 2987, 18, 1220, 903, 1746, 326, 1004, 1459, 309, 3323, 18, 225, 411, 8895, 16605, 34, 1021, 2987, 903, 1158, 7144, 506...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 22442, 2420, 326, 2987, 18, 1220, 903, 1746, 326, 1004, 1459, 309, 3323, 18, 225, 411, 8895, 16605, 34, 1021, 2987, 903, 1158, 7144, 506...
name = XML.digValue(gen, str, "name").strip() if gen.url: name = tag('a', href=str(gen.url).strip())[ name ] items = ["Generated by ", Template.value[name]] if gen.version: items.extend([" version ", str(gen.version).strip()])
name = XML.digValue(gen, str, "name") url = XML.digValue(gen, str, "url") version = XML.digValue(gen, str, "version") if url: name = tag('a', href=url)[ name ] items = ["Generated by ", Template.value[ name ]] if version: items.extend([" version ", version])
def format_generator(self, gen): """Format the information contained in this message's <generator> tag""" name = XML.digValue(gen, str, "name").strip() if gen.url: name = tag('a', href=str(gen.url).strip())[ name ] items = ["Generated by ", Template.value[name]] if gen.version: items.extend([" version ", str(gen.version).strip()]) return items
0ce9f812a0e7c69531930b75a6b8eaba9b1499cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/0ce9f812a0e7c69531930b75a6b8eaba9b1499cb/MessageViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 8812, 12, 2890, 16, 3157, 4672, 3536, 1630, 326, 1779, 7542, 316, 333, 883, 1807, 411, 8812, 34, 1047, 8395, 508, 273, 3167, 18, 5606, 620, 12, 4507, 16, 609, 16, 315, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 8812, 12, 2890, 16, 3157, 4672, 3536, 1630, 326, 1779, 7542, 316, 333, 883, 1807, 411, 8812, 34, 1047, 8395, 508, 273, 3167, 18, 5606, 620, 12, 4507, 16, 609, 16, 315, 529, ...
def distribute_userguide():
def distribute_userguide(version):
def pygments_directive(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): try: lexer = get_lexer_by_name(arguments[0]) except ValueError: # no lexer found - use the text one instead of an exception lexer = TextLexer() # take an arbitrary option if more than one is given formatter = options and VARIANTS[options.keys()[0]] or DEFAULT filtered = [ line for line in content if line ] if len(filtered) and os.path.isfile(filtered[0]): content = open(content[0]).read().splitlines() # Read source code from a file parsed = highlight(u'\n'.join(content), lexer, formatter) return [nodes.raw('', parsed, format='html')]
60b5e38ad3831fa23e21916a6544b5394f2b6636 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/60b5e38ad3831fa23e21916a6544b5394f2b6636/ug2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 75, 1346, 67, 22347, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 775, 30, 8512, 273, 336, 67, 31731...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2395, 75, 1346, 67, 22347, 12, 529, 16, 1775, 16, 702, 16, 913, 16, 7586, 16, 913, 67, 3348, 16, 1203, 67, 955, 16, 919, 16, 919, 67, 9149, 4672, 775, 30, 8512, 273, 336, 67, 31731...
start_path, end_path = self.log_view.get_visible_range ()
visible_range = self.log_view.get_visible_range () if visible_range is None: return start_path, end_path = visible_range
def update_timeline_position (self):
74cd49277ab41d2ce9d441d4c5e02484d6ae9a07 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12310/74cd49277ab41d2ce9d441d4c5e02484d6ae9a07/Timeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 26237, 67, 3276, 261, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 26237, 67, 3276, 261, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Return True if this equality is definitely true. Return False if it is false or the algorithm for testing equality is
Return True if this (in)equality is definitely true. Return False if it is false or the algorithm for testing (in)equality is
def __nonzero__(self): """ Return True if this equality is definitely true. Return False if it is false or the algorithm for testing equality is inconclusive.
bad92acfe83f4150bc094d014b6c99f9df39d49f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/bad92acfe83f4150bc094d014b6c99f9df39d49f/equations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 3536, 2000, 1053, 309, 333, 261, 267, 13, 9729, 560, 353, 2217, 25818, 638, 18, 225, 2000, 1083, 309, 518, 353, 629, 578, 326, 4886, 364, 7769, 261, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 26449, 972, 12, 2890, 4672, 3536, 2000, 1053, 309, 333, 261, 267, 13, 9729, 560, 353, 2217, 25818, 638, 18, 225, 2000, 1083, 309, 518, 353, 629, 578, 326, 4886, 364, 7769, 261, 2...
milestone = Milestone(self.__env)
milestone = Milestone(self.env_open())
def _do_milestone_add(self, name): milestone = Milestone(self.__env) milestone.name = name milestone.insert()
132f03448459e7c8907500129479bb5f6c5bc47a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/132f03448459e7c8907500129479bb5f6c5bc47a/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 81, 18270, 67, 1289, 12, 2890, 16, 508, 4672, 28664, 273, 490, 18270, 12, 2890, 18, 3074, 67, 3190, 10756, 28664, 18, 529, 273, 508, 28664, 18, 6387, 1435, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 81, 18270, 67, 1289, 12, 2890, 16, 508, 4672, 28664, 273, 490, 18270, 12, 2890, 18, 3074, 67, 3190, 10756, 28664, 18, 529, 273, 508, 28664, 18, 6387, 1435, 2, -100, -100...
event.Skip()
def OnMenuSwitchParameters(self, event):
53f75eb2d3cbdc36ce27afd50f09c315334d9e25 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5435/53f75eb2d3cbdc36ce27afd50f09c315334d9e25/prototype.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4599, 10200, 2402, 12, 2890, 16, 871, 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, ...
[ 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, 2755, 4599, 10200, 2402, 12, 2890, 16, 871, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.buffer.write("
plurial = len(modules) > 1 and 's' or '' self.buffer.write("
def quote(str): return '"%s"' % str.replace('"','\\"') \ .replace('\n', '\\n"\n"')
78fce194caa14faf4eeca470e9c5be5da2cfa2e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/78fce194caa14faf4eeca470e9c5be5da2cfa2e1/translate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3862, 12, 701, 4672, 327, 22563, 87, 5187, 738, 609, 18, 2079, 22076, 17023, 1695, 5187, 13, 521, 263, 2079, 2668, 64, 82, 2187, 3718, 82, 12691, 82, 5187, 13, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3862, 12, 701, 4672, 327, 22563, 87, 5187, 738, 609, 18, 2079, 22076, 17023, 1695, 5187, 13, 521, 263, 2079, 2668, 64, 82, 2187, 3718, 82, 12691, 82, 5187, 13, 2, -100, -100, -100, -10...
("Quit", gtk.STOCK_QUIT, "_Quit", "<control>Q", None, gtk.main_quit),
("Quit", gtk.STOCK_QUIT, "_Quit", "<control>Q", None, quit),
def __init__(self, action): gtk.AboutDialog.__init__(self) self.set_name("Urk") self.set_version("8") self.set_copyright("Yes, 2004") self.set_comments("Comments") self.set_license("Gee Pee Ell") self.set_website("http://urk.sf.net") self.set_authors("Vincent and Marc") self.show_all()
0ea013c4765a473cbec647755c05bc23f0387f16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/0ea013c4765a473cbec647755c05bc23f0387f16/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1301, 4672, 22718, 18, 24813, 6353, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 542, 67, 529, 2932, 57, 86, 79, 7923, 365, 18, 542, 67, 1589, 2932, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1301, 4672, 22718, 18, 24813, 6353, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 542, 67, 529, 2932, 57, 86, 79, 7923, 365, 18, 542, 67, 1589, 2932, 2...
elif record[u'host'] and storagegroups[u'posterdir']:
elif record[u'host'] and storagegroups.has_key(u'posterdir'):
def updateMythVideo(items): '''Add and delete MythVideo records for played Miro Videos. Add and delete symbolic links to Miro Videos, to coverart/Miro icons, banners and Miro screenshots and fanart. NOTE: banner and fanart graphics were provided with the script and are used only if present. Abort if processing failed return True if processing was successful ''' global localhostname, vid_graphics_dirs, storagegroups, channel_id, flat, simulation, verbose global channel_watch_only, statistics global graphic_suffix, graphic_path_suffix, graphic_name_suffix if not items: # There may not be any new items but a clean up of existing records may be required items = [] # Check that a MIRO video directory exists # if not then create the dir and add symbolic link to cover/file or icon createMiroMythVideoDirectory() # Remove any Miro Mythvideo records which the video or graphics paths are broken records = getMiroVideometadataRecords() if records: statistics[u'Total_Miro_MythVideos'] = len(records) for record in records: # Count the Miro-MythVideos that Miro is expiring or has saved if record[u'filename'][0] == u'/': if os.path.islink(record[u'filename']) and os.path.isfile(record[u'filename']): statistics[u'Total_Miro_expiring']+=1 elif record[u'host'] and storagegroups[u'mythvideo']: if os.path.islink(storagegroups[u'mythvideo']+record[u'filename']) and os.path.isfile(storagegroups[u'mythvideo']+record[u'filename']): statistics[u'Total_Miro_expiring']+=1 for record in records: if checkVideometadataFails(record, flat): delete = False if os.path.islink(record[u'filename']): # Only delete video files if they are symlinks if not record[u'host'] or record[u'filename'][0] == '/': if not os.path.isfile(record[u'filename']): delete = True else: if not os.path.isfile(vid_graphics_dirs[key_trans[field]]+record[u'filename']): delete = True else: if not os.path.isfile(record[u'filename']): delete = True if delete: # Only delete video files if they are symlinks deleteVideometadataRecord(record[u'intid']) deleteOldrecordedForMythVideo(record[u'title'], record[u'subtitle']) removeMythvideoSeekTable(record[u'filename']) statistics[u'Total_Miro_MythVideos']-=1 if record[u'filename'][0] == '/': try: if simulation: logger.info(u"Simulation: Remove video file symlink (%s)" % (record[u'filename'])) else: os.remove(record[u'filename']) statistics[u'Miros_MythVideos_video_removed']+=1 except OSError: pass elif record[u'host'] and storagegroups[u'mythvideo']: try: if simulation: logger.info(u"Simulation: Remove video file (%s)" % (storagegroups[u'mythvideo']+record[u'filename'])) else: os.remove(storagegroups[u'mythvideo']+record[u'filename']) except OSError: pass if record[u'screenshot']: # Remove any associated Screenshot if record[u'screenshot'][0] == '/': try: if simulation: logger.info(u"Simulation: Remove screenshot symlink (%s)" % (record[u'screenshot'])) else: os.remove(record[u'screenshot']) except OSError: pass elif record[u'host'] and storagegroups[u'episodeimagedir']: try: if simulation: logger.info(u"Simulation: Remove file (%s)" % (storagegroups[u'episodeimagedir']+record[u'screenshot'])) else: os.remove(storagegroups[u'episodeimagedir']+record[u'screenshot']) except OSError: pass # Remove any unique cover art graphic files if record[u'title'].lower() in channel_icon_override: if record[u'coverfile'][0] == u'/': try: if simulation: logger.info(u"Simulation: Remove item cover art file (%s)" % (record[u'coverfile'])) else: os.remove(record[u'coverfile']) except OSError: pass elif record[u'host'] and storagegroups[u'posterdir']: try: if simulation: logger.info(u"Simulation: Remove item cover art file (%s)" % (storagegroups[u'posterdir']+record[u'coverfile'])) else: os.remove(storagegroups[u'posterdir']+record[u'coverfile']) except OSError: pass if not items: # There may not be any new items to add to MythVideo return True # Reread Miro Mythvideo videometadata records # Remove the matching videometadata record from array of items items_copy = [] for item in items: items_copy.append(item) records = getMiroVideometadataRecords() if records: for record in records: for item in items: if item[u'channelTitle'] == record[u'title'] and item[u'title'] == record[u'subtitle']: try: items_copy.remove(item) except ValueError: logger.info(u"Video (%s - %s) was found multiple times in list of (watched and/or saved) items from Miro - skipping" % (item[u'channelTitle'], item[u'title'])) pass break for item in items: # Remove any items that are for a Channel that does not get MythVideo records if filter(is_not_punct_char, item[u'channelTitle'].lower()) in channel_watch_only: try: # Some items may have already been removed, let those passed items_copy.remove(item) except ValueError: pass # Add Miro videos that remain in the item list # If not a flat directory check if title directory exists and add icon symbolic link as coverfile for item in items_copy: if not flat and not item.has_key(u'copied'): createMiroChannelSubdirectory(item) if not item[u'screenshot']: # If there is no screen shot then create one screenshot_mythvideo = u"%s%s - %s%s.jpg" % (vid_graphics_dirs[u'episodeimagedir'], item[u'channelTitle'], item[u'title'], graphic_suffix[u'episodeimagedir']) try: result = takeScreenShot(item[u'videoFilename'], screenshot_mythvideo, size_limit=False) except: result = None if result != None: item[u'screenshot'] = screenshot_mythvideo tmp_array = createVideometadataRecord(item) videometadata = tmp_array[0] oldrecorded = tmp_array[1] if simulation: logger.info(u"Simulation: Create videometadata record for (%s - %s)" % (item[u'channelTitle'], item[u'title'])) else: intid = mythvideo.getMetadataId(videometadata[u'filename']) # Check for duplicates if intid == None: intid = mythvideo.setMetadata(videometadata, id=None) if not intid: logger.critical(u"Adding Miro video to MythVideo (%s - %s) failed." % (item[u'channelTitle'], item[u'title'])) sys.exit(False) if not item.has_key(u'copied'): setRecord(u'oldrecorded', oldrecorded, channel_id, delete=False, id=None) if videometadata[u'filename'][0] == u'/': cmd = mythcommflag_videos % videometadata[u'filename'] elif videometadata[u'host'] and storagegroups[u'mythvideo']: cmd = mythcommflag_videos % ((storagegroups[u'mythvideo']+videometadata[u'filename'])) #subprocess.call(u'%s' % cmd, shell=True) # Seek table creation disabled statistics[u'Miros_MythVideos_added']+=1 statistics[u'Total_Miro_expiring']+=1 statistics[u'Total_Miro_MythVideos']+=1 displayMessage(u"Added Miro video to MythVideo (%s - %s)" % (videometadata[u'title'], videometadata[u'subtitle'])) else: sys.stdout.write(u'') displayMessage(u"Skipped adding a duplicate Miro video to MythVideo:\n(%s - %s)\nSometimes a Miro channel has the same video downloaded multiple times.\nThis is a Miro/Channel web site issue and often rectifies itself overtime.\n" % (videometadata[u'title'], videometadata[u'subtitle'])) return True # end updateMythVideo()
cefa7947527c8e9e2184befa6fb1cdca04096461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cefa7947527c8e9e2184befa6fb1cdca04096461/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12062, 451, 10083, 12, 3319, 4672, 9163, 986, 471, 1430, 8005, 451, 10083, 3853, 364, 6599, 329, 490, 11373, 776, 19871, 18, 1436, 471, 1430, 16754, 4716, 358, 490, 11373, 776, 19871...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12062, 451, 10083, 12, 3319, 4672, 9163, 986, 471, 1430, 8005, 451, 10083, 3853, 364, 6599, 329, 490, 11373, 776, 19871, 18, 1436, 471, 1430, 16754, 4716, 358, 490, 11373, 776, 19871...
def model_id_get(self, cr, model, id_str):
def model_id_get(self, cr, id_str):
def model_id_get(self, cr, model, id_str): model_data_obj = self.pool.get('ir.model.data') mod = self.module if '.' in id_str: mod,id_str = id_str.split('.') return model_data_obj.get_object_reference(cr, self.uid, mod, id_str)
07a4bc7f3fdbd5f93ba4a066290ae65a3016075c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/07a4bc7f3fdbd5f93ba4a066290ae65a3016075c/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 938, 67, 350, 67, 588, 12, 2890, 16, 4422, 16, 612, 67, 701, 4672, 938, 67, 892, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 892, 6134, 681, 273, 365, 18, 2978,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 938, 67, 350, 67, 588, 12, 2890, 16, 4422, 16, 612, 67, 701, 4672, 938, 67, 892, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 892, 6134, 681, 273, 365, 18, 2978,...
("cAlternameFileName", c_wchar * 14)]
("cAlternateFileName", c_wchar * 14)]
def RGB(red, green, blue): return red + (green << 8) + (blue << 16)
b4eec28e3386c52a43cc02737517759deb3a3df5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/b4eec28e3386c52a43cc02737517759deb3a3df5/wintypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11510, 12, 1118, 16, 10004, 16, 8024, 4672, 327, 1755, 397, 261, 11571, 2296, 1725, 13, 397, 261, 14081, 2296, 2872, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11510, 12, 1118, 16, 10004, 16, 8024, 4672, 327, 1755, 397, 261, 11571, 2296, 1725, 13, 397, 261, 14081, 2296, 2872, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if not _type_to_name_map:
if _type_to_name_map=={}:
def type_to_name(gtype): global _type_to_name_map if not _type_to_name_map: for name in _names: if name[:2] == 'A_': _type_to_name_map[eval(name)] = name[2:] if _type_to_name_map.has_key(gtype): return _type_to_name_map[gtype] return 'TYPE=' + `gtype`
737c49114353f2ed1f18347a1280b23baee08671 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/737c49114353f2ed1f18347a1280b23baee08671/gopherlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 67, 869, 67, 529, 12, 75, 723, 4672, 2552, 389, 723, 67, 869, 67, 529, 67, 1458, 309, 389, 723, 67, 869, 67, 529, 67, 1458, 631, 2916, 30, 364, 508, 316, 389, 1973, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 67, 869, 67, 529, 12, 75, 723, 4672, 2552, 389, 723, 67, 869, 67, 529, 67, 1458, 309, 389, 723, 67, 869, 67, 529, 67, 1458, 631, 2916, 30, 364, 508, 316, 389, 1973, 30, 309, ...
keyval = 'need' sysID = self.xmlU.generateSysID(keyval) date_for_need_id = needData.need_idid_num date_object_format = self.fixDate(needData.need_idid_num_date_collected) sysID = sysID + str(date_object_format) recID = self.xmlU.generateRecID(keyval) need = ET.SubElement(needs, "need") need.attrib["record_id"] = recID need.attrib["system_id"] = sysID need.attrib["date_added"] = datetime.now().isoformat() need.attrib["date_updated"] = datetime.now().isoformat() return need
keyval = 'need' sysID = self.xmlU.generateSysID(keyval) date_for_need_id = needData.need_idid_num date_object_format = self.fixDate(needData.need_idid_num_date_collected) sysID = sysID + str(date_object_format) recID = self.xmlU.generateRecID(keyval) need = ET.SubElement(needs, "need") need.attrib["record_id"] = recID need.attrib["system_id"] = sysID need.attrib["date_added"] = datetime.now().isoformat() need.attrib["date_updated"] = datetime.now().isoformat() return need
def createNeed(self, needs, needData):
47d2884a8b5be4efadf798bbb2e71a3d5e993c3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9116/47d2884a8b5be4efadf798bbb2e71a3d5e993c3e/svcpointxml_406_writer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 14112, 12, 2890, 16, 4260, 16, 1608, 751, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 14112, 12, 2890, 16, 4260, 16, 1608, 751, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.debug > 0: print 'running a calculation'
log.debug('running a calculation')
def calculate(self): '''run a calculation.
efb0053a692e68241ce5b5d3e00d105383545b1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5572/efb0053a692e68241ce5b5d3e00d105383545b1a/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 12, 2890, 4672, 9163, 2681, 279, 11096, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4604, 12, 2890, 4672, 9163, 2681, 279, 11096, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.textAdvance=float(self.height())/3
self.textAdvance=float(self.rect().height())/3
def updateText(self): self.textAdvance=float(self.height())/3 self.lineSpacing=0 self.setFont(QFont("",self.textAdvance*0.7), False) self.reArangeText(False, -self.textAdvance-self.lineSpacing)
ec36c0ee1ff83993ab2a8719855a6928ab83ae00 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/ec36c0ee1ff83993ab2a8719855a6928ab83ae00/OWRegressionTreeViewer2D.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1528, 12, 2890, 4672, 365, 18, 955, 1871, 5882, 33, 5659, 12, 2890, 18, 2607, 7675, 4210, 10756, 19, 23, 365, 18, 1369, 18006, 33, 20, 365, 18, 542, 5711, 12, 53, 5711, 2932, 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, 1089, 1528, 12, 2890, 4672, 365, 18, 955, 1871, 5882, 33, 5659, 12, 2890, 18, 2607, 7675, 4210, 10756, 19, 23, 365, 18, 1369, 18006, 33, 20, 365, 18, 542, 5711, 12, 53, 5711, 2932, 3...
next_text = body.find(text=nextpattern) if next_text is not None: path = next_text.parent['href']
nextLink = body.find('a', href=nextLinkPattern) if nextLink is not None: path = nextLink['href']
def getReferences(self, follow_redirects=True, withTemplateInclusion=True, onlyTemplateInclusion=False, redirectsOnly=False): """ Yield all pages that link to the page. If you need a full list of referring pages, use this:
92039ac08a5fe80526ec99b0b731f8bf768c5df3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/92039ac08a5fe80526ec99b0b731f8bf768c5df3/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 2980, 12, 2890, 16, 2805, 67, 22715, 33, 5510, 16, 598, 2283, 382, 15335, 33, 5510, 16, 1338, 2283, 382, 15335, 33, 8381, 16, 18064, 3386, 33, 8381, 4672, 3536, 31666, 777, 4689, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5561, 2980, 12, 2890, 16, 2805, 67, 22715, 33, 5510, 16, 598, 2283, 382, 15335, 33, 5510, 16, 1338, 2283, 382, 15335, 33, 8381, 16, 18064, 3386, 33, 8381, 4672, 3536, 31666, 777, 4689, ...
if name[0] == '.':
if not name[0]:
def nametowidget(self, name): """Return the Tkinter instance of a widget identified by its Tcl name NAME.""" w = self if name[0] == '.': w = w._root() name = name[1:] while name: i = name.find('.') if i >= 0: name, tail = name[:i], name[i+1:] else: tail = '' w = w.children[name] name = tail return w
c7af7f36a664f4f413d4b6bb0558632efeaa7824 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/c7af7f36a664f4f413d4b6bb0558632efeaa7824/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15135, 278, 543, 2208, 12, 2890, 16, 508, 4672, 3536, 990, 326, 399, 79, 2761, 791, 434, 279, 3604, 9283, 635, 2097, 399, 830, 508, 6048, 12123, 341, 273, 365, 225, 309, 486, 508, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15135, 278, 543, 2208, 12, 2890, 16, 508, 4672, 3536, 990, 326, 399, 79, 2761, 791, 434, 279, 3604, 9283, 635, 2097, 399, 830, 508, 6048, 12123, 341, 273, 365, 225, 309, 486, 508, 63, ...
nic_count = 0
nic_total = 0
def FinalizeExport(instance, snap_disks): """Write out the export configuration information. @type instance: L{objects.Instance} @param instance: the instance which we export, used for saving configuration @type snap_disks: list of L{objects.Disk} @param snap_disks: list of snapshot block devices, which will be used to get the actual name of the dump file @rtype: boolean @return: the success of the operation """ destdir = os.path.join(constants.EXPORT_DIR, instance.name + ".new") finaldestdir = os.path.join(constants.EXPORT_DIR, instance.name) config = objects.SerializableConfigParser() config.add_section(constants.INISECT_EXP) config.set(constants.INISECT_EXP, 'version', '0') config.set(constants.INISECT_EXP, 'timestamp', '%d' % int(time.time())) config.set(constants.INISECT_EXP, 'source', instance.primary_node) config.set(constants.INISECT_EXP, 'os', instance.os) config.set(constants.INISECT_EXP, 'compression', 'gzip') config.add_section(constants.INISECT_INS) config.set(constants.INISECT_INS, 'name', instance.name) config.set(constants.INISECT_INS, 'memory', '%d' % instance.beparams[constants.BE_MEMORY]) config.set(constants.INISECT_INS, 'vcpus', '%d' % instance.beparams[constants.BE_VCPUS]) config.set(constants.INISECT_INS, 'disk_template', instance.disk_template) nic_count = 0 for nic_count, nic in enumerate(instance.nics): config.set(constants.INISECT_INS, 'nic%d_mac' % nic_count, '%s' % nic.mac) config.set(constants.INISECT_INS, 'nic%d_ip' % nic_count, '%s' % nic.ip) config.set(constants.INISECT_INS, 'nic%d_bridge' % nic_count, '%s' % nic.bridge) # TODO: redundant: on load can read nics until it doesn't exist config.set(constants.INISECT_INS, 'nic_count' , '%d' % nic_count) disk_total = 0 for disk_count, disk in enumerate(snap_disks): if disk: disk_total += 1 config.set(constants.INISECT_INS, 'disk%d_ivname' % disk_count, ('%s' % disk.iv_name)) config.set(constants.INISECT_INS, 'disk%d_dump' % disk_count, ('%s' % disk.physical_id[1])) config.set(constants.INISECT_INS, 'disk%d_size' % disk_count, ('%d' % disk.size)) config.set(constants.INISECT_INS, 'disk_count' , '%d' % disk_total) utils.WriteFile(os.path.join(destdir, constants.EXPORT_CONF_FILE), data=config.Dumps()) shutil.rmtree(finaldestdir, True) shutil.move(destdir, finaldestdir) return True
95268cc342b15aab3fe623e5eb0122b3875abe17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/95268cc342b15aab3fe623e5eb0122b3875abe17/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30740, 6144, 12, 1336, 16, 10915, 67, 28577, 4672, 3536, 3067, 596, 326, 3359, 1664, 1779, 18, 225, 632, 723, 791, 30, 511, 95, 6911, 18, 1442, 97, 632, 891, 791, 30, 326, 791, 1492, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30740, 6144, 12, 1336, 16, 10915, 67, 28577, 4672, 3536, 3067, 596, 326, 3359, 1664, 1779, 18, 225, 632, 723, 791, 30, 511, 95, 6911, 18, 1442, 97, 632, 891, 791, 30, 326, 791, 1492, ...
self.log = DIRAC.gLogger.getSubLogger( '%sPilotDirector/%s' % ( self.Flavor, submitPool ) )
self.log = DIRAC.gLogger.getSubLogger( '%sDirector/%s' % ( self.Flavor, submitPool ) )
def __init__( self, submitPool ):
ad126932ccd59d97b2540b53f64abaaf7fa88845 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12038/ad126932ccd59d97b2540b53f64abaaf7fa88845/VMDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 4879, 2864, 262, 30, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 4879, 2864, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def _membership_state_search(self, cr, uid, obj, name, args): '''Search on membership state''' today = time.strftime('%Y-%m-%d') clause = 'WHERE ' for i in range(len(args)): if i!=0: clause += 'OR ' clause += 'state '+args[i][1]+" '"+args[i][2]+"' " cr.execute(REQUETE % (today, today, today, today, today, today, clause)) ids=[x[0] for x in cr.fetchall()] return [('id', 'in', ids)]
def _membership_state_search(self, cr, uid, obj, name, args): '''Search on membership state'''
556af59af81a74e16a64983bcb40457921fa8d6e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/556af59af81a74e16a64983bcb40457921fa8d6e/membership.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19679, 67, 2019, 67, 3072, 12, 2890, 16, 4422, 16, 4555, 16, 1081, 16, 508, 16, 833, 4672, 9163, 2979, 603, 12459, 919, 26418, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19679, 67, 2019, 67, 3072, 12, 2890, 16, 4422, 16, 4555, 16, 1081, 16, 508, 16, 833, 4672, 9163, 2979, 603, 12459, 919, 26418, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
"cannot copy tree %s: not a directory" % src
"cannot copy tree '%s': not a directory" % src
def copy_tree (src, dst, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0): """Copy an entire directory tree 'src' to a new location 'dst'. Both 'src' and 'dst' must be directory names. If 'src' is not a directory, raise DistutilsFileError. If 'dst' does not exist, it is created with 'mkpath()'. The end result of the copy is that every file in 'src' is copied to 'dst', and directories under 'src' are recursively copied to 'dst'. Return the list of files copied (under their output names) -- note that if 'update' is true, this might be less than the list of files considered. Return value is not affected by 'dry_run'. 'preserve_mode' and 'preserve_times' are the same as for 'copy_file'; note that they only apply to regular files, not to directories. If 'preserve_symlinks' is true, symlinks will be copied as symlinks (on platforms that support them!); otherwise (the default), the destination of the symlink will be copied. 'update' and 'verbose' are the same as for 'copy_file'.""" if not dry_run and not os.path.isdir (src): raise DistutilsFileError, \ "cannot copy tree %s: not a directory" % src try: names = os.listdir (src) except os.error, (errno, errstr): if dry_run: names = [] else: raise DistutilsFileError, \ "error listing files in %s: %s" % (src, errstr) if not dry_run: mkpath (dst, verbose=verbose) outputs = [] for n in names: src_name = os.path.join (src, n) dst_name = os.path.join (dst, n) if preserve_symlinks and os.path.islink (src_name): link_dest = os.readlink (src_name) if verbose: print "linking %s -> %s" % (dst_name, link_dest) if not dry_run: os.symlink (link_dest, dst_name) outputs.append (dst_name) elif os.path.isdir (src_name): outputs.extend ( copy_tree (src_name, dst_name, preserve_mode, preserve_times, preserve_symlinks, update, verbose, dry_run)) else: if (copy_file (src_name, dst_name, preserve_mode, preserve_times, update, verbose, dry_run)): outputs.append (dst_name) return outputs
2f9a6b1661601c41c826e81ad226fea7ce090544 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2f9a6b1661601c41c826e81ad226fea7ce090544/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 3413, 261, 4816, 16, 3046, 16, 9420, 67, 3188, 33, 21, 16, 9420, 67, 8293, 33, 21, 16, 9420, 67, 21278, 87, 33, 20, 16, 1089, 33, 20, 16, 3988, 33, 20, 16, 10299, 67, 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, 1610, 67, 3413, 261, 4816, 16, 3046, 16, 9420, 67, 3188, 33, 21, 16, 9420, 67, 8293, 33, 21, 16, 9420, 67, 21278, 87, 33, 20, 16, 1089, 33, 20, 16, 3988, 33, 20, 16, 10299, 67, 2...
APPELLATIONS = [ u"Avenida", u"Avinguda", u"Calle", u"Camino", u"Camí", u"Carrer", u"Carretera", u"Plaza", u"Plaça", u"Ronda" ]
APPELLATIONS = [ u"Avenida", u"Avinguda", u"Calle", u"Callejón", u"Calzada", u"Camino", u"Camí", u"Carrer", u"Carretera", u"Glorieta", u"Parque", u"Pasaje", u"Pasarela", u"Paseo", u"Plaza", u"Plaça", u"Privada", u"Puente", u"Ronda", u"Salida", u"Travesia" ]
def first_letter_equal(self, a, b): return self._upper_unaccent_string(a) == self._upper_unaccent_string(b)
833ded55afaf300716c8ab4829f4eebecaf97501 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9326/833ded55afaf300716c8ab4829f4eebecaf97501/i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1122, 67, 13449, 67, 9729, 12, 2890, 16, 279, 16, 324, 4672, 327, 365, 6315, 5797, 67, 318, 8981, 319, 67, 1080, 12, 69, 13, 422, 365, 6315, 5797, 67, 318, 8981, 319, 67, 1080, 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, 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, 1122, 67, 13449, 67, 9729, 12, 2890, 16, 279, 16, 324, 4672, 327, 365, 6315, 5797, 67, 318, 8981, 319, 67, 1080, 12, 69, 13, 422, 365, 6315, 5797, 67, 318, 8981, 319, 67, 1080, 12, ...
self.indexed = False
self.indexed = False
def _g_remove(self, recursive=False): # Remove the associated indexes (if they exist). if self.indexed: itgroup = self._v_file._getNode(_indexPathnameOf(self)) itgroup._f_remove(recursive=True) self.indexed = False # The indexes are no longer valid
91bb37bd7823804c026d213294d296011d5abe76 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12687/91bb37bd7823804c026d213294d296011d5abe76/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 75, 67, 4479, 12, 2890, 16, 5904, 33, 8381, 4672, 468, 3581, 326, 3627, 5596, 261, 430, 2898, 1005, 2934, 309, 365, 18, 19626, 30, 518, 1655, 273, 365, 6315, 90, 67, 768, 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, 389, 75, 67, 4479, 12, 2890, 16, 5904, 33, 8381, 4672, 468, 3581, 326, 3627, 5596, 261, 430, 2898, 1005, 2934, 309, 365, 18, 19626, 30, 518, 1655, 273, 365, 6315, 90, 67, 768, 6315, ...
res = map(lambda x: self._relation_transform(cr, uid, fields[f]['relation'], x, action, context), data[f])
res = map(lambda x: self._relation_transform(cr, uid, pool_src, pool_dest, fields[f]['relation'], x, action, context), data[f])
def _data_transform(self, cr, uid, pool_src, object, data, action='u', context={}): self.meta.setdefault(pool_src, {}) if not object in self.meta[pool_src]: self.meta[pool_src][object] = pool_src.get(object).fields_get(cr, uid, context) fields = self.meta[pool_src][object]
3e02111b2ab3b22af9b15b2de15ac6e615c82c4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/3e02111b2ab3b22af9b15b2de15ac6e615c82c4e/base_synchro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 892, 67, 6547, 12, 2890, 16, 4422, 16, 4555, 16, 2845, 67, 4816, 16, 733, 16, 501, 16, 1301, 2218, 89, 2187, 819, 12938, 4672, 365, 18, 3901, 18, 542, 1886, 12, 6011, 67, 4816, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 67, 6547, 12, 2890, 16, 4422, 16, 4555, 16, 2845, 67, 4816, 16, 733, 16, 501, 16, 1301, 2218, 89, 2187, 819, 12938, 4672, 365, 18, 3901, 18, 542, 1886, 12, 6011, 67, 4816, ...
type(e) is not exc):
type(e) is not exc):
def testAttributes(self): # test that exception attributes are happy try: str(u'Hello \u00E1') except Exception, e: sampleUnicodeEncodeError = e
bb8d88aac4867aa6708a73adf2001252815a0e7e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bb8d88aac4867aa6708a73adf2001252815a0e7e/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 775, 30, 609, 12, 89, 11, 18601, 521, 89, 713, 41, 21, 6134, 1335, 1185, 16, 425, 30, 3296, 16532, 5509, 668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2498, 12, 2890, 4672, 468, 1842, 716, 1520, 1677, 854, 5622, 2074, 775, 30, 609, 12, 89, 11, 18601, 521, 89, 713, 41, 21, 6134, 1335, 1185, 16, 425, 30, 3296, 16532, 5509, 668, ...
print "Ham distribution for", tag
print "-> <stat> Ham distribution for", tag,
def printhist(tag, ham, spam): print print "Ham distribution for", tag ham.display() print print "Spam distribution for", tag spam.display()
77c5b5710d262fd9795f7ffbf68d7016f5317e6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/77c5b5710d262fd9795f7ffbf68d7016f5317e6a/TestDriver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 846, 267, 451, 376, 12, 2692, 16, 366, 301, 16, 24824, 4672, 1172, 1172, 315, 2122, 411, 5642, 34, 670, 301, 7006, 364, 3113, 1047, 16, 366, 301, 18, 5417, 1435, 225, 1172, 1172, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 846, 267, 451, 376, 12, 2692, 16, 366, 301, 16, 24824, 4672, 1172, 1172, 315, 2122, 411, 5642, 34, 670, 301, 7006, 364, 3113, 1047, 16, 366, 301, 18, 5417, 1435, 225, 1172, 1172, 315, ...
else: mil.completed = 0
def render_admin_panel(self, req, cat, page, milestone): req.perm.require('TICKET_ADMIN')
92b4beedefba22f9d279a03853a2001d63693582 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/92b4beedefba22f9d279a03853a2001d63693582/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 28664, 4672, 1111, 18, 12160, 18, 6528, 2668, 56, 16656, 1584, 67, 15468, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 28664, 4672, 1111, 18, 12160, 18, 6528, 2668, 56, 16656, 1584, 67, 15468, 6134, 2, -100, -100, -100, -100, -100, ...
self._combinatorial_class = permutation.Permutations(n)
self._basis_keys = permutation.Permutations(n)
def __init__(self, R, n, q=None): """ TESTS::
67122d01e881bc98eb41ce9e759a79a3a210eaec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/67122d01e881bc98eb41ce9e759a79a3a210eaec/symmetric_group_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 534, 16, 290, 16, 1043, 33, 7036, 4672, 3536, 22130, 55, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 534, 16, 290, 16, 1043, 33, 7036, 4672, 3536, 22130, 55, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
for entry in entries[:]: if 0x1600 <= entry < 0x1800 or 0x1A00 <= entry < 0x1C00: subentry_value = Node.GetEntry(entry, 1) if subentry_value is None or subentry_value == 0: entries.remove(entry) entries.remove(entry - 0x200)
def GenerateFileContent(Node, filepath): # Dictionary of each index contents indexContents = {} # Extract local time current_time = localtime() # Extract node informations nodename = Node.GetNodeName() nodeid = Node.GetNodeID() nodetype = Node.GetNodeType() description = Node.GetNodeDescription() # Retreiving lists of indexes defined entries = Node.GetIndexes() # Generate FileInfo section fileContent = "[FileInfo]\n" fileContent += "FileName=%s\n"%os.path.split(filepath)[-1] fileContent += "FileVersion=1\n" fileContent += "FileRevision=1\n" fileContent += "EDSVersion=4.0\n" fileContent += "Description=%s\n"%description fileContent += "CreationTime=%s"%strftime("%I:%M", current_time) # %p option of strftime seems not working, then generate AM/PM by hands if strftime("%I", current_time) == strftime("%H", current_time): fileContent += "AM\n" else: fileContent += "PM\n" fileContent += "CreationDate=%s\n"%strftime("%m-%d-%Y", current_time) fileContent += "CreatedBy=CANFestival\n" fileContent += "ModificationTime=%s"%strftime("%I:%M", current_time) # %p option of strftime seems not working, then generate AM/PM by hands if strftime("%I", current_time) == strftime("%H", current_time): fileContent += "AM\n" else: fileContent += "PM\n" fileContent += "ModificationDate=%s\n"%strftime("%m-%d-%Y", current_time) fileContent += "ModifiedBy=CANFestival\n" # Generate DeviceInfo section fileContent += "\n[DeviceInfo]\n" fileContent += "VendorName=CANFestival\n" # Use information typed by user in Identity entry fileContent += "VendorNumber=0x%8.8X\n"%Node.GetEntry(0x1018, 1) fileContent += "ProductName=%s\n"%nodename fileContent += "ProductNumber=0x%8.8X\n"%Node.GetEntry(0x1018, 2) fileContent += "RevisionNumber=0x%8.8X\n"%Node.GetEntry(0x1018, 3) # CANFestival support all baudrates as soon as driver choosen support them fileContent += "BaudRate_10=1\n" fileContent += "BaudRate_20=1\n" fileContent += "BaudRate_50=1\n" fileContent += "BaudRate_125=1\n" fileContent += "BaudRate_250=1\n" fileContent += "BaudRate_500=1\n" fileContent += "BaudRate_800=1\n" fileContent += "BaudRate_1000=1\n" # Select BootUp type from the informations given by user fileContent += "SimpleBootUpMaster=%s\n"%BOOL_TRANSLATE[nodetype == "master"] fileContent += "SimpleBootUpSlave=%s\n"%BOOL_TRANSLATE[nodetype == "slave"] # CANFestival characteristics fileContent += "Granularity=8\n" fileContent += "DynamicChannelsSupported=0\n" fileContent += "CompactPDO=0\n" fileContent += "GroupMessaging=0\n" # Calculate receive and tranmit PDO numbers with the entry available fileContent += "NrOfRXPDO=%d\n"%len([idx for idx in entries if 0x1400 <= idx <= 0x15FF]) fileContent += "NrOfTXPDO=%d\n"%len([idx for idx in entries if 0x1800 <= idx <= 0x19FF]) # LSS not supported as soon as DS-302 was not fully implemented fileContent += "LSS_Supported=0\n" # Generate Dummy Usage section fileContent += "\n[DummyUsage]\n" fileContent += "Dummy0001=0\n" fileContent += "Dummy0002=1\n" fileContent += "Dummy0003=1\n" fileContent += "Dummy0004=1\n" fileContent += "Dummy0005=1\n" fileContent += "Dummy0006=1\n" fileContent += "Dummy0007=1\n" # Generate Comments section fileContent += "\n[Comments]\n" fileContent += "Lines=0\n" # List of entry by type (Mandatory, Optional or Manufacturer mandatories = [] optionals = [] manufacturers = [] # Remove all unused PDO for entry in entries[:]: if 0x1600 <= entry < 0x1800 or 0x1A00 <= entry < 0x1C00: subentry_value = Node.GetEntry(entry, 1) if subentry_value is None or subentry_value == 0: entries.remove(entry) entries.remove(entry - 0x200) # For each entry, we generate the entry section or sections if there is subindexes for entry in entries: # Extract infos and values for the entry entry_infos = Node.GetEntryInfos(entry) values = Node.GetEntry(entry, compute = False) # Define section name text = "\n[%X]\n"%entry # If there is only one value, it's a VAR entry if type(values) != ListType: # Extract the informations of the first subindex subentry_infos = Node.GetSubentryInfos(entry, 0) # Generate EDS informations for the entry text += "ParameterName=%s\n"%subentry_infos["name"] text += "ObjectType=0x7\n" text += "DataType=0x%4.4X\n"%subentry_infos["type"] text += "AccessType=%s\n"%subentry_infos["access"] if subentry_infos["type"] == 1: text += "DefaultValue=%s\n"%BOOL_TRANSLATE[values] else: text += "DefaultValue=%s\n"%values text += "PDOMapping=%s\n"%BOOL_TRANSLATE[subentry_infos["pdo"]] else: # Generate EDS informations for the entry text += "ParameterName=%s\n"%entry_infos["name"] if entry_infos["struct"] & node.OD_IdenticalSubindexes: text += "ObjectType=0x9\n" else: text += "ObjectType=0x8\n" # Generate EDS informations for subindexes of the entry in a separate text subtext = "" # Reset number of subindex defined nb_subentry = 0 for subentry, value in enumerate(values): # Extract the informations of each subindex subentry_infos = Node.GetSubentryInfos(entry, subentry) # If entry is not for the compatibility, generate informations for subindex if subentry_infos["name"] != "Compatibility Entry": subtext += "\n[%Xsub%X]\n"%(entry, subentry) subtext += "ParameterName=%s\n"%subentry_infos["name"] subtext += "ObjectType=0x7\n" subtext += "DataType=0x%4.4X\n"%subentry_infos["type"] subtext += "AccessType=%s\n"%subentry_infos["access"] if subentry_infos["type"] == 1: subtext += "DefaultValue=%s\n"%BOOL_TRANSLATE[value] else: subtext += "DefaultValue=%s\n"%value subtext += "PDOMapping=%s\n"%BOOL_TRANSLATE[subentry_infos["pdo"]] # Increment number of subindex defined nb_subentry += 1 # Write number of subindex defined for the entry text += "SubNumber=%d\n"%nb_subentry # Write subindex definitions text += subtext # Then we add the entry in the right list # First case, entry is between 0x2000 and 0x5FFF, then it's a manufacturer entry if 0x2000 <= entry <= 0x5FFF: manufacturers.append(entry) # Second case, entry is required, then it's a mandatory entry elif entry_infos["need"]: mandatories.append(entry) # In any other case, it's an optional entry else: optionals.append(entry) # Save text of the entry in the dictiionary of contents indexContents[entry] = text # Before generate File Content we sort the entry list manufacturers.sort() mandatories.sort() optionals.sort() # Generate Definition of mandatory objects fileContent += "\n[MandatoryObjects]\n" fileContent += "SupportedObjects=%d\n"%len(mandatories) for idx, entry in enumerate(mandatories): fileContent += "%d=0x%4.4X\n"%(idx + 1, entry) # Write mandatory entries for entry in mandatories: fileContent += indexContents[entry] # Generate Definition of optional objects fileContent += "\n[OptionalObjects]\n" fileContent += "SupportedObjects=%d\n"%len(optionals) for idx, entry in enumerate(optionals): fileContent += "%d=0x%4.4X\n"%(idx + 1, entry) # Write optional entries for entry in optionals: fileContent += indexContents[entry] # Generate Definition of manufacturer objects fileContent += "\n[ManufacturerObjects]\n" fileContent += "SupportedObjects=%d\n"%len(manufacturers) for idx, entry in enumerate(manufacturers): fileContent += "%d=0x%4.4X\n"%(idx + 1, entry) # Write manufacturer entries for entry in manufacturers: fileContent += indexContents[entry] # Return File Content return fileContent
b74d42a1db2962b6299eee6685ddeeb9c56ff672 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11017/b74d42a1db2962b6299eee6685ddeeb9c56ff672/eds_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 25391, 12, 907, 16, 3608, 4672, 468, 16447, 434, 1517, 770, 2939, 770, 6323, 273, 2618, 225, 468, 8152, 1191, 813, 783, 67, 957, 273, 1191, 957, 1435, 468, 8152, 756, 26978, 14003,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 25391, 12, 907, 16, 3608, 4672, 468, 16447, 434, 1517, 770, 2939, 770, 6323, 273, 2618, 225, 468, 8152, 1191, 813, 783, 67, 957, 273, 1191, 957, 1435, 468, 8152, 756, 26978, 14003,...
attrs['url'], str(msg))
attrs['url'], str(evalue))
def filter (self, data, attrs): """ Feed data to XML parser. """ if 'xmlrewriter_parser' not in attrs: return data p = attrs['xmlrewriter_parser'] f = attrs['xmlrewriter_filter'] try: p.feed(data) except xml.sax.SAXException, msg: wc.log.error(wc.LOG_FILTER, "XML filter error at %s: %s", attrs['url'], str(msg)) return data return f.getoutput()
f0d0e2022480b4ac7338ad70d5a4257c7498b331 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/f0d0e2022480b4ac7338ad70d5a4257c7498b331/XmlRewriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 261, 2890, 16, 501, 16, 3422, 4672, 3536, 14013, 501, 358, 3167, 2082, 18, 3536, 309, 296, 2902, 266, 6299, 67, 4288, 11, 486, 316, 3422, 30, 327, 501, 293, 273, 3422, 3292, 2902...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 261, 2890, 16, 501, 16, 3422, 4672, 3536, 14013, 501, 358, 3167, 2082, 18, 3536, 309, 296, 2902, 266, 6299, 67, 4288, 11, 486, 316, 3422, 30, 327, 501, 293, 273, 3422, 3292, 2902...
split = libpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1]
mod.dir = '/'.join(relpath[:-1]) mod.mod_dir = relpath[:-1]
def parse_module(name, ast=None, parent=None, node=None): # --- valid name? for c in name: if not c in string.letters+string.digits+'_.': print ("*ERROR*:%s.py: module names should consist of letters, digits and underscores" % name) sys.exit() # --- parse ident = name.split('.')[-1] mod = module(ident, node) mod.builtin = False if ast: # XXX mod.ast = ast mod.filename = name+'.py' mod.dir = '' mod.mod_path = [name] mod.mod_dir = [] else: # --- locate module relname = name.replace('.', '/') relpath = name.split('.') if parent: path = connect_paths(parent.dir, relname) else: path = name libpath = connect_paths(getgx().libdir, relname) rootpath = connect_paths(os.getcwd(), relname) if os.path.isfile(path+'.py'): # local module mod.filename = path+'.py' if parent: mod.mod_path = parent.mod_dir + relpath else: mod.mod_path = relpath split = path.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] mod.builtin = not parent or parent.builtin elif os.path.isfile(connect_paths(path, '__init__.py')): mod.filename = connect_paths(path, '__init__.py') if parent: mod.mod_path = parent.mod_dir + relpath else: mod.mod_path = relpath mod.dir = path mod.mod_dir = mod.mod_path mod.builtin = not parent or parent.builtin elif os.path.isfile(rootpath+'.py'): # root module mod.filename = rootpath+'.py' mod.mod_path = relpath split = rootpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] elif os.path.isfile(connect_paths(rootpath, '__init__.py')): mod.filename = connect_paths(rootpath, '__init__.py') mod.mod_path = relpath mod.dir = rootpath mod.mod_dir = mod.mod_path elif os.path.isfile(libpath+'.py'): # library module mod.filename = libpath+'.py' mod.mod_path = relpath split = libpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] mod.builtin = True elif os.path.isfile(connect_paths(libpath, '__init__.py')): mod.filename = connect_paths(libpath, '__init__.py') mod.mod_path = relpath mod.dir = libpath mod.mod_dir = mod.mod_path mod.builtin = True else: error('cannot locate module: '+name, node) modpath = '.'.join(mod.mod_path) if modpath in getgx().modules: # cached? return getgx().modules[modpath] #print 'not cached', modpath getgx().modules[modpath] = mod mod.ast = parsefile(mod.filename) old_mv = getmv() mod.mv = mv = moduleVisitor(mod) setmv(mv) mv.visit = mv.dispatch mv.visitor = mv mv.dispatch(mod.ast) mv = old_mv setmv(mv) mod.funcs = mod.mv.funcs mod.classes = mod.mv.classes return mod
051eacf40bd512b7594e2d783b5a679691c17bf6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6661/051eacf40bd512b7594e2d783b5a679691c17bf6/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2978, 12, 529, 16, 3364, 33, 7036, 16, 982, 33, 7036, 16, 756, 33, 7036, 4672, 468, 9948, 923, 508, 35, 364, 276, 316, 508, 30, 309, 486, 276, 316, 533, 18, 26054, 15, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2978, 12, 529, 16, 3364, 33, 7036, 16, 982, 33, 7036, 16, 756, 33, 7036, 4672, 468, 9948, 923, 508, 35, 364, 276, 316, 508, 30, 309, 486, 276, 316, 533, 18, 26054, 15, 10...
readline.read_history_file(scapy.conf.histfile)
try: readline.read_history_file(scapy.conf.histfile) except IOError: pass
def usage(): print "Usage: scapy.py [-s sessionfile]" sys.exit(0)
0ce0d284ce51101875c44e4a8261c136e4dce9c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/0ce0d284ce51101875c44e4a8261c136e4dce9c7/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
_gamera_initialised = True
def _init_gamera(): global _gamera_initialised if _gamera_initialised: return import plugin, gamera_xml, sys # Create the default functions for the menupl for method in ( plugin.PluginFactory( "load_image", "File", plugin.ImageType(ALL, "image"), plugin.ImageType(ALL), plugin.Args([plugin.FileOpen("filename")])), plugin.PluginFactory( "display", "Displaying", None, plugin.ImageType(ALL), None), plugin.PluginFactory( "display_ccs", "Displaying", None, plugin.ImageType([ONEBIT]), None), plugin.PluginFactory( "display_false_color", "Displaying", None, plugin.ImageType([GREYSCALE, FLOAT]), None), plugin.PluginFactory( "classify_manual", "Classification", None, plugin.ImageType([ONEBIT]), plugin.Args([plugin.String("id")])), plugin.PluginFactory( "classify_heuristic", "Classification", None, plugin.ImageType([ONEBIT]), plugin.Args([plugin.String("id")])), plugin.PluginFactory( "classify_automatic", "Classification", None, plugin.ImageType([ONEBIT]), plugin.Args([plugin.String("id")])), plugin.PluginFactory( "unclassify", "Classification", None, plugin.ImageType([ONEBIT]), None), plugin.PluginFactory( "to_xml", "XML", plugin.String('xml'), plugin.ImageType([ONEBIT]), None), plugin.PluginFactory( "to_xml_filename", "XML", None, plugin.ImageType([ONEBIT]), plugin.Args([ plugin.FileSave("filename", extension=gamera_xml.extensions)])) ): method.register() paths.import_directory(paths.plugins, globals(), locals(), 1) sys.path.append(".") _gamera_initialised = True
e39ed63f3bf5e7a8cc351ca020e12d263ddfa0df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/e39ed63f3bf5e7a8cc351ca020e12d263ddfa0df/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 67, 75, 11229, 13332, 2552, 389, 75, 11229, 67, 6769, 5918, 309, 389, 75, 11229, 67, 6769, 5918, 30, 327, 1930, 1909, 16, 314, 11229, 67, 2902, 16, 2589, 468, 1788, 326, 805...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 67, 75, 11229, 13332, 2552, 389, 75, 11229, 67, 6769, 5918, 309, 389, 75, 11229, 67, 6769, 5918, 30, 327, 1930, 1909, 16, 314, 11229, 67, 2902, 16, 2589, 468, 1788, 326, 805...
if (os.environ.has_key("DYLD_LIBRARY_PATH")):
if ("DYLD_LIBRARY_PATH" in os.environ):
def CheckLinkerLibraryPath(): if (sys.platform == "win32"): return builtlib = os.path.abspath(os.path.join(OUTPUTDIR,"lib")) dyldpath = [] try: ldpath = [] f = file("/etc/ld.so.conf","r") for line in f: ldpath.append(line.rstrip()) f.close() except: ldpath = [] # Get the current if (os.environ.has_key("LD_LIBRARY_PATH")): ldpath = ldpath + os.environ["LD_LIBRARY_PATH"].split(":") if (sys.platform == "darwin" and os.environ.has_key("DYLD_LIBRARY_PATH")): dyldpath = os.environ["DYLD_LIBRARY_PATH"].split(":") # Remove any potential current Panda installation lib dirs for i in ldpath: if i.startswith("/usr/lib/panda"): ldpath.remove(i) for i in ldpath: if i.startswith("/usr/local/panda"): ldpath.remove(i) for i in dyldpath: if i.startswith("/Applications/Panda3D"): dyldpath.remove(i) # Add built/lib/ to (DY)LD_LIBRARY_PATH if it's not already there if (ldpath.count(builtlib)==0): if (os.environ.has_key("LD_LIBRARY_PATH")): os.environ["LD_LIBRARY_PATH"] = builtlib + ":" + os.environ["LD_LIBRARY_PATH"] else: os.environ["LD_LIBRARY_PATH"] = builtlib if (sys.platform == "darwin" and dyldpath.count(builtlib)==0): if (os.environ.has_key("DYLD_LIBRARY_PATH")): os.environ["DYLD_LIBRARY_PATH"] = builtlib + ":" + os.environ["DYLD_LIBRARY_PATH"] else: os.environ["DYLD_LIBRARY_PATH"] = builtlib
fdcc1205b8a0b6802b88877ecb24913b8464ac72 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7242/fdcc1205b8a0b6802b88877ecb24913b8464ac72/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2098, 264, 9313, 743, 13332, 309, 261, 9499, 18, 9898, 422, 315, 8082, 1578, 6, 4672, 327, 6650, 2941, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 12, 15527, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2098, 264, 9313, 743, 13332, 309, 261, 9499, 18, 9898, 422, 315, 8082, 1578, 6, 4672, 327, 6650, 2941, 273, 1140, 18, 803, 18, 5113, 803, 12, 538, 18, 803, 18, 5701, 12, 15527, ...
sqliteDrop = sybaseDrop = mssqlDrop = postgresDrop = rdbhostDrop
sqliteDrop = sybaseDrop = mssqlDrop = rdbhostDrop = postgresDrop
def test_collidingName(self): raises(AssertionError, Person.sqlmeta.addColumn, StringCol(name="name")) raises(AssertionError, Person.sqlmeta.addColumn, StringCol(name="_init")) raises(AssertionError, Person.sqlmeta.addColumn, StringCol(name="expire")) raises(AssertionError, Person.sqlmeta.addColumn, StringCol(name="set")) raises(AssertionError, self._test_collidingName)
66b347f3e8b0719a22e910e3f52a5685215b7d9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8798/66b347f3e8b0719a22e910e3f52a5685215b7d9a/test_auto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12910, 10415, 461, 12, 2890, 4672, 14183, 12, 14979, 668, 16, 11573, 18, 4669, 3901, 18, 1289, 1494, 16, 514, 914, 12, 529, 1546, 529, 6, 3719, 14183, 12, 14979, 668, 16, 115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12910, 10415, 461, 12, 2890, 4672, 14183, 12, 14979, 668, 16, 11573, 18, 4669, 3901, 18, 1289, 1494, 16, 514, 914, 12, 529, 1546, 529, 6, 3719, 14183, 12, 14979, 668, 16, 115...
if test_support.verbose: print 'yes'
f = open(TESTFN, 'wb') try: f.seek(2147483649L) f.write("x") f.flush() except (IOError, OverflowError): f.close() unlink(TESTFN) raise TestSkipped, "filesystem does not have largefile support" else: f.close() suite = unittest.TestSuite() suite.addTest(TestCase('test_seek')) suite.addTest(TestCase('test_osstat')) suite.addTest(TestCase('test_seek_read')) suite.addTest(TestCase('test_lseek')) f = open(TESTFN, 'w') if hasattr(f, 'truncate'): suite.addTest(TestCase('test_truncate')) f.close() unlink(TESTFN) run_unittest(suite) unlink(TESTFN)
def expect(got_this, expect_this): if test_support.verbose: print '%r =?= %r ...' % (got_this, expect_this), if got_this != expect_this: if test_support.verbose: print 'no' raise test_support.TestFailed, 'got %r, but expected %r' %\ (got_this, expect_this) else: if test_support.verbose: print 'yes'
152cb89fb6b8d7ac91b02907a24fec7570b2a56a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/152cb89fb6b8d7ac91b02907a24fec7570b2a56a/test_largefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4489, 12, 13212, 67, 2211, 16, 4489, 67, 2211, 4672, 309, 1842, 67, 13261, 18, 11369, 30, 1172, 1995, 86, 273, 35, 33, 738, 86, 25956, 738, 261, 13212, 67, 2211, 16, 4489, 67, 2211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4489, 12, 13212, 67, 2211, 16, 4489, 67, 2211, 4672, 309, 1842, 67, 13261, 18, 11369, 30, 1172, 1995, 86, 273, 35, 33, 738, 86, 25956, 738, 261, 13212, 67, 2211, 16, 4489, 67, 2211, ...
buildir = os.path.dirname(sys.executable)
buildir = os.path.dirname(os.path.realpath(sys.executable))
def get_python_inc(plat_specific=0, prefix=None): """Return the directory containing installed Python header files. If 'plat_specific' is false (the default), this is the path to the non-platform-specific header files, i.e. Python.h and so on; otherwise, this is the path to platform-specific header files (namely pyconfig.h). If 'prefix' is supplied, use it instead of sys.prefix or sys.exec_prefix -- i.e., ignore 'plat_specific'. """ if prefix is None: prefix = plat_specific and EXEC_PREFIX or PREFIX if os.name == "posix": if python_build: buildir = os.path.dirname(sys.executable) if plat_specific: # python.h is located in the buildir inc_dir = buildir else: # the source dir is relative to the buildir srcdir = os.path.abspath(os.path.join(buildir, get_config_var('srcdir'))) # Include is located in the srcdir inc_dir = os.path.join(srcdir, "Include") return inc_dir return os.path.join(prefix, "include", "python" + get_python_version()) elif os.name == "nt": return os.path.join(prefix, "include") elif os.name == "mac": if plat_specific: return os.path.join(prefix, "Mac", "Include") else: return os.path.join(prefix, "Include") elif os.name == "os2": return os.path.join(prefix, "Include") else: raise DistutilsPlatformError( "I don't know where Python installs its C header files " "on platform '%s'" % os.name)
6f09ea893713808934d21cf56eeddbf4f51a3fcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/6f09ea893713808934d21cf56eeddbf4f51a3fcb/sysconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8103, 67, 9523, 12, 412, 270, 67, 12524, 33, 20, 16, 1633, 33, 7036, 4672, 3536, 990, 326, 1867, 4191, 5876, 6600, 1446, 1390, 18, 225, 971, 296, 412, 270, 67, 12524, 11, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8103, 67, 9523, 12, 412, 270, 67, 12524, 33, 20, 16, 1633, 33, 7036, 4672, 3536, 990, 326, 1867, 4191, 5876, 6600, 1446, 1390, 18, 225, 971, 296, 412, 270, 67, 12524, 11, 35...
if obj not in self.valdocs: return None
if obj not in self.module_set: return None
def url(self, obj): """ Return the URL for the given object, which can be a C{VariableDoc}, a C{ValueDoc}, or a C{DottedName}. """ # Module: <canonical_name>-module.html if isinstance(obj, ModuleDoc): if obj not in self.valdocs: return None return urllib.quote('%s'%obj.canonical_name) + '-module.html' # Class: <canonical_name>-class.html elif isinstance(obj, ClassDoc): if obj not in self.valdocs: return None return urllib.quote('%s'%obj.canonical_name) + '-class.html' # Variable elif isinstance(obj, VariableDoc): val_doc = obj.value if isinstance(val_doc, (ModuleDoc, ClassDoc)): return self.url(val_doc) elif obj.container in (None, UNKNOWN): return self.url(val_doc) else: container_url = self.url(obj.container) if container_url is None: return None return '%s#%s' % (container_url, urllib.quote('%s'%obj.name)) # Value (other than module or class) elif isinstance(obj, ValueDoc): container = self.docindex.container(obj) if container is None: return None # We couldn't find it! else: container_url = self.url(container) if container_url is None: return None anchor = urllib.quote('%s'%obj.canonical_name[-1]) return '%s#%s' % (container_url, anchor) # Dotted name: look up the corresponding APIDoc elif isinstance(obj, DottedName): val_doc = self.docindex.get_valdoc(obj) if val_doc is None: return None return self.url(val_doc) # Special pages: elif obj == 'indices': return 'indices.html' elif obj == 'help': return 'help.html' elif obj == 'trees': return 'trees.html' else: raise ValueError, "Don't know what to do with %r" % obj
28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 12, 2890, 16, 1081, 4672, 3536, 2000, 326, 1976, 364, 326, 864, 733, 16, 1492, 848, 506, 279, 385, 95, 3092, 1759, 5779, 279, 385, 95, 620, 1759, 5779, 578, 279, 385, 95, 10412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 12, 2890, 16, 1081, 4672, 3536, 2000, 326, 1976, 364, 326, 864, 733, 16, 1492, 848, 506, 279, 385, 95, 3092, 1759, 5779, 279, 385, 95, 620, 1759, 5779, 578, 279, 385, 95, 10412, ...
description = models.CharField(maxlength=128)
description = models.CharField(maxlength=128, core=True)
def __str__(self): return str(self.name)
055370503cff7e2ec12d0d3c02a5dd18d816de20 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6757/055370503cff7e2ec12d0d3c02a5dd18d816de20/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 609, 12, 2890, 18, 529, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 609, 12, 2890, 18, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if '__init__.py' in names:
if '__terp__.py' in names:
def find_addons(): for (dp, dn, names) in os.walk(opj('bin', 'addons')): if '__init__.py' in names: modname = dp.replace(os.path.sep, '.').replace('bin', 'openerp-server', 1) yield modname
66c977ae9a20804ba2998f7f7d7d0e2e9bf3a60b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/66c977ae9a20804ba2998f7f7d7d0e2e9bf3a60b/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 1289, 7008, 13332, 364, 261, 9295, 16, 8800, 16, 1257, 13, 316, 1140, 18, 11348, 12, 556, 78, 2668, 4757, 2187, 296, 1289, 7008, 26112, 30, 309, 4940, 387, 84, 25648, 2074, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 7008, 13332, 364, 261, 9295, 16, 8800, 16, 1257, 13, 316, 1140, 18, 11348, 12, 556, 78, 2668, 4757, 2187, 296, 1289, 7008, 26112, 30, 309, 4940, 387, 84, 25648, 2074, 1...
print "Sent emails ... %s" % str(datatuple)
def save(self): isnew = not self.id ret = super(Post, self).save()
c5dfb139ab883fdf2c1ac85261fc4fdacf351bfe /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11563/c5dfb139ab883fdf2c1ac85261fc4fdacf351bfe/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 353, 2704, 273, 486, 365, 18, 350, 325, 273, 2240, 12, 3349, 16, 365, 2934, 5688, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12, 2890, 4672, 353, 2704, 273, 486, 365, 18, 350, 325, 273, 2240, 12, 3349, 16, 365, 2934, 5688, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...