rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
proutn(" ")
if not silent: proutn(" ")
def lrscan(): # long-range sensor scan if damaged(DLRSENS): # Now allow base's sensors if docked if game.condition != "docked": prout(_("LONG-RANGE SENSORS DAMAGED.")) return prout(_("Starbase's long-range scan")) else: prout(_("Long-range scan")) for x in range(game.quadrant.x-1, game.quadrant.x+2): proutn(" ") for y in range(game.quadrant.y-1, game.quadrant.y+2): if not VALID_QUADRANT(x, y): proutn(" -1") else: if not damaged(DRADIO): game.state.galaxy[x][y].charted = True game.state.chart[x][y].klingons = game.state.galaxy[x][y].klingons game.state.chart[x][y].starbase = game.state.galaxy[x][y].starbase game.state.chart[x][y].stars = game.state.galaxy[x][y].stars if game.state.galaxy[x][y].supernova: proutn(" ***") else: proutn(" %3d" % (game.state.chart[x][y].klingons*100 + game.state.chart[x][y].starbase * 10 + game.state.chart[x][y].stars)) prout(" ")
874334bb4787b1c102e1171674709e30ee23368a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/874334bb4787b1c102e1171674709e30ee23368a/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12226, 9871, 13332, 468, 1525, 17, 3676, 10583, 4135, 309, 302, 301, 11349, 12, 8914, 54, 26753, 4672, 468, 4494, 1699, 1026, 1807, 31349, 309, 5822, 329, 309, 7920, 18, 4175, 480, 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, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12226, 9871, 13332, 468, 1525, 17, 3676, 10583, 4135, 309, 302, 301, 11349, 12, 8914, 54, 26753, 4672, 468, 4494, 1699, 1026, 1807, 31349, 309, 5822, 329, 309, 7920, 18, 4175, 480, 315, ...
cat >/etc/yum.repos.d/beaker-tests.repo <<REPO_END
cat >/tmp/etc/yum.repos.d/beaker-tests.repo <<REPO_END
def content(self): self.write_line("""
7ce769700eaf7f983fc48a6c23613433a4bb3bc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13148/7ce769700eaf7f983fc48a6c23613433a4bb3bc3/beakerlc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 12, 2890, 4672, 365, 18, 2626, 67, 1369, 2932, 3660, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 913, 12, 2890, 4672, 365, 18, 2626, 67, 1369, 2932, 3660, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if by: w("BYMONTH=%s;" % by)
if by: w(";BYMONTH=%s" % by)
def doRecur(self, sts, r, propName, predName): w = self._w w(propName + ":") freq = sts.any(r, ICAL.freq) if freq: w("FREQ=%s;" % freq) ival = sts.any(r, ICAL.interval) if freq: w("INTERVAL=%s;" % ival) by = sts.any(r, ICAL.byday) if by: w("BYDAY=%s;" % by) by = sts.any(r, ICAL.bymonth) if by: w("BYMONTH=%s;" % by) w(CRLF)
01e8ffcef9da5b976597b7730b45e27c8acc68b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/01e8ffcef9da5b976597b7730b45e27c8acc68b2/toIcal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 426, 1397, 12, 2890, 16, 27099, 16, 436, 16, 9994, 16, 3479, 461, 4672, 341, 273, 365, 6315, 91, 341, 12, 5986, 461, 397, 6153, 13, 7684, 273, 27099, 18, 2273, 12, 86, 16, 467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 426, 1397, 12, 2890, 16, 27099, 16, 436, 16, 9994, 16, 3479, 461, 4672, 341, 273, 365, 6315, 91, 341, 12, 5986, 461, 397, 6153, 13, 7684, 273, 27099, 18, 2273, 12, 86, 16, 467, ...
jumpPoints = [0] points = contourPoly(face.contour()) if simplifyEpsilon != None: points = simplifyPolygon(points, simplifyEpsilon, simplifyEpsilon) del points[-1] jumpPoints.append(len(points)) for anchor in face.holeContours(): innerContour = contourPoly(anchor) if simplifyEpsilon != None: innerContour = simplifyPolygon( innerContour, simplifyEpsilon, simplifyEpsilon) points.extend(innerContour) del points[-1] jumpPoints.append(len(points)) if triangle: return constrainedDelaunayMap( points, jumpPoints, imageSize, contourProtection, onlyInner) else: return fakedConstrainedDelaunayMap( points, jumpPoints, imageSize, contourProtection, onlyInner)
return fakedConstrainedDelaunayMap(polygons, imageSize)
def faceCDTMap(face, imageSize, simplifyEpsilon = None, contourProtection = CONTOUR_PROTECTION, onlyInner = True): """USAGE: dlm = faceCDTMap(face, mapSize) `face` should be a GeoMap.Face object, and all its contours will be extracted. `mapSize` is used to initialize the GeoMap with the resulting edges. Optional keyword parameters: simplifyEpsilon If given, each contour polygon is simplified by calling simplifyPolygon with this epsilon as parameter (default None -> don't use simplifyPolygon). markContour If True(default), the point list is expected to be a sorted list, and edges between successive entries are marked as contour edges (an exception is raised if such a connection is missing). A `jumpPoints` list is used to mark multiple contours. onlyInner If True(default), all edges outside (left) of the marked contour are removed in a post-processing step. (This has no effect if `markContour` is False.)""" if type(face) == tuple: points, jumpPoints = face elif type(face) in (list, Polygon): points = Polygon(face) if points[-1] == points[0]: del points[-1] jumpPoints = [0, len(points)] else: jumpPoints = [0] points = contourPoly(face.contour()) if simplifyEpsilon != None: points = simplifyPolygon(points, simplifyEpsilon, simplifyEpsilon) del points[-1] jumpPoints.append(len(points)) for anchor in face.holeContours(): innerContour = contourPoly(anchor) if simplifyEpsilon != None: innerContour = simplifyPolygon( innerContour, simplifyEpsilon, simplifyEpsilon) points.extend(innerContour) del points[-1] jumpPoints.append(len(points)) if triangle: return constrainedDelaunayMap( points, jumpPoints, imageSize, contourProtection, onlyInner) else: return fakedConstrainedDelaunayMap( points, jumpPoints, imageSize, contourProtection, onlyInner)
9780fdb920d074c0946e5e96a8fed5fb752733ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/9780fdb920d074c0946e5e96a8fed5fb752733ff/delaunay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7945, 39, 9081, 863, 12, 865, 16, 29344, 16, 16499, 29889, 10327, 273, 599, 16, 15332, 16938, 273, 3492, 4296, 1099, 67, 3373, 1448, 3106, 16, 1338, 2857, 273, 1053, 4672, 3536, 29550, 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, 7945, 39, 9081, 863, 12, 865, 16, 29344, 16, 16499, 29889, 10327, 273, 599, 16, 15332, 16938, 273, 3492, 4296, 1099, 67, 3373, 1448, 3106, 16, 1338, 2857, 273, 1053, 4672, 3536, 29550, 3...
color_map_dict[func] = func.__name__
def gmt_drywet(range, **traits): """ Generator function for the 'GMT Dry-Wet' gradient """ _data = {'red': ((0.00000,0.5255,0.5255), (0.16670,0.9333,0.9333), (0.33330,0.7059,0.7059), (0.50000,0.1961,0.1961), (0.66670,0.0471,0.0471), (0.83330,0.1490,0.1490), (1.00000,0.0314,0.0314)), 'green': ((0.00000,0.3804,0.3804), (0.16670,0.7804,0.7804), (0.33330,0.9333,0.9333), (0.50000,0.9333,0.9333), (0.66670,0.4706,0.4706), (0.83330,0.0039,0.0039), (1.00000,0.2000,0.2000)), 'blue': ((0.00000,0.1647,0.1647), (0.16670,0.3922,0.3922), (0.33330,0.5294,0.5294), (0.50000,0.9216,0.9216), (0.66670,0.9333,0.9333), (0.83330,0.7176,0.7176), (1.00000,0.4431,0.4431)) } return ColorMapper.from_segment_map(_data, range=range)
da90829f0c68c68066ac72470a127341776cb6b9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13167/da90829f0c68c68066ac72470a127341776cb6b9/default_colormaps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 1010, 67, 25011, 91, 278, 12, 3676, 16, 2826, 2033, 1282, 4672, 3536, 10159, 445, 364, 326, 296, 25315, 463, 1176, 17, 59, 278, 11, 10292, 3536, 225, 389, 892, 273, 13666, 1118, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 1010, 67, 25011, 91, 278, 12, 3676, 16, 2826, 2033, 1282, 4672, 3536, 10159, 445, 364, 326, 296, 25315, 463, 1176, 17, 59, 278, 11, 10292, 3536, 225, 389, 892, 273, 13666, 1118, 4...
f = codecs.open(path.join(d['path'], 'make.bat'), 'w', encoding='utf-8')
f = open(path.join(d['path'], 'make.bat'), 'w', encoding='utf-8')
def inner_main(args): d = {} texescape.init() if not color_terminal(): nocolor() print bold('Welcome to the Sphinx %s quickstart utility.') % __version__ print '''
002bf6b2a886357632099dce76b0a7e59df6c89d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/002bf6b2a886357632099dce76b0a7e59df6c89d/quickstart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 5254, 12, 1968, 4672, 302, 273, 2618, 16573, 6939, 18, 2738, 1435, 225, 309, 486, 2036, 67, 15979, 13332, 30601, 355, 280, 1435, 225, 1172, 13068, 2668, 59, 16312, 358, 326, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3443, 67, 5254, 12, 1968, 4672, 302, 273, 2618, 16573, 6939, 18, 2738, 1435, 225, 309, 486, 2036, 67, 15979, 13332, 30601, 355, 280, 1435, 225, 1172, 13068, 2668, 59, 16312, 358, 326, 34...
if bytes_recv >= 524288: if not rein_sent: self.client.sendcmd('user ' + USER) self.assertRaises(ftplib.error_perm, self.client.dir) rein_sent = 1
def test_user_on_transfer(self): # Test USER while already authenticated and a transfer is # in progress. self.client.login(user=USER, passwd=PASSWD) data = 'abcde12345' * 100000 self.f1.write(data) self.f1.close()
01b9245edb7880250424a1f6998bed3fcf477d7c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3782/01b9245edb7880250424a1f6998bed3fcf477d7c/test_ftpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1355, 67, 265, 67, 13866, 12, 2890, 4672, 468, 7766, 7443, 1323, 1818, 9370, 471, 279, 7412, 353, 468, 316, 4007, 18, 365, 18, 2625, 18, 5819, 12, 1355, 33, 4714, 16, 19093, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1355, 67, 265, 67, 13866, 12, 2890, 4672, 468, 7766, 7443, 1323, 1818, 9370, 471, 279, 7412, 353, 468, 316, 4007, 18, 365, 18, 2625, 18, 5819, 12, 1355, 33, 4714, 16, 19093, ...
return R.nan()
""" EXAMPLES: sage: RDF(NaN) nan """ return R.NaN()
def _real_double_(self, R): return R.nan()
2a839b3d50866729418f3c87713bc3adb8f65bac /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/2a839b3d50866729418f3c87713bc3adb8f65bac/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7688, 67, 9056, 67, 12, 2890, 16, 534, 4672, 327, 534, 18, 13569, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 389, 7688, 67, 9056, 67, 12, 2890, 16, 534, 4672, 327, 534, 18, 13569, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for index in m.group("list").split(","): if indices.has_key(index): indices[index].command(cmd, args[1:]) else: for index in indices.values(): index.command(cmd, args)
names = m.group("list").split(",") args = args[1:] if names is None: self.defaults.append([cmd, args]) names = indices.keys() for index in names: if indices.has_key(index): indices[index].command(cmd, args[1:]) elif self.commands.has_key(index): self.commands[index].append([cmd, args]) else: self.commands[index] = [[cmd, args]]
def command (self, cmd, args): indices = self.indices if len(args) > 0: m = re_optarg.match(args[0]) if m: for index in m.group("list").split(","): if indices.has_key(index): indices[index].command(cmd, args[1:]) else: for index in indices.values(): index.command(cmd, args)
246518fe05858dd373693d5f39f87ebc015f46a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10102/246518fe05858dd373693d5f39f87ebc015f46a2/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 261, 2890, 16, 1797, 16, 833, 4672, 4295, 273, 365, 18, 6836, 309, 562, 12, 1968, 13, 405, 374, 30, 312, 273, 283, 67, 3838, 3175, 18, 1916, 12, 1968, 63, 20, 5717, 309, 312, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 261, 2890, 16, 1797, 16, 833, 4672, 4295, 273, 365, 18, 6836, 309, 562, 12, 1968, 13, 405, 374, 30, 312, 273, 283, 67, 3838, 3175, 18, 1916, 12, 1968, 63, 20, 5717, 309, 312, ...
artype = b.typecode() if artype not in ['F','D','f','d']: artype = Num.Float
artype = mintypecode((a,b))
def lp2bs(b,a,wo=1,bw=1): """Return a band-stop filter with center frequency wo and bandwidth bw from a low-pass filter prototype with unity cutoff frequency. """ a,b = map(atleast_1d,(a,b)) D = len(a) - 1 N = len(b) - 1 artype = b.typecode() if artype not in ['F','D','f','d']: artype = Num.Float M = max([N,D]) Np = M + M Dp = M + M bprime = Num.zeros(Np+1,artype) aprime = Num.zeros(Dp+1,artype) wosq = wo*wo for j in range(Np+1): val = 0.0 for i in range(0,N+1): for k in range(0,M-i+1): if i+2*k == j: val += comb(M-i,k)*b[N-i]*(wosq)**(M-i-k) * bw**i bprime[Np-j] = val for j in range(Dp+1): val = 0.0 for i in range(0,D+1): for k in range(0,M-i+1): if i+2*k == j: val += comb(M-i,k)*a[D-i]*(wosq)**(M-i-k) * bw**i aprime[Dp-j] = val return normalize(bprime, aprime)
eb85a014d534e66d42610f6f5ad6031ebdb93f39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/eb85a014d534e66d42610f6f5ad6031ebdb93f39/filter_design.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12423, 22, 2038, 12, 70, 16, 69, 16, 6933, 33, 21, 16, 70, 91, 33, 21, 4672, 3536, 990, 279, 8937, 17, 5681, 1034, 598, 4617, 8670, 341, 83, 471, 20508, 12986, 628, 279, 4587, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12423, 22, 2038, 12, 70, 16, 69, 16, 6933, 33, 21, 16, 70, 91, 33, 21, 4672, 3536, 990, 279, 8937, 17, 5681, 1034, 598, 4617, 8670, 341, 83, 471, 20508, 12986, 628, 279, 4587, 17, ...
version = '1.19'
version = '1.20'
def makeTag(self, config): """Return an XML tag for this file, using the given config""" attrs = {}
625a03221a5e78c8f487d2dae50b8ba7ab0314ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/625a03221a5e78c8f487d2dae50b8ba7ab0314ad/ciabot_svn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1805, 12, 2890, 16, 642, 4672, 3536, 990, 392, 3167, 1047, 364, 333, 585, 16, 1450, 326, 864, 642, 8395, 3422, 273, 2618, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1805, 12, 2890, 16, 642, 4672, 3536, 990, 392, 3167, 1047, 364, 333, 585, 16, 1450, 326, 864, 642, 8395, 3422, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.shape = scale_rotate_poly(self.shape, (self.radius + padding)/float(self.radius), 0)
self.shape = list(scale_rotate_poly(self.shape, (self.radius + padding)/float(self.radius), 0))
def pad(self, padding): self.shape = scale_rotate_poly(self.shape, (self.radius + padding)/float(self.radius), 0)
829ef4073836bdda59b8887ebe8133cadb6c07aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9601/829ef4073836bdda59b8887ebe8133cadb6c07aa/game.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4627, 12, 2890, 16, 4992, 4672, 365, 18, 4867, 273, 3159, 67, 20342, 67, 16353, 12, 2890, 18, 4867, 16, 261, 2890, 18, 11282, 397, 4992, 13176, 5659, 12, 2890, 18, 11282, 3631, 374, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4627, 12, 2890, 16, 4992, 4672, 365, 18, 4867, 273, 3159, 67, 20342, 67, 16353, 12, 2890, 18, 4867, 16, 261, 2890, 18, 11282, 397, 4992, 13176, 5659, 12, 2890, 18, 11282, 3631, 374, 13...
raise ValueError, "Log of %s to the base %s does not exist."%(a,b) m = ord.isqrt() g = [a] c = b**(-m) S2 = [1]
raise ValueError, "Log of %s to the base %s does not exist."%(a,b) m = ord.isqrt()+1 table = dict() g = 1 for j in range(m): table[g] = j g *= b g = g**(-1) h = a
def discrete_log_generic(x, base, ord=None): r""" Return an integer $n$ such that $b^n = x$, assuming that ord is a multiple of the multiplicative order of $a$ and $b$ is the base. If ord is not specified an attempt is made to compute it. WARNING: If x has a log method, it is likely to be vastly faster than using this function. E.g., if x is an integer modulo n, use its log method instead! INPUT: x -- number base -- number (base of log) ord -- integer (multiple of order of base). The elements a and b must support exponentiation to a negative power. If no such $x$ exits, this function raises a ValueError exception. ALGORITHM: Baby step giant step. EXAMPLES: sage: b = Mod(2,37); a = b^20 sage: discrete_log_generic(a, b) 20 sage: b = Mod(2,997); a = b^20 sage: discrete_log_generic(a, b) 20 sage: K = GF(3^6,'b') sage: b = K.gen() sage: a = b^210 sage: discrete_log_generic(a, b, K.order()-1) 210 sage: b = Mod(1,37); x = Mod(2,37) sage: discrete_log_generic(x, b) Traceback (most recent call last): ... ValueError: Log of 2 to the base 1 does not exist. sage: b = Mod(1,997); x = Mod(2,997) sage: discrete_log_generic(x, b) Traceback (most recent call last): ... ValueError: Log of 2 to the base 1 does not exist. AUTHOR: -- William Stein and David Joyner (2005-01-05) """ Z = integer_ring.ZZ b = base; a = x if b == 0: if a == 0: return Integer(1) else: raise ValueError, "Log of %s to the base %s does not exist."%(a,b) elif a == 0: if b == 0: return Integer(1) else: raise ValueError, "Log of %s to the base %s does not exist."%(a,b) if ord is None: ord = b.multiplicative_order() ord = Z(ord) if ord < 100: c = 1 for i in range(ord): if c == a: # is b^i return Z(i) c *= b raise ValueError, "Log of %s to the base %s does not exist."%(a,b) m = ord.isqrt() g = [a] c = b**(-m) S2 = [1] for i in range(m): g.append(g[i]*c) if i < m-1: S2.append(S2[i]*b) for y in g: if y in S2: x = S2.index(y) return Z(m*(g.index(y)) + x) raise ValueError, "Log of %s to the base %s does not exist."%(a,b)
0f521a5ed76430bdc024c1f27c3b328cc58bbd72 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0f521a5ed76430bdc024c1f27c3b328cc58bbd72/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20035, 67, 1330, 67, 13540, 12, 92, 16, 1026, 16, 4642, 33, 7036, 4672, 436, 8395, 2000, 392, 3571, 271, 82, 8, 4123, 716, 271, 70, 66, 82, 273, 619, 8, 16, 15144, 716, 4642, 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, 20035, 67, 1330, 67, 13540, 12, 92, 16, 1026, 16, 4642, 33, 7036, 4672, 436, 8395, 2000, 392, 3571, 271, 82, 8, 4123, 716, 271, 70, 66, 82, 273, 619, 8, 16, 15144, 716, 4642, 353, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 539) else quickfix.IntField.__init__(self, 539, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5520, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 5520, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
tractorbeam()
tractorbeam(yank)
def destroybase(): # Code merges here for any commander destroying base # Not perfect, but will have to do # Handle case where base is in same quadrant as starship if game.battle == game.quadrant: game.state.chart[game.battle.x][game.battle.y].starbase = False game.quad[game.base.x][game.base.y] = IHDOT game.base.x=game.base.y=0 newcnd() skip(1) prout(_("Spock- \"Captain, I believe the starbase has been destroyed.\"")) elif game.state.rembase != 1 and communicating(): # Get word via subspace radio announce() skip(1) prout(_("Lt. Uhura- \"Captain, Starfleet Command reports that")) proutn(_(" the starbase in Quadrant %s has been destroyed by") % game.battle) if game.isatb == 2: prout(_("the Klingon Super-Commander")) else: prout(_("a Klingon Commander")) game.state.chart[game.battle.x][game.battle.y].starbase = False # Remove Starbase from galaxy game.state.galaxy[game.battle.x][game.battle.y].starbase = False for i in range(1, game.state.rembase+1): if game.state.baseq[i] == game.battle: game.state.baseq[i] = game.state.baseq[game.state.rembase] game.state.rembase -= 1 if game.isatb == 2: # reinstate a commander's base attack game.battle = hold game.isatb = 0 else: invalidate(game.battle)
ad7e6b2e5d6f82e729fafaf4752f0fd8fed97fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/ad7e6b2e5d6f82e729fafaf4752f0fd8fed97fc3/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5546, 1969, 13332, 468, 3356, 19037, 2674, 364, 1281, 1296, 264, 5546, 310, 1026, 468, 2288, 24746, 16, 1496, 903, 1240, 358, 741, 468, 5004, 648, 1625, 1026, 353, 316, 1967, 9474, 6890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5546, 1969, 13332, 468, 3356, 19037, 2674, 364, 1281, 1296, 264, 5546, 310, 1026, 468, 2288, 24746, 16, 1496, 903, 1240, 358, 741, 468, 5004, 648, 1625, 1026, 353, 316, 1967, 9474, 6890, ...
def convertSet(s, IITreeSet=IITreeSet):
def convertSet(s, IITreeSet=IITreeSet, IntType=type(0), type=type, len=len, doneTypes = (IntType, IITreeSet)): if type(s) in doneTypes: return s
def convertSet(s, IITreeSet=IITreeSet): if len(s) == 1: try: return s[0] # convert to int except: pass # This is just an optimization. return IITreeSet(s)
d9b19a5f2ece094ee5270244e59a17bf122936b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/d9b19a5f2ece094ee5270244e59a17bf122936b1/UnIndex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 694, 12, 87, 16, 467, 1285, 992, 694, 33, 45, 1285, 992, 694, 16, 3094, 559, 33, 723, 12, 20, 3631, 618, 33, 723, 16, 562, 33, 1897, 16, 2731, 2016, 273, 261, 1702, 559, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 694, 12, 87, 16, 467, 1285, 992, 694, 33, 45, 1285, 992, 694, 16, 3094, 559, 33, 723, 12, 20, 3631, 618, 33, 723, 16, 562, 33, 1897, 16, 2731, 2016, 273, 261, 1702, 559, 16, ...
import skunklib._normpath _normpath = skunklib.normpath
def _getCompileCache(name, srcModTime, version): if srcModTime is None: srcModTime = _getDocRootModTime(name) cacheModTime = _getCompileCacheModTime(name) if cacheModTime > srcModTime or Configuration.runOutOfCache: try: ret, vsn = marshal.loads(_readCompileCacheRoot(name)) except ValueError: #marshal got bad shit ERROR('marshal.loads got bad stuff from compile cache, ignoring') return 0, _readDocRoot(name), srcModTime if vsn == version: return 1, ret, srcModTime else: DEBUG(CACHE, '_gcc() version mismatch, wanted %s, got %s, ' 'returning source' % (version, vsn)) return 0, _readDocRoot(name), srcModTime else: return 0, _readDocRoot(name), srcModTime
2654681f3aa5067a56fe66578d8f904351c93e91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/2654681f3aa5067a56fe66578d8f904351c93e91/Cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 9937, 1649, 12, 529, 16, 1705, 1739, 950, 16, 1177, 4672, 309, 1705, 1739, 950, 353, 599, 30, 1705, 1739, 950, 273, 389, 588, 1759, 2375, 1739, 950, 12, 529, 13, 1247, 1739, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 9937, 1649, 12, 529, 16, 1705, 1739, 950, 16, 1177, 4672, 309, 1705, 1739, 950, 353, 599, 30, 1705, 1739, 950, 273, 389, 588, 1759, 2375, 1739, 950, 12, 529, 13, 1247, 1739, ...
debughelper.showParseTree(sys.stdout, bookParseTree)
def writeBook(self, book, bookParseTree, output, removedArticlesFile=None, coverimage=None): self.outputdir = output #debughelper.showParseTree(sys.stdout, bookParseTree) buildAdvancedTree(bookParseTree) debughelper.showParseTree(sys.stdout, bookParseTree) try: self.renderBook(book, bookParseTree, output, coverimage=coverimage) log.info('###### RENDERING OK') return 0 except: try: self.removeBadArticles(book, bookParseTree, output, removedArticlesFile) self.renderBook(book, bookParseTree, output, coverimage=coverimage) log.info('###### RENDERING OK - REMOVED ARTICLES:')#, repr(open(removedArticlesFile).read())) return 0 except Exception, err: # cant render book traceback.print_exc() log.error('###### RENDERING FAILED:') log.error(err) raise
5a2b917c1ad3ba1c8d2d6121cfac00ef58f71ede /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12390/5a2b917c1ad3ba1c8d2d6121cfac00ef58f71ede/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 9084, 12, 2890, 16, 6978, 16, 6978, 3201, 2471, 16, 876, 16, 3723, 19001, 812, 33, 7036, 16, 5590, 2730, 33, 7036, 4672, 365, 18, 2844, 1214, 273, 876, 468, 1361, 23618, 2471, 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, 1045, 9084, 12, 2890, 16, 6978, 16, 6978, 3201, 2471, 16, 876, 16, 3723, 19001, 812, 33, 7036, 16, 5590, 2730, 33, 7036, 4672, 365, 18, 2844, 1214, 273, 876, 468, 1361, 23618, 2471, 12...
reduct_data = [(0,0,N,0)] + [ (u, 1, 1, inverse_mod(u, N)) for u in H ] not_yet_done = list(set(range(1,N)).difference(set(H))) not_yet_done.sort()
reduct_data = [0] * N reduct_data[0] = (0,N,0) for u in H: reduct_data[u] = (1, 1, inverse_mod(u, N))
def _coset_reduction_data_first_coord(G): """ Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specfically returns data needed for the first part of the reduction step (the first coordinate).
eb301dff111c888467560bbc7545e7b8e22d5329 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/eb301dff111c888467560bbc7545e7b8e22d5329/congroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14445, 278, 67, 1118, 4062, 67, 892, 67, 3645, 67, 5732, 12, 43, 4672, 3536, 8155, 501, 1399, 364, 23789, 326, 7378, 4987, 278, 23174, 434, 392, 930, 434, 348, 48, 67, 22, 12, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14445, 278, 67, 1118, 4062, 67, 892, 67, 3645, 67, 5732, 12, 43, 4672, 3536, 8155, 501, 1399, 364, 23789, 326, 7378, 4987, 278, 23174, 434, 392, 930, 434, 348, 48, 67, 22, 12, 6...
x.extra = fp.read(centdir[13]) x.comment = fp.read(centdir[14]) total = total + centdir[12] + centdir[13] + centdir[14] x.header_offset = centdir[18] + concat x.file_offset = x.header_offset + 30 + centdir[12] + centdir[13]
x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH]) x.comment = fp.read(centdir[_CD_COMMENT_LENGTH]) total = (total + centdir[_CD_FILENAME_LENGTH] + centdir[_CD_EXTRA_FIELD_LENGTH] + centdir[_CD_COMMENT_LENGTH]) x.header_offset = centdir[_CD_LOCAL_HEADER_OFFSET] + concat
def _GetContents(self): """Read in the table of contents for the ZIP file.""" fp = self.fp fp.seek(-22, 2) # Start of end-of-archive record filesize = fp.tell() + 22 # Get file size endrec = fp.read(22) # Archive must not end with a comment! if endrec[0:4] != stringEndArchive or endrec[-2:] != "\000\000": raise BadZipfile, "File is not a zip file, or ends with a comment" endrec = struct.unpack(structEndArchive, endrec) if self.debug > 1: print endrec size_cd = endrec[5] # bytes in central directory offset_cd = endrec[6] # offset of central directory x = filesize - 22 - size_cd # "concat" is zero, unless zip was concatenated to another file concat = x - offset_cd if self.debug > 2: print "given, inferred, offset", offset_cd, x, concat # self.start_dir: Position of start of central directory self.start_dir = offset_cd + concat fp.seek(self.start_dir, 0) total = 0 while total < size_cd: centdir = fp.read(46) total = total + 46 if centdir[0:4] != stringCentralDir: raise BadZipfile, "Bad magic number for central directory" centdir = struct.unpack(structCentralDir, centdir) if self.debug > 2: print centdir filename = fp.read(centdir[12]) # Create ZipInfo instance to store file information x = ZipInfo(filename) x.extra = fp.read(centdir[13]) x.comment = fp.read(centdir[14]) total = total + centdir[12] + centdir[13] + centdir[14] x.header_offset = centdir[18] + concat x.file_offset = x.header_offset + 30 + centdir[12] + centdir[13] (x.create_version, x.create_system, x.extract_version, x.reserved, x.flag_bits, x.compress_type, t, d, x.CRC, x.compress_size, x.file_size) = centdir[1:12] x.volume, x.internal_attr, x.external_attr = centdir[15:18] # Convert date/time code to (year, month, day, hour, min, sec) x.date_time = ( (d>>9)+1980, (d>>5)&0xF, d&0x1F, t>>11, (t>>5)&0x3F, (t&0x1F) * 2 ) self.filelist.append(x) self.NameToInfo[x.filename] = x if self.debug > 2: print "total", total for data in self.filelist: fp.seek(data.header_offset, 0) fheader = fp.read(30) if fheader[0:4] != stringFileHeader: raise BadZipfile, "Bad magic number for file header" fheader = struct.unpack(structFileHeader, fheader) fname = fp.read(fheader[10]) if fname != data.filename: raise RuntimeError, \ 'File name in directory "%s" and header "%s" differ.' % ( data.filename, fname)
57d2c8f69045eaa26f4c12ac2bc15aab3dc5419f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/57d2c8f69045eaa26f4c12ac2bc15aab3dc5419f/zipfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 6323, 12, 2890, 4672, 3536, 1994, 316, 326, 1014, 434, 2939, 364, 326, 18277, 585, 12123, 4253, 273, 365, 18, 7944, 4253, 18, 16508, 19236, 3787, 16, 576, 13, 540, 468, 3603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 967, 6323, 12, 2890, 4672, 3536, 1994, 316, 326, 1014, 434, 2939, 364, 326, 18277, 585, 12123, 4253, 273, 365, 18, 7944, 4253, 18, 16508, 19236, 3787, 16, 576, 13, 540, 468, 3603, ...
2
def __getitem__(self, n): """ Return the n'th point in self's __points list. This enables users to iterate over the curve's point set.
5b3e13bc1da72ed371c878092222e7887554bcec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5b3e13bc1da72ed371c878092222e7887554bcec/ell_finite_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 290, 4672, 3536, 2000, 326, 290, 1404, 76, 1634, 316, 365, 1807, 1001, 4139, 666, 18, 225, 1220, 19808, 3677, 358, 7401, 1879, 326, 8882, 1807, 1634, 444,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 290, 4672, 3536, 2000, 326, 290, 1404, 76, 1634, 316, 365, 1807, 1001, 4139, 666, 18, 225, 1220, 19808, 3677, 358, 7401, 1879, 326, 8882, 1807, 1634, 444,...
import string
import string, DateTime
def register_user(self, email, user_id='', first_name='', last_name='', password_length=8, roles=[], groups=[], post_wf=[]): """ A method for a user to allow a user to register themselves. """ import string validChars = string.letters+string.digits+'.' user_id_provided = False if user_id: user_id_provided = True if user_id_provided and user_id: if self.getUser(user_id): raise KeyError, 'User ID %s already exists' % user_id if self.get_userByEmail(email): raise KeyError, 'A user already exists with email address %s' % email valid_id = False gen_user_id = XWFUtils.generate_user_id(user_id, first_name, last_name, email) if not user_id: user_id = gen_user_id.next() while not valid_id: if not self.getUser(user_id): for char in user_id: if char not in validChars: if user_id_provided: raise KeyError, ('User ID %s contains an invalid character' ' (%s). Valid characters are %s.' % validChars) else: break valid_id = True if valid_id: break user_id = gen_user_id.next() user_id_provided = False password = XWFUtils.generate_password(password_length) self._doAddUser(user_id, password, roles, [], groups) user = self.getUser(user_id) if user: try: lhs = email.split('@')[0] except: lhs = '' first_name = first_name or lhs or last_name last_name = last_name or lhs or first_name preferred_name = first_name user.manage_changeProperties(firstName=first_name, lastName=last_name, preferredName=preferred_name) user.manage_addProperty('creation_date', DateTime.DateTime(), 'date') user.add_defaultDeliveryEmailAddress(email) verification_code = user.set_verificationCode() user.set_verificationWF(post_wf) return (user_id, password, verification_code) return None
940788b5c86802c6afff38bdc5b0655ff8481cf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6270/940788b5c86802c6afff38bdc5b0655ff8481cf1/CustomUserFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 1355, 12, 2890, 16, 2699, 16, 729, 67, 350, 2218, 2187, 1122, 67, 529, 2218, 2187, 1142, 67, 529, 2218, 2187, 2201, 67, 2469, 33, 28, 16, 4900, 22850, 6487, 3252, 22850, 6487...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 1355, 12, 2890, 16, 2699, 16, 729, 67, 350, 2218, 2187, 1122, 67, 529, 2218, 2187, 1142, 67, 529, 2218, 2187, 2201, 67, 2469, 33, 28, 16, 4900, 22850, 6487, 3252, 22850, 6487...
"""Applies ini tweaks to Fallout3.ini.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('INI Tweaks...')) menu.AppendItem(menuItem) def Execute(self,event): """Handle menu selection.""" window = getattr(self,'gTank',None) or self.window message = _("Apply an ini tweak to Fallout3.ini?\n\nWARNING: Incorrect tweaks can result in CTDs and even damage to you computer!") if not balt.askContinue(window,message,'bash.iniTweaks.continue',_("INI Tweaks")): return tweakDir = bosh.modInfos.dir.join("INI Tweaks") tweakDir.makedirs() tweakPath = balt.askOpen(window,_('INI Tweaks'),tweakDir,'', '*.ini') if not tweakPath: return bosh.fallout3Ini.applyTweakFile(tweakPath) balt.showInfo(window,tweakPath.stail+_(' applied.'),_('INI Tweaks'))
"""Applies ini tweaks to Fallout3.ini.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('INI Tweaks...')) menu.AppendItem(menuItem) def Execute(self,event): """Handle menu selection.""" window = getattr(self,'gTank',None) or self.window message = _("Apply an ini tweak to Fallout3.ini?\n\nWARNING: Incorrect tweaks can result in CTDs and even damage to you computer!") if not balt.askContinue(window,message,'bash.iniTweaks.continue',_("INI Tweaks")): return tweakDir = bosh.modInfos.dir.join("INI Tweaks") tweakDir.makedirs() tweakPath = balt.askOpen(window,_('INI Tweaks'),tweakDir,'', '*.ini') if not tweakPath: return bosh.fallout3Ini.applyTweakFile(tweakPath) balt.showInfo(window,tweakPath.stail+_(' applied.'),_('INI Tweaks'))
def Execute(self,event): message = _("Generate Bash program translator file?\n\nThis function is for translating Bash itself (NOT mods) into non-English languages. For more info, see Internationalization section of Bash readme.") if not balt.askContinue(self.window,message,'bash.dumpTranslator.continue',_('Dump Translator')): return import locale language = locale.getlocale()[0].split('_',1)[0] outPath = bosh.dirs['app'].join('Mopy','Data','NEW%s.txt' % (language,)) outFile = outPath.open('w') #--Scan for keys and dump to keyCount = 0 dumpedKeys = set() reKey = re.compile(r'_\([\'\"](.+?)[\'\"]\)') reTrans = bolt.reTrans for pyPath in (GPath(x+'.py') for x in ('bolt','balt','bush','bosh','bash','basher','bashmon')): pyText = pyPath.open() for lineNum,line in enumerate(pyText): line = re.sub('#.*','',line) for key in reKey.findall(line): key = reTrans.match(key).group(2) if key in dumpedKeys: continue outFile.write('=== %s, %d\n' % (pyPath.s,lineNum+1)) outFile.write(key+'\n>>>>\n') value = _(key,False) if value != key: outFile.write(value) outFile.write('\n') dumpedKeys.add(key) keyCount += 1 pyText.close() outFile.close() balt.showOk(self.window, '%d translation keys written to Mopy\\Data\\%s.' % (keyCount,outPath.stail), _('Dump Translator')+': '+outPath.stail)
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 883, 273, 389, 2932, 4625, 605, 961, 5402, 8333, 585, 10936, 82, 64, 82, 2503, 445, 353, 364, 2162, 1776, 605, 961, 6174, 261, 4400, 15546, 13, 1368, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 883, 273, 389, 2932, 4625, 605, 961, 5402, 8333, 585, 10936, 82, 64, 82, 2503, 445, 353, 364, 2162, 1776, 605, 961, 6174, 261, 4400, 15546, 13, 1368, 16...
raise self.error('command %s illegal in state %s' % (command, self.state))
raise self.error("command %s illegal in state %s, " "only allowed in states %s" % (command, self.state, ', '.join(Commands[command])))
def uid(self, command, *args): """Execute "command arg ..." with messages identified by UID, rather than message number.
9d02253bfd1bdf7e4a3686d2f96a8ede569d3485 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/9d02253bfd1bdf7e4a3686d2f96a8ede569d3485/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4555, 12, 2890, 16, 1296, 16, 380, 1968, 4672, 3536, 5289, 315, 3076, 1501, 18483, 598, 2743, 9283, 635, 10034, 16, 9178, 2353, 883, 1300, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4555, 12, 2890, 16, 1296, 16, 380, 1968, 4672, 3536, 5289, 315, 3076, 1501, 18483, 598, 2743, 9283, 635, 10034, 16, 9178, 2353, 883, 1300, 18, 2, -100, -100, -100, -100, -100, -100, -100...
fraction *= self.dt/maxwellTimeV[model] dq[model] += fSign*fraction/factorial elif maxwellTimeV[model] < timeFrac*self.dt: dq[model] = maxwellTimeV[model]/dt
fraction *= self.dt/maxwellTimeV[imodel] dq[imodel] += fSign*fraction/factorial elif maxwellTimeV[imodel] < timeFrac*self.dt: dq[imodel] = maxwellTimeV[imodel]/dt
def _calcStress(self, strainV, muV, lambdaV, shearRatioV, maxwellTimeV, strainTV, visStrainV, initialStateV): """ Compute stress and derivative of elasticity matrix. This assumes behavior is always viscoelastic. """ import math # import pdb bulkModulus = lambdaV + 2.0 * muV/3.0
f3d9e94f0d99fae027150353c86121d7d117b2d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8645/f3d9e94f0d99fae027150353c86121d7d117b2d1/GenMaxwellIsotropic3DTimeDep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12448, 510, 663, 12, 2890, 16, 16853, 58, 16, 4129, 58, 16, 3195, 58, 16, 23901, 297, 8541, 58, 16, 943, 30389, 950, 58, 16, 16853, 15579, 16, 2281, 1585, 530, 58, 16, 2172, 111...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12448, 510, 663, 12, 2890, 16, 16853, 58, 16, 4129, 58, 16, 3195, 58, 16, 23901, 297, 8541, 58, 16, 943, 30389, 950, 58, 16, 16853, 15579, 16, 2281, 1585, 530, 58, 16, 2172, 111...
self.frequency = settings.UPDATER_FREQ self.output = None
def init(self): self.frequency = settings.UPDATER_FREQ self.output = None if settings.PROTOCOL != 'irc': raise ValueError('ircops only relevant for irc protocol')
7c6c0fe6800b4d2fc0aeee291bf43c9c3d85333f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10942/7c6c0fe6800b4d2fc0aeee291bf43c9c3d85333f/ircops.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 309, 1947, 18, 16850, 480, 296, 481, 71, 4278, 1002, 2068, 2668, 481, 71, 4473, 1338, 9368, 364, 277, 1310, 1771, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 4672, 309, 1947, 18, 16850, 480, 296, 481, 71, 4278, 1002, 2068, 2668, 481, 71, 4473, 1338, 9368, 364, 277, 1310, 1771, 6134, 2, -100, -100, -100, -100, -100, -100, -100,...
self.response = ""
def __call__(self, args): Bcfg2.Server.Admin.Mode.__call__(self, args) opts = Bcfg2.Options.OptionParser(self.options) opts.parse([]) self.response = ""
555f0d2cb8dc4004afbd780c2b24781c64d31d33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/555f0d2cb8dc4004afbd780c2b24781c64d31d33/Init.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 833, 4672, 605, 7066, 22, 18, 2081, 18, 4446, 18, 2309, 16186, 1991, 972, 12, 2890, 16, 833, 13, 1500, 273, 605, 7066, 22, 18, 1320, 18, 1895, 2678, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 833, 4672, 605, 7066, 22, 18, 2081, 18, 4446, 18, 2309, 16186, 1991, 972, 12, 2890, 16, 833, 13, 1500, 273, 605, 7066, 22, 18, 1320, 18, 1895, 2678, 12...
wrdl cs, t7, t2 wrsel cs, t2
wrdl ss, t7, t2 wrsel ss, t2
def macroop IRET_PROT { .adjust_env oszIn64Override # Check for a nested task. This isn't supported at the moment. rflag t1, NT panic "Task switching with iret is unimplemented!", flags=(nCEZF,) #t1 = temp_RIP #t2 = temp_CS #t3 = temp_RFLAGS #t4 = handy m5 register # Pop temp_RIP, temp_CS, and temp_RFLAGS ld t1, ss, [1, t0, rsp], "0 * env.stackSize", dataSize=ssz ld t2, ss, [1, t0, rsp], "1 * env.stackSize", dataSize=ssz ld t3, ss, [1, t0, rsp], "2 * env.stackSize", dataSize=ssz
2b17d43934f87c1542dfb7cda84c531d9b5da6aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7385/2b17d43934f87c1542dfb7cda84c531d9b5da6aa/interrupts_and_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 467, 10238, 67, 3373, 56, 288, 263, 13362, 67, 3074, 1140, 94, 382, 1105, 6618, 225, 468, 2073, 364, 279, 4764, 1562, 18, 1220, 5177, 1404, 3260, 622, 326, 10382, 18, 436, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 467, 10238, 67, 3373, 56, 288, 263, 13362, 67, 3074, 1140, 94, 382, 1105, 6618, 225, 468, 2073, 364, 279, 4764, 1562, 18, 1220, 5177, 1404, 3260, 622, 326, 10382, 18, 436, ...
print "Attempting rebase onto %s..." % revision
options.stdout.write('Attempting rebase onto %s...\n' % revision)
def _AttemptRebase(self, upstream, files, verbose=False, newbase=None, branch=None, printed_path=False): """Attempt to rebase onto either upstream or, if specified, newbase.""" files.extend(self._Run(['diff', upstream, '--name-only']).split()) revision = upstream if newbase: revision = newbase if not printed_path: print "\n_____ %s : Attempting rebase onto %s..." % (self.relpath, revision) printed_path = True else: print "Attempting rebase onto %s..." % revision
e603c688da503d6a6db9690684aa49a1b2a54706 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/e603c688da503d6a6db9690684aa49a1b2a54706/gclient_scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7744, 426, 1969, 12, 2890, 16, 13505, 16, 1390, 16, 3988, 33, 8381, 16, 394, 1969, 33, 7036, 16, 3803, 33, 7036, 16, 14099, 67, 803, 33, 8381, 4672, 3536, 7744, 358, 283, 1969, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7744, 426, 1969, 12, 2890, 16, 13505, 16, 1390, 16, 3988, 33, 8381, 16, 394, 1969, 33, 7036, 16, 3803, 33, 7036, 16, 14099, 67, 803, 33, 8381, 4672, 3536, 7744, 358, 283, 1969, ...
cmd_l.append("'%s'" % self.source)
cmd_l.append(self.source)
def _start(self): """ Start worker, initialize buffers, prepare command. """ task = self.worker.task
995d481195c72528d7e776ab532569eaa06d6110 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11479/995d481195c72528d7e776ab532569eaa06d6110/Ssh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 12, 2890, 4672, 3536, 3603, 4322, 16, 4046, 9664, 16, 2911, 1296, 18, 3536, 1562, 273, 365, 18, 10124, 18, 4146, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1937, 12, 2890, 4672, 3536, 3603, 4322, 16, 4046, 9664, 16, 2911, 1296, 18, 3536, 1562, 273, 365, 18, 10124, 18, 4146, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
elif UName == "interix":
elif UName == "interix":
def GetVersion(Key): # # Only read the file if an environment variable is "missing" (they # usually all are, ok), and only read it once. # #print("WriteVariablesIntoEnvironment:3") Value = Versions.get(Key) if Value: return Value # # CM3VERSION d5.7.1 # CM3VERSIONNUM 050701 # CM3LASTCHANGED 2009-01-21 # RegExp = re.compile("(" + "|".join(Versions.keys()) + ") (.+)$", re.IGNORECASE) ShFilePath = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "version") for Line in open(ShFilePath): Match = RegExp.match(Line) if Match: MatchKey = Match.group(1) # # We are here because one of them wasn't found, but we should be # sure only to overwrite what we don't have. # if not Versions[MatchKey]: Value = Match.group(2) Versions[MatchKey] = Value exec("%s = \"%s\"" % (MatchKey, Value), locals(), globals()) # # Make sure we found every key in the file (at least those # not defined in the environment) # MissingKey = None for Item in Versions.iteritems(): #print(Item) if Item[1] is None: MissingKey = Item[0] File = __file__ sys.stderr.write("%(File)s: %(MissingKey)s not found in %(ShFilePath)s\n" % vars()) if MissingKey: sys.exit(1) return Versions.get(Key)
a5382390fc1645f62582e9440bae90e340b3d767 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/a5382390fc1645f62582e9440bae90e340b3d767/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1444, 12, 653, 4672, 468, 468, 5098, 855, 326, 585, 309, 392, 3330, 2190, 353, 315, 7337, 6, 261, 451, 402, 468, 11234, 777, 854, 16, 1529, 3631, 471, 1338, 855, 518, 3647, 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, 968, 1444, 12, 653, 4672, 468, 468, 5098, 855, 326, 585, 309, 392, 3330, 2190, 353, 315, 7337, 6, 261, 451, 402, 468, 11234, 777, 854, 16, 1529, 3631, 471, 1338, 855, 518, 3647, 18, ...
elif arg == u'': return default
def get_unicode(request, arg, name=None, default=None): """ For use with values returned from parse_quoted_separated or given as macro parameters, return a unicode string from a unicode string. The empty string or None are valid input and yield the default value. @param request: A request instance @param arg: The argument, may be None or a unicode string @param name: Name of the argument, for error messages @param default: default value if arg is empty; should be the same as any default value for arg @rtype: float @returns: the float value of the string """ _ = request.getText if arg is None: return default elif not isinstance(arg, unicode): raise TypeError('argument must be None or unicode') elif arg == u'': return default return arg
d3986959419a39d4209f1e85383e01eeb9abd552 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/d3986959419a39d4209f1e85383e01eeb9abd552/wikiutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9124, 12, 2293, 16, 1501, 16, 508, 33, 7036, 16, 805, 33, 7036, 4672, 3536, 2457, 999, 598, 924, 2106, 628, 1109, 67, 15179, 67, 24622, 578, 864, 487, 11522, 1472, 16, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9124, 12, 2293, 16, 1501, 16, 508, 33, 7036, 16, 805, 33, 7036, 4672, 3536, 2457, 999, 598, 924, 2106, 628, 1109, 67, 15179, 67, 24622, 578, 864, 487, 11522, 1472, 16, 327, ...
if os.path.isfile(os.path.join(MEDIA_ROOT, path, new_filename + "_" + version_prefix + ext)):
if os.path.isfile(smart_str(os.path.join(MEDIA_ROOT, path, new_filename + "_" + version_prefix + ext))):
def get_version_path(value, version_prefix): """ Construct the PATH to an Image version. Value has to be server-path, relative to MEDIA_ROOT. version_filename = filename + version_prefix + ext Returns a path relative to MEDIA_ROOT. """ if os.path.isfile(os.path.join(MEDIA_ROOT, value)): path, filename = os.path.split(value) filename, ext = os.path.splitext(filename) # check if this file is a version of an other file # to return filename_<version>.ext instead of filename_<version>_<version>.ext tmp = filename.split("_") if tmp[len(tmp)-1] in ADMIN_VERSIONS: # it seems like the "original" is actually a version of an other original # so we strip the suffix (aka. version_perfix) new_filename = filename.replace("_" + tmp[len(tmp)-1], "") # check if the version exists when we use the new_filename if os.path.isfile(os.path.join(MEDIA_ROOT, path, new_filename + "_" + version_prefix + ext)): # our "original" filename seem to be filename_<version> construct # so we replace it with the new_filename filename = new_filename # if a VERSIONS_BASEDIR is set we need to strip it from the path # or we get a <VERSIONS_BASEDIR>/<VERSIONS_BASEDIR>/... construct if VERSIONS_BASEDIR != "": path = path.replace(VERSIONS_BASEDIR + "/", "") version_filename = filename + "_" + version_prefix + ext return os.path.join(VERSIONS_BASEDIR, path, version_filename) else: return None
88e5542fefafc9009c986d0f1b0eec9573798695 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12975/88e5542fefafc9009c986d0f1b0eec9573798695/functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 67, 803, 12, 1132, 16, 1177, 67, 3239, 4672, 3536, 14291, 326, 7767, 358, 392, 3421, 1177, 18, 1445, 711, 358, 506, 1438, 17, 803, 16, 3632, 358, 26312, 67, 9185, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1589, 67, 803, 12, 1132, 16, 1177, 67, 3239, 4672, 3536, 14291, 326, 7767, 358, 392, 3421, 1177, 18, 1445, 711, 358, 506, 1438, 17, 803, 16, 3632, 358, 26312, 67, 9185, 18, ...
widgets = [] parent.widgets.append(self)
self.widgets = [] parent.widgets.append(self)
def __init__(self, parent, title='', titleButton=False): """ Appends a QGroupBox widget to <parent>, a property manager groupbox. Arguments: <parent> - the main property manager dialog (PropMgrBaseClass). <title> - the GroupBox title text. <titleButton> - if True, a titleButton is added to the top of the GroupBox with the label <title>. The titleButton is used to collapse and expand the GroupBox. if False, no titleButton is added. <title> will be used as the GroupBox title and the GroupBox will not be collapsable/expandable. """ QGroupBox.__init__(self) self.parent = parent # Calling addWidget() here is important. If done at the end, # the title button does not get assigned its palette for some # unknown reason. Mark 2007-05-20. parent.VBoxLayout.addWidget(self) # Add self to PropMgr's VBoxLayout widgets = [] # All widgets in the groupbox (except the title button). #parent.groupboxes.append(self) # REMOVE THIS parent.widgets.append(self) # KEEP if works self.setAutoFillBackground(True) self.setPalette(self.getPalette()) self.setStyleSheet(self.getStyleSheet()) # Create vertical box layout self.VBoxLayout = QVBoxLayout(self) self.VBoxLayout.setMargin(pmGrpBoxVboxLayoutMargin) self.VBoxLayout.setSpacing(pmGrpBoxVboxLayoutSpacing) # Create grid layout self.GridLayout = QGridLayout() self.GridLayout.setMargin(pmGridLayoutMargin) self.GridLayout.setSpacing(pmGridLayoutSpacing) # Insert grid layout in its own VBoxLayout self.VBoxLayout.addLayout(self.GridLayout) if titleButton: # Add title button to GroupBox self.titleButton = self.getTitleButton(title, self) self.VBoxLayout.insertWidget(0, self.titleButton) self.connect(self.titleButton,SIGNAL("clicked()"), self.toggleExpandCollapse) else: self.setTitle(title)
3e7f27913e8293125b584309c5e7a1a92c3c446d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/3e7f27913e8293125b584309c5e7a1a92c3c446d/PropMgrBaseClass.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 2077, 2218, 2187, 2077, 3616, 33, 8381, 4672, 3536, 6181, 87, 279, 2238, 1114, 3514, 3604, 358, 411, 2938, 20401, 279, 1272, 3301, 1041, 2147, 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, 1001, 2738, 972, 12, 2890, 16, 982, 16, 2077, 2218, 2187, 2077, 3616, 33, 8381, 4672, 3536, 6181, 87, 279, 2238, 1114, 3514, 3604, 358, 411, 2938, 20401, 279, 1272, 3301, 1041, 2147, 18,...
try:
try:
def execute(self,data={}, context={}): result = {} result['temp1'] = {} result['temp1']['value'] = 99 result['temp1']['unit'] = "C" result['hum1'] = {} result['hum1']['value'] = 0 result['hum1']['unit'] = "%" result['temp0'] = {} result['temp0']['value'] = 99 result['temp0']['unit'] = "C" result['hum0'] = {} result['hum0']['value'] = 0 result['hum0']['unit'] = "%" result['press'] = {} result['press']['value'] = 0 result['press']['unit'] = "mb" result['rain'] = {} result['rain']['value'] = 9999 result['rain']['unit'] = "mm/h" result['wind'] = {} result['wind']['value'] = 9999 result['wind']['max'] = 9999 result['wind']['deg'] = 0 result['wind']['dir'] = 'N' result['wind']['unit'] = "m/s" result['info'] = {} result['info']['timestamp'] = datetime(2001, 01, 01) try: dom = xml.dom.minidom.parse(self.path) except: self.logger.exception("Could not parse "+self.path) try: result['temp1']['value'] = float(dom.getElementsByTagName('th1')[0].getElementsByTagName('temp')[0].childNodes[0].data) except: pass
a246492feda03780f3e2aac7289cbfd893c010e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3323/a246492feda03780f3e2aac7289cbfd893c010e2/xmlquery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 892, 28793, 819, 12938, 4672, 225, 563, 273, 2618, 563, 3292, 5814, 21, 3546, 273, 2618, 563, 3292, 5814, 21, 21712, 1132, 3546, 273, 14605, 563, 3292, 5814, 21, 2171...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 892, 28793, 819, 12938, 4672, 225, 563, 273, 2618, 563, 3292, 5814, 21, 3546, 273, 2618, 563, 3292, 5814, 21, 21712, 1132, 3546, 273, 14605, 563, 3292, 5814, 21, 2171...
return self.tk.call(self._w, 'info', 'up', index)
return self.tk.call(self._w, 'info', 'up', index)
def info_up(self, index):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 416, 12, 2890, 16, 770, 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...
[ 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, 1123, 67, 416, 12, 2890, 16, 770, 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, ...
CheckDeps, missingdep = self._requiringFromInstalled(requiringPkg.pkgtup,
CheckDeps, missingdep = self._requiringFromInstalled(requiringPkg.returnNevraTuple(),
def _processReq(self, dep): """processes a Requires dep from the resolveDeps functions, returns a tuple of (CheckDeps, missingdep, conflicts, errors) the last item is an array of error messages""" CheckDeps = 0 missingdep = 0 conflicts = 0 errormsgs = [] ((name, version, release), (needname, needversion), flags, suggest, sense) = dep niceformatneed = rpmUtils.miscutils.formatRequire(needname, needversion, flags) self.verbose_logger.log(logginglevels.DEBUG_1, '%s requires: %s', name, niceformatneed) if self.dsCallback: self.dsCallback.procReq(name, niceformatneed) # is the requiring tuple (name, version, release) from an installed package? pkgs = [] dumbmatchpkgs = self.rpmdb.searchNevra(name=name, ver=version, rel=release) for po in dumbmatchpkgs: if self.tsInfo.exists(po.pkgtup): self.verbose_logger.log(logginglevels.DEBUG_4, 'Skipping package already in Transaction Set: %s', po) continue if niceformatneed in po.requiresList(): pkgs.append(po)
5faeaecb6dea5e9f73efedbf2d10f2a7058059a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/5faeaecb6dea5e9f73efedbf2d10f2a7058059a5/depsolve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 6113, 12, 2890, 16, 5993, 4672, 3536, 18675, 279, 16412, 5993, 628, 326, 2245, 14430, 4186, 16, 1135, 279, 3193, 434, 261, 1564, 14430, 16, 3315, 15037, 16, 14450, 16, 1334, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2567, 6113, 12, 2890, 16, 5993, 4672, 3536, 18675, 279, 16412, 5993, 628, 326, 2245, 14430, 4186, 16, 1135, 279, 3193, 434, 261, 1564, 14430, 16, 3315, 15037, 16, 14450, 16, 1334, 1...
cur.execute('SELECT pkgKey FROM packages WHERE pkgId="%s"' % pkgId)
cur.execute('SELECT pkgKey FROM packages WHERE pkgId=?', (pkgId,))
def getPkgById(self, pkgId): cur = self._primarydb.cursor() cur.execute('SELECT pkgKey FROM packages WHERE pkgId="%s"' % pkgId) ob = cur.fetchone() if ob: return self.getPkgByKey(ob["pkgKey"]) else: return None
1bd6adee371af6defb14a869c8d6fece65e51000 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/1bd6adee371af6defb14a869c8d6fece65e51000/sqliterepodb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1689, 14931, 5132, 12, 2890, 16, 3475, 548, 4672, 662, 273, 365, 6315, 8258, 1966, 18, 9216, 1435, 662, 18, 8837, 2668, 4803, 3475, 653, 4571, 5907, 4852, 3475, 548, 17282, 2187, 261, 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, 1689, 14931, 5132, 12, 2890, 16, 3475, 548, 4672, 662, 273, 365, 6315, 8258, 1966, 18, 9216, 1435, 662, 18, 8837, 2668, 4803, 3475, 653, 4571, 5907, 4852, 3475, 548, 17282, 2187, 261, 10...
nrRe=re.compile("[-+]?[0-9]*\\.?[0-9]+([eEdD][-+]?[0-9]+)?")
nrRe=re.compile("[-+]?[0-9]*\\.?[0-9]+([eEdD][-+]?[0-9]+)?$")
def diffEpsilon(str1, str2,incomparable_val=1): """retuns the difference between two strings, parsing numbers and confronting them.""" import re nrRe=re.compile("[-+]?[0-9]*\\.?[0-9]+([eEdD][-+]?[0-9]+)?") tokens1=str1.split() tokens2=str2.split() distance=0.0 if len(tokens1)!=len(tokens2): return incomparable_val i=0 for t1 in tokens1: t2=tokens2[i] i=i+1 if (t1!=t2): if nrRe.match(t1) and nrRe.match(t2): (f1,f2)=(float(t1),float(t2)) distance=max(distance, compareNr(f1,f2)) else: return incomparable_val return distance
bd571a17048ee98a8c7aab8391ad0192de16d969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2834/bd571a17048ee98a8c7aab8391ad0192de16d969/diffEpsilon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 29889, 10327, 12, 701, 21, 16, 609, 22, 16, 267, 832, 10207, 67, 1125, 33, 21, 4672, 3536, 1349, 27595, 326, 7114, 3086, 2795, 2064, 16, 5811, 5600, 471, 2195, 86, 1580, 310, 218...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 29889, 10327, 12, 701, 21, 16, 609, 22, 16, 267, 832, 10207, 67, 1125, 33, 21, 4672, 3536, 1349, 27595, 326, 7114, 3086, 2795, 2064, 16, 5811, 5600, 471, 2195, 86, 1580, 310, 218...
if instrument != "REF": self.add_option("", "--ecan", help="Specify the empty container file") self.add_option("", "--ecan-bkg", help="Specify the empty container background file")
elif instrument == "REF": self.add_option("", "--norm-bkg", help="Specify the normalization background file")
def __init__(self, usage=None, option_list=None, **kwargs): """ Constructor for SNSOptions
abfda24076faa2d8d1c00e17e255ee73c5af43e4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/763/abfda24076faa2d8d1c00e17e255ee73c5af43e4/hlr_options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4084, 33, 7036, 16, 1456, 67, 1098, 33, 7036, 16, 2826, 4333, 4672, 3536, 11417, 364, 25297, 1320, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4084, 33, 7036, 16, 1456, 67, 1098, 33, 7036, 16, 2826, 4333, 4672, 3536, 11417, 364, 25297, 1320, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
None, [cty.POINTER(cty.c_ushort), cty.POINTER(cty.c_ubyte), cty.c_int],
None, [cty.POINTER(cty.c_ushort), cty.POINTER(cty.c_ubyte), cty.c_int],
def fl_pack_bits(p1, p2, p3): """ fl_pack_bits(p1, p2, p3) """ _fl_pack_bits(p1, p2, p3)
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, 2920, 67, 6789, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 2920, 67, 6789, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 3536, 225, 389, 2242, 67, 2920, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2920, 67, 6789, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 2920, 67, 6789, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 3536, 225, 389, 2242, 67, 2920, 67...
r""" Number of labeled mappings from $n$ points to themselves (endofunctions): $n^n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000312;a Number of labeled mappings from n points to themselves (endofunctions): n^n. sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(0) 1 sage: a(1) 1 sage: a(9) 387420489 sage: a.list(11) [1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000] AUTHOR: -- Jaap Spies (2007-01-26) """ def __init__(self):
def __init__(self): r""" Number of labeled mappings from $n$ points to themselves (endofunctions): $n^n$. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000312;a Number of labeled mappings from n points to themselves (endofunctions): n^n. sage: a(-1) Traceback (most recent call last): ... ValueError: input n (=-1) must be an integer >= 0 sage: a(0) 1 sage: a(1) 1 sage: a(9) 387420489 sage: a.list(11) [1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000] AUTHOR: -- Jaap Spies (2007-01-26) """
def _eval(self, n): return Integer(n**(n-2))
d2510d4232e17c9cea8d1a0271c6be68a81d317b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/d2510d4232e17c9cea8d1a0271c6be68a81d317b/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 12, 82, 17, 22, 3719, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 12, 82, 17, 22, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
else: atom.UnsetAromatic()
def ToOBMol(self): atomCache={} mol=OBMol() for sourceAtom in self.atoms: atom=mol.NewAtom() atom.SetAtomicNum(sourceAtom.GetAtomicNum()) if sourceAtom.IsAromatic(): atom.SetAromatic() else: atom.UnsetAromatic() atomCache[sourceAtom]=atom for sourceBond in self.bonds: mol.AddBond(atomCache[sourceBond.atom1].GetIdx(), atomCache[sourceBond.atom2].GetIdx(), sourceBond.GetBondOrder()) return mol
5777da743aa14fefa65bf5d15a355e209a496532 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/5777da743aa14fefa65bf5d15a355e209a496532/orngChem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2974, 5704, 49, 355, 12, 2890, 4672, 3179, 1649, 12938, 12629, 33, 5704, 49, 355, 1435, 364, 1084, 3641, 316, 365, 18, 14937, 30, 3179, 33, 21260, 18, 1908, 3641, 1435, 3179, 18, 694, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2974, 5704, 49, 355, 12, 2890, 4672, 3179, 1649, 12938, 12629, 33, 5704, 49, 355, 1435, 364, 1084, 3641, 316, 365, 18, 14937, 30, 3179, 33, 21260, 18, 1908, 3641, 1435, 3179, 18, 694, ...
self.DrawWavySegment(graphe.seg,waviness.dx,waviness.dy,graphe.params(),N=N)
self.DrawWavySegment(graphe.seg,waviness.dx,waviness.dy,graphe.params(),separator=separator)
def DrawGraphOfASegment(self,graphe,N=None): if graphe.wavy == False : self.DrawSegment(graphe.seg,graphe.params(),N=N) if graphe.wavy == True : waviness = graphe.waviness self.DrawWavySegment(graphe.seg,waviness.dx,waviness.dy,graphe.params(),N=N)
9d2efc3d6c32e84b237b0b8c846aa8aeaf38faf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5111/9d2efc3d6c32e84b237b0b8c846aa8aeaf38faf4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4137, 951, 3033, 9325, 12, 2890, 16, 75, 1266, 580, 16, 50, 33, 7036, 4672, 309, 314, 1266, 580, 18, 91, 23935, 422, 1083, 294, 365, 18, 6493, 4131, 12, 75, 1266, 580, 18, 568...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4137, 951, 3033, 9325, 12, 2890, 16, 75, 1266, 580, 16, 50, 33, 7036, 4672, 309, 314, 1266, 580, 18, 91, 23935, 422, 1083, 294, 365, 18, 6493, 4131, 12, 75, 1266, 580, 18, 568...
class DinoCity: def __init__(self, screen_size, rom_directory, cover_directory): self.stage = self._create_stage(screen_size) self.rom_directory = rom_directory self.cover_directory = cover_directory self._display_game('roms/simcity.smc', 'covers/simcity.jpg') def _create_stage(self, screen_size): stage = clutter.Stage() stage.set_size(*screen_size) stage.connect('destroy', clutter.main_quit) stage.set_color(COLOR_BLACK) stage.connect('key-press-event', self._on_key_event) title = clutter.Text() title.set_text('DinoCity') title.set_position(100, 20) title.set_color(COLOR_WHITE) title.set_font_name('Helvecita Bold 36') stage.add(title) return stage def _on_key_event(self, stage, event): if event.keyval == clutter.keysyms.Escape: clutter.main_quit() def _display_game(self, filename, coverart=None): assert self.stage game = Game(filename, coverart)
def render(self):
def get_info_string(self): info = '%dkB %s' % (2**self.rom_info['rom_size'], self.get_layout_type()) if self.rom_info.get('cartridge_type', None) == SNES_CARTRIDGE_TYPE_SAVERAM: info += ', with %dkB %s' % (2**self.rom_info['ram_size'], self.get_cartridge_type()) else: info += ', %s' % self.get_cartridge_type()
50deb16ab5d1d4c25f1ac7b473b0c7e96f42bfff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5007/50deb16ab5d1d4c25f1ac7b473b0c7e96f42bfff/dinocity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 67, 1080, 12, 2890, 4672, 1123, 273, 1995, 2883, 38, 738, 87, 11, 738, 261, 22, 636, 2890, 18, 520, 67, 1376, 3292, 520, 67, 1467, 17337, 365, 18, 588, 67, 6741, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1376, 67, 1080, 12, 2890, 4672, 1123, 273, 1995, 2883, 38, 738, 87, 11, 738, 261, 22, 636, 2890, 18, 520, 67, 1376, 3292, 520, 67, 1467, 17337, 365, 18, 588, 67, 6741, 67, ...
LOG("no sessionStore defined: cannot load sessionHandler service")
import SkunkWeb.LogObj as lo lo.LOG("no sessionStore defined: cannot load sessionHandler service")
def __initSession(): import SkunkWeb.Configuration as Configuration if not Configuration.SessionStore: LOG("no sessionStore defined: cannot load sessionHandler service") else: import Session import SkunkWeb.constants as skc import SkunkWeb.Hooks as hk import requestHandler.requestHandler as rr hk.ServerStart.append(Session.mungeConnection) allweb="%s*" % skc.WEB_JOB rr.InitRequest.addFunction(Session.untouch, allweb) rr.PostRequest.addFunction(Session.saveSession, allweb)
f4a2690448b7b7c11ef7ee42c95c046d7417d66d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/f4a2690448b7b7c11ef7ee42c95c046d7417d66d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 2157, 13332, 1930, 10362, 1683, 4079, 18, 1750, 487, 4659, 309, 486, 4659, 18, 2157, 2257, 30, 1930, 10362, 1683, 4079, 18, 1343, 2675, 487, 437, 437, 18, 4842, 2932, 2135, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2157, 13332, 1930, 10362, 1683, 4079, 18, 1750, 487, 4659, 309, 486, 4659, 18, 2157, 2257, 30, 1930, 10362, 1683, 4079, 18, 1343, 2675, 487, 437, 437, 18, 4842, 2932, 2135, 1...
Format SAGE documentation for viewing with IPython.
Format Sage source code ``s`` for viewing with IPython. If ``s`` contains a string of the form "<<<obj>>>", then it replaces it with the source code for "obj". INPUT: ``s`` - string OUTPUT: string EXAMPLES:: sage: from sage.misc.sagedoc import format_src sage: format_src('unladen swallow') 'unladen swallow' sage: format_src('<<<Sq>>>')[5:15] 'Sq(*nums):'
def format_src(s): """ Format SAGE documentation for viewing with IPython. """ if not isinstance(s, str): raise TypeError, "s must be a string" docs = set([]) import sage.all while True: i = s.find("<<<") if i == -1: break j = s[i+3:].find('>>>') if j == -1: break obj = s[i+3:i+3+j] if obj in docs: t = '' else: x = eval('sage.all.%s'%obj, locals()) t = my_getsource(x, False) docs.add(obj) if t is None: print x t = '' s = s[:i] + '\n' + t + s[i+6+j:] return s
961618d1f49432f1785285cbc8a024cd67a942df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/961618d1f49432f1785285cbc8a024cd67a942df/sagedoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 4816, 12, 87, 4672, 3536, 4077, 348, 410, 1084, 981, 12176, 87, 10335, 364, 1476, 310, 598, 26085, 18, 225, 971, 12176, 87, 10335, 1914, 279, 533, 434, 326, 646, 3532, 17685, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4816, 12, 87, 4672, 3536, 4077, 348, 410, 1084, 981, 12176, 87, 10335, 364, 1476, 310, 598, 26085, 18, 225, 971, 12176, 87, 10335, 1914, 279, 533, 434, 326, 646, 3532, 17685, ...
self.listeners.append(obj)
if obj not in self.listeners: self.listeners.append(obj)
def append(self, obj, target): # this will be needed, but not # sure why we don't seem to need it yet
1c832aa51ccf4b0970b242d92a0f458cd2fb2a45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/1c832aa51ccf4b0970b242d92a0f458cd2fb2a45/event.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 1081, 16, 1018, 4672, 468, 333, 903, 506, 3577, 16, 1496, 486, 468, 3071, 11598, 732, 2727, 1404, 19264, 358, 1608, 518, 4671, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 1081, 16, 1018, 4672, 468, 333, 903, 506, 3577, 16, 1496, 486, 468, 3071, 11598, 732, 2727, 1404, 19264, 358, 1608, 518, 4671, 2, -100, -100, -100, -100, -100, -100, ...
if strToDate(date_to)<=strToDate(line.paid_date):
if strToDate(line.date_to)<=strToDate(line.paid_date):
def _theo_amt(self, cr, uid, ids,context={}): res = {} for line in self.browse(cr, uid, ids): today=datetime.datetime.today() date_to = today.strftime("%Y-%m-%d") date_from = line.date_from if context.has_key('wizard_date_from'): date_from = context['wizard_date_from'] if context.has_key('wizard_date_to'): date_to = context['wizard_date_to']
965099b579785611f07151461383684e2aa3d4a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/965099b579785611f07151461383684e2aa3d4a1/crossovered_budget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 451, 4361, 67, 301, 88, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 2472, 12938, 4672, 400, 273, 2618, 364, 980, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 10074, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 451, 4361, 67, 301, 88, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 2472, 12938, 4672, 400, 273, 2618, 364, 980, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 10074, ...
while True:
for i in xrange(10):
def emit(self, record): '''chunk and deliver records''' record.name = self.procname if str(record.msg) > 250: msgs = [] error = record.exc_info record.exc_info = None msgdata = record.msg while msgdata: newrec = copy.deepcopy(record) newrec.msg = msgdata[:250] msgs.append(newrec) msgdata = msgdata[250:] msgs[0].exc_info = error else: msgs = [record] while msgs: newrec = msgs.pop() msg = self.log_format_string % (self.encodePriority(self.facility, newrec.levelname.lower()), self.format(newrec)) try: self.socket.send(msg) except socket.error: while True: try: if isinstance(self.address, tuple): self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) else: self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) self.socket.connect(self.address) break except socket.error: continue self.socket.send("Reconnected to syslog") self.socket.send(msg)
f8b1a55d842f2beef4823b825552ff440b80c655 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/f8b1a55d842f2beef4823b825552ff440b80c655/Logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 12, 2890, 16, 1409, 4672, 9163, 6551, 471, 11795, 3853, 26418, 1409, 18, 529, 273, 365, 18, 9381, 529, 309, 609, 12, 3366, 18, 3576, 13, 405, 16927, 30, 8733, 273, 5378, 555, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 12, 2890, 16, 1409, 4672, 9163, 6551, 471, 11795, 3853, 26418, 1409, 18, 529, 273, 365, 18, 9381, 529, 309, 609, 12, 3366, 18, 3576, 13, 405, 16927, 30, 8733, 273, 5378, 555, 273...
VS.playSound(self.speech[index], self.player.Position(), (10000,10000,10000))
VS.playSound(self.speech[index], self.player.Position(), (0,0,0))
def Execute (self): # do not do anything before the player undocks if (self.stage==STAGE_DOCKED): self.complete = self.getSaveValue() if (self.complete==0): # publish news text = "CEPHID SECURITY INITIATIVE GIVES TRINING FOR FLIGHT SAFETY\\\The Cephid Security Initiative (CSI) is offering training for pilots with the purpose to enhance flight safety in and out of the system. " text += "A representative said, this training is sponsored by volunteer contributors and open for all pilots. " text += "If you are a greenhorn in space faring or a long-time pilot you may meet one of the volunteers when leaving from a planet or station into space and participate in the training or refresher." news.publishNews(text) if (self.complete>=98): self.stage = self.complete if (self.complete<98): self.playerIsUndocked()
66c46e79ea501cbc68b49d8dd0a03a57988f1683 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2883/66c46e79ea501cbc68b49d8dd0a03a57988f1683/quest_tutorial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 261, 2890, 4672, 468, 741, 486, 741, 6967, 1865, 326, 7291, 22927, 20641, 309, 261, 2890, 18, 12869, 631, 882, 2833, 67, 3191, 3507, 2056, 4672, 365, 18, 6226, 273, 365, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 261, 2890, 4672, 468, 741, 486, 741, 6967, 1865, 326, 7291, 22927, 20641, 309, 261, 2890, 18, 12869, 631, 882, 2833, 67, 3191, 3507, 2056, 4672, 365, 18, 6226, 273, 365, 18, 588, ...
if object.im_self:
if object.im_self is not None:
def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + self.classlink(imclass, mod) else: if object.im_self: note = ' method of %s instance' % self.classlink( object.im_self.__class__, mod) else: note = ' unbound %s method' % self.classlink(imclass,mod) object = object.im_func
85ec1f09cb07f4b1d375bf2ec1022ac2606cfaea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/85ec1f09cb07f4b1d375bf2ec1022ac2606cfaea/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 16, 15630, 28793, 3318, 28793, 2590, 28793, 927, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 445, 578, 707, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 22640, 12, 2890, 16, 733, 16, 508, 33, 7036, 16, 681, 33, 7036, 16, 15630, 28793, 3318, 28793, 2590, 28793, 927, 33, 7036, 4672, 3536, 25884, 3982, 7323, 364, 279, 445, 578, 707, ...
if len(m) == 1:
if len(m) == 0: pass elif len(m) == 1:
def parse(self, mv): """ This function allows one to create the permutation group element from a variety of formats. INPUT: one of the following list -- list of facets (as returned by self.facets()) dict -- list of faces (as returned by self.faces()) str -- either cycle notation (passed to GAP) or a product of generators or Singmaster notation perm_group element -- returned as an element of self.group() EXAMPLES: sage: C = CubeGroup() sage: C.parse(range(1,49)) () sage: g = C.parse("L"); g (1,17,41,40)(4,20,44,37)(6,22,46,35)(9,11,16,14)(10,13,15,12) sage: C.parse(str(g)) == g True sage: facets = C.facets(g); facets [17, 2, 3, 20, 5, 22, 7, 8, 11, 13, 16, 10, 15, 9, 12, 14, 41, 18, 19, 44, 21, 46, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 6, 36, 4, 38, 39, 1, 40, 42, 43, 37, 45, 35, 47, 48] sage: C.parse(facets) (1,17,41,40)(4,20,44,37)(6,22,46,35)(9,11,16,14)(10,13,15,12) sage: C.parse(facets) == g True sage: faces = C.faces("L"); faces {'right': [[25, 26, 27], [28, 0, 29], [30, 31, 32]], 'up': [[17, 2, 3], [20, 0, 5], [22, 7, 8]], 'back': [[33, 34, 6], [36, 0, 4], [38, 39, 1]], 'down': [[40, 42, 43], [37, 0, 45], [35, 47, 48]], 'front': [[41, 18, 19], [44, 0, 21], [46, 23, 24]], 'left': [[11, 13, 16], [10, 0, 15], [9, 12, 14]]} sage: C.parse(faces) == C.parse("L") True sage: C.parse("L' R2") == C.parse("L^(-1)*R^2") True sage: C.parse("L' R2") (1,40,41,17)(3,43)(4,37,44,20)(5,45)(6,35,46,22)(8,48)(9,14,16,11)(10,12,15,13)(19,38)(21,36)(24,33)(25,32)(26,31)(27,30)(28,29) sage: C.parse("L^4") () sage: C.parse("L^(-1)*R") (1,40,41,17)(3,38,43,19)(4,37,44,20)(5,36,45,21)(6,35,46,22)(8,33,48,24)(9,14,16,11)(10,12,15,13)(25,27,32,30)(26,29,31,28) """ G = self.group() if isinstance(mv, PermutationGroupElement): # mv is a perm_group element, return mv return mv if mv.parent() is G else G(mv) elif isinstance(mv, str): # It is a string: may be in cycle notation or rubik's notation if '(' in mv and not '^' in mv: return G(mv) else: gens = G.gens() names = self.gen_names() map = {} for i in range(6): map[names[i]] = gens[i] g = G(1) mv = mv.strip().replace(" ","*").replace("**", "*").replace("'", "-1").replace('^','').replace('(','').replace(')','') M = mv.split("*") for m in M: if len(m) == 1: g *= map[m[0]] else: g *= map[m[0]]**int(m[1:]) return g elif isinstance(mv, dict): state = mv state_facets = [] keyss = state.keys() keyss.sort() for k in keyss: r = state[k][0]+state[k][1]+state[k][2] r.remove(0) state_facets = state_facets + r state0 = self.faces("") state0_facets = [] keyss = state0.keys() keyss.sort() for k in keyss: r = state0[k][0]+state0[k][1]+state0[k][2] r.remove(0) state0_facets = state0_facets + r p1 = [state0_facets.index(x) for x in range(1,49)] p2 = [state_facets[j] for j in p1] return G(p2) elif isinstance(mv, list): return G(mv) else: raise TypeError, "Not a valid Rubik's move: %s" % mv
21b1bfb9c6cbd0850c3e2b3eba251adb5d7f39b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/21b1bfb9c6cbd0850c3e2b3eba251adb5d7f39b1/cubegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 7701, 4672, 3536, 1220, 445, 5360, 1245, 358, 752, 326, 17440, 1041, 930, 628, 279, 1394, 14369, 434, 6449, 18, 225, 12943, 30, 1245, 434, 326, 3751, 666, 1493, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 7701, 4672, 3536, 1220, 445, 5360, 1245, 358, 752, 326, 17440, 1041, 930, 628, 279, 1394, 14369, 434, 6449, 18, 225, 12943, 30, 1245, 434, 326, 3751, 666, 1493, 666, ...
return args.append(CmdArg(self.name, self.type))
return args.append(self) def AddInitArgs(self, args): """Adds init arguments for this argument to the given list.""" return args.append(self)
def AddCmdArgs(self, args): """Adds command arguments for this argument to the given list.""" return args.append(CmdArg(self.name, self.type))
3975916c448229deb7fa73586d80d6aebe8671fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/3975916c448229deb7fa73586d80d6aebe8671fa/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 5931, 2615, 12, 2890, 16, 833, 4672, 3536, 3655, 1296, 1775, 364, 333, 1237, 358, 326, 864, 666, 12123, 327, 833, 18, 6923, 12, 5931, 4117, 12, 2890, 18, 529, 16, 365, 18, 723, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 5931, 2615, 12, 2890, 16, 833, 4672, 3536, 3655, 1296, 1775, 364, 333, 1237, 358, 326, 864, 666, 12123, 327, 833, 18, 6923, 12, 5931, 4117, 12, 2890, 18, 529, 16, 365, 18, 723, ...
from UserDict import DictMixin class SeqDict(DictMixin):
class SeqDict(UserDict.DictMixin):
def display(self): print self
0ea3bd5410a03ddede4d162253fbbcbe58223a0e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0ea3bd5410a03ddede4d162253fbbcbe58223a0e/test_userdict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 4672, 1172, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 4672, 1172, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
asyncore.loop(timeout=.01, count=300)
if hasattr(select, 'poll'): poll_fun = asyncore.poll2 else: poll_fun = asyncore.poll n = 1000 while asyncore.socket_map and n > 0: poll_fun(0.01, asyncore.socket_map) if client_evt.isSet(): serv.close() break n -= 1
def debugging_server(evt): serv = smtpd.DebuggingServer(("", PORT), ('nowhere', -1)) try: asyncore.loop(timeout=.01, count=300) except socket.timeout: pass finally: # allow some time for the client to read the result time.sleep(0.5) asyncore.close_all() evt.set()
7b4fd585717660ae0f6a41180e84e8735a9ddc8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/7b4fd585717660ae0f6a41180e84e8735a9ddc8d/test_smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10450, 67, 3567, 12, 73, 11734, 4672, 13515, 273, 17660, 72, 18, 2829, 1998, 2081, 12, 2932, 3113, 20987, 3631, 7707, 3338, 14852, 2187, 300, 21, 3719, 225, 775, 30, 309, 3859, 12, 4025,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10450, 67, 3567, 12, 73, 11734, 4672, 13515, 273, 17660, 72, 18, 2829, 1998, 2081, 12, 2932, 3113, 20987, 3631, 7707, 3338, 14852, 2187, 300, 21, 3719, 225, 775, 30, 309, 3859, 12, 4025,...
file.write("TEXTURE {}\n".format(txtrs[tex.name]))
file.write("TEXTURE {}\n".format(txtrs[tex.name]+1))
def export_msh(filepath,convert_coords): nonormal=False if os.path.splitext(filepath)[1]=="": filepath=filepath+".msh" file=open(filepath,"w") file.write("MSHX1\n") ngroups=0 for obj in bpy.context.selected_objects: if obj.type=='MESH': ngroups=ngroups+1 file.write("GROUPS {}\n".format(ngroups)) mtrls={} txtrs={} for obj in bpy.context.selected_objects: if obj.type=='MESH': matrix=obj.matrix_world me=obj.data n=0 vtx=[] faces=[] file.write("LABEL {}\n".format(obj.name)) # Adding materials and textures if len(obj.material_slots)!=0: mat=obj.material_slots[0].material if not (mat.name in mtrls): print("Mew material:",mat.name) mtrls[mat.name]=len(mtrls) file.write("MATERIAL {}\n".format(mtrls[mat.name])) if mat.texture_slots[0]!=None: tex=mat.texture_slots[0].texture if tex.type=="IMAGE": #Texture type must be image if not(tex.name in txtrs): print("New texture:",tex.name) txtrs[tex.name]=len(txtrs) file.write("TEXTURE {}\n".format(txtrs[tex.name])) else: print("Non-image texture") #preparing vertices array: coords and normal for vert in me.vertices: vtx.append([matrix*vert.co,vert.normal]) has_uv=True; if len(me.uv_textures)==0: has_uv=False; print("Mesh ",obj.name,"has not UV map" ) #Creating faces array and finishing vtx array with UVs for n in range(len(me.faces)): face=me.faces[n] if has_uv:# 3 UVs changeface=False fc=[]#face to add for i in range(len(face.vertices)): uvs=me.uv_textures[0].data[n].uv_raw[(2*i):(2*i+2)] idx_vert=face.vertices[i] if len(vtx[idx_vert])==2: #no UVs yet, add idx_vert to fc and uvs to vert vtx[idx_vert].append(uvs) fc.append(idx_vert) else: if vtx[idx_vert][2]==uvs:#UVs are equal, just add idx_vert to fc #print("uvs equal") fc.append(idx_vert) else: #uvs differ, add new vtx and use new idx_vert vtx.append([vtx[idx_vert][0],vtx[idx_vert][1],uvs]) fc.append(len(vtx)-1) #Add resulting fc faces.append(fc[:3]) if len(fc)==4: faces.append([fc[2],fc[3],fc[0]]) else:#export just faces without uv faces.append(face.vertices[:3]) #first (or alone) triangle if len(face.vertices)==4: #2nd triangle if face is quad #print("!!!tetragon!!!") faces.append([face.vertices[2],face.vertices[3],face.vertices[0]]) #else: # print("triangle") print("====Mesh Geometry Summary====") if VERBOSE_OUT: for v in vtx: print(v) print("---") print(faces) print("vtx: ",len(vtx)," faces:",len(faces)) #write GEOM section if nonormal: file.write("NONORMAL\n") file.write("GEOM {} {}\n".format(len(vtx),len(faces))) if convert_coords: for v in vtx: file.write("{} {} {}".format(-v[0][0],v[0][2],-v[0][1])) if not nonormal: #I think normal coords should be converted too file.write(" {} {} {}".format(-v[1][0],v[1][2],-v[1][1])) if has_uv: file.write(" {} {}".format(v[2][0],1-v[2][1])) file.write("\n") for f in faces: file.write("{} {} {}\n".format(f[0],f[2],f[1])) else: for v in vtx: file.write("{} {} {}".format(v[0][0],v[0][1],v[0][2])) if not nonormal: file.write(" {} {} {}".format(v[1][0],v[1][1],v[1][2])) if has_uv: file.write(" {} {}".format(v[2][0],1-v[2][1])) file.write("\n") for f in faces: file.write("{} {} {}\n".format(f[0],f[1],f[2])) #write other sections print("===Materials summary====") print(mtrls) print("===Textures summary=====") print(txtrs) #===Write MATERIALS section===== file.write("MATERIALS {}\n".format(len(mtrls))) #just mtrls sorted by values temp_m=sorted(mtrls.items(),key=lambda x: x[1]) for m in temp_m: file.write("{}\n".format(m[0])) for m in temp_m: file.write("MATERIAL {}\n".format(m[0])) mat=bpy.data.materials[m[0]] dc=mat.diffuse_color file.write("{} {} {} {}\n".format(dc[0],dc[1],dc[2],mat.alpha)) file.write("{} {} {} {}\n".format(dc[0],dc[1],dc[2],mat.alpha)) sc=mat.specular_color file.write("{} {} {} {} {}\n".format(sc[0],sc[1],sc[2],mat.specular_alpha,mat.specular_hardness)) file.write("{} {} {} {}\n".format(dc[0]*mat.emit,dc[1]*mat.emit,dc[2]*mat.emit,mat.alpha)) #=====Write TEXTURES section ====== file.write("TEXTURES {}\n".format(len(txtrs))) v=os.path.split(filepath) mshdir=v[0] mshname=os.path.splitext(v[1])[0] texdir=mshname+"tex" texpath=os.path.join(mshdir,texdir) temp_t=sorted(txtrs.items(),key=lambda x: x[1]) for t in temp_t: tex=bpy.data.textures[t[0]] img_fp=tex.image.filepath tex_fname="" if img_fp=="Untitled": #new name from tex name tex_fname=tex.name+"."+tex.image.file_format.lower() tex.image.save_render(os.path.join(texpath,tex_fname)) else: #image file is already saved on disk tex_fname=os.path.split(img_fp)[1] if tex.image.file_format=="":#if no format (dds) it will be saved as png. tex_fname=os.path.splitext(tex_fname)[0]+".png" tex.image.save_render(os.path.join(texpath,tex_fname)) file.write("{}\n".format(ntpath.join(texdir,os.path.splitext(tex_fname)[0]+".dds"))) #local dir + fname+'dds' file.close()
f3baba948e8974f43627cf7cb7b96ba7545fac59 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10993/f3baba948e8974f43627cf7cb7b96ba7545fac59/io_orbiter_msh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 81, 674, 12, 10561, 16, 6283, 67, 9076, 4672, 225, 1661, 1687, 33, 8381, 225, 309, 1140, 18, 803, 18, 4939, 408, 12, 10561, 25146, 21, 65, 631, 3660, 30, 3608, 33, 10561, 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, 3359, 67, 81, 674, 12, 10561, 16, 6283, 67, 9076, 4672, 225, 1661, 1687, 33, 8381, 225, 309, 1140, 18, 803, 18, 4939, 408, 12, 10561, 25146, 21, 65, 631, 3660, 30, 3608, 33, 10561, 9...
if day > self.dayOfWeek: daysToWait = (day - self.dayOfWeek) - 1 self.rolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24)) if day < self.dayOfWeek: daysToWait = (6 - self.dayOfWeek) + day
if day != self.dayOfWeek: if day < self.dayOfWeek: daysToWait = self.dayOfWeek - day - 1 else: daysToWait = 6 - day + self.dayOfWeek
def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None): BaseRotatingHandler.__init__(self, filename, 'a', encoding) self.when = string.upper(when) self.backupCount = backupCount # Calculate the real rollover interval, which is just the number of # seconds between rollovers. Also set the filename suffix used when # a rollover occurs. Current 'when' events supported: # S - Seconds # M - Minutes # H - Hours # D - Days # midnight - roll over at midnight # W{0-6} - roll over on a certain day; 0 - Monday # # Case of the 'when' specifier is not important; lower or upper case # will work. currentTime = int(time.time()) if self.when == 'S': self.interval = 1 # one second self.suffix = "%Y-%m-%d_%H-%M-%S" elif self.when == 'M': self.interval = 60 # one minute self.suffix = "%Y-%m-%d_%H-%M" elif self.when == 'H': self.interval = 60 * 60 # one hour self.suffix = "%Y-%m-%d_%H" elif self.when == 'D' or self.when == 'MIDNIGHT': self.interval = 60 * 60 * 24 # one day self.suffix = "%Y-%m-%d" elif self.when.startswith('W'): self.interval = 60 * 60 * 24 * 7 # one week if len(self.when) != 2: raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when) if self.when[1] < '0' or self.when[1] > '6': raise ValueError("Invalid day specified for weekly rollover: %s" % self.when) self.dayOfWeek = int(self.when[1]) self.suffix = "%Y-%m-%d" else: raise ValueError("Invalid rollover interval specified: %s" % self.when)
16c7a6a3d92b06bc413916e843590fb980514f00 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/16c7a6a3d92b06bc413916e843590fb980514f00/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 16, 2688, 33, 7036, 4672, 3360, 8570, 1776, 1503, 16186, 2738, 972, 12, 2890, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 16, 2688, 33, 7036, 4672, 3360, 8570, 1776, 1503, 16186, 2738, 972, 12, 2890, 16, ...
symboltable = self.symboltable)
symboltable = self.symboltable, libraries = self.libraries)
def generate_source(self, db=None, defines={}): assert self.c_source_filename is None translator = self.translator
c3c105b391ef68f5016b657b6ea481d0c0567cc0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/c3c105b391ef68f5016b657b6ea481d0c0567cc0/genc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 3168, 12, 2890, 16, 1319, 33, 7036, 16, 11164, 12938, 4672, 1815, 365, 18, 71, 67, 3168, 67, 3459, 353, 599, 8333, 273, 365, 18, 17879, 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, 2103, 67, 3168, 12, 2890, 16, 1319, 33, 7036, 16, 11164, 12938, 4672, 1815, 365, 18, 71, 67, 3168, 67, 3459, 353, 599, 8333, 273, 365, 18, 17879, 2, -100, -100, -100, -100, -100, -100,...
unittest.main()
unittest.main()
def testReturningNonWrappedPtr( self ) : r = IECore.ReadProcedural() o = IECore.CompoundObject( { "c" : r } )
648d06a3cf8b9e3e69dab586f83806986531b3f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9042/648d06a3cf8b9e3e69dab586f83806986531b3f2/WrapperToPython.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28365, 3989, 17665, 5263, 12, 365, 262, 294, 225, 436, 273, 10897, 4670, 18, 1994, 626, 3263, 3766, 1435, 320, 273, 10897, 4670, 18, 16835, 921, 12, 288, 315, 71, 6, 294, 436, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28365, 3989, 17665, 5263, 12, 365, 262, 294, 225, 436, 273, 10897, 4670, 18, 1994, 626, 3263, 3766, 1435, 320, 273, 10897, 4670, 18, 16835, 921, 12, 288, 315, 71, 6, 294, 436, 28...
optional argument 'maxSaddleDist' to change the default of 0.1
optional argument 'minSaddleDist' to change the default of 0.1
def subpixelWatershedData(spws, biSIV = None, threshold = None, mask = None, maxSaddleDist = 0.12, # sensible: ssMinDist perpendicularDistEpsilon = 0.1, maxStep = 0.1): """subpixelWatershedData(spws, biSIV, threshold) -> tuple Calculates and returns a pair with a list of maxima and a list of edges (composed flowline pairs) from the SubPixelWatersheds object 'spws'. Each edge is represented with a quadrupel of startNodeIndex, endNodeIndex, edge polygon and the index of the original saddle within that polygon. The first edge is None. That output is suitable and intended for addFlowLinesToMap(). Gives verbose output during operation and uses filterSaddlePoints to filter out saddle points below the threshold within the SplineImageView 'biSIV' which should contain the boundary indicator and to filter out duplicate saddlepoints (pass the optional argument 'maxSaddleDist' to change the default of 0.1 here). Each found edge polygon is simplified using simplifyPolygon with perpendicularDistEpsilon = 0.1 and maxStep = 0.1 (use the optional parameters with the same names to change the default).""" sys.stdout.write("- finding critical points..") c = time.clock() if mask: spws.findCriticalPoints(mask) rawSaddles = spws.saddles() maxima = spws.maxima() sys.stdout.write("done. (%ss, %d maxima, %d saddles, %d minima)\n" % ( time.clock()-c, len(maxima)-1, len(rawSaddles)-1, len(spws.minima())-1)) def calculateEdge(index): flowline = spws.edge(index) if not flowline: return flowline sn, en, poly, saddleIndex = flowline if perpendicularDistEpsilon: simple = hourglass.simplifyPolygon( poly[:saddleIndex+1], perpendicularDistEpsilon, maxStep) newSaddleIndex = len(simple)-1 simple.extend(hourglass.simplifyPolygon( poly[saddleIndex:], perpendicularDistEpsilon, maxStep)) poly = simple saddleIndex = newSaddleIndex return (sn, en, poly, saddleIndex, index) saddles = filterSaddlePoints(rawSaddles, biSIV, threshold, maxSaddleDist) prefix = "- following %d/%d edges.." % (len(saddles), len(rawSaddles)) c = time.clock() flowlines = [None] percentGranularity = len(saddles) / 260 + 1 for k, _ in saddles: edgeTuple = calculateEdge(k) if edgeTuple: flowlines.append(edgeTuple) if k % percentGranularity == 0: sys.stderr.write("%s %d%%\r" % ( prefix, 100 * (len(flowlines)-1) / len(saddles), )) print "%s done (%ss)." % (prefix, time.clock()-c) if len(flowlines)-1 < len(saddles): print " (%d edges parallel to border removed)" % ( len(saddles) - (len(flowlines)-1)) if perpendicularDistEpsilon: print " (simplified edges with perpendicularDistEpsilon = %s, maxStep = %s)" % ( perpendicularDistEpsilon, maxStep) return maxima, flowlines
43fa35262c81565391129ff8b1d3eee04166fe34 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10394/43fa35262c81565391129ff8b1d3eee04166fe34/maputils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 11743, 59, 31302, 18550, 751, 12, 1752, 4749, 16, 10054, 2320, 58, 273, 599, 16, 5573, 273, 599, 16, 3066, 273, 599, 16, 943, 55, 1289, 298, 5133, 273, 374, 18, 2138, 16, 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, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 11743, 59, 31302, 18550, 751, 12, 1752, 4749, 16, 10054, 2320, 58, 273, 599, 16, 5573, 273, 599, 16, 3066, 273, 599, 16, 943, 55, 1289, 298, 5133, 273, 374, 18, 2138, 16, 468, 1...
logging.getLogger('').addHandler(_handler)
logger = logging.getLogger('') logger.addHandler(_handler) logger.setLevel(logging.DEBUG)
def install(): """Install a logger to remember records before we have logging setup. """ global _handler if _handler is not None: raise ValueError("Prelogger already installed") _handler = PreLogger() logging.getLogger('').addHandler(_handler)
70fd9db0c3b2e8e1bb9393184c6658b9f5035e34 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/70fd9db0c3b2e8e1bb9393184c6658b9f5035e34/prelogger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 13332, 3536, 6410, 279, 1194, 358, 11586, 3853, 1865, 732, 1240, 2907, 3875, 18, 3536, 2552, 389, 4176, 309, 389, 4176, 353, 486, 599, 30, 1002, 2068, 2932, 1386, 4901, 1818, 5876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 13332, 3536, 6410, 279, 1194, 358, 11586, 3853, 1865, 732, 1240, 2907, 3875, 18, 3536, 2552, 389, 4176, 309, 389, 4176, 353, 486, 599, 30, 1002, 2068, 2932, 1386, 4901, 1818, 5876, ...
elif name == 'TexImage2D' or name == 'TexSubImage2D': code = """ uint32 data_size; if (!GLES2Util::ComputeImageDataSize( width, height, format, type, unpack_alignment_, &data_size)) { return error::kOutOfBounds; } """ file.Write(code)
elif name == 'CompressedTexSubImage2D': file.Write(" uint32 data_size = imageSize;\n") elif name == 'TexImage2D': file.Write(" uint32 data_size = GLES2Util::ComputeImageDataSize(\n") file.Write(" width, height, format, type, unpack_alignment_);\n") elif name == 'TexSubImage2D': file.Write(" uint32 data_size = GLES2Util::ComputeImageDataSize(\n") file.Write(" width, height, format, type, unpack_alignment_);\n")
def WriteGetDataSizeCode(self, func, file): """Overrriden from TypeHandler.""" # TODO(gman): Move this data to _FUNCTION_INFO? name = func.name if name.endswith("Immediate"): name = name[0:-9] if name == 'BufferData' or name == 'BufferSubData': file.Write(" uint32 data_size = size;\n") elif (name == 'CompressedTexImage2D' or name == 'CompressedTexSubImage2D'): file.Write(" uint32 data_size = imageSize;\n") elif name == 'TexImage2D' or name == 'TexSubImage2D': code = """ uint32 data_size;
3b6ec20aec909735d1f8b69c1088f256fe36c2a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/3b6ec20aec909735d1f8b69c1088f256fe36c2a4/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 967, 29414, 1085, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 468, 2660, 12, 75, 4728, 4672, 9933, 333, 501, 358, 389, 7788, 67, 5923, 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, 2598, 967, 29414, 1085, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 468, 2660, 12, 75, 4728, 4672, 9933, 333, 501, 358, 389, 7788, 67, 5923, 35, ...
is_superuser = try_type(bool, _get_user_attribute(data, user_name, 'siteadmin',
is_superuser = try_type(bool, _get_user_attribute(data, user_name, 'rights.siteadmin',
def create_database_user(data, user_name): # Create basic user information user = User(username = user_name, first_name = _get_user_attribute(data, user_name, 'name'), email = _get_user_attribute(data, user_name, 'email'), is_active = try_type(bool, _get_user_attribute(data, user_name, 'activated', unicode_me=False, default=0)), password = _get_user_attribute(data, user_name, 'passwdhash', unicode_me = False), # "hash" is the login type that indicates "hash" the user's # submitted password into MD5 and check against a local file/DB.
b258c8ea0266b77ff7c47a2a0f3ddc79f40a8dc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/b258c8ea0266b77ff7c47a2a0f3ddc79f40a8dc8/import_old_prefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 6231, 67, 1355, 12, 892, 16, 729, 67, 529, 4672, 468, 1788, 5337, 729, 1779, 729, 273, 2177, 12, 5053, 4202, 273, 729, 67, 529, 16, 1122, 67, 529, 377, 273, 389, 588, 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, 752, 67, 6231, 67, 1355, 12, 892, 16, 729, 67, 529, 4672, 468, 1788, 5337, 729, 1779, 729, 273, 2177, 12, 5053, 4202, 273, 729, 67, 529, 16, 1122, 67, 529, 377, 273, 389, 588, 67, ...
const=1))
const=1, virtual=1))
def makeHandlerMethod(name, switch, hasReply, dispatches=0): params = [ Decl(Type('Message', const=1, ref=1), msgvar.name) ] if hasReply: params.append(Decl(Type('Message', ref=1, ptr=1), replyvar.name)) method = MethodDefn(MethodDecl(name, virtual=True, params=params, ret=_Result.Type())) if dispatches: routevar = ExprVar('__route') routedecl = StmtDecl( Decl(_actorIdType(), routevar.name), init=ExprCall(ExprSelect(msgvar, '.', 'routing_id')))
81b76baaacdd498ca1d4b689d328d493eefdf96c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/81b76baaacdd498ca1d4b689d328d493eefdf96c/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1503, 1305, 12, 529, 16, 1620, 16, 711, 7817, 16, 3435, 281, 33, 20, 4672, 859, 273, 306, 16110, 12, 559, 2668, 1079, 2187, 1866, 33, 21, 16, 1278, 33, 21, 3631, 1234, 1401, 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, 1221, 1503, 1305, 12, 529, 16, 1620, 16, 711, 7817, 16, 3435, 281, 33, 20, 4672, 859, 273, 306, 16110, 12, 559, 2668, 1079, 2187, 1866, 33, 21, 16, 1278, 33, 21, 3631, 1234, 1401, 18...
func.AddCmdArg(CmdArg("client_id", 'uint32'))
func.AddCmdArg(Argument("client_id", 'uint32'))
def InitFunction(self, func): """Overrriden from TypeHandler.""" func.AddCmdArg(CmdArg("client_id", 'uint32'))
6b5cc7aeca6761c88c0f98b0e54990becbe32177 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/6b5cc7aeca6761c88c0f98b0e54990becbe32177/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 2083, 12, 2890, 16, 1326, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 1326, 18, 986, 5931, 4117, 12, 5931, 4117, 2932, 2625, 67, 350, 3113, 296, 11890, 1578, 26112, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4378, 2083, 12, 2890, 16, 1326, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 1326, 18, 986, 5931, 4117, 12, 5931, 4117, 2932, 2625, 67, 350, 3113, 296, 11890, 1578, 26112, 2, -1...
print time.strftime(LAST_CHANGED, time.localtime(now))
print time.strftime(LAST_CHANGED, time.localtime(latest))
def last_changed(self, files):
b266355973e5a02526070e14205d2bdf6efb9f94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b266355973e5a02526070e14205d2bdf6efb9f94/faqwiz.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1142, 67, 6703, 12, 2890, 16, 1390, 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, 1142, 67, 6703, 12, 2890, 16, 1390, 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,...
class dm_campaign_proposition(osv.osv):
class dm_campaign_proposition(osv.osv):
def unlink(self, cr, uid, ids, context={}): for campaign in self.browse(cr, uid, ids, context): history_id = self.pool.get('dm.offer.history').search(cr, uid, [('campaign_id','=',campaign.id)]) self.pool.get('dm.offer.history').unlink(cr, uid, history_id, context) return super(dm_campaign, self).unlink(cr, uid, ids, context)
7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 8965, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 4672, 4927, 67, 350, 273, 365, 18, 6011, 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, 8255, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 364, 8965, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819, 4672, 4927, 67, 350, 273, 365, 18, 6011, 18...
test_str = "%s: %s(complex(%r, %r))" % (id, fn, ar, ai) self.fail('ValueError not raised in test %s' % test_str)
self.fail('ValueError not raised in test ' '{}: {}(complex({!r}, {!r}))'.format(id, fn, ar, ai))
def polar_complex(z): """Wrapped version of polar that returns a complex number instead of two floats.""" return complex(*polar(z))
12662f56d10475f3f84ee6aa6a188e5c4760a44b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/12662f56d10475f3f84ee6aa6a188e5c4760a44b/test_cmath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24244, 67, 14259, 12, 94, 4672, 3536, 17665, 1177, 434, 24244, 716, 1135, 279, 7233, 1300, 3560, 434, 2795, 19172, 12123, 327, 7233, 30857, 3915, 297, 12, 94, 3719, 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, 0, 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, 24244, 67, 14259, 12, 94, 4672, 3536, 17665, 1177, 434, 24244, 716, 1135, 279, 7233, 1300, 3560, 434, 2795, 19172, 12123, 327, 7233, 30857, 3915, 297, 12, 94, 3719, 2, -100, -100, -100, ...
if self.debugging: print '<-- file', `file`
print '!'*self.debugging, '<-- file', `file`
def do_include(self, args): file = args file = os.path.join(self.includedir, file) try: fp = open(file, 'r') except IOError, msg: print '*** Can\'t open include file', `file` return if self.debugging: print '--> file', `file` save_done = self.done save_skip = self.skip save_stack = self.stack self.includedepth = self.includedepth + 1 self.parserest(fp, 0) self.includedepth = self.includedepth - 1 fp.close() self.done = save_done self.skip = save_skip self.stack = save_stack if self.debugging: print '<-- file', `file`
0e58802a83c0ef801f65d198692c71f60b73fb54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/0e58802a83c0ef801f65d198692c71f60b73fb54/texi2html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6702, 12, 2890, 16, 833, 4672, 585, 273, 833, 585, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 20405, 481, 16, 585, 13, 775, 30, 4253, 273, 1696, 12, 768, 16, 296, 86, 613...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6702, 12, 2890, 16, 833, 4672, 585, 273, 833, 585, 273, 1140, 18, 803, 18, 5701, 12, 2890, 18, 20405, 481, 16, 585, 13, 775, 30, 4253, 273, 1696, 12, 768, 16, 296, 86, 613...
return 0, ('unknown option: "%s"' % detail)
return 0, ('unknown option: "%s"' % detail.args[0])
def parse_extension_options(self, option_spec, datalines): """ Parse `datalines` for a field list containing extension options matching `option_spec`.
0499d5ed442c098f68a71981e90263ea5db98490 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/0499d5ed442c098f68a71981e90263ea5db98490/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6447, 67, 2116, 12, 2890, 16, 1456, 67, 2793, 16, 18462, 1465, 4672, 3536, 2884, 1375, 72, 3145, 1465, 68, 364, 279, 652, 666, 4191, 2710, 702, 3607, 1375, 3482, 67, 2793, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6447, 67, 2116, 12, 2890, 16, 1456, 67, 2793, 16, 18462, 1465, 4672, 3536, 2884, 1375, 72, 3145, 1465, 68, 364, 279, 652, 666, 4191, 2710, 702, 3607, 1375, 3482, 67, 2793, 83...
if __debug__:
if _debug:
def __del__(self): if __debug__: print "Destroying RDF.uri" if self.uri: if __debug__: print "Deleting Redland uri object" Redland.librdf_free_uri(self.uri)
9d200f22543978d0df7fbde12b64052f94f16755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14754/9d200f22543978d0df7fbde12b64052f94f16755/RDF.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 309, 389, 4148, 30, 1172, 315, 10740, 310, 13539, 18, 1650, 6, 309, 365, 18, 1650, 30, 309, 389, 4148, 30, 1172, 315, 20433, 4621, 15733, 2003, 733, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 309, 389, 4148, 30, 1172, 315, 10740, 310, 13539, 18, 1650, 6, 309, 365, 18, 1650, 30, 309, 389, 4148, 30, 1172, 315, 20433, 4621, 15733, 2003, 733, 6,...
s = idaapi.get_struc(id)
s = idaapi.get_struc(sid)
def SetStrucIdx(id, index): """ Change structure index @param id: structure type ID @param index: new index of the structure @return: != 0 - ok @note: See GetFirstStrucIdx() for the explanation of structure indices and IDs. """ s = idaapi.get_struc(id) if not s: return 0 return idaapi.set_struc_idx(s, index)
244a3cd02a580c0095170004ec30e922f0d1a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6984/244a3cd02a580c0095170004ec30e922f0d1a8a6/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1585, 5286, 4223, 12, 350, 16, 770, 4672, 3536, 7576, 3695, 770, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 770, 30, 394, 770, 434, 326, 3695, 225, 632, 2463, 30, 480, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 1585, 5286, 4223, 12, 350, 16, 770, 4672, 3536, 7576, 3695, 770, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 770, 30, 394, 770, 434, 326, 3695, 225, 632, 2463, 30, 480, ...
self.path = os.path.join(path, self.distribution.name)
self.path = os.path.join(pbuilder_path, self.distribution.name)
def __init__(self, distribution, pbuilder_path, **opts): super(Pbuilder, self).__init__(distribution, **opts)
1f2a975124bada70b6ddc6afbb8c8151550d9f90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13693/1f2a975124bada70b6ddc6afbb8c8151550d9f90/pbuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7006, 16, 6386, 953, 67, 803, 16, 2826, 4952, 4672, 2240, 12, 52, 9574, 16, 365, 2934, 972, 2738, 972, 12, 16279, 16, 2826, 4952, 13, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7006, 16, 6386, 953, 67, 803, 16, 2826, 4952, 4672, 2240, 12, 52, 9574, 16, 365, 2934, 972, 2738, 972, 12, 16279, 16, 2826, 4952, 13, 2, -100, -100, -1...
def update_title(): if not changes: return title = '; '.join(['%s %s' % (', '.join(v), k) for k, v in change_summary.iteritems()]) changes[-1]['title'] = title for date, author, field, old, new in changelog: if date != curr_date or author != curr_author: update_title() change_summary = {} changes.append({ 'date': http_date(date), 'author': author, 'fields': {} }) curr_date = date curr_author = author if field == 'comment':
for change in self.grouped_changelog_entries(ticket, db): changes.append(change) change_summary = {} if 'comment' in change: comment = change['comment'] change['comment'] = unicode(wiki_to_html( comment, self.env, req, db, absurls=True))
def update_title(): if not changes: return title = '; '.join(['%s %s' % (', '.join(v), k) for k, v in change_summary.iteritems()]) changes[-1]['title'] = title
17d2605c5e7554f3f9e5ab421e623d4853f1a2c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/17d2605c5e7554f3f9e5ab421e623d4853f1a2c2/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2649, 13332, 309, 486, 3478, 30, 327, 2077, 273, 12386, 2418, 5701, 12, 3292, 9, 87, 738, 87, 11, 738, 261, 2187, 2418, 5701, 12, 90, 3631, 417, 13, 364, 417, 16, 331, 316,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2649, 13332, 309, 486, 3478, 30, 327, 2077, 273, 12386, 2418, 5701, 12, 3292, 9, 87, 738, 87, 11, 738, 261, 2187, 2418, 5701, 12, 90, 3631, 417, 13, 364, 417, 16, 331, 316,...
rmdirRecursive(d)
shutil.rmtree(d, ignore_errors=True)
def purge(base_dir, gigs, ignore, dry_run=False): """Delete directories under `base_dir` until `gigs` GB are free Will not delete directories listed in the ignore list.""" gigs *= 1024 * 1024 * 1024 if freespace(base_dir) >= gigs: return dirs = [os.path.join(base_dir, d) for d in os.listdir(base_dir) if os.path.isdir(os.path.join(base_dir, d)) and d not in ignore] dirs.sort(mtime_sort) while dirs and freespace(base_dir) < gigs: d = dirs.pop(0) print "Deleting", d if not dry_run: rmdirRecursive(d)
04d1327531acc613e340dc41deb9959eac612f50 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6206/04d1327531acc613e340dc41deb9959eac612f50/purge_builds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12, 1969, 67, 1214, 16, 314, 360, 87, 16, 2305, 16, 10299, 67, 2681, 33, 8381, 4672, 3536, 2613, 6402, 3613, 1375, 1969, 67, 1214, 68, 3180, 1375, 75, 360, 87, 68, 25069, 854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12, 1969, 67, 1214, 16, 314, 360, 87, 16, 2305, 16, 10299, 67, 2681, 33, 8381, 4672, 3536, 2613, 6402, 3613, 1375, 1969, 67, 1214, 68, 3180, 1375, 75, 360, 87, 68, 25069, 854, ...
def bigStorage(self, minFree, default, *candidates):
def bigStorage(minFree, default, *candidates):
def bigStorage(self, minFree, default, *candidates): mounts = open('/proc/mounts', 'rb').readlines() # format: device mountpoint fstype options # mountpoints = [x.split(' ', 2)[1] for x in mounts] for candidate in candidates: if candidate in mountpoints: try: diskstat = os.statvfs(candidate) free = diskstat.f_bfree * diskstat.f_bsize if free > minFree: return candidate except: pass return default
c524b6d0e0023a9c6c4b96a568ca17dc53a0a773 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10939/c524b6d0e0023a9c6c4b96a568ca17dc53a0a773/EPGImport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5446, 3245, 12, 1154, 9194, 16, 805, 16, 380, 21635, 4672, 19399, 273, 1696, 2668, 19, 9381, 19, 4778, 87, 2187, 296, 6731, 16063, 896, 3548, 1435, 468, 740, 30, 2346, 27122, 20223, 388,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5446, 3245, 12, 1154, 9194, 16, 805, 16, 380, 21635, 4672, 19399, 273, 1696, 2668, 19, 9381, 19, 4778, 87, 2187, 296, 6731, 16063, 896, 3548, 1435, 468, 740, 30, 2346, 27122, 20223, 388,...
if handle in self._textChannels:
try:
def channel_for_text(self, handle, suppress_handler=False): if handle in self._textChannels: chan = self._textChannels[handle] else: _moduleLogger.debug("Requesting new text channel") contact = handle.contact
ae58a0e7efd07fd97be2289c97cc2d3a53651ca9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13096/ae58a0e7efd07fd97be2289c97cc2d3a53651ca9/channel_manager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1904, 67, 1884, 67, 955, 12, 2890, 16, 1640, 16, 12257, 67, 4176, 33, 8381, 4672, 775, 30, 3861, 273, 365, 6315, 955, 10585, 63, 4110, 65, 469, 30, 389, 2978, 3328, 18, 4148, 2932, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1904, 67, 1884, 67, 955, 12, 2890, 16, 1640, 16, 12257, 67, 4176, 33, 8381, 4672, 775, 30, 3861, 273, 365, 6315, 955, 10585, 63, 4110, 65, 469, 30, 389, 2978, 3328, 18, 4148, 2932, 6...
base, bit, char = bitname(typeobj) revdict[typeobj] = (typeinfo[a][:-1], (base, bit, char), a) if base != '': myname = "%s%d" % (base, bit) if (name != 'longdouble' and name != 'clongdouble') or \ myname not in allTypes.keys(): allTypes[myname] = typeobj typeDict[myname] = typeobj if base == 'uint': tmpstr = 'UInt%d' % bit typeDict[tmpstr] = typeobj na_name = tmpstr elif base == 'complex': na_name = '%s%d' % (base.capitalize(), bit/2) elif base == 'bool': na_name = base.capitalize() typeDict[na_name] = typeobj else: na_name = "%s%d" % (base.capitalize(), bit) typeDict[na_name] = typeobj typeNA[na_name] = typeobj typeNA[typeobj] = na_name typeNA[typeinfo[a][0]] = na_name if char != '': typeDict[char] = typeobj typeNA[char] = na_name
def _add_types(): for a in typeinfo.keys(): name = a.lower() if isinstance(typeinfo[a], type(())): typeobj = typeinfo[a][-1] # define C-name and insert typenum and typechar references also allTypes[name] = typeobj typeDict[name] = typeobj typeDict[typeinfo[a][0]] = typeobj typeDict[typeinfo[a][1]] = typeobj # insert bit-width version for this class (if relevant) base, bit, char = bitname(typeobj) revdict[typeobj] = (typeinfo[a][:-1], (base, bit, char), a) if base != '': myname = "%s%d" % (base, bit) if (name != 'longdouble' and name != 'clongdouble') or \ myname not in allTypes.keys(): allTypes[myname] = typeobj typeDict[myname] = typeobj if base == 'uint': tmpstr = 'UInt%d' % bit typeDict[tmpstr] = typeobj na_name = tmpstr elif base == 'complex': na_name = '%s%d' % (base.capitalize(), bit/2) elif base == 'bool': na_name = base.capitalize() typeDict[na_name] = typeobj else: na_name = "%s%d" % (base.capitalize(), bit) typeDict[na_name] = typeobj typeNA[na_name] = typeobj typeNA[typeobj] = na_name typeNA[typeinfo[a][0]] = na_name if char != '': typeDict[char] = typeobj typeNA[char] = na_name else: # generic class allTypes[name] = typeinfo[a]
d04f07463ef0816435777ea4213752c5bd0f2760 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/d04f07463ef0816435777ea4213752c5bd0f2760/numerictypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 2352, 13332, 364, 279, 316, 618, 1376, 18, 2452, 13332, 508, 273, 279, 18, 8167, 1435, 309, 1549, 12, 723, 1376, 63, 69, 6487, 618, 12, 1435, 3719, 30, 618, 2603, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 67, 2352, 13332, 364, 279, 316, 618, 1376, 18, 2452, 13332, 508, 273, 279, 18, 8167, 1435, 309, 1549, 12, 723, 1376, 63, 69, 6487, 618, 12, 1435, 3719, 30, 618, 2603, 273, ...
if var is not None: priv = var.is_public is False else: priv = doc.canonical_name[-1].startswith('_')
priv = ((var is not None and var.is_public is False) or (var is None and doc.canonical_name[-1].startswith('_')))
def write_module_tree_item(self, out, doc, package=None): # If it's a private variable, then mark its <li>. var = package and package.variables.get(doc.canonical_name[-1]) if var is not None: priv = var.is_public is False else: priv = doc.canonical_name[-1].startswith('_') out(' <li%s> <strong class="uidlink">%s</strong>' % (priv and ' class="private"' or '', self.href(doc))) if doc.summary not in (None, UNKNOWN): out(': <em class="summary">'+ self.description(doc.summary, doc, 8)+'</em>') out('</li>\n') if doc.submodules != UNKNOWN and doc.submodules: out(' <ul%s>\n' % (priv and ' class="private"' or '')) for submodule in doc.submodules: self.write_module_tree_item(out, submodule, package=doc) out(' </ul>\n </li>\n')
5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2978, 67, 3413, 67, 1726, 12, 2890, 16, 596, 16, 997, 16, 2181, 33, 7036, 4672, 468, 971, 518, 1807, 279, 3238, 2190, 16, 1508, 2267, 2097, 411, 549, 18652, 569, 273, 2181, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2978, 67, 3413, 67, 1726, 12, 2890, 16, 596, 16, 997, 16, 2181, 33, 7036, 4672, 468, 971, 518, 1807, 279, 3238, 2190, 16, 1508, 2267, 2097, 411, 549, 18652, 569, 273, 2181, ...
add(parent.link_to(request, _("Show Parent", formatted=False)))
add(parent.link_to(request, _("Parent Page", formatted=False)))
def editbar(self, d): """ Assemble the page edit bar.
a0585c91871df50359fe2e7f0176e911c0460579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/a0585c91871df50359fe2e7f0176e911c0460579/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 3215, 12, 2890, 16, 302, 4672, 3536, 2970, 10045, 326, 1363, 3874, 4653, 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, ...
[ 1, 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, 3874, 3215, 12, 2890, 16, 302, 4672, 3536, 2970, 10045, 326, 1363, 3874, 4653, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""Fails if the given lists are unequal.
"""Fails if the given dictionaries are not equal.
def dictionaries_should_be_equal(self, dict1, dict2, msg=None, values=True): """Fails if the given lists are unequal. First the equality of dictionaries' keys is checked and after that all the key value pairs. If there are differences between the values, those are listed in an error message, for example with dictionaries "${D1} = {'a':1, 'b':2, 'c':3}" and "${D2} = {'a':1, 'b':4, 'c':6}". Dictionaries are different: key, dict1 value, dict2 value b, 2, 4 c, 3, 6
2f5075140c0afeaf5bda26b5924aceb3478d1a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/2f5075140c0afeaf5bda26b5924aceb3478d1a14/Collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16176, 67, 13139, 67, 2196, 67, 9729, 12, 2890, 16, 2065, 21, 16, 2065, 22, 16, 1234, 33, 7036, 16, 924, 33, 5510, 4672, 3536, 30800, 309, 326, 864, 16176, 854, 486, 3959, 18, 225, 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, 16176, 67, 13139, 67, 2196, 67, 9729, 12, 2890, 16, 2065, 21, 16, 2065, 22, 16, 1234, 33, 7036, 16, 924, 33, 5510, 4672, 3536, 30800, 309, 326, 864, 16176, 854, 486, 3959, 18, 225, 5...
if now > deadline + DEADLINE_OFFSET:
if now > deadline + FREQUENCY_FLEXIBILITY:
def _after_connect(exc, dns, permid, selversion): if DEBUG: if exc: print >>sys.stderr, "crawler: dialback to crawler failed", dns, show_permid_short(permid), exc else: print >>sys.stderr, "crawler: dialback to crawler established", dns, show_permid_short(permid)
cb99a26a957890fc5affa36e045759bf785841ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/cb99a26a957890fc5affa36e045759bf785841ea/Crawler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5205, 67, 3612, 12, 10075, 16, 6605, 16, 4641, 350, 16, 357, 1589, 4672, 309, 6369, 30, 309, 3533, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 71, 10644, 30, 7609, 823, 358, 18588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5205, 67, 3612, 12, 10075, 16, 6605, 16, 4641, 350, 16, 357, 1589, 4672, 309, 6369, 30, 309, 3533, 30, 1172, 1671, 9499, 18, 11241, 16, 315, 71, 10644, 30, 7609, 823, 358, 18588, ...
if os.path.isfile(entry):
if not os.path.exists(entry) or os.path.isfile(entry):
def delete_func(entry, must_exist=0): if not must_exist and not os.path.exists(entry): return None if os.path.isfile(entry): return os.unlink(entry) else: return shutil.rmtree(entry, 1)
01da62eccd6ac87a683ea2e81606365fa139f1fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7126/01da62eccd6ac87a683ea2e81606365fa139f1fc/Defaults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 644, 12, 4099, 16, 1297, 67, 7398, 33, 20, 4672, 309, 486, 1297, 67, 7398, 471, 486, 1140, 18, 803, 18, 1808, 12, 4099, 4672, 327, 599, 309, 486, 1140, 18, 803, 18, 1808, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 644, 12, 4099, 16, 1297, 67, 7398, 33, 20, 4672, 309, 486, 1297, 67, 7398, 471, 486, 1140, 18, 803, 18, 1808, 12, 4099, 4672, 327, 599, 309, 486, 1140, 18, 803, 18, 1808, ...
count = len(self.req.get_tasks_list(started_only=False, tags=[tag]))
count = len( self.req.get_tasks_list(started_only=False, tags=[tag]))
def refresh_tags(self): select = self.tag_tview.get_selection() t_path = None if select: t_model, t_path = select.get_selected_rows() #pylint: disable-msg=W0612 self.tag_ts.clear() alltag = self.req.get_alltag_tag() notag = self.req.get_notag_tag() if self.workview: count_all_task = len(self.req.get_active_tasks_list(workable=True)) count_no_tags = len(self.req.get_active_tasks_list(notag_only=True,\ workable=True)) else: count_all_task = len(self.req.get_tasks_list(started_only=False)) count_no_tags = len(self.req.get_tasks_list(notag_only=True,\ started_only=False))
fac54dcba973acc5967f43b60fb540659a1a87a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/fac54dcba973acc5967f43b60fb540659a1a87a8/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 4156, 12, 2890, 4672, 2027, 273, 365, 18, 2692, 67, 88, 1945, 18, 588, 67, 10705, 1435, 268, 67, 803, 273, 599, 309, 2027, 30, 268, 67, 2284, 16, 268, 67, 803, 273, 2027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 4156, 12, 2890, 4672, 2027, 273, 365, 18, 2692, 67, 88, 1945, 18, 588, 67, 10705, 1435, 268, 67, 803, 273, 599, 309, 2027, 30, 268, 67, 2284, 16, 268, 67, 803, 273, 2027, ...
checkValue(parser, "new_sub_block[1]/filename", u'"ACL"'),
checkValue(parser, "new_sub_block[1]/filename", u'ACL'),
def checkRAR(parser): return ( checkValue(parser, "archive_start/crc16", 0x77E1), checkValue(parser, "new_sub_block[0]/crc16", 0x2994), checkValue(parser, "file[0]/crc32", 0x4C6D13ED), checkValue(parser, "new_sub_block[1]/crc32", 0x34528E23), checkValue(parser, "file[1]/filename", ".svn\prop-base\README.svn-base"), checkValue(parser, "new_sub_block[1]/filename", u'"ACL"'), #archive_end bad candidate for checking checkValue(parser, "new_sub_block[362]/crc32", 0x6C84C95E),
13b3183e1f167346bb05ee112299fa75435586dc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/13b3183e1f167346bb05ee112299fa75435586dc/run_testcase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 54, 985, 12, 4288, 4672, 327, 261, 866, 620, 12, 4288, 16, 315, 10686, 67, 1937, 19, 22988, 2313, 3113, 374, 92, 4700, 41, 21, 3631, 866, 620, 12, 4288, 16, 315, 2704, 67, 1717,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 54, 985, 12, 4288, 4672, 327, 261, 866, 620, 12, 4288, 16, 315, 10686, 67, 1937, 19, 22988, 2313, 3113, 374, 92, 4700, 41, 21, 3631, 866, 620, 12, 4288, 16, 315, 2704, 67, 1717,...
parameters: @ISR-flat.paf
parameters: @PT1Pipe/ISR-flat.paf
def isrProcess(f): print >>f, """ appStage: { name: isrInputRaw parallelClass: lsst.pex.harness.IOStage.InputStageParallel eventTopic: None stagePolicy: { parameters: { butler: @butlerInput.paf inputItems: {""" for channelX in (0, 1): for channelY in (0, 1, 2, 3, 4, 5, 6, 7): for snap in (0, 1): channelName = '"%d,%d"' % (channelX, channelY) channelSnap = "%d%d_%d" % (channelX, channelY, snap) print >>f, """ isrExposure""" + channelSnap + """: { datasetType: raw datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: """ + str(snap) + """ channel: """ + channelName + """ } } }""" print >>f, """ } } } }""" for channelX in (0, 1): for channelY in (0, 1, 2, 3, 4, 5, 6, 7): channelName = '"%d,%d"' % (channelX, channelY) channelId = "%d%d" % (channelX, channelY) print >>f, """ appStage: { name: isrInput""" + channelId + """ parallelClass: lsst.pex.harness.IOStage.InputStageParallel eventTopic: None stagePolicy: { parameters: { butler: @butlerInput.paf inputItems: { biasExposure: { datasetType: bias datasetId: { fromJobIdentity: "raft" "sensor" set: { channel: """ + channelName + """ } } } darkExposure: { datasetType: dark datasetId: { fromJobIdentity: "raft" "sensor" set: { channel: """ + channelName + """ } } } flatExposure: { datasetType: flat datasetId: { fromJobIdentity: "raft" "sensor" set: { channel: """ + channelName + """ } } } } } } }""" for snap in (0, 1): channelSnap = "%d%d_%d" % (channelX, channelY, snap) print >>f, """ appStage: { name: isrSaturation""" + channelSnap + """ parallelClass: lsst.ip.pipeline.IsrSaturationStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ } outputKeys: { saturationMaskedExposure: isrExposure""" + channelSnap + """ } } } appStage: { name: isrOverscan""" + channelSnap + """ parallelClass: lsst.ip.pipeline.IsrOverscanStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ } outputKeys: { overscanCorrectedExposure: isrExposure""" + channelSnap + """ } } } appStage: { name: isrBias""" + channelSnap + """ parallelClass: lsst.ip.pipeline.IsrBiasStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ biasexposure: biasExposure } outputKeys: { biasSubtractedExposure: isrExposure""" + channelSnap + """ } } } appStage: { name: isrVariance""" + channelSnap + """ parallelClass: lsst.ip.pipeline.IsrVarianceStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ } outputKeys: { varianceAddedExposure: isrExposure""" + channelSnap + """ } } } appStage: { name: isrDark""" + channelSnap + """ parallelClass: lsst.ip.pipeline.IsrDarkStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ darkexposure: darkExposure } outputKeys: { darkSubtractedExposure: isrExposure""" + channelSnap + """ } } } appStage: { name: isrFlat""" + channelSnap + """ parallelClass: lsst.ip.pipeline.IsrFlatStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ flatexposure: flatExposure } outputKeys: { darkSubtractedExposure: isrExposure""" + channelSnap + """ } parameters: @ISR-flat.paf outputKeys: { flatCorrectedExposure: isrExposure""" + channelSnap + """ } } } appStage: { name: isrSdqaAmp""" + channelSnap + """ parallelClass: lsst.sdqa.pipeline.IsrSdqaStageParallel eventTopic: None stagePolicy: { inputKeys: { exposure: isrExposure""" + channelSnap + """ } parameters: @ISR-sdqaAmp.paf outputKeys: { isrPersistableSdqaRatingVectorKey: sdqaRatingVector""" + str(snap) + """ } } }""" pass # end of snap loop print >>f, """ appStage: { name: isrOutput""" + channelId + """ parallelClass: lsst.pex.harness.IOStage.OutputStageParallel eventTopic: None stagePolicy: { parameters: { butler: @butlerUpdate.paf outputItems: { sdqaRatingVector0: { datasetType: sdqaAmp datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: 0 channel: """ + channelName + """ } } } sdqaRatingVector1: { datasetType: sdqaAmp datasetId: { fromJobIdentity: "visit" "raft" "sensor" set: { snap: 1 channel: """ + channelName + """ } } } } } } }"""
794695332025b0321e85c5771ec0bb572bc37b41 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6538/794695332025b0321e85c5771ec0bb572bc37b41/createImSimPipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 86, 2227, 12, 74, 4672, 1172, 1671, 74, 16, 3536, 595, 8755, 30, 288, 508, 30, 353, 86, 1210, 4809, 7230, 797, 30, 7180, 334, 18, 84, 338, 18, 76, 1303, 403, 18, 4294, 8755, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 86, 2227, 12, 74, 4672, 1172, 1671, 74, 16, 3536, 595, 8755, 30, 288, 508, 30, 353, 86, 1210, 4809, 7230, 797, 30, 7180, 334, 18, 84, 338, 18, 76, 1303, 403, 18, 4294, 8755, 1...
formatField.update(IAccessibleHandler.splitIA2Attribs(attribsString))
if attribsString: formatField.update(IAccessibleHandler.splitIA2Attribs(attribsString))
def _getFormatFieldAndOffsets(self,offset): try: startOffset,endOffset,attribsString=self.obj.IAccessibleTextObject.attributes(offset) except COMError: log.debugWarning("could not get attributes",exc_info=True) return textHandler.FormatField(),(self._startOffset,self._endOffset) formatField=textHandler.FormatField() formatField.update(IAccessibleHandler.splitIA2Attribs(attribsString)) try: textAlign=formatField.pop("text-align") except KeyError: textAlign=None if textAlign: if "right" in textAlign: textAlign="right" elif "center" in textAlign: textAlign="center" elif "justify" in textAlign: textAlign="justify" formatField["text-align"]=textAlign try: fontWeight=formatField.pop("font-weight") except KeyError: fontWeight=None if fontWeight is not None and fontWeight.lower()=="bold" or (fontWeight.isdigit() and int(fontWeight)>=700): formatField["bold"]=True else: formatField["bold"]=False try: fontStyle=formatField.pop("font-style") except KeyError: fontStyle=None if fontStyle is not None and fontStyle.lower()=="italic": formatField["italic"]=True else: formatField["italic"]=False try: invalid=formatField.pop("invalid") except KeyError: invalid=None if invalid and invalid.lower()=="spelling": formatField["invalid-spelling"]=True return formatField,(startOffset,endOffset)
21b6f7c6f54c9cfc224d7c84d61323f99b4c0479 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/21b6f7c6f54c9cfc224d7c84d61323f99b4c0479/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1630, 974, 1876, 13830, 12, 2890, 16, 3348, 4672, 775, 30, 18245, 16, 409, 2335, 16, 19617, 780, 33, 2890, 18, 2603, 18, 45, 10451, 1528, 921, 18, 4350, 12, 3348, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1630, 974, 1876, 13830, 12, 2890, 16, 3348, 4672, 775, 30, 18245, 16, 409, 2335, 16, 19617, 780, 33, 2890, 18, 2603, 18, 45, 10451, 1528, 921, 18, 4350, 12, 3348, 13, 1335, ...
sys.stdout.write(' matching performance keys for %s/%s %s %s'% (localdir, execname, ' '.join(globalExecopts), execopts)) if len(compoptslist) > 1: sys.stdout.write('(%s%s)'% (' '.join(globalCompopts),compopts)) if result==0: sys.stdout.write(']\n') else: sys.stdout.write(' (%d-%d)]\n'%(compoptsnum, execoptsnum))
sys.stdout.write(' matching performance keys for %s/%s'% (localdir, execname)) if status!=0 and not onlyone: sys.stdout.write(' %s %s (%s %s) (%d-%d)'% (' '.join(globalExecopts), execopts, ' '.join(globalCompopts),compopts, compoptsnum, execoptsnum)) sys.stdout.write(']\n')
def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return
29b6860eea7c9b664c56ab3eb02b594a27cd8593 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/29b6860eea7c9b664c56ab3eb02b594a27cd8593/sub_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
def command_quit(self, args):
def command_quit(self, arg):
def command_quit(self, args): """ /quit """ if len(args): msg = ' '.join(args) else: msg = None if msg: self.muc.disconnect(self.rooms, msg) sleep(0.2) # :(
1c7377804051166c26f33457378524d192077c66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/1c7377804051166c26f33457378524d192077c66/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 67, 27176, 12, 2890, 16, 1501, 4672, 3536, 342, 27176, 3536, 309, 562, 12, 1968, 4672, 1234, 273, 296, 2418, 5701, 12, 1968, 13, 469, 30, 1234, 273, 599, 309, 1234, 30, 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, 1296, 67, 27176, 12, 2890, 16, 1501, 4672, 3536, 342, 27176, 3536, 309, 562, 12, 1968, 4672, 1234, 273, 296, 2418, 5701, 12, 1968, 13, 469, 30, 1234, 273, 599, 309, 1234, 30, 365, 18, ...
return importer.import_file(filename, finfo, fqname)
return importFunc(filename, finfo, fqname)
def _import_pathname(self, pathname, fqname): if _os_path_isdir(pathname): result = self._import_pathname(_os_path_join(pathname, '__init__'), fqname) if result: values = result[2] values['__pkgdir__'] = pathname values['__path__'] = [ pathname ] return 1, result[1], values return None
2de07507437c9c4f18a0ba8d79f54df846aa9524 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2de07507437c9c4f18a0ba8d79f54df846aa9524/imputil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5666, 67, 28336, 12, 2890, 16, 9806, 16, 8508, 529, 4672, 309, 389, 538, 67, 803, 67, 291, 1214, 12, 28336, 4672, 563, 273, 365, 6315, 5666, 67, 28336, 24899, 538, 67, 803, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5666, 67, 28336, 12, 2890, 16, 9806, 16, 8508, 529, 4672, 309, 389, 538, 67, 803, 67, 291, 1214, 12, 28336, 4672, 563, 273, 365, 6315, 5666, 67, 28336, 24899, 538, 67, 803, 67, ...
self.iterCopy(from_model, from_iter, to_model, to_iter, to_pos)
self.iter_copy(from_model, from_iter, to_model, to_iter, to_pos)
def on_drag_drop(self, to_tree, drag_context, x, y, selection): to_path, to_pos = to_tree.get_dest_row_at_pos(x, y) to_model = to_tree.get_model() to_iter = to_model.get_iter(to_path) from_tree = drag_context.get_source_widget() from_model, from_iter = from_tree.get_selection().get_selected() self.iterCopy(from_model, from_iter, to_model, to_iter, to_pos) if to_tree == from_tree: """move element in the save tree""" drag_context.finish(True, True) to_tree.expand_to_path(to_path)
9a4d8e331bf54871c3c49e7561f0bc855ad4308b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/9a4d8e331bf54871c3c49e7561f0bc855ad4308b/init_grug_and_drop.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 7285, 12, 2890, 16, 358, 67, 3413, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 4421, 4672, 358, 67, 803, 16, 358, 67, 917, 273, 358, 67, 3413, 18, 588, 67, 10488,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 15997, 67, 7285, 12, 2890, 16, 358, 67, 3413, 16, 8823, 67, 2472, 16, 619, 16, 677, 16, 4421, 4672, 358, 67, 803, 16, 358, 67, 917, 273, 358, 67, 3413, 18, 588, 67, 10488,...
if entry.getElementsByTagName('ReportLink'):
if entry.getElementsByTagName('ReportLink') and entry.getElementsByTagName('ReportLink')[0].firstChild:
def subtitle_info(self, raw_xml): dom = minidom.parseString(raw_xml) #Make the dom from raw xml entries=dom.getElementsByTagName('opensubtitles') #Pull out all entry's subtitle_entries=[] #Make an empty container to fill up and return data=None for entry in entries: if entry.getElementsByTagName('SubBrowse'): for result in entry.getElementsByTagName('SubBrowse'): if result.getElementsByTagName('Subtitle'): data = result.getElementsByTagName('Subtitle') break break #print "data=", data if not data: return [] # catch subtitle information for entry in data: sub = {} if entry.getElementsByTagName('LinkDetails'): sub['LinkDetails'] = entry.getElementsByTagName('LinkDetails')[0].firstChild.data if entry.getElementsByTagName('IDSubtitle'): sub['IDSubtitle'] = { 'IDSubtitle': entry.getElementsByTagName('IDSubtitle')[0].firstChild.data, 'Link': entry.getElementsByTagName('IDSubtitle')[0].getAttribute('Link'), } if entry.getElementsByTagName('MovieReleaseName'): sub['MovieReleaseName'] = entry.getElementsByTagName('MovieReleaseName')[0].firstChild.data if entry.getElementsByTagName('SubFormat'): sub['SubFormat'] = entry.getElementsByTagName('SubFormat')[0].firstChild.data if entry.getElementsByTagName('SubSumCD'): sub['SubSumCD'] = entry.getElementsByTagName('SubSumCD')[0].firstChild.data if entry.getElementsByTagName('SubAuthorComment'): sub['SubAuthorComment'] = entry.getElementsByTagName('SubAuthorComment')[0].firstChild.data if entry.getElementsByTagName('SubAddDate'): sub['SubAddDate'] = entry.getElementsByTagName('SubAddDate')[0].firstChild.data if entry.getElementsByTagName('SubSumVotes'): sub['SubSumVotes'] = entry.getElementsByTagName('SubSumVotes')[0].firstChild.data if entry.getElementsByTagName('SubRating'): sub['SubRating'] = entry.getElementsByTagName('SubRating')[0].firstChild.data if entry.getElementsByTagName('SubDownloadsCnt'): sub['SubDownloadsCnt'] = entry.getElementsByTagName('SubDownloadsCnt')[0].firstChild.data if entry.getElementsByTagName('UserNickName'): sub['UserNickName'] = entry.getElementsByTagName('UserNickName')[0].firstChild.data if entry.getElementsByTagName('LanguageName'): sub['LanguageName'] = entry.getElementsByTagName('LanguageName')[0].firstChild.data if entry.getElementsByTagName('SubtitleFile'): SubtitleFile = {} _SubtitleFile = entry.getElementsByTagName('SubtitleFile')[0] _File = _SubtitleFile.getElementsByTagName('File')[0] SubtitleFile['File'] = {'ID': _SubtitleFile.getElementsByTagName('File')[0].getAttribute('ID'), 'SubActualCD': {'SubActualCD':_File.getElementsByTagName('SubActualCD')[0].firstChild.data, 'SubSize': _File.getElementsByTagName('SubActualCD')[0].getAttribute('Link'), 'MD5': _File.getElementsByTagName('SubActualCD')[0].getAttribute('MD5'), 'SubFileName': _File.getElementsByTagName('SubActualCD')[0].getAttribute('SubFileName'), 'DownloadLink': _File.getElementsByTagName('SubActualCD')[0].getAttribute('DownloadLink'), }, 'SubPreview': _File.getElementsByTagName('SubPreview')[0].firstChild.data } SubtitleFile['Download'] = {'Download': _SubtitleFile.getElementsByTagName('Download')[0].firstChild.data, 'DownloadLink': _SubtitleFile.getElementsByTagName('Download')[0].getAttribute('DownloadLink'), } sub['SubtitleFile'] = SubtitleFile if entry.getElementsByTagName('Movie'): _Movie = entry.getElementsByTagName('Movie')[0] #sub['MovieName'] = _Movie.getElementsByTagName('MovieName')[0].firstChild.data sub['MovieID'] = {'MovieID': _Movie.getElementsByTagName('MovieName')[0].getAttribute('MovieID'), 'Link': _Movie.getElementsByTagName('MovieName')[0].getAttribute('Link'), } for section in _Movie.getElementsByTagName('section'): if section.getAttribute('type') == u"about": for info in section.getElementsByTagName("info"): if info.getElementsByTagName("web_url")[0].firstChild.data == u"http://www.imdb.com": sub['MovieID']['LinkImdb'] = info.getElementsByTagName("link_detail")[0].firstChild.data if entry.getElementsByTagName('FullName'): sub['FullName'] = entry.getElementsByTagName('FullName')[0].firstChild.data if entry.getElementsByTagName('ReportLink'): sub['ReportLink'] = entry.getElementsByTagName('ReportLink')[0].firstChild.data # just s shortcut sub['DownloadLink'] = sub['SubtitleFile']['File']['SubActualCD']['DownloadLink'] if sub: subtitle_entries.append(sub) return subtitle_entries
f4a0b5c76f2474a74fe101030a960e622bef3d59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/f4a0b5c76f2474a74fe101030a960e622bef3d59/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20281, 67, 1376, 12, 2890, 16, 1831, 67, 2902, 4672, 4092, 273, 1131, 350, 362, 18, 2670, 780, 12, 1899, 67, 2902, 13, 468, 6464, 326, 4092, 628, 1831, 2025, 3222, 33, 9859, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20281, 67, 1376, 12, 2890, 16, 1831, 67, 2902, 4672, 4092, 273, 1131, 350, 362, 18, 2670, 780, 12, 1899, 67, 2902, 13, 468, 6464, 326, 4092, 628, 1831, 2025, 3222, 33, 9859, 18, 588, ...
def __init__(self,doc,localcontext, images={}, path='.', title=None):
def __init__(self, doc, localcontext, images={}, path='.', title=None):
def __init__(self,doc,localcontext, images={}, path='.', title=None): self.localcontext = localcontext self.doc = doc self.styles = doc.styles self.images = images self.path = path self.title = title
8e08b1afb4e551b469ca33479d41aa58e68527b4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/8e08b1afb4e551b469ca33479d41aa58e68527b4/trml2pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 997, 16, 1191, 2472, 16, 4602, 28793, 589, 2218, 1093, 16, 2077, 33, 7036, 4672, 365, 18, 3729, 2472, 273, 1191, 2472, 365, 18, 2434, 273, 997, 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, 1001, 2738, 972, 12, 2890, 16, 997, 16, 1191, 2472, 16, 4602, 28793, 589, 2218, 1093, 16, 2077, 33, 7036, 4672, 365, 18, 3729, 2472, 273, 1191, 2472, 365, 18, 2434, 273, 997, 365, 18, ...
QtCore.QVariant(self.__columns)).toString()
QtCore.QVariant(Settings.s_columns)).toStringList()
def __init__(self, p_parent = None): # initialisiere Objekt QtCore.QObject.__init__(self, p_parent)
824a511487ba06871f904b5354e4fbc422d5d389 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4919/824a511487ba06871f904b5354e4fbc422d5d389/Settings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 293, 67, 2938, 273, 599, 4672, 468, 2172, 291, 77, 822, 18760, 3839, 88, 20193, 18, 53, 921, 16186, 2738, 972, 12, 2890, 16, 293, 67, 2938, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 293, 67, 2938, 273, 599, 4672, 468, 2172, 291, 77, 822, 18760, 3839, 88, 20193, 18, 53, 921, 16186, 2738, 972, 12, 2890, 16, 293, 67, 2938, 13, 2, -100...
"""Like our superclass, but has __set__ and __del__ methods so as to be a data descriptor.
"""Like our superclass, but has __set__ and __delete__ methods so as to be a data descriptor.
def copy_for_subclass(self, cls): copy = self.__class__(cls, self.attr, *self.args, **self.kws) copy.__copycount = self.__copycount + 1 if copy.__copycount > 1: if not seen_before("ClassAttrSpecific_NonDataDescriptor copied again"): print "once-per-session developer warning: this copy got copied again:", self return copy
681b75d395818614eea70912ebd5e60f2c6d0ff0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/681b75d395818614eea70912ebd5e60f2c6d0ff0/ExprsMeta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 1884, 67, 10678, 12, 2890, 16, 2028, 4672, 1610, 273, 365, 16186, 1106, 972, 12, 6429, 16, 365, 18, 1747, 16, 380, 2890, 18, 1968, 16, 2826, 2890, 18, 79, 4749, 13, 1610, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1884, 67, 10678, 12, 2890, 16, 2028, 4672, 1610, 273, 365, 16186, 1106, 972, 12, 6429, 16, 365, 18, 1747, 16, 380, 2890, 18, 1968, 16, 2826, 2890, 18, 79, 4749, 13, 1610, 1...
self.assy.selectParts()
def toolsSelectMolecules(self): self.glpane.setMode('SELECT') self.assy.selectParts() # Update display with selected molecules
4cca8f85b66ad81a0326fef962afffc5b23fae9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/4cca8f85b66ad81a0326fef962afffc5b23fae9a/MWsemantics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8513, 3391, 49, 29466, 12, 2890, 4672, 365, 18, 7043, 29009, 18, 542, 2309, 2668, 4803, 6134, 225, 468, 2315, 2562, 598, 3170, 312, 29466, 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, 0, 0, 0, 0, 0, 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, 8513, 3391, 49, 29466, 12, 2890, 4672, 365, 18, 7043, 29009, 18, 542, 2309, 2668, 4803, 6134, 225, 468, 2315, 2562, 598, 3170, 312, 29466, 2, -100, -100, -100, -100, -100, -100, -100, -1...
line=""
bufs = [] readsize = 100
def readline(self):
f260fc87b610b3af9eb777202097d1d17f433f44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f260fc87b610b3af9eb777202097d1d17f433f44/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 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, 0, 0...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 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, -100, ...
new_ia=normalizeIAccessible(res).QueryInterface(IAccessible)
new_ia=normalizeIAccessible(res)
def accFocus(ia): try: res=ia.accFocus if isinstance(res,comtypes.client.dynamic._Dispatch) or isinstance(res,IUnknown): new_ia=normalizeIAccessible(res).QueryInterface(IAccessible) new_child=0 elif isinstance(res,int): new_ia=ia new_child=res else: return None return (new_ia,new_child) except: return None
5a7d0ef6cdff11c17c76b9f32a0be428280e20d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/5a7d0ef6cdff11c17c76b9f32a0be428280e20d1/IAccessibleHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 9233, 12, 1155, 4672, 775, 30, 400, 33, 1155, 18, 8981, 9233, 309, 1549, 12, 455, 16, 832, 2352, 18, 2625, 18, 14507, 6315, 5325, 13, 578, 1549, 12, 455, 16, 45, 4874, 4672, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 9233, 12, 1155, 4672, 775, 30, 400, 33, 1155, 18, 8981, 9233, 309, 1549, 12, 455, 16, 832, 2352, 18, 2625, 18, 14507, 6315, 5325, 13, 578, 1549, 12, 455, 16, 45, 4874, 4672, 39...
if len(colors) > self.id: return colors[self.id]
key = (self.id % 28) + 1 if len(colors) > key: return colors[key]
def get_color(self): colors = ['ffd478', 'ff9400','d25700','935200','d4fb79','73fa79','8efa00','4e8f00','76d6ff','0096ff', '0a31ff','d783ff','7a80ff','942092','531a93','ff8ad8','ff3092','ff40ff', '941751','941200','ff2700','005393','ff7e79','fffc00','009192', '009051','00f900','929292','929000'] if len(colors) > self.id: return colors[self.id] else: return str(hex(592191*self.id))[2:]#255*255*255/28 states == 592191
0507469770a4ed7a3943185c247599f82c966557 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6998/0507469770a4ed7a3943185c247599f82c966557/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3266, 12, 2890, 4672, 5740, 273, 10228, 1403, 72, 24, 8285, 2187, 296, 1403, 11290, 713, 17023, 72, 2947, 26874, 17023, 29, 4763, 6976, 17023, 72, 24, 19192, 7235, 17023, 9036, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3266, 12, 2890, 4672, 5740, 273, 10228, 1403, 72, 24, 8285, 2187, 296, 1403, 11290, 713, 17023, 72, 2947, 26874, 17023, 29, 4763, 6976, 17023, 72, 24, 19192, 7235, 17023, 9036, ...