rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
if ob.portal_type == 'Folder': translate_folder([id], language, [id_trans], lang_trans)
def translate_folder(path, language, path_trans, lang_trans): ob = portal.unrestrictedTraverse(path, None) ob_trans = portal.unrestrictedTraverse(path_trans, None) for item in ob.objectIds(): subob = ob.unrestrictedTraverse(item, None) subob_trans = ob_trans.unrestrictedTraverse(item, None) if not subob_trans: log.warning('Object %s not found. No translation for %s will be set' % ("/".join(path_trans + [item]), lang_trans)) else: if not subob.hasTranslation(lang_trans): linkTranslations(portal, [[(path + [item], language), (path_trans + [item], lang_trans)]]) log.debug('Setting translation for %s (%s): %s (%s)' % (path + [item], language, path_trans + [item], lang_trans)) if subob and subob.portal_type == 'Folder': translate_folder(path + [item], language, path_trans + [item], lang_trans) else: log.warning('%s is already translated into %s!' % path,lang_trans)
445c640b1b0bca473c2354f6a1a8ca81dba5efa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10562/445c640b1b0bca473c2354f6a1a8ca81dba5efa1/setuphandlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 67, 5609, 12, 803, 16, 2653, 16, 589, 67, 2338, 16, 3303, 67, 2338, 4672, 3768, 273, 11899, 18, 318, 29306, 29654, 12, 803, 16, 599, 13, 3768, 67, 2338, 273, 11899, 18, 318, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 67, 5609, 12, 803, 16, 2653, 16, 589, 67, 2338, 16, 3303, 67, 2338, 4672, 3768, 273, 11899, 18, 318, 29306, 29654, 12, 803, 16, 599, 13, 3768, 67, 2338, 273, 11899, 18, 318, 29...
return self.parse_line(self.fp.next())
return self.parse_line(self.fp.readline())
def next(self): return self.parse_line(self.fp.next())
bd223d9b126ea58264001a696c0eecaa6986fd40 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/bd223d9b126ea58264001a696c0eecaa6986fd40/compatcsv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 327, 365, 18, 2670, 67, 1369, 12, 2890, 18, 7944, 18, 4285, 10756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1024, 12, 2890, 4672, 327, 365, 18, 2670, 67, 1369, 12, 2890, 18, 7944, 18, 4285, 10756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self._out.write(' %s=%s' % (name, quoteattr(value))) self._out.write('>')
self._write(' %s=%s' % (name, quoteattr(value))) self._write('>')
def startElement(self, name, attrs): self._out.write('<' + name) for (name, value) in attrs.items(): self._out.write(' %s=%s' % (name, quoteattr(value))) self._out.write('>')
cb328763261cc3b346c08d4105ffc5bb02350316 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cb328763261cc3b346c08d4105ffc5bb02350316/saxutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 2890, 16, 508, 16, 3422, 4672, 365, 6315, 659, 18, 2626, 2668, 32, 11, 397, 508, 13, 364, 261, 529, 16, 460, 13, 316, 3422, 18, 3319, 13332, 365, 6315, 659, 18, 2626, 2668...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 2890, 16, 508, 16, 3422, 4672, 365, 6315, 659, 18, 2626, 2668, 32, 11, 397, 508, 13, 364, 261, 529, 16, 460, 13, 316, 3422, 18, 3319, 13332, 365, 6315, 659, 18, 2626, 2668...
sage: m = matrix(3, lambda i,j: i-j)
sage: m = matrix(3, lambda i,j: i-j); m
def matrix(*args, **kwds): """ Create a matrix. INPUT: The matrix command takes the entries of a matrix, optionally preceded by a ring and the dimensions of the matrix, and returns a matrix. The entries of a matrix can be specified as a flat list of elements, a list of lists (i.e., a list of rows), a list of Sage vectors, a callable object, or a dictionary having positions as keys and matrix entries as values (see the examples). If you pass in a callable object, then you must specify the number of rows and columns. You can create a matrix of zeros by passing an empty list or the integer zero for the entries. To construct a multiple of the identity (`cI`), you can specify square dimensions and pass in `c`. Calling matrix() with a Sage object may return something that makes sense. Calling matrix() with a NumPy array will convert the array to a matrix. The ring, number of rows, and number of columns of the matrix can be specified by setting the ring, nrows, or ncols parameters or by passing them as the first arguments to the function in the order ring, nrows, ncols. The ring defaults to ZZ if it is not specified or cannot be determined from the entries. If the numbers of rows and columns are not specified and cannot be determined, then an empty 0x0 matrix is returned. - ``ring`` - the base ring for the entries of the matrix. - ``nrows`` - the number of rows in the matrix. - ``ncols`` - the number of columns in the matrix. - ``sparse`` - create a sparse matrix. This defaults to True when the entries are given as a dictionary, otherwise defaults to False. OUTPUT: a matrix EXAMPLES:: sage: m=matrix(2); m; m.parent() [0 0] [0 0] Full MatrixSpace of 2 by 2 dense matrices over Integer Ring :: sage: m=matrix(2,3); m; m.parent() [0 0 0] [0 0 0] Full MatrixSpace of 2 by 3 dense matrices over Integer Ring :: sage: m=matrix(QQ,[[1,2,3],[4,5,6]]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Rational Field :: sage: m = matrix(QQ, 3, 3, lambda i, j: i+j); m [0 1 2] [1 2 3] [2 3 4] sage: m = matrix(3, lambda i,j: i-j) [ 0 -1 -2] [ 1 0 -1] [ 2 1 0] :: sage: v1=vector((1,2,3)) sage: v2=vector((4,5,6)) sage: m=matrix([v1,v2]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Integer Ring :: sage: m=matrix(QQ,2,[1,2,3,4,5,6]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Rational Field :: sage: m=matrix(QQ,2,3,[1,2,3,4,5,6]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Rational Field :: sage: m=matrix({(0,1): 2, (1,1):2/5}); m; m.parent() [ 0 2] [ 0 2/5] Full MatrixSpace of 2 by 2 sparse matrices over Rational Field :: sage: m=matrix(QQ,2,3,{(1,1): 2}); m; m.parent() [0 0 0] [0 2 0] Full MatrixSpace of 2 by 3 sparse matrices over Rational Field :: sage: import numpy sage: n=numpy.array([[1,2],[3,4]],float) sage: m=matrix(n); m; m.parent() [1.0 2.0] [3.0 4.0] Full MatrixSpace of 2 by 2 dense matrices over Real Double Field :: sage: v = vector(ZZ, [1, 10, 100]) sage: m=matrix(v); m; m.parent() [ 1 10 100] Full MatrixSpace of 1 by 3 dense matrices over Integer Ring sage: m=matrix(GF(7), v); m; m.parent() [1 3 2] Full MatrixSpace of 1 by 3 dense matrices over Finite Field of size 7 :: sage: g = graphs.PetersenGraph() sage: m = matrix(g); m; m.parent() [0 1 0 0 1 1 0 0 0 0] [1 0 1 0 0 0 1 0 0 0] [0 1 0 1 0 0 0 1 0 0] [0 0 1 0 1 0 0 0 1 0] [1 0 0 1 0 0 0 0 0 1] [1 0 0 0 0 0 0 1 1 0] [0 1 0 0 0 0 0 0 1 1] [0 0 1 0 0 1 0 0 0 1] [0 0 0 1 0 1 1 0 0 0] [0 0 0 0 1 0 1 1 0 0] Full MatrixSpace of 10 by 10 dense matrices over Integer Ring :: sage: matrix(ZZ, 10, 10, range(100), sparse=True).parent() Full MatrixSpace of 10 by 10 sparse matrices over Integer Ring :: sage: R = PolynomialRing(QQ, 9, 'x') sage: A = matrix(R, 3, 3, R.gens()); A [x0 x1 x2] [x3 x4 x5] [x6 x7 x8] sage: det(A) -x2*x4*x6 + x1*x5*x6 + x2*x3*x7 - x0*x5*x7 - x1*x3*x8 + x0*x4*x8 TESTS:: sage: m=matrix(); m; m.parent() [] Full MatrixSpace of 0 by 0 dense matrices over Integer Ring sage: m=matrix(QQ); m; m.parent() [] Full MatrixSpace of 0 by 0 dense matrices over Rational Field sage: m=matrix(QQ,2); m; m.parent() [0 0] [0 0] Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: m=matrix(QQ,2,3); m; m.parent() [0 0 0] [0 0 0] Full MatrixSpace of 2 by 3 dense matrices over Rational Field sage: m=matrix([]); m; m.parent() [] Full MatrixSpace of 0 by 0 dense matrices over Integer Ring sage: m=matrix(QQ,[]); m; m.parent() [] Full MatrixSpace of 0 by 0 dense matrices over Rational Field sage: m=matrix(2,2,1); m; m.parent() [1 0] [0 1] Full MatrixSpace of 2 by 2 dense matrices over Integer Ring sage: m=matrix(QQ,2,2,1); m; m.parent() [1 0] [0 1] Full MatrixSpace of 2 by 2 dense matrices over Rational Field sage: m=matrix(2,3,0); m; m.parent() [0 0 0] [0 0 0] Full MatrixSpace of 2 by 3 dense matrices over Integer Ring sage: m=matrix(QQ,2,3,0); m; m.parent() [0 0 0] [0 0 0] Full MatrixSpace of 2 by 3 dense matrices over Rational Field sage: m=matrix([[1,2,3],[4,5,6]]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Integer Ring sage: m=matrix(QQ,2,[[1,2,3],[4,5,6]]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Rational Field sage: m=matrix(QQ,3,[[1,2,3],[4,5,6]]); m; m.parent() Traceback (most recent call last): ... ValueError: Number of rows does not match up with specified number. sage: m=matrix(QQ,2,3,[[1,2,3],[4,5,6]]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Rational Field sage: m=matrix(QQ,2,4,[[1,2,3],[4,5,6]]); m; m.parent() Traceback (most recent call last): ... ValueError: Number of columns does not match up with specified number. sage: m=matrix([(1,2,3),(4,5,6)]); m; m.parent() [1 2 3] [4 5 6] Full MatrixSpace of 2 by 3 dense matrices over Integer Ring sage: m=matrix([1,2,3,4,5,6]); m; m.parent() [1 2 3 4 5 6] Full MatrixSpace of 1 by 6 dense matrices over Integer Ring sage: m=matrix((1,2,3,4,5,6)); m; m.parent() [1 2 3 4 5 6] Full MatrixSpace of 1 by 6 dense matrices over Integer Ring sage: m=matrix(QQ,[1,2,3,4,5,6]); m; m.parent() [1 2 3 4 5 6] Full MatrixSpace of 1 by 6 dense matrices over Rational Field sage: m=matrix(QQ,3,2,[1,2,3,4,5,6]); m; m.parent() [1 2] [3 4] [5 6] Full MatrixSpace of 3 by 2 dense matrices over Rational Field sage: m=matrix(QQ,2,4,[1,2,3,4,5,6]); m; m.parent() Traceback (most recent call last): ... ValueError: entries has the wrong length sage: m=matrix(QQ,5,[1,2,3,4,5,6]); m; m.parent() Traceback (most recent call last): ... TypeError: entries has the wrong length sage: m=matrix({(1,1): 2}); m; m.parent() [0 0] [0 2] Full MatrixSpace of 2 by 2 sparse matrices over Integer Ring sage: m=matrix(QQ,{(1,1): 2}); m; m.parent() [0 0] [0 2] Full MatrixSpace of 2 by 2 sparse matrices over Rational Field sage: m=matrix(QQ,3,{(1,1): 2}); m; m.parent() [0 0 0] [0 2 0] [0 0 0] Full MatrixSpace of 3 by 3 sparse matrices over Rational Field sage: m=matrix(QQ,3,4,{(1,1): 2}); m; m.parent() [0 0 0 0] [0 2 0 0] [0 0 0 0] Full MatrixSpace of 3 by 4 sparse matrices over Rational Field sage: m=matrix(QQ,2,{(1,1): 2}); m; m.parent() [0 0] [0 2] Full MatrixSpace of 2 by 2 sparse matrices over Rational Field sage: m=matrix(QQ,1,{(1,1): 2}); m; m.parent() Traceback (most recent call last): ... IndexError: invalid entries list sage: m=matrix({}); m; m.parent() [] Full MatrixSpace of 0 by 0 sparse matrices over Integer Ring sage: m=matrix(QQ,{}); m; m.parent() [] Full MatrixSpace of 0 by 0 sparse matrices over Rational Field sage: m=matrix(QQ,2,{}); m; m.parent() [0 0] [0 0] Full MatrixSpace of 2 by 2 sparse matrices over Rational Field sage: m=matrix(QQ,2,3,{}); m; m.parent() [0 0 0] [0 0 0] Full MatrixSpace of 2 by 3 sparse matrices over Rational Field sage: m=matrix(2,{}); m; m.parent() [0 0] [0 0] Full MatrixSpace of 2 by 2 sparse matrices over Integer Ring sage: m=matrix(2,3,{}); m; m.parent() [0 0 0] [0 0 0] Full MatrixSpace of 2 by 3 sparse matrices over Integer Ring sage: m=matrix(0); m; m.parent() [] Full MatrixSpace of 0 by 0 dense matrices over Integer Ring sage: m=matrix(0,2); m; m.parent() [] Full MatrixSpace of 0 by 2 dense matrices over Integer Ring sage: m=matrix(2,0); m; m.parent() [] Full MatrixSpace of 2 by 0 dense matrices over Integer Ring sage: m=matrix(0,[1]); m; m.parent() Traceback (most recent call last): ... ValueError: entries has the wrong length sage: m=matrix(1,0,[]); m; m.parent() [] Full MatrixSpace of 1 by 0 dense matrices over Integer Ring sage: m=matrix(0,1,[]); m; m.parent() [] Full MatrixSpace of 0 by 1 dense matrices over Integer Ring sage: m=matrix(0,[]); m; m.parent() [] Full MatrixSpace of 0 by 0 dense matrices over Integer Ring sage: m=matrix(0,{}); m; m.parent() [] Full MatrixSpace of 0 by 0 sparse matrices over Integer Ring sage: m=matrix(0,{(1,1):2}); m; m.parent() Traceback (most recent call last): ... IndexError: invalid entries list sage: m=matrix(2,0,{(1,1):2}); m; m.parent() Traceback (most recent call last): ... IndexError: invalid entries list sage: import numpy sage: n=numpy.array([[numpy.complex(0,1),numpy.complex(0,2)],[3,4]],complex) sage: m=matrix(n); m; m.parent() [1.0*I 2.0*I] [ 3.0 4.0] Full MatrixSpace of 2 by 2 dense matrices over Complex Double Field sage: n=numpy.array([[1,2],[3,4]],'int32') sage: m=matrix(n); m; m.parent() [1 2] [3 4] Full MatrixSpace of 2 by 2 dense matrices over Integer Ring sage: n = numpy.array([[1,2,3],[4,5,6],[7,8,9]],'float32') sage: m=matrix(n); m; m.parent() [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] Full MatrixSpace of 3 by 3 dense matrices over Real Double Field sage: n=numpy.array([[1,2,3],[4,5,6],[7,8,9]],'float64') sage: m=matrix(n); m; m.parent() [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] Full MatrixSpace of 3 by 3 dense matrices over Real Double Field sage: n=numpy.array([[1,2,3],[4,5,6],[7,8,9]],'complex64') sage: m=matrix(n); m; m.parent() [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] Full MatrixSpace of 3 by 3 dense matrices over Complex Double Field sage: n=numpy.array([[1,2,3],[4,5,6],[7,8,9]],'complex128') sage: m=matrix(n); m; m.parent() [1.0 2.0 3.0] [4.0 5.0 6.0] [7.0 8.0 9.0] Full MatrixSpace of 3 by 3 dense matrices over Complex Double Field sage: a = matrix([[1,2],[3,4]]) sage: b = matrix(a.numpy()); b [1 2] [3 4] sage: a == b True sage: c = matrix(a.numpy('float32')); c [1.0 2.0] [3.0 4.0] sage: matrix(numpy.array([[5]])) [5] sage: v = vector(ZZ, [1, 10, 100]) sage: m=matrix(ZZ['x'], v); m; m.parent() [ 1 10 100] Full MatrixSpace of 1 by 3 dense matrices over Univariate Polynomial Ring in x over Integer Ring sage: matrix(ZZ, 10, 10, range(100)).parent() Full MatrixSpace of 10 by 10 dense matrices over Integer Ring sage: m = matrix(GF(7), [[1/3,2/3,1/2], [3/4,4/5,7]]); m; m.parent() [5 3 4] [6 5 0] Full MatrixSpace of 2 by 3 dense matrices over Finite Field of size 7 sage: m = matrix([[1,2,3], [RDF(2), CDF(1,2), 3]]); m; m.parent() [ 1.0 2.0 3.0] [ 2.0 1.0 + 2.0*I 3.0] Full MatrixSpace of 2 by 3 dense matrices over Complex Double Field sage: m=matrix(3,3,1/2); m; m.parent() [1/2 0 0] [ 0 1/2 0] [ 0 0 1/2] Full MatrixSpace of 3 by 3 dense matrices over Rational Field sage: matrix([[1],[2,3]]) Traceback (most recent call last): ... ValueError: List of rows is not valid (rows are wrong types or lengths) sage: matrix([[1],2]) Traceback (most recent call last): ... ValueError: List of rows is not valid (rows are wrong types or lengths) sage: matrix(vector(RR,[1,2,3])).parent() Full MatrixSpace of 1 by 3 dense matrices over Real Field with 53 bits of precision AUTHORS: - ??: Initial implementation - Jason Grout (2008-03): almost a complete rewrite, with bits and pieces from the original implementation """ args = list(args) sparse = kwds.get('sparse',False) # if the first object already knows how to make itself into a # matrix, try that, defaulting to a matrix over the integers. if len(args) == 1 and hasattr(args[0], '_matrix_'): try: return args[0]._matrix_(sparse=sparse) except TypeError: return args[0]._matrix_() elif len(args) == 2: if hasattr(args[0], '_matrix_'): try: return args[0]._matrix_(args[1], sparse=sparse) except TypeError: return args[0]._matrix_(args[1]) elif hasattr(args[1], '_matrix_'): try: return args[1]._matrix_(args[0], sparse=sparse) except TypeError: return args[1]._matrix_(args[0]) if len(args) == 0: # if nothing was passed return the empty matrix over the # integer ring. return matrix_space.MatrixSpace(rings.ZZ, 0, 0, sparse=sparse)([]) if len(args) >= 1 and rings.is_Ring(args[0]): # A ring is specified if kwds.get('ring', args[0]) != args[0]: raise ValueError, "Specified rings are not the same" else: ring = args[0] args.pop(0) else: ring = kwds.get('ring', None) if len(args) >= 1: # check to see if the number of rows is specified try: import numpy if isinstance(args[0], numpy.ndarray): raise TypeError nrows = int(args[0]) args.pop(0) if kwds.get('nrows', nrows) != nrows: raise ValueError, "Number of rows specified in two places and they are not the same" except TypeError: nrows = kwds.get('nrows', None) else: nrows = kwds.get('nrows', None) if len(args) >= 1: # check to see if additionally, the number of columns is specified try: import numpy if isinstance(args[0], numpy.ndarray): raise TypeError ncols = int(args[0]) args.pop(0) if kwds.get('ncols', ncols) != ncols: raise ValueError, "Number of columns specified in two places and they are not the same" except TypeError: ncols = kwds.get('ncols', None) else: ncols = kwds.get('ncols', None) # Now we've taken care of initial ring, nrows, and ncols arguments. # We've also taken care of the Sage object case. # Now the rest of the arguments are a list of rows, a flat list of # entries, a callable, a dict, a numpy array, or a single value. if len(args) == 0: # If no entries are specified, pass back a zero matrix entries = 0 entry_ring = rings.ZZ elif len(args) == 1: if isinstance(args[0], (types.FunctionType, types.LambdaType, types.MethodType)): if ncols is None and nrows is None: raise ValueError, "When passing in a callable, the dimensions of the matrix must be specified" if ncols is None: ncols = nrows else: nrows = ncols f = args[0] args[0] = [[f(i,j) for j in range(ncols)] for i in range(nrows)] if isinstance(args[0], (list, tuple)): if len(args[0]) == 0: # no entries are specified, pass back the zero matrix entries = 0 entry_ring = rings.ZZ elif isinstance(args[0][0], (list, tuple)) or is_Vector(args[0][0]): # Ensure we have a list of lists, each inner list having the same number of elements first_len = len(args[0][0]) if not all( (isinstance(v, (list, tuple)) or is_Vector(v)) and len(v) == first_len for v in args[0]): raise ValueError, "List of rows is not valid (rows are wrong types or lengths)" # We have a list of rows or vectors if nrows is None: nrows = len(args[0]) elif nrows != len(args[0]): raise ValueError, "Number of rows does not match up with specified number." if ncols is None: ncols = len(args[0][0]) elif ncols != len(args[0][0]): raise ValueError, "Number of columns does not match up with specified number." entries = sum([list(v) for v in args[0]], []) else: # We have a flat list; figure out nrows and ncols if nrows is None: nrows = 1 if nrows > 0: if ncols is None: ncols = len(args[0]) // nrows elif ncols != len(args[0]) // nrows: raise ValueError, "entries has the wrong length" elif len(args[0]) > 0: raise ValueError, "entries has the wrong length" entries = args[0] if nrows > 0 and ncols > 0 and ring is None: entries, ring = prepare(entries) elif isinstance(args[0], dict): # We have a dictionary # default to sparse sparse = kwds.get('sparse', True) if len(args[0]) == 0: # no entries are specified, pass back the zero matrix entries = 0 else: entries, entry_ring = prepare_dict(args[0]) if nrows is None: nrows = nrows_from_dict(entries) ncols = ncols_from_dict(entries) # note that ncols can still be None if nrows is set -- # it will be assigned nrows down below. # See the construction after the numpy case below. else: import numpy if isinstance(args[0], numpy.ndarray): num_array = args[0] str_dtype = str(num_array.dtype) if not( num_array.flags.c_contiguous is True or num_array.flags.f_contiguous is True): raise TypeError('numpy matrix must be either c_contiguous or f_contiguous') if str_dtype.count('float32')==1: m=matrix(RDF,num_array.shape[0],num_array.shape[1],0) m._replace_self_with_numpy32(num_array) elif str_dtype.count('float64')==1: m=matrix(RDF,num_array.shape[0],num_array.shape[1],0) m._replace_self_with_numpy(num_array) elif str_dtype.count('complex64')==1: m=matrix(CDF,num_array.shape[0],num_array.shape[1],0) m._replace_self_with_numpy32(num_array) elif str_dtype.count('complex128')==1: m=matrix(CDF,num_array.shape[0],num_array.shape[1],0) m._replace_self_with_numpy(num_array) elif str_dtype.count('int') == 1: m = matrix(ZZ, [list(row) for row in list(num_array)]) elif str_dtype.count('object') == 1: #Get the raw nested list from the numpy array #and feed it back into matrix try: return matrix( [list(row) for row in list(num_array)]) except TypeError: raise TypeError("cannot convert NumPy matrix to Sage matrix") else: raise TypeError("cannot convert NumPy matrix to Sage matrix") return m elif nrows is not None and ncols is not None: # assume that we should just pass the thing into the # MatrixSpace constructor and hope for the best # This is not documented, but it is doctested if ring is None: entry_ring = args[0].parent() entries = args[0] else: raise ValueError, "Invalid matrix constructor. Type matrix? for help" else: raise ValueError, "Invalid matrix constructor. Type matrix? for help" if nrows is None: nrows = 0 if ncols is None: ncols = nrows if ring is None: try: ring = entry_ring except NameError: ring = rings.ZZ return matrix_space.MatrixSpace(ring, nrows, ncols, sparse=sparse)(entries)
4030367e5d70ad437a6627f16cbfce35bc5d5e1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/4030367e5d70ad437a6627f16cbfce35bc5d5e1b/constructor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 30857, 1968, 16, 2826, 25577, 4672, 3536, 1788, 279, 3148, 18, 225, 12943, 30, 1021, 3148, 1296, 5530, 326, 3222, 434, 279, 3148, 16, 8771, 29953, 635, 279, 9221, 471, 326, 5769, 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, 3148, 30857, 1968, 16, 2826, 25577, 4672, 3536, 1788, 279, 3148, 18, 225, 12943, 30, 1021, 3148, 1296, 5530, 326, 3222, 434, 279, 3148, 16, 8771, 29953, 635, 279, 9221, 471, 326, 5769, 4...
evaluatable in the globals of __main__, it will be evaluated and its attributes (as revealed by dir()) are used as possible completions. (For class instances, class members are are also considered.)
evaluatable in self.namespace, it will be evaluated and its attributes (as revealed by dir()) are used as possible completions. (For class instances, class members are are also considered.)
def attr_matches(self, text): """Compute matches when text contains a dot.
dbab3e3178d8819a839ad08571f995376edcba00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/dbab3e3178d8819a839ad08571f995376edcba00/rlcompleter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1604, 67, 8436, 12, 2890, 16, 977, 4672, 3536, 7018, 1885, 1347, 977, 1914, 279, 3928, 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,...
[ 1, 1, 1, 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, 1604, 67, 8436, 12, 2890, 16, 977, 4672, 3536, 7018, 1885, 1347, 977, 1914, 279, 3928, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
if (os.path.islink(sys.executable)): SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) else: SDK["PYTHONEXEC"] = sys.executable
def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): SDK["PYTHON"] += "-x64" SDK["PYTHONEXEC"] = SDK["PYTHON"] + "/python" if (GetOptimize() <= 2): SDK["PYTHONEXEC"] += "_d.exe" else: SDK["PYTHONEXEC"] += ".exe" if (not os.path.isfile(SDK["PYTHONEXEC"])): exit("Could not find %s!" % SDK["PYTHONEXEC"]) os.system(SDK["PYTHONEXEC"].replace("/", "\\") + " -V > "+OUTPUTDIR+"/tmp/pythonversion 2>&1") pv=ReadFile(OUTPUTDIR+"/tmp/pythonversion") if (pv.startswith("Python ")==0): exit("python -V did not produce the expected output") pv = pv[7:10] SDK["PYTHONVERSION"]="python"+pv elif (sys.platform == "win32"): SDK["PYTHON"] = os.path.dirname(sysconfig.get_python_inc()) SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable elif (sys.platform == "darwin"): SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) elif (sys.platform == "darwin"): SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
2ca86338332ec66ee319f80f1313d69753a8228b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/2ca86338332ec66ee319f80f1313d69753a8228b/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 15774, 12, 5734, 67, 1202, 67, 9499, 67, 17751, 273, 1083, 4672, 309, 261, 11264, 6368, 2932, 16235, 20131, 7923, 631, 20, 4672, 309, 261, 9499, 18, 9898, 422, 315, 8082...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 15774, 12, 5734, 67, 1202, 67, 9499, 67, 17751, 273, 1083, 4672, 309, 261, 11264, 6368, 2932, 16235, 20131, 7923, 631, 20, 4672, 309, 261, 9499, 18, 9898, 422, 315, 8082...
_HttpServerRequestExecutor(self, connection, client_addr)
self.request_executor(self, connection, client_addr)
def _IncomingConnection(self): """Called for each incoming connection
1f8588f6691bae503f7deb3e07278f1df8f48b00 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/1f8588f6691bae503f7deb3e07278f1df8f48b00/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 20370, 1952, 12, 2890, 4672, 3536, 8185, 364, 1517, 6935, 1459, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 20370, 1952, 12, 2890, 4672, 3536, 8185, 364, 1517, 6935, 1459, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return utils.getProcessOutput(getTrialPath(), args=args, errortoo=1,
params = [ '-c', 'from twisted.scripts.trial import run; run()' ] params.extend(args) return utils.getProcessOutput(sys.executable, args=params, errortoo=1,
def runTrialWithEnv(env, *args): return utils.getProcessOutput(getTrialPath(), args=args, errortoo=1, env=env)
385bb0fcea4b2de5eb215b831ad577f7f549b7e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/385bb0fcea4b2de5eb215b831ad577f7f549b7e0/test_output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6251, 287, 1190, 3491, 12, 3074, 16, 380, 1968, 4672, 859, 273, 306, 2400, 71, 2187, 296, 2080, 2339, 25444, 18, 12827, 18, 17493, 1930, 1086, 31, 1086, 11866, 308, 859, 18, 14313,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 6251, 287, 1190, 3491, 12, 3074, 16, 380, 1968, 4672, 859, 273, 306, 2400, 71, 2187, 296, 2080, 2339, 25444, 18, 12827, 18, 17493, 1930, 1086, 31, 1086, 11866, 308, 859, 18, 14313,...
elif label == 'Unsure':
elif buttonLabel == 'Unsure':
def appendMessages(self, lines, keyedMessages, label): """Appends the lines of a table of messages to 'lines'.""" buttons = \ """<input type='radio' name='classify:%s:%s' value='discard'>&nbsp; <input type='radio' name='classify:%s:%s' value='defer' %s>&nbsp; <input type='radio' name='classify:%s:%s' value='ham' %s>&nbsp; <input type='radio' name='classify:%s:%s' value='spam' %s>""" stripe = 0 for key, message in keyedMessages: # Parse the message and get the relevant headers and the first # part of the body if we can. subject = self.trimAndQuote(message["Subject"] or "(none)", 50) from_ = self.trimAndQuote(message["From"] or "(none)", 40) try: part = typed_subpart_iterator(message, 'text', 'plain').next() text = part.get_payload() except StopIteration: try: part = typed_subpart_iterator(message, 'text', 'html').next() text = part.get_payload() text, _ = tokenizer.crack_html_style(text) text, _ = tokenizer.crack_html_comment(text) text = tokenizer.html_re.sub(' ', text) text = '(this message only has an HTML body)\n' + text except StopIteration: text = '(this message has no text body)' text = text.replace('&nbsp;', ' ') # Else they'll be quoted text = re.sub(r'(\s)\s+', r'\1', text) # Eg. multiple blank lines text = self.trimAndQuote(text.strip(), 200, True)
d319917072174781f46b53caa571a8bdd023d80f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/d319917072174781f46b53caa571a8bdd023d80f/proxytrainer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 5058, 12, 2890, 16, 2362, 16, 17408, 5058, 16, 1433, 4672, 3536, 15049, 326, 2362, 434, 279, 1014, 434, 2743, 358, 296, 3548, 11, 12123, 9502, 273, 521, 3536, 32, 2630, 618, 2218, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 5058, 12, 2890, 16, 2362, 16, 17408, 5058, 16, 1433, 4672, 3536, 15049, 326, 2362, 434, 279, 1014, 434, 2743, 358, 296, 3548, 11, 12123, 9502, 273, 521, 3536, 32, 2630, 618, 2218, ...
reportfilename = \ JobHandling.archiveJob("Failed", job, reportfilename)
reportfilename = self.jobHandling.archiveJob( "Failed", job, reportfilename )
def publishJobFailed(self, job, reportfilename): """ __publishJobFailed__ """
ce74f7cf6b70c2ae34dfbc0733f261cf20e1fae2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/ce74f7cf6b70c2ae34dfbc0733f261cf20e1fae2/GetOutputComponent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 2278, 2925, 12, 2890, 16, 1719, 16, 2605, 3459, 4672, 3536, 1001, 6543, 2278, 2925, 972, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 2278, 2925, 12, 2890, 16, 1719, 16, 2605, 3459, 4672, 3536, 1001, 6543, 2278, 2925, 972, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print header
self.stdout.write("%s\n"%str(header))
def print_topics(self, header, cmds, cmdlen, maxcol): if cmds: print header if self.ruler: print self.ruler * len(header) self.columnize(cmds, maxcol-1) print
156c8cacd5b24e96aca73a09979e4d4cc9691d70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/156c8cacd5b24e96aca73a09979e4d4cc9691d70/cmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 17905, 12, 2890, 16, 1446, 16, 13446, 16, 1797, 1897, 16, 943, 1293, 4672, 309, 13446, 30, 365, 18, 10283, 18, 2626, 27188, 87, 64, 82, 28385, 701, 12, 3374, 3719, 309, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 17905, 12, 2890, 16, 1446, 16, 13446, 16, 1797, 1897, 16, 943, 1293, 4672, 309, 13446, 30, 365, 18, 10283, 18, 2626, 27188, 87, 64, 82, 28385, 701, 12, 3374, 3719, 309, 365, ...
if event in ( PLAY_END, USER_END ) and self.repeat == REPEAT_ITEM: self.current_item.play()
if event == PLAY_END: if self.repeat == REPEAT_ITEM: self.__current.play() elif self.__next: self.__current = self.__next Playlist.play(self, True) else: self.stop() eventhandler.post(Event(PLAY_END, self))
def eventhandler(self, event, menuw=None): """ Handle playlist specific events """
5949d6a14c5ea1900f65dfd873a7ac49fa7e8687 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/5949d6a14c5ea1900f65dfd873a7ac49fa7e8687/playlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 16, 3824, 91, 33, 7036, 4672, 3536, 5004, 16428, 2923, 2641, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 16, 3824, 91, 33, 7036, 4672, 3536, 5004, 16428, 2923, 2641, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def log_fct(self, db, uid, passwd, object, method, fct_src, *args):
def log_fct(self, db, uid, object, method, fct_src, *args):
def log_fct(self, db, uid, passwd, object, method, fct_src, *args): logged_uids = [] pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() obj=pool.get(object) object_name=obj._name obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)]) model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0] if method in ('create'): res_id = fct_src( db, uid, passwd, object, method, *args) cr.commit() new_value=pool.get(model_object.model).read(cr,uid,[res_id],args[0].keys())[0] if 'id' in new_value: del new_value['id'] if not len(logged_uids) or uid in logged_uids: resource_name = pool.get(model_object.model).name_get(cr,uid,[res_id]) resource_name = resource_name and resource_name[0][1] or '' id=pool.get('audittrail.log').create(cr, uid, {"method": method , "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name}) lines=[] for field in new_value: if new_value[field]: line={ 'name':field, 'new_value':new_value[field], 'new_value_text': self.get_value_text(cr,uid,field,new_value[field],model_object) } lines.append(line) self.create_log_line(cr,uid,id,model_object,lines) cr.commit() cr.close() return res_id
d8781cd0f2eee29372e5a54862aa63c732ae3150 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d8781cd0f2eee29372e5a54862aa63c732ae3150/audittrail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 67, 74, 299, 12, 2890, 16, 1319, 16, 4555, 16, 733, 16, 707, 16, 28478, 67, 4816, 16, 380, 1968, 4672, 7545, 67, 21428, 273, 5378, 2845, 273, 2845, 264, 18, 588, 67, 6011, 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, 613, 67, 74, 299, 12, 2890, 16, 1319, 16, 4555, 16, 733, 16, 707, 16, 28478, 67, 4816, 16, 380, 1968, 4672, 7545, 67, 21428, 273, 5378, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, ...
print "TempStyle:", tempstyle
def scatter_plot(group_info,scatter_info,data_set): #data_set is a dictionary keyed by quantity containing lists of groups and X and Y data points. #print "Group Info:", group_info for quantity_number in scatter_info: #print "Dataset for quantity number "+str(quantity_number)+": ", data_set[quantity_number] if data_set[quantity_number] == []: print "No Scatter Plot Data in Quantity "+str(quantity_number)+" Dataset.\n" else: print "Scatter Plot Data for Quantity "+str(quantity_number)+" Dataset." # Set variables for Plot extracted from the first group of lines in config file starting with 'q'. # Variables for plot. plot_title = scatter_info[int(quantity_number)]['Scatter_Plot_Title'] print plot_title x_title = scatter_info[int(quantity_number)]['X_Title'] y_title = scatter_info[int(quantity_number)]['Y_Title'] min_x = float(scatter_info[int(quantity_number)]['Plot_Min']) #print min_x max_x = float(scatter_info[int(quantity_number)]['Plot_Max']) #print max_x min_y = float(scatter_info[int(quantity_number)]['Plot_Min']) max_y = float(scatter_info[int(quantity_number)]['Plot_Max']) percent_error = int(scatter_info[int(quantity_number)]['%error']) title_quadrant = int(scatter_info[int(quantity_number)]['Title_Quadrant']) key_pos = scatter_info[int(quantity_number)]['Key_Position'] key_dist = 0.2*unit.v_cm plot_width = int(scatter_info[int(quantity_number)]['Plot_Width(cm)']) #Create filename from fields in input file record. plot_file_name = scatter_info[int(quantity_number)]['Plot_Filename'] #print plot_file_name # Determine the location for the key, alignment based on key_quadrant setting. if key_pos == "tl" or "tc" or "tr" or "ml" or "mc" or "mr" or "bl" or "bc" or "br": () #print "Key Position =", key_pos else: print "The key position was not specified./nUsing the default bottom right position." key_pos = "br" #Begin Plotting #print exp_data #print mod_data # Initialize graph object g = graph.graphxy(width=plot_width, ratio=1/1, key=graph.key.key(pos=key_pos, dist=key_dist), x=graph.axis.linear(title=x_title, min=min_x, max=max_x), y=graph.axis.linear(title=y_title, min=min_y, max=max_y)) #Plot Midline and Error bounds lines. errorLineCenterPoints = [[min_x,min_y],[max_x,max_y]] #print errorLineCenterPoints lower_bound = max_y - max_y * percent_error / 100 #print lower_bound errorLineLowerPoints = [[min_x,min_y],[max_x,lower_bound]] #print errorLineLowerPoints upper_bound = max_y + max_y * percent_error / 100.0 #print upper_bound errorLineUpperPoints = [[min_x,min_y],[max_x,upper_bound]] #print errorLineUpperPoints g.plot(graph.data.points(errorLineCenterPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.solid])]) g.plot(graph.data.points(errorLineLowerPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) g.plot(graph.data.points(errorLineUpperPoints, title=None, x=1, y=2), [graph.style.line([style.linewidth.Thin, style.linestyle.dashed])]) # mystyle = graph.style.symbol(graph.style.symbol.changetriangletwice, size=0.1*unit.v_cm, # symbolattrs=[graph.style.symbol.changefilledstroked, # attr.changelist([color.rgb.red, color.rgb.green, color.rgb.blue])]) #One point at a time added to plot from each data set. # Iterate over items in scatter data dictionary key for items that are not []. # Append data sets to scatter_plot_data_list # colors for symbols are from http://pyx.sourceforge.net/manual/colorname.html scatter_plot_data_list = [] grouped_data = {} grouped_data_list = range(len(group_quantity_data_dicts[0])+1) #print "Grouped Data List:", grouped_data_list #print "DataSet for Quantity "+str(quantity_number)+":", data_set[quantity_number] if len(data_set[quantity_number]) > 1: #print "Grouped Scatter Data:" #print data_set[quantity_number] for arr_temp in grouped_data_list: grouped_data_list[arr_temp] = [] for data_set_item in data_set[quantity_number]: #print data_set_item #print "Data for group "+data_set_item[0]+":", data_set_item[1] grouped_data_list[int(data_set_item[0])].append(data_set_item[1]) print "Grouped data list:", grouped_data_list #g.plot(graph.data.points(scatter_plot_data, x=1, y=2, title=group_info[int(data_set[quantity_number][0][0])]["Group_Title"]), [mystyle]) group_counter = 0 for j in grouped_data_list: print "J =", j if j != []: print group_counter # Pull group symbol specifications from config file. config_group_symbol = group_info[group_counter]["Symbol"] #print config_group_symbol group_symbol = "graph.style.symbol."+config_group_symbol #print group_symbol config_group_symbol_color = group_info[group_counter]["Color"] #print config_group_symbol_color #group_color = "color.rgb."+config_group_symbol_color config_group_symbol_filled = group_info[group_counter]["Filled"] #print config_group_symbol_filled if config_group_symbol_filled == 'yes': fillstyle = "deco.filled([color.rgb."+config_group_symbol_color+"])" else: fillstyle = "deco.stroked([color.rgb."+config_group_symbol_color+"])" print group_symbol, fillstyle #Create temporary symbol style. tempstyle = "graph.style.symbol("+group_symbol+", size=0.1*unit.v_cm, symbolattrs=["+fillstyle+"])" print "TempStyle:", tempstyle scatterpointstyle = eval(tempstyle) #print group_info[group_counter]["Group_Title"] g.plot(graph.data.points(j, x=1, y=2, title=group_info[group_counter]["Group_Title"]), [scatterpointstyle]) else: pass group_counter = group_counter + 1 else: print "Non-Grouped Scatter Data:" print data_set[quantity_number] scatter_plot_data = [] scatter_plot_data.append(data_set[quantity_number][0][1]) print scatter_plot_data #print grouped_data_list # Now plot the Title text, alignment based on title quadrant setting. if title_quadrant == 1: g.text(0.1, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.small]) elif title_quadrant == 2: g.text(g.width-0.1, g.height - 0.2, plot_title, [text.halign.right, text.valign.top, text.size.normalsize]) elif title_quadrant == 3: g.text(0.1, 0.2, plot_title, [text.halign.left, text.valign.bottom, text.size.normalsize]) elif title_quadrant == 4: g.text(g.width-0.1, 0.2, plot_title, [text.halign.right, text.valign.bottom, text.size.normalsize]) else: print "A title location was not specified./nUsing the default top left quadrant." g.text(0.1, g.height - 0.2, plot_title, [text.halign.left, text.valign.top, text.size.small]) # Write the output plot_file_path = output_directory+plot_file_name #print plot_file_path g.writePDFfile(plot_file_path) print "Plot to: \n", plot_file_path+".PDF\n"
ad91d4eb3f67d10bfa5d623cd1280d36462603e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/ad91d4eb3f67d10bfa5d623cd1280d36462603e1/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 67, 4032, 12, 1655, 67, 1376, 16, 31320, 67, 1376, 16, 892, 67, 542, 4672, 468, 892, 67, 542, 353, 279, 3880, 17408, 635, 10457, 4191, 6035, 434, 3252, 471, 1139, 471, 1624, 501...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14644, 67, 4032, 12, 1655, 67, 1376, 16, 31320, 67, 1376, 16, 892, 67, 542, 4672, 468, 892, 67, 542, 353, 279, 3880, 17408, 635, 10457, 4191, 6035, 434, 3252, 471, 1139, 471, 1624, 501...
mappedVariableContent += " %s%s\n"%(value, sep)
mappedVariableContent += " %s%s%s\n"%(value, sep, comment)
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexes rangelist = [idx for name,idx in Manager.GetCurrentValidIndexes(0, 0x260)] listIndex = [idx for name,idx in Manager.GetCurrentValidIndexes(0x1000, 0xFFFF)] communicationlist = [idx for name,idx in Manager.GetCurrentValidIndexes(0x1000, 0x11FF)] sdolist = [idx for name,idx in Manager.GetCurrentValidIndexes(0x1200, 0x12FF)] pdolist = [idx for name,idx in Manager.GetCurrentValidIndexes(0x1400, 0x1BFF)] variablelist = [idx for name,idx in Manager.GetCurrentValidIndexes(0x2000, 0xBFFF)]
2a73b36861102cb231f23799169e0e6af21a8af9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11017/2a73b36861102cb231f23799169e0e6af21a8af9/gen_cfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 25391, 12, 1318, 16, 1446, 10561, 4672, 2552, 618, 15219, 273, 2618, 15219, 9614, 1896, 14625, 2338, 1938, 11929, 273, 374, 15219, 9614, 18948, 6, 6487, 15219, 9614, 22229, 6, 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, 6654, 25391, 12, 1318, 16, 1446, 10561, 4672, 2552, 618, 15219, 273, 2618, 15219, 9614, 1896, 14625, 2338, 1938, 11929, 273, 374, 15219, 9614, 18948, 6, 6487, 15219, 9614, 22229, 6, 6487, ...
DebugPrint(1, 'Disconnected from ' + Config.get_SSLHost() + '/jclarens/xmlrpc' )
DebugPrint(1, 'Disconnected from ' + Config.get_SSLHost() )
def __disconnect(): global __connection global __connected try: if Config.get_UseSSL() != 0 and __connected == 1: __connection.system.logout() __connected = 0 DebugPrint(1, 'Disconnected from ' + Config.get_SSLHost() + '/jclarens/xmlrpc' ) except: DebugPrint(0, 'Failed to disconnect from ' + Config.get_SSLHost() + ': ', sys.exc_info(),"--",sys.exc_info()[0],"++",sys.exc_info()[1])
968c35ddfa0cb0bef8b4d62d805134a0ec082982 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/637/968c35ddfa0cb0bef8b4d62d805134a0ec082982/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 20177, 13332, 2552, 1001, 4071, 2552, 1001, 8537, 225, 775, 30, 309, 1903, 18, 588, 67, 3727, 6745, 1435, 480, 374, 471, 1001, 8537, 422, 404, 30, 1001, 4071, 18, 4299, 18, 21229, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 20177, 13332, 2552, 1001, 4071, 2552, 1001, 8537, 225, 775, 30, 309, 1903, 18, 588, 67, 3727, 6745, 1435, 480, 374, 471, 1001, 8537, 422, 404, 30, 1001, 4071, 18, 4299, 18, 21229, ...
special_position_indices=special_position_indices)
special_position_indices=special_position_indices, broken_bond_i_seq_pairs=broken_bond_i_seq_pairs)
def use_scattering_type_if_available_to_define_nonbonded_type(): if (residue.iselection.size() != 1): return False i_seq = residue.iselection[0] atom = stage_1.atom_attributes_list[i_seq] key = atom.element.strip().upper() if (key not in ad_hoc_single_atom_residue_element_types): return False entry = ener_lib.lib_atom.get(key, None) if (entry is None): return False scattering_type_registry.assign_directly( i_seq=i_seq, symbol=key) nonbonded_energy_type_registry.assign_directly( i_seq=i_seq, symbol=key) ad_hoc_single_atom_residues[mm.residue_name] += 1 return True
b658df9726b7aae32f2fe28cdcb3e4e5459f257c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/b658df9726b7aae32f2fe28cdcb3e4e5459f257c/pdb_interpretation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 999, 67, 31320, 310, 67, 723, 67, 430, 67, 5699, 67, 869, 67, 11255, 67, 5836, 18688, 785, 67, 723, 13332, 309, 261, 23388, 18, 291, 292, 794, 18, 1467, 1435, 480, 404, 4672, 327, 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, 999, 67, 31320, 310, 67, 723, 67, 430, 67, 5699, 67, 869, 67, 11255, 67, 5836, 18688, 785, 67, 723, 13332, 309, 261, 23388, 18, 291, 292, 794, 18, 1467, 1435, 480, 404, 4672, 327, 10...
def GothamLibrary(t, sources): releaseEnv = GothamReleaseEnvironment() if os.name == 'posix': releaseEnv.Library(t, sources) elif os.name == 'nt': releaseLib = releaseEnv.Library(t, sources) def GothamSharedLibrary(t, sources): releaseEnv = GothamReleaseEnvironment() if os.name == 'posix': releaseEnv.SharedLibrary(t, sources) elif os.name == 'nt': releaseLib = releaseEnv.SharedLibrary(t, sources)
def GothamLibrary(t, sources): #debugEnv = GothamDebugEnvironment() releaseEnv = GothamReleaseEnvironment() if os.name == 'posix': releaseEnv.Library(t, sources) elif os.name == 'nt': releaseLib = releaseEnv.Library(t, sources) #debugLib = debugEnv.Library(t + 'd', sources)
2b3d38822eba54e75140153fc7aa14bf84972957 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11657/2b3d38822eba54e75140153fc7aa14bf84972957/build-env.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 611, 10370, 301, 9313, 12, 88, 16, 5550, 4672, 468, 4148, 3491, 273, 611, 10370, 301, 2829, 5494, 1435, 3992, 3491, 273, 611, 10370, 301, 7391, 5494, 1435, 309, 1140, 18, 529, 422, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 611, 10370, 301, 9313, 12, 88, 16, 5550, 4672, 468, 4148, 3491, 273, 611, 10370, 301, 2829, 5494, 1435, 3992, 3491, 273, 611, 10370, 301, 7391, 5494, 1435, 309, 1140, 18, 529, 422, 296, ...
handler = target.get_handler(name) if handler.is_allowed_to_view(): path = here.get_pathto(handler) bc_target = str(root.get_pathto(handler)) url = context.uri.replace(bc_target=bc_target) is_folder = isinstance(handler, Folder) is_selectable = False if is_folder or isinstance(handler, filter_type): is_selectable = True self.is_submit = True path_to_icon = handler.get_path_to_icon(16) if path: path_to_handler = uri.Path(str(path) + '/') path_to_icon = path_to_handler.resolve(path_to_icon) objects.append({'name': name, 'is_folder': is_folder, 'is_selectable': is_selectable, 'path': path, 'url': url, 'icon': path_to_icon, 'object_type': handler.get_mimetype()})
path = here.get_pathto(handler) bc_target = str(root.get_pathto(handler)) url = context.uri.replace(bc_target=bc_target) self.is_submit = True path_to_icon = handler.get_path_to_icon(16) if path: path_to_handler = uri.Path(str(path) + '/') path_to_icon = path_to_handler.resolve(path_to_icon) objects.append({'name': handler.name, 'is_folder': isinstance(handler, Folder), 'is_selectable': True, 'path': path, 'url': url, 'icon': path_to_icon, 'object_type': handler.get_mimetype()})
def __init__(self, filter_type=Handler, root=None, start=None): """ The 'start' must be a handler, 'filter_type' must be a handler class. """ context = get_context() request, response = context.request, context.response
40a8cf1cf1eb99492d0971bf29eb1f152cdd158d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/40a8cf1cf1eb99492d0971bf29eb1f152cdd158d/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1034, 67, 723, 33, 1503, 16, 1365, 33, 7036, 16, 787, 33, 7036, 4672, 3536, 1021, 296, 1937, 11, 1297, 506, 279, 1838, 16, 296, 2188, 67, 723, 11, 1297...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1034, 67, 723, 33, 1503, 16, 1365, 33, 7036, 16, 787, 33, 7036, 4672, 3536, 1021, 296, 1937, 11, 1297, 506, 279, 1838, 16, 296, 2188, 67, 723, 11, 1297...
WHERE (%s) ${GT} (%s) AND (%s) <= (%s)
WHERE (%s AND %s)
def copy_data_pass(): shared_columns_listing = ", ".join(shared_columns) engine_flags = "" if table_engine == "innodb": engine_flags = "LOCK IN SHARE MODE" data_pass_query = """ INSERT IGNORE INTO %s.%s (%s) (SELECT %s FROM %s.%s WHERE (%s) ${GT} (%s) AND (%s) <= (%s) %s) """ % (database_name, ghost_table_name, shared_columns_listing, shared_columns_listing, database_name, original_table_name, unique_key_column_names, get_unique_key_range_start_variables(), unique_key_column_names, get_unique_key_range_end_variables(), engine_flags) act_data_pass(data_pass_query, "Copying")
23247bbe849887ddc489626584fc9973367d589f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10338/23247bbe849887ddc489626584fc9973367d589f/oak-online-alter-table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 892, 67, 5466, 13332, 5116, 67, 5112, 67, 21228, 273, 3104, 3552, 5701, 12, 11574, 67, 5112, 13, 4073, 67, 7133, 273, 1408, 309, 1014, 67, 8944, 422, 315, 267, 82, 10605, 687...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 892, 67, 5466, 13332, 5116, 67, 5112, 67, 21228, 273, 3104, 3552, 5701, 12, 11574, 67, 5112, 13, 4073, 67, 7133, 273, 1408, 309, 1014, 67, 8944, 422, 315, 267, 82, 10605, 687...
aFile['PFN']=for_file['endpoint']+file_name
aFile['PFN']=for_file['endpoint']+os.path.basename(file_name)
def updateLFN(f, lfn, newLFN): """ _updateLFN_ Update a LFN. """ if f['LFN'] != lfn: return f['LFN'] = newLFN return
7fac1366c19dafc5cf638a001005ddf6b0d19aa6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8886/7fac1366c19dafc5cf638a001005ddf6b0d19aa6/ModifyJobReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 9105, 50, 12, 74, 16, 328, 4293, 16, 394, 9105, 50, 4672, 3536, 389, 2725, 9105, 50, 67, 225, 2315, 279, 18803, 50, 18, 3536, 309, 284, 3292, 9105, 50, 3546, 480, 328, 4293, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 9105, 50, 12, 74, 16, 328, 4293, 16, 394, 9105, 50, 4672, 3536, 389, 2725, 9105, 50, 67, 225, 2315, 279, 18803, 50, 18, 3536, 309, 284, 3292, 9105, 50, 3546, 480, 328, 4293, 30...
if (os.path.exists('Modules/_curses_panel.c') and module_enabled(exts, '_curses') and
if (module_enabled(exts, '_curses') and
def detect_modules(self): # Ensure that /usr/local is always used if '/usr/local/lib' not in self.compiler.library_dirs: self.compiler.library_dirs.insert(0, '/usr/local/lib') if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' )
a2da3b29c303d06ff9efc08ef57a42cf0ba658f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a2da3b29c303d06ff9efc08ef57a42cf0ba658f8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 309, 1173, 13640, 19, 3729, 19, 2941, 11, 486, 316, 365, 18, 9576, 18, 12083, 67, 8291, 30, 365, ...
print " - Migration '%s' is marked for no-dry-run."
print " - Migration '%s' is marked for no-dry-run." % migration
def _run_migration(self, migration): if migration.no_dry_run() and self.verbosity: print " - Migration '%s' is marked for no-dry-run." return db.dry_run = True db.debug, old_debug = False, db.debug pending_creates = db.get_pending_creates() db.start_transaction() migration_function = self.direction(migration) try: try: migration_function() except: raise exceptions.FailedDryRun(migration, sys.exc_info()) finally: db.rollback_transactions_dry_run() db.debug = old_debug db.clear_run_data(pending_creates) db.dry_run = False
4d2c3ce2a1437e28518b1368c1a6090e305b070b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/4d2c3ce2a1437e28518b1368c1a6090e305b070b/migrators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 15746, 12, 2890, 16, 6333, 4672, 309, 6333, 18, 2135, 67, 25011, 67, 2681, 1435, 471, 365, 18, 16629, 8807, 30, 1172, 315, 300, 15309, 1995, 87, 11, 353, 9350, 364, 1158...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 15746, 12, 2890, 16, 6333, 4672, 309, 6333, 18, 2135, 67, 25011, 67, 2681, 1435, 471, 365, 18, 16629, 8807, 30, 1172, 315, 300, 15309, 1995, 87, 11, 353, 9350, 364, 1158...
data = orange.ExampleTable(r'../../doc/datasets/wt') matrix = computeMatrix(data)
data = orange.ExampleTable(r'../../doc/datasets/iris.tab') data = data.select(orange.MakeRandomIndices2(p0=20)(data), 0) for d in data: d.name = str(d["sepal length"]) matrix = distanceMatrix(data)
def computeMatrix(data): dist = orange.ExamplesDistanceConstructor_Euclidean(data) matrix = orange.SymMatrix(len(data)) matrix.setattr('items', data) for i in range(len(data)): for j in range(i+1): matrix[i, j] = dist(data[i], data[j]) return matrix
9dec2648a439fbcedb4a6e19f89488c157b33964 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9dec2648a439fbcedb4a6e19f89488c157b33964/OWDistanceMap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 4635, 12, 892, 4672, 2411, 273, 578, 726, 18, 23905, 7200, 6293, 67, 41, 22392, 12, 892, 13, 3148, 273, 578, 726, 18, 11901, 4635, 12, 1897, 12, 892, 3719, 3148, 18, 542, 1747, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 4635, 12, 892, 4672, 2411, 273, 578, 726, 18, 23905, 7200, 6293, 67, 41, 22392, 12, 892, 13, 3148, 273, 578, 726, 18, 11901, 4635, 12, 1897, 12, 892, 3719, 3148, 18, 542, 1747, ...
class MonitoringDelegate(QtGui.QStyledItemDelegate):
class MonitoringDelegate(QtGui.QItemDelegate):
def flags(self, index): ret = QtCore.QAbstractTableModel.flags(self, index) if index.row() in (0,1,2): ret |= Qt.Qt.ItemIsEditable return ret
ab6c24d458acfe747b56d3578ffe661a5becec0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11526/ab6c24d458acfe747b56d3578ffe661a5becec0c/saffire_dice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2943, 12, 2890, 16, 770, 4672, 325, 273, 20193, 18, 53, 7469, 1388, 1488, 18, 7133, 12, 2890, 16, 770, 13, 309, 770, 18, 492, 1435, 316, 261, 20, 16, 21, 16, 22, 4672, 325, 5626, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2943, 12, 2890, 16, 770, 4672, 325, 273, 20193, 18, 53, 7469, 1388, 1488, 18, 7133, 12, 2890, 16, 770, 13, 309, 770, 18, 492, 1435, 316, 261, 20, 16, 21, 16, 22, 4672, 325, 5626, 7...
'head' : """title: $blog_title\ncontact: contact@example.com (The Contact Person)\nlink: $url\n\n""", 'story' : """$mtime\t$title\t$base_url/$file_path""",
'head' : """title: $blog_title\ncontact: contact@example.com (The Contact Person)\nlink: $url\n\n\n""", 'story' : """$mtime\t$title\t$base_url/$file_path\n""",
def __getFlavour(self, taste = 'html'): """ Flavours, or views, or templates, as some may call it, defaults are given, but can be overidden with files on the datadir. Don't like the default html templates, add your own, head.html, story.html etc. """ # Ugly default templates, have to though :( html = {'content_type' : 'text/html', 'head' : """<html><head><link rel="alternate" type="application/rss+xml" title="RSS" href="$url/?flav=rss" /><title>$blog_title $pi_da $pi_mo $pi_yr</title></head><body><center><font size="+3">$blog_title</font><br />$pi_da $pi_mo $pi_yr</center><p />""", 'date_head' : '<div class="blosxomDayDiv">\n<span class="blosxomDate">$date</span>', 'story' : """<p><a name="$fn"><b>$title</b></a><br />$body<br /><br />posted at: $ti | path: <a href="$url/$path">/$path</a> | <a href="$base_url/$file_path.$flavour">permanent link to this entry</a></p>\n""", 'date_foot' : '</div>', 'foot' : """<p /><center><a href="http://roughingit.subtlehints.net/pyblosxom"><img src="http://roughingit.subtlehints.net/images/pb_pyblosxom.gif" border="0" /></body></html>"""} rss = {'content_type' : 'text/xml', 'head' : """<?xml version="1.0"?>\n<!-- name="generator" content="pyblosxom/0+5i" -->\n<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">\n\n<rss version="0.91">\n <channel>\n <title>$blog_title $pi_da $pi_mo $pi_yr</title>\n <link>$url</link>\n <description>$blog_description</description>\n <language>$blog_language</language>\n""", 'story' : """<item>\n <title>$title</title>\n <link>$base_url/$file_path.html</link>\n <description>$body</description>\n </item>\n""", 'foot' : ' </channel>\n</rss>'} rss3 = {'content_type' : 'text/plain', 'head' : """title: $blog_title\ndescription: $blog_description\nlink: $url\ncreator: wari@wari.per.sg Wari Wahab\nerrorsTo: wari@wari.per.sg Wari Wahab\nlang: $blog_language\n\n""", 'story' : """title: $title\nlink: $base_url/$file_path.html\ncreated: $w3cdate\nsubject: $path\nguid: $file_path\n""", 'foot' : ''} esf = {'content_type' : 'text/plain', 'head' : """title: $blog_title\ncontact: contact@example.com (The Contact Person)\nlink: $url\n\n""", 'story' : """$mtime\t$title\t$base_url/$file_path""", 'foot' : ''} error = {'content_type' : 'text/plain', 'head' : """ Error: I'm afraid this is the first I've heard of a "$flavour" flavoured pyblosxom.\n Try dropping the "?flav=$flavour" bit from the end of the URL.\n\n"""} flavours = {'html' : html, 'rss' : rss, 'error' : error, 'rss3' : rss3, 'esf' : esf} # End of ugly portion! Yucks :) # Look for flavours in datadir
bc25c1afa66c7f9a966e16b6aa78ee352f892e9f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/bc25c1afa66c7f9a966e16b6aa78ee352f892e9f/blosxom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2340, 842, 477, 12, 2890, 16, 268, 14725, 273, 296, 2620, 11, 4672, 3536, 3857, 842, 4390, 16, 578, 7361, 16, 578, 5539, 16, 487, 2690, 2026, 745, 518, 16, 3467, 854, 864, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 2340, 842, 477, 12, 2890, 16, 268, 14725, 273, 296, 2620, 11, 4672, 3536, 3857, 842, 4390, 16, 578, 7361, 16, 578, 5539, 16, 487, 2690, 2026, 745, 518, 16, 3467, 854, 864, ...
WRAPCODE_REGEX = re.compile(r'(CREATE OR REPLACE (TYPE|FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY|) \"(\w+?)\" wrapped.+?)(?=\s+\/\s+)', re.S)
WRAPCODE_REGEX = re.compile(r'(CREATE OR REPLACE (TYPE|FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY|) \"?(\w+?)\"? wrapped.+?)(?=\s+\/\s+)', re.S)
def generate_diff(self, left, right): self.execute_cmd('generating schema difference report', ['dvs', 'compare', '--html', '--context', '10', left, right]) self.write_file(self.change_report, self.output)
c074469f97e50a83c1c64dec2f9ac97c2fcfba2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/760/c074469f97e50a83c1c64dec2f9ac97c2fcfba2c/dvstool_oracle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 5413, 12, 2890, 16, 2002, 16, 2145, 4672, 365, 18, 8837, 67, 4172, 2668, 3441, 1776, 1963, 7114, 2605, 2187, 10228, 72, 6904, 2187, 296, 9877, 2187, 3534, 2620, 2187, 3534, 247...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 5413, 12, 2890, 16, 2002, 16, 2145, 4672, 365, 18, 8837, 67, 4172, 2668, 3441, 1776, 1963, 7114, 2605, 2187, 10228, 72, 6904, 2187, 296, 9877, 2187, 3534, 2620, 2187, 3534, 247...
log.info( "Instance '%s' found alive." % reservation.instances[0].id )
log.info( "Instance '%s' found alive. Restarting instance so it can register with the master." % reservation.instances[0].id ) ec2_conn.reboot_instances([reservation.instances[0].id])
def get_worker_instances( self ): instances = [] if self.app.TESTFLAG is True: # for i in range(5): # instance = Instance( self.app, inst=None, m_state="Pending" ) # instance.id = "WorkerInstance" # instances.append(instance) return instances log.debug("Trying to discover any worker instances associated with this cluster...") filters = {'tag:clusterName': self.app.ud['cluster_name'], 'tag:role': 'worker'} try: ec2_conn = self.app.cloud_interface.get_ec2_connection() reservations = ec2_conn.get_all_instances(filters=filters) for reservation in reservations: if reservation.instances[0].state != 'terminated' and reservation.instances[0].state != 'shutting-down': i = Instance( self.app, inst=reservation.instances[0], m_state=reservation.instances[0].state ) instances.append( i ) log.info( "Instance '%s' found alive." % reservation.instances[0].id ) except EC2ResponseError, e: log.debug( "Error checking for live instances: %s" % e ) return instances
e15bf11c41c127c27387917c2476fd6da995acfd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5255/e15bf11c41c127c27387917c2476fd6da995acfd/master.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 10124, 67, 10162, 12, 365, 262, 30, 3884, 273, 5378, 309, 365, 18, 2910, 18, 16961, 9651, 353, 1053, 30, 468, 364, 277, 316, 1048, 12, 25, 4672, 468, 377, 791, 273, 5180, 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, 336, 67, 10124, 67, 10162, 12, 365, 262, 30, 3884, 273, 5378, 309, 365, 18, 2910, 18, 16961, 9651, 353, 1053, 30, 468, 364, 277, 316, 1048, 12, 25, 4672, 468, 377, 791, 273, 5180, 12...
else: recID = recIDs[0] pattern_for_preview = "recid:%s" % recID
pattern_for_preview = "recid:%s" % recID
def format_template_show_preview_or_save(req, bft, ln=config.cdslang, code=None, ln_for_preview=config.cdslang, pattern_for_preview="", content_type_for_preview='text/html', save_action=None, navtrail=""): """ Print the preview of a record with a format template. To be included inside Format template editor. If the save_action has a value, then the code should also be saved at the same time @param code the code of a template to use for formatting @param ln_for_preview the language for the preview (for bfo) @param pattern_for_preview the search pattern to be used for the preview (for bfo) @param save_action has a value if the code has to be saved @param bft the filename of the template to save @param navtrail standard navtrail """ ln = wash_language(ln) _ = gettext_set_language(ln) try: uid = getUid(req) except MySQLdb.Error, e: return error_page(req) (auth_code, auth_msg) = check_user(req, 'cfgbibformat') if not auth_code: bft = wash_url_argument(bft, 'str') if save_action is not None and code is not None: #save bibformatadminlib.update_format_template_code(bft, code=code) bibformat_engine.clear_caches() if code is None: code = bibformat_engine.get_format_template(bft)['code'] ln_for_preview = wash_language(ln_for_preview) pattern_for_preview = wash_url_argument(pattern_for_preview, 'str') if pattern_for_preview == "": recIDs = search_pattern(p='-collection:DELETED').tolist() if len(recIDs) == 0: return page(title="No Document Found", body="", uid=uid, language=ln_for_preview, navtrail = "", lastupdated=__lastupdated__, req=req, navmenuid='search') else: recID = recIDs[0] pattern_for_preview = "recid:%s" % recID else: recIDs = search_pattern(p=pattern_for_preview + \ ' -collection:DELETED').tolist() if len(recIDs) == 0: return page(title="No Record Found for %s" % pattern_for_preview, body="", uid=uid, language=ln_for_preview, navtrail = "", lastupdated=__lastupdated__, req=req) else: recID = recIDs[0] units = create_basic_search_units(None, pattern_for_preview, None) keywords = [unit[1] for unit in units if unit[0] != '-'] bfo = bibformat_engine.BibFormatObject(recID, ln_for_preview, keywords, None, getUid(req), req=req) (body, errors) = bibformat_engine.format_with_format_template(bft, bfo, verbose=7, format_template_code=code) if content_type_for_preview == 'text/html': #Standard page display with CDS headers, etc. return page(title="", body=body, uid=uid, language=ln_for_preview, navtrail = navtrail, lastupdated=__lastupdated__, req=req, navmenuid='search') else: #Output with chosen content-type. req.content_type = content_type_for_preview req.send_http_header() req.write(body) else: return page_not_authorized(req=req, text=auth_msg)
d316c471832ce7267157d204e42410f12271fec8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/d316c471832ce7267157d204e42410f12271fec8/bibformatadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 3202, 67, 4500, 67, 12102, 67, 280, 67, 5688, 12, 3658, 16, 324, 1222, 16, 7211, 33, 1425, 18, 4315, 2069, 539, 16, 981, 33, 7036, 16, 7211, 67, 1884, 67, 12102, 33, 1425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3202, 67, 4500, 67, 12102, 67, 280, 67, 5688, 12, 3658, 16, 324, 1222, 16, 7211, 33, 1425, 18, 4315, 2069, 539, 16, 981, 33, 7036, 16, 7211, 67, 1884, 67, 12102, 33, 1425, ...
""" This method should return the unmodified root for the file or 'None'
""" This method should return the repository root for the file or 'None'
def GetRoot(self): """ This method should return the unmodified root for the file or 'None' on failure. """ raise NotImplementedError
1ab91a9a544bb8619bd1948ef7fae3f29befb3fe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/1ab91a9a544bb8619bd1948ef7fae3f29befb3fe/symbolstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2375, 12, 2890, 4672, 3536, 1220, 707, 1410, 327, 326, 3352, 1365, 364, 326, 585, 578, 296, 7036, 11, 603, 5166, 18, 3536, 1002, 11206, 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, 968, 2375, 12, 2890, 4672, 3536, 1220, 707, 1410, 327, 326, 3352, 1365, 364, 326, 585, 578, 296, 7036, 11, 603, 5166, 18, 3536, 1002, 11206, 2, -100, -100, -100, -100, -100, -100, -100, ...
all_y = set(range(dim))
all_y = set(y_vec)
def calc_max_assignment(mat): """Uses the Hungarian algorithm to find the maximum weighted perfect matching. see notes http://www.cse.ust.hk/~golin/COMP572/Notes/Matching.pdf for description of the algorithm and the notation. """ print mat dim = len(mat) # Initialization: # Assign the initial labels (all y's get 0, and all x's get the cell weight) # Construct the equality graph, and # Find the initial matching y_vec = [Vertex(n, 0, True) for n in xrange(dim)] x_vec = [] eq_graph = EqualityGraph(dim) matching = [] m_y_vertices = set() m_x_vertices = set() for n, row in enumerate(mat): assert (dim == len(row)) m = max(row) x_el = Vertex(n, m, False) x_vec.append(x_el) for col_n, cell in enumerate(row): if cell == m: y_el = y_vec[col_n] e = eq_graph.add(x_el, y_el) if (y_el not in m_y_vertices) and (x_el not in m_x_vertices): # Edges of the equality graph can be part of the matching # as long as the vertices do not already exist in the matching m_x_vertices.add(x_el) m_y_vertices.add(y_el) matching.append(e) e.set_in_match(True) # if the matching is perfect, we are done. if len(matching) == dim: return score_from_matching(matching) # Add a free vertex to the set S assert len(s) == 1 # The set t is the empty set t = set() all_y = set(range(dim)) reset_s = True while len(matching) != dim: if reset_s: s = set() for x in x_vec: if x.matching_edge is None: s.add(x) break reset_s = False neighborhood = get_neighboring_vertices(s) if neighborhood == t: update_labelings(all_y, t, s, mat) update_equality_graph(eq_graph, s, t, mat) else: diff = neighborhood - t y = diff[0] if y.matching_edge is None: # y is free assert len(s) == 1 u = s.pop() eq_graph.augment_path(u, y, matching) reset_s = True else: t.add(u) s.add(y.matching_edge.tail) return
a2ad0dee0947cbc68b1113dad3dc27777f909fdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11717/a2ad0dee0947cbc68b1113dad3dc27777f909fdb/partition_dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 1896, 67, 12960, 12, 7373, 4672, 3536, 15128, 326, 670, 20651, 297, 2779, 4886, 358, 1104, 326, 4207, 13747, 24746, 3607, 18, 2621, 10913, 1062, 2207, 5591, 18, 71, 307, 18, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 1896, 67, 12960, 12, 7373, 4672, 3536, 15128, 326, 670, 20651, 297, 2779, 4886, 358, 1104, 326, 4207, 13747, 24746, 3607, 18, 2621, 10913, 1062, 2207, 5591, 18, 71, 307, 18, 64...
self.widths[index] = (w1 + w2 + w3, w1, w2, w3)
self.widths[index] = (total, w1, w2, w3) if self.largest_width is None: self.calc_scroll = (text1, bold, w1, w2) self.largest_width = total elif self.largest_width >= 0: if text1 == self.calc_scroll[0] and bold == self.calc_scroll[1]: if total > self.largest_width: self.largest_width = total else: self.largest_width = -1
def calcWidth(self, index): height = 0 width = 0 text1, bold, text2 = self.getTextParts(index) w1, h1 = self.GetTextExtent(text1) w2, h2 = self.bold_dc.GetTextExtent(bold) w3, h3 = self.GetTextExtent(text2) self.heights[index] = (max(h1, h2), h1, h2, h3) self.widths[index] = (w1 + w2 + w3, w1, w2, w3)
1dcedf3b36f194de5623b0ea9a5eed27e7613a0a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/1dcedf3b36f194de5623b0ea9a5eed27e7613a0a/textctrl_autocomplete.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 2384, 12, 2890, 16, 770, 4672, 2072, 273, 374, 1835, 273, 374, 977, 21, 16, 13068, 16, 977, 22, 273, 365, 18, 588, 1528, 4305, 12, 1615, 13, 341, 21, 16, 366, 21, 273, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 2384, 12, 2890, 16, 770, 4672, 2072, 273, 374, 1835, 273, 374, 977, 21, 16, 13068, 16, 977, 22, 273, 365, 18, 588, 1528, 4305, 12, 1615, 13, 341, 21, 16, 366, 21, 273, 365, 1...
count = 0 for v,e2 in map(None, value[0], value[1]): term1 = 1.0 / (2.0 * math.sin(angle/2.0)) term2 = 1.0 / (2.0 * math.tan(angle/2.0)) value[0][count] = v * term1 v2 = value[0][count] * value[0][count] value[1][count] = term1*term1*e2 + v2*term2*term2*angle_err2 count += 1
len_v0 = len(value[0]) len_v1 = len(value[1])
def tof_to_d_spacing(obj,**kwargs): # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(obj) (o_descr,d_descr)=hlr_utils.get_descr(obj) if o_descr == "number" or o_descr == "list": raise RuntimeError, "Must provide a SOM of a SO to the function." # Go on else: pass # Setup keyword arguments try: polar = kwargs["polar"] except KeyError: polar = None try: pathlength = kwargs["pathlength"] except KeyError: pathlength = None try: units = kwargs["units"] except KeyError: units = "microseconds" # Primary axis for transformation. If a SO is passed, the function, will # assume the axis for transformation is at the 0 position if o_descr == "SOM": axis = hlr_utils.hlr_1D_units(obj, units) else: axis = 0 result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) if res_descr == "SOM": result = hlr_utils.hlr_force_units(result, "Angstroms", axis) result.setAxisLabel(axis, "d-spacing") result.setYUnits("Counts/A") result.setYLabel("Intensity") else: pass if pathlength == None or polar == None: if o_descr == "SOM": try: obj.attr_list.instrument.get_primary() inst = obj.attr_list.instrument except RuntimeError: raise RuntimeError, "A detector was not provided" else: if pathlength == None and polar == None: raise RuntimeError, "If no SOM is provided, then pathlength "\ +"and polar angle information must be provided" elif pathlength == None: raise RuntimeError, "If no SOM is provided, then pathlength "\ +"information must be provided" elif polar == None: raise RuntimeError, "If no SOM is provided, then polar angle "\ +"information must be provided" else: pass if pathlength != None: (p_descr,e_descr) = hlr_utils.get_descr(pathlength) if polar != None: (a_descr,e_descr) = hlr_utils.get_descr(polar) # iterate through the values import axis_manip import math for i in range(hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"x",axis) err2 = hlr_utils.get_err2(obj,i,o_descr,"x",axis) map_so = hlr_utils.get_map_so(obj,None,i) if pathlength == None: (pl,pl_err2) = hlr_utils.get_parameter("total",map_so,inst) else: pl = hlr_utils.get_value(pathlength,i,p_descr) pl_err2 = hlr_utils.get_err2(pathlength,i,p_descr) value=axis_manip.tof_to_wavelength(val, err2, pl, pl_err2) if polar == None: (angle,angle_err2) = hlr_utils.get_parameter("polar",map_so,inst) else: angle = hlr_utils.get_value(polar,i,p_descr) angle_err2 = hlr_utils.get_err2(polar,i,p_descr) count = 0 for v,e2 in map(None, value[0], value[1]): term1 = 1.0 / (2.0 * math.sin(angle/2.0)) term2 = 1.0 / (2.0 * math.tan(angle/2.0)) value[0][count] = v * term1 v2 = value[0][count] * value[0][count] value[1][count] = term1*term1*e2 + v2*term2*term2*angle_err2 count += 1 hlr_utils.result_insert(result,res_descr,value,map_so,"x",axis) return result
8dcf8af8c74e3673ec736b87e019766d76714d13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/8dcf8af8c74e3673ec736b87e019766d76714d13/hlr_tof_to_d_spacing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 72, 67, 14080, 12, 2603, 16, 636, 4333, 4672, 225, 468, 1930, 326, 4222, 4186, 1930, 366, 10826, 67, 5471, 225, 468, 444, 731, 364, 5960, 3059, 501, 261, 2088, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 72, 67, 14080, 12, 2603, 16, 636, 4333, 4672, 225, 468, 1930, 326, 4222, 4186, 1930, 366, 10826, 67, 5471, 225, 468, 444, 731, 364, 5960, 3059, 501, 261, 2088, ...
if not self.template_available(template):
last_modified = self.template_available(template) req.check_modified(last_modified) if not last_modified:
def process_request(self, req): match = re.match(r'^/l10nhelp/(.*)$', req.path_info) template = 'l10nhelp/%s.html' % match.group(1) data = {}
7f0171adee0c59674da38e5cbf83c795eed1d741 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5797/7f0171adee0c59674da38e5cbf83c795eed1d741/help.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 845, 273, 283, 18, 1916, 12, 86, 19856, 19, 80, 2163, 82, 5201, 19, 14361, 8, 2187, 1111, 18, 803, 67, 1376, 13, 1542, 273, 296, 80, 2163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 12, 2890, 16, 1111, 4672, 845, 273, 283, 18, 1916, 12, 86, 19856, 19, 80, 2163, 82, 5201, 19, 14361, 8, 2187, 1111, 18, 803, 67, 1376, 13, 1542, 273, 296, 80, 2163, ...
def cover_search_file(self, arg=None, menuw=None): """ search imdb for this item
def handle_exception(self, item, box, exception): """ Exception while getting data. """ box.destroy() if isinstance(exception, amazon.AmazonError): text = _('No matches for %s - %s') % \ (item['artist'], item['album']) else: text = _('Unknown error: %s' % exception) MessageBox(text).show() item.show_menu() def __get_data_thread(self, search): """ Get the cover data in a thread. """ for locale in self.locales: log.info('trying amazon locale %s' % locale) amazon.setLocale(locale) try: cover = amazon.searchByKeyword(search, product_line="music") break except AmazonError: pass else: raise AmazonError('No results found') results = [] for c in cover: for url in c.ImageUrlLarge, c.ImageUrlMedium, \ c.ImageUrlLarge.replace('.01.', '.03.'): try: data = urllib2.urlopen(url) if data.info()['Content-Length'] == '807': continue image = Imlib2.open_from_memory(data.read()) image = image.crop((2,2), (image.width-4, image.height-4)) break except urllib2.HTTPError: pass except: log.exception('create image data') else: log.info('No image for %s' % c.ProductName) continue name = Unicode(c.ProductName) if url == c.ImageUrlMedium: name += _('[small]') results.append((name, image)) return results def search(self, item): """ Search for the cover.
def cover_search_file(self, arg=None, menuw=None): """ search imdb for this item """ box = WaitBox(text=_( 'searching Amazon...' ) ) box.show()
6d9f53994b120f152cf01dbb5f9d46eae2739b7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6d9f53994b120f152cf01dbb5f9d46eae2739b7d/coversearch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4064, 12, 2890, 16, 761, 16, 3919, 16, 1520, 4672, 3536, 1185, 1323, 8742, 501, 18, 3536, 3919, 18, 11662, 1435, 309, 1549, 12, 4064, 16, 3750, 18, 19280, 668, 4672, 977, 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, 1640, 67, 4064, 12, 2890, 16, 761, 16, 3919, 16, 1520, 4672, 3536, 1185, 1323, 8742, 501, 18, 3536, 3919, 18, 11662, 1435, 309, 1549, 12, 4064, 16, 3750, 18, 19280, 668, 4672, 977, 273...
self.sec.setTunerLinked(slotid, nimmgr.getConfigPrefix(slotid).value)
def nimConfigModeChanged(self, slotid, mode): if (mode != 1): # not linked print "Unlinking slot " + str(slotid) # TODO call c++ to unlink nim in slot slotid if (mode == 1): # linked if (len(self.getNimListOfType(self.nimType["DVB-S"], slotid)) > 0): print "Linking slot " + str(slotid) + " to " + str(nimmgr.getConfigPrefix(slotid).value) self.sec.setTunerLinked(slotid, nimmgr.getConfigPrefix(slotid).value) # TODO call c++ to link nim in slot slotid with nim in slot nimmgr.getConfigPrefix(slotid).value
ae566d06a9a24dd549f78c5522d5a90b71341352 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/ae566d06a9a24dd549f78c5522d5a90b71341352/NimManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 381, 809, 2309, 5033, 12, 2890, 16, 4694, 350, 16, 1965, 4672, 309, 261, 3188, 480, 404, 4672, 468, 486, 8459, 1172, 315, 984, 1232, 310, 4694, 315, 397, 609, 12, 14194, 350, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 381, 809, 2309, 5033, 12, 2890, 16, 4694, 350, 16, 1965, 4672, 309, 261, 3188, 480, 404, 4672, 468, 486, 8459, 1172, 315, 984, 1232, 310, 4694, 315, 397, 609, 12, 14194, 350, 13, ...
if newoffset.simple(): return map[newoffset]
if newoffset.simple(): remap = map.copy() del remap[newoffset] return Expr(map[newoffset]).withmemory(remap)
def withmemory(self, map): newoffset = self.offset.withmemory(_withmemory_propagate(map)) try: if newoffset.simple(): return map[newoffset] except KeyError: pass return ReferenceExpr(newoffset)
df89eb4658c7e1320df3664a0772c2584505673f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/df89eb4658c7e1320df3664a0772c2584505673f/expr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 598, 7858, 12, 2890, 16, 852, 4672, 394, 3348, 273, 365, 18, 3348, 18, 1918, 7858, 24899, 1918, 7858, 67, 5986, 346, 340, 12, 1458, 3719, 775, 30, 309, 394, 3348, 18, 9647, 13332, 282,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 598, 7858, 12, 2890, 16, 852, 4672, 394, 3348, 273, 365, 18, 3348, 18, 1918, 7858, 24899, 1918, 7858, 67, 5986, 346, 340, 12, 1458, 3719, 775, 30, 309, 394, 3348, 18, 9647, 13332, 282,...
self._console.info("Class: %s" % classId) self._console.indent() for otherClassId in package: otherClassDeps = self._depLoader.getDeps(otherClassId, variants) if classId in otherClassDeps["load"]: self._console.info("Used by: %s (load)" % otherClassId) if classId in otherClassDeps["run"]: self._console.info("Used by: %s (run)" % otherClassId) self._console.outdent() self._console.outdent() return def usingDeps(logConf, dset): gr = graph.digraph() for cid in self._classList: fsize = self._classes[cid]['size'] if fsize > 20000: color = "red" elif fsize > 5000: color = "green" else: color = "blue" gr.add_node(cid, attrs=[("color", color)]) grLoad = graph.digraph() grLoad.add_nodes(self._classList) grRun = graph.digraph() grRun.add_nodes(self._classList) for packageId, package in enumerate(packages): self._console.info("Package %s" % packageId) self._console.indent() for partId in parts: if packageId in parts[partId]: self._console.info("Part %s" % partId) for classId in sorted(package): self._console.info("Class: %s" % classId) self._console.indent()
def usedByDeps(logConf): for packageId, package in enumerate(packages): self._console.info("Package %s" % packageId) self._console.indent()
0c557769fd8c5281018ba8f72d96ce1e01932491 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/0c557769fd8c5281018ba8f72d96ce1e01932491/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1399, 858, 14430, 12, 1330, 3976, 4672, 364, 2181, 548, 16, 2181, 316, 4241, 12, 10308, 4672, 365, 6315, 8698, 18, 1376, 2932, 2261, 738, 87, 6, 738, 2181, 548, 13, 365, 6315, 8698, 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, 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, 1399, 858, 14430, 12, 1330, 3976, 4672, 364, 2181, 548, 16, 2181, 316, 4241, 12, 10308, 4672, 365, 6315, 8698, 18, 1376, 2932, 2261, 738, 87, 6, 738, 2181, 548, 13, 365, 6315, 8698, 18...
self._owner.UnregisterHandlerOnce('proceed',self.StartTLSHandler,xmlns=NS_TLS) self._owner.UnregisterHandlerOnce('failure',self.StartTLSHandler,xmlns=NS_TLS)
def plugout(self,now=0): """ Unregisters TLS handler's from owner's dispatcher. Take note that encription can not be stopped once started. You can only break the connection and start over.""" self._owner.UnregisterHandler('features',self.FeaturesHandler,xmlns=NS_STREAMS) self._owner.UnregisterHandlerOnce('proceed',self.StartTLSHandler,xmlns=NS_TLS) self._owner.UnregisterHandlerOnce('failure',self.StartTLSHandler,xmlns=NS_TLS)
fb107517894e980e708686d790ff619e1a9ba2a7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2729/fb107517894e980e708686d790ff619e1a9ba2a7/transports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15852, 659, 12, 2890, 16, 3338, 33, 20, 4672, 3536, 1351, 22559, 8098, 1838, 1807, 628, 3410, 1807, 7393, 18, 17129, 4721, 716, 2446, 566, 375, 848, 486, 506, 9627, 3647, 5746, 18, 4554,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15852, 659, 12, 2890, 16, 3338, 33, 20, 4672, 3536, 1351, 22559, 8098, 1838, 1807, 628, 3410, 1807, 7393, 18, 17129, 4721, 716, 2446, 566, 375, 848, 486, 506, 9627, 3647, 5746, 18, 4554,...
result = string.join(format_pieces, '')
result = ''.join(format_pieces)
def get_date_format_string( period ): """ for a given period (e.g. 'month', 'day', or some numeric interval such as 3600 (in secs)), return the format string that can be used with strftime to format that time to specify the times across that interval, but no more detailed. so, get_date_format_string('month') == '%Y-%m' get_date_format_string(3600) == get_date_format_string('hour') == '%Y-%m-%d %H' get_date_format_string(None) -> raise TypeError get_date_format_string('garbage') -> raise ValueError """ # handle the special case of 'month' which doesn't have # a static interval in seconds if isinstance(period, basestring) and string.lower(period) == 'month': result = '%Y-%m' else: file_period_secs = get_period_seconds(period) format_pieces = ('%Y', '-%m-%d', ' %H', '-%M', '-%S') intervals = ( seconds_per_year, seconds_per_day, seconds_per_hour, seconds_per_minute, 1, # seconds_per_second ) mods = map(lambda interval: file_period_secs % interval, intervals) format_pieces = format_pieces[ : mods.index( 0 ) + 1 ] result = string.join(format_pieces, '') return result
6573a07c31abfaced24c517d4d4a453b60735614 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/865/6573a07c31abfaced24c517d4d4a453b60735614/datetools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 712, 67, 2139, 67, 1080, 12, 3879, 262, 30, 3536, 364, 279, 864, 3879, 261, 73, 18, 75, 18, 296, 7496, 2187, 296, 2881, 2187, 578, 2690, 6389, 3673, 4123, 487, 12396, 261, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 712, 67, 2139, 67, 1080, 12, 3879, 262, 30, 3536, 364, 279, 864, 3879, 261, 73, 18, 75, 18, 296, 7496, 2187, 296, 2881, 2187, 578, 2690, 6389, 3673, 4123, 487, 12396, 261, 2...
username CHAR(20) NOT NULL, first_name CHAR(20), surname CHAR(20), maintainer_id INT4, email TEXT, admin BOOLEAN, editor_id INT4,
user_id INT4 NOT NULL, username CHAR(20) NOT NULL UNIQUE, session_id CHAR(20), first_name CHAR(20), middle_name CHAR(20), surname CHAR(20), email TEXT, admin BOOLEAN, password CHAR(12), notes TEXT,
def get_connection(name) : from pyPgSQL import PgSQL return PgSQL.connect(database=name)
c8a618b16ec6f950b520d1f2a7d9bebd1142eac7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1319/c8a618b16ec6f950b520d1f2a7d9bebd1142eac7/__unittest_data__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4071, 12, 529, 13, 294, 628, 2395, 27265, 3997, 1930, 26344, 3997, 327, 26344, 3997, 18, 3612, 12, 6231, 33, 529, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4071, 12, 529, 13, 294, 628, 2395, 27265, 3997, 1930, 26344, 3997, 327, 26344, 3997, 18, 3612, 12, 6231, 33, 529, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
Returns the real period. This is the correct period in the BSD conjecture, i.e., it is the least real period * 2 when the period lattice is rectangular.
Returns the real period. If self is given by a \emph{minimal Weierstrass equation} then this is the correct period in the BSD conjecture, i.e., it is the least real period * 2 when the period lattice is rectangular.
def omega(self): """ Returns the real period. This is the correct period in the BSD conjecture, i.e., it is the least real period * 2 when the period lattice is rectangular.
b887d4fae2ad8d9c7f1ce5996235d681761c2f80 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b887d4fae2ad8d9c7f1ce5996235d681761c2f80/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17220, 12, 2890, 4672, 3536, 2860, 326, 2863, 3879, 18, 225, 1220, 353, 326, 3434, 3879, 316, 326, 605, 9903, 356, 937, 594, 16, 277, 18, 73, 12990, 518, 353, 326, 4520, 2863, 3879, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17220, 12, 2890, 4672, 3536, 2860, 326, 2863, 3879, 18, 225, 1220, 353, 326, 3434, 3879, 316, 326, 605, 9903, 356, 937, 594, 16, 277, 18, 73, 12990, 518, 353, 326, 4520, 2863, 3879, 38...
Returns the Cartan Type.
Returns the Cartan type.
def cartan_type(self): """ Returns the Cartan Type.
426aec46fc27abb10bd553529a37d002d6f934b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/426aec46fc27abb10bd553529a37d002d6f934b3/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7035, 304, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 17695, 304, 1412, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7035, 304, 67, 723, 12, 2890, 4672, 3536, 2860, 326, 17695, 304, 1412, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
list = filter(lambda x: self._jobs.get(x, Job()).attempt < self.maxRetry, self.ready)
list = filter(lambda x: self._jobs.get(x, Job()).attempt - 1 < self.maxRetry, self.ready)
def getSubmissionJobs(self, maxsample): # Determine number of jobs to submit submit = self.nJobs nQueued = len(self.queued) if self.inQueue > 0: submit = min(submit, self.inQueue - nQueued) if self.inFlight > 0: submit = min(submit, self.inFlight - nQueued - len(self.running)) if self.config.opts.continuous: submit = min(submit, maxsample) submit = max(submit, 0)
29ce5a23e477b88d191bb796bb2443bffeab4377 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8443/29ce5a23e477b88d191bb796bb2443bffeab4377/job_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7040, 3951, 7276, 12, 2890, 16, 943, 6358, 4672, 468, 10229, 1300, 434, 6550, 358, 4879, 4879, 273, 365, 18, 82, 7276, 290, 21039, 273, 562, 12, 2890, 18, 19499, 13, 309, 365, 18, 267,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7040, 3951, 7276, 12, 2890, 16, 943, 6358, 4672, 468, 10229, 1300, 434, 6550, 358, 4879, 4879, 273, 365, 18, 82, 7276, 290, 21039, 273, 562, 12, 2890, 18, 19499, 13, 309, 365, 18, 267,...
be associated with any text entry control. (eg. wxTextCtrl, wxComboBox, etc.)
be associated with any text entry control. (eg. wx.TextCtrl, wx.ComboBox, etc.)
def _AdjustField(self, slice): """ 'Fixes' an integer field. Right or left-justifies, as required."""
89f9e172e206e88c784ef0ef88f77a38a5585d35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/89f9e172e206e88c784ef0ef88f77a38a5585d35/maskededit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10952, 974, 12, 2890, 16, 2788, 4672, 3536, 296, 8585, 281, 11, 392, 3571, 652, 18, 13009, 578, 2002, 17, 3732, 5032, 16, 487, 1931, 12123, 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, 389, 10952, 974, 12, 2890, 16, 2788, 4672, 3536, 296, 8585, 281, 11, 392, 3571, 652, 18, 13009, 578, 2002, 17, 3732, 5032, 16, 487, 1931, 12123, 2, -100, -100, -100, -100, -100, -100, ...
'BarTest.Test1', 'BarTest.Test2', 'BarTest.Test3', ]) self.RunAndVerify('BarTest.*-BarTest.Test1', [ 'BarTest.Test2', 'BarTest.Test3',
'BarTest.TestOne', 'BarTest.TestTwo', 'BarTest.TestThree', ] + PARAM_TESTS) self.RunAndVerify('BarTest.*-BarTest.TestOne', [ 'BarTest.TestTwo', 'BarTest.TestThree',
def testNegativeFilters(self): self.RunAndVerify('*-FooTest.Abc', [ 'FooTest.Xyz',
3d7042176307f0d7700a3640f3b3bcc8790b8fcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4198/3d7042176307f0d7700a3640f3b3bcc8790b8fcd/gtest_filter_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 14959, 5422, 12, 2890, 4672, 365, 18, 1997, 1876, 8097, 2668, 14, 17, 42, 5161, 4709, 18, 5895, 71, 2187, 306, 296, 42, 5161, 4709, 18, 60, 93, 94, 2187, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 14959, 5422, 12, 2890, 4672, 365, 18, 1997, 1876, 8097, 2668, 14, 17, 42, 5161, 4709, 18, 5895, 71, 2187, 306, 296, 42, 5161, 4709, 18, 60, 93, 94, 2187, 2, -100, -100, -100, -...
d0 = base.replace(minute=3, tzinfo=OperandDependentOffset()) d1 = base.replace(minute=9, tzinfo=OperandDependentOffset()) d2 = base.replace(minute=11, tzinfo=OperandDependentOffset()) for x in d0, d1, d2: for y in d0, d1, d2: got = cmp(x, y) if (x is d0 or x is d1) and (y is d0 or y is d1): expected = 0 elif x is y is d2: expected = 0 elif x is d2: expected = -1 else: assert y is d2 expected = 1 self.assertEqual(got, expected)
if cls is not timetz: d0 = base.replace(minute=3, tzinfo=OperandDependentOffset()) d1 = base.replace(minute=9, tzinfo=OperandDependentOffset()) d2 = base.replace(minute=11, tzinfo=OperandDependentOffset()) for x in d0, d1, d2: for y in d0, d1, d2: got = cmp(x, y) if (x is d0 or x is d1) and (y is d0 or y is d1): expected = 0 elif x is y is d2: expected = 0 elif x is d2: expected = -1 else: assert y is d2 expected = 1 self.assertEqual(got, expected)
def utcoffset(self, t): if t.minute < 10: return t.minute # d0 and d1 equal after adjustment else: return 59 # d2 off in the weeds
bad8ff089a04372465c3143a3567b9712673c155 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/bad8ff089a04372465c3143a3567b9712673c155/test_datetime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9439, 3348, 12, 2890, 16, 268, 4672, 309, 268, 18, 17637, 411, 1728, 30, 327, 268, 18, 17637, 468, 302, 20, 471, 302, 21, 3959, 1839, 18335, 469, 30, 327, 14995, 4202, 468, 302, 22, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9439, 3348, 12, 2890, 16, 268, 4672, 309, 268, 18, 17637, 411, 1728, 30, 327, 268, 18, 17637, 468, 302, 20, 471, 302, 21, 3959, 1839, 18335, 469, 30, 327, 14995, 4202, 468, 302, 22, ...
return FireBirdExecutionContext(self)
return FBExecutionContext(self)
def create_execution_context(self): return FireBirdExecutionContext(self)
046703498161bc3cd3851e24e20ce87796440d31 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/046703498161bc3cd3851e24e20ce87796440d31/firebird.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 16414, 67, 2472, 12, 2890, 4672, 327, 10151, 38, 6909, 3210, 1042, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 752, 67, 16414, 67, 2472, 12, 2890, 4672, 327, 10151, 38, 6909, 3210, 1042, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
document.body[j+1:j+1] = subst
document.body[j:j] = subst
def revert_tabularvalign(document): " Revert the tabular valign option " i = 0 while True: i = find_token(document.body, "\\begin_inset Tabular", i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of tabular.") i = j continue # don't set a box for longtables, only delete tabularvalignment # the alignment is 2 lines below \\begin_inset Tabular p = document.body[i+2].find("islongtable") if p > -1: q = document.body[i+2].find("tabularvalignment") if q > -1: document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' i = i + 1 # when no longtable if p == -1: tabularvalignment = 'c' # which valignment is specified? m = document.body[i+2].find('tabularvalignment="top"') if m > -1: tabularvalignment = 't' m = document.body[i+2].find('tabularvalignment="bottom"') if m > -1: tabularvalignment = 'b' # delete tabularvalignment q = document.body[i+2].find("tabularvalignment") if q > -1: document.body[i+2] = document.body[i+2][:q-1] document.body[i+2] = document.body[i+2] + '>' # don't add a box when centered if tabularvalignment == 'c': i = j continue subst = ['\\end_layout', '\\end_inset'] document.body[j+1:j+1] = subst # just inserts those lines subst = ['\\begin_inset Box Frameless', 'position "' + tabularvalignment +'"', 'hor_pos "c"', 'has_inner_box 1', 'inner_pos "c"', 'use_parbox 0', # we don't know the width, assume 50% 'width "50col%"', 'special "none"', 'height "1in"', 'height_special "totalheight"', 'status open', '', '\\begin_layout Plain Layout'] document.body[i:i] = subst # this just inserts the array at i i += len(subst) + 2 # adjust i to save a few cycles
34012e0bee301286dc4811826c629bca978be630 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7514/34012e0bee301286dc4811826c629bca978be630/lyx_2_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 7032, 2490, 1125, 724, 12, 5457, 4672, 315, 868, 1097, 326, 28342, 1244, 724, 1456, 315, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 842...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 7032, 2490, 1125, 724, 12, 5457, 4672, 315, 868, 1097, 326, 28342, 1244, 724, 1456, 315, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67, 2316, 12, 5457, 18, 3432, 16, 842...
transaction_count = 50
transaction_count = 100
def testFixture(self): """"This isn't actually a test. It just takes advantage of the test harness to spam a bunch of messages to the supply app and spit out the data in a format that can be sucked into a fixture""" # this is the number of transactions that will be generated transaction_count = 50 # these are the locations that will be the origins, chosen randomly # from this list # the destinations will be chosen randomly from the origins' children originating_locations = [20, 2001, 2002, 2003] # the sender will always be the same, for now phone = "55555" all_txns = [] # these are the percentages these items will match waybill_match_percent = .9 amount_match_percent = .9 loc_match_percent = .95 num_locs = len(Location.objects.all()) # allow specifying the minimum and maximum dates for message generation min_date = datetime(2009,4,1) max_date = datetime(2009,4,30) min_time = time.mktime(min_date.timetuple()) max_time = time.mktime(max_date.timetuple()) for i in range(transaction_count): # get some random data based on the parameters we've set above origin = Location.objects.get(code=random.choice(originating_locations )) destination = random.choice(origin.children.all()) waybill = random.randint(10000,99999) amount = random.randint(1, 500) * 10 stock = random.randint(1, 3000) * 10 date = datetime.fromtimestamp(random.randint(min_time, max_time)) issue_string = "%s@%s > llin issue from %s to %s %s %s %s" % (phone, date.strftime("%Y%m%d%H%M"), origin.code, destination.code, waybill, amount, stock) all_txns.append(issue_string) # create a waybill number based on the likelihood of match if random.random() < waybill_match_percent: ret_waybill = waybill else: ret_waybill = random.randint(10000,99999) # create an amount based on the likelihood of match if random.random() < amount_match_percent: ret_amount = amount else: ret_amount = random.randint(1, 500) * 10 # create an origin and destination based on the likelihood of match if random.random() < loc_match_percent: ret_orig = origin else: ret_orig = Location.objects.get(pk=random.randint(1,num_locs)) if random.random() < loc_match_percent: ret_dest = destination else: ret_dest = Location.objects.get(pk=random.randint(1, num_locs)) # make sure the stock at the receiver is higher than the amount of the bill ret_stock = random.randint(1, 2000) * 10 + ret_amount # make sure the date received is after the date sent ret_date = datetime.fromtimestamp(random.randint(time.mktime(date.timetuple()), max_time)) receive_string = "%s@%s > llin receive from %s to %s %s %s %s" % (phone, ret_date.strftime("%Y%m%d%H%M"), ret_orig.code, ret_dest.code, ret_waybill, ret_amount, ret_stock) all_txns.append(receive_string) script = "\n".join(all_txns) self.runScript(script) dumpdata = Command() print "\n\n=========This is your fixture. Copy and paste it to a text file========\n\n" print dumpdata.handle("supply")
10de2c4f7545836b49dff712cb464a45f66355d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/10de2c4f7545836b49dff712cb464a45f66355d1/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 26392, 12, 2890, 4672, 3536, 6, 2503, 5177, 1404, 6013, 279, 1842, 18, 225, 2597, 2537, 5530, 1261, 7445, 410, 434, 326, 1842, 366, 1303, 403, 358, 24824, 279, 25606, 434, 2743, 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, 1842, 26392, 12, 2890, 4672, 3536, 6, 2503, 5177, 1404, 6013, 279, 1842, 18, 225, 2597, 2537, 5530, 1261, 7445, 410, 434, 326, 1842, 366, 1303, 403, 358, 24824, 279, 25606, 434, 2743, 35...
pass
pass
def preparesocket(socketobject): if ostype == 'Windows': # we need to set a timeout because on rare occasions Windows will block # on recvmess with a bad socket. This prevents it from locking the system. # We use select, so the timeout should never be actually used. # The actual value doesn't seem to matter, so I'll use 100 years socketobject.settimeout(60*60*24*365*100) elif ostype == 'Linux' or ostype == 'Darwin': # Linux seems not to care if we set the timeout, Mac goes nuts and refuses # to let you send from a socket you're receiving on (why?) pass elif ostype == "WindowsCE": # No known issues, so just go pass else: raise UnsupportedSystemException, "Unsupported system type: '"+osrealtype+"' (alias: "+ostype+")"
22d761c4c15eac3b454036ce4b39f5c1a4116a85 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7272/22d761c4c15eac3b454036ce4b39f5c1a4116a85/nonportable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29294, 1861, 12, 7814, 1612, 4672, 225, 309, 320, 27273, 422, 296, 10399, 4278, 468, 732, 1608, 358, 444, 279, 2021, 2724, 603, 25671, 9145, 345, 1115, 8202, 903, 1203, 468, 603, 1950, 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, 29294, 1861, 12, 7814, 1612, 4672, 225, 309, 320, 27273, 422, 296, 10399, 4278, 468, 732, 1608, 358, 444, 279, 2021, 2724, 603, 25671, 9145, 345, 1115, 8202, 903, 1203, 468, 603, 1950, 3...
def process_python_command_line_scripts(self, source_dir, prefix=" "):
def process_python_command_line_scripts(self, source_dir, prefix=" ", infix=""):
def process_python_command_line_scripts(self, source_dir, prefix=" "): print prefix+'Processing: %s' % show_string(source_dir) for file_name in os.listdir(source_dir): if (not file_name.endswith(".py")): continue self.write_dispatcher( source_dir=source_dir, file_name=file_name, suppress_warning=False)
510224941fe0603139123782c91ca0a3d92f787b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/510224941fe0603139123782c91ca0a3d92f787b/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 8103, 67, 3076, 67, 1369, 67, 12827, 12, 2890, 16, 1084, 67, 1214, 16, 1633, 1546, 225, 3104, 316, 904, 1546, 6, 4672, 1172, 1633, 6797, 7798, 30, 738, 87, 11, 738, 2405, 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, 1207, 67, 8103, 67, 3076, 67, 1369, 67, 12827, 12, 2890, 16, 1084, 67, 1214, 16, 1633, 1546, 225, 3104, 316, 904, 1546, 6, 4672, 1172, 1633, 6797, 7798, 30, 738, 87, 11, 738, 2405, 6...
return matrix(N.multiply(self.arr, other)) else: return matrix(N.dot(self.arr, other))
return asmatrix(N.multiply(self.arr, other)) else: return asmatrix(N.dot(self.arr, other))
def __mul__(self, other): if (isinstance(other, N.ndarray) or isinstance(other, matrix)) \ and other.ndim == 0: return matrix(N.multiply(self.arr, other)) else: return matrix(N.dot(self.arr, other))
9f57eaeaee4fa542932b99f4bea5dc7e44538184 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/9f57eaeaee4fa542932b99f4bea5dc7e44538184/matrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 309, 261, 291, 1336, 12, 3011, 16, 423, 18, 25681, 13, 578, 1549, 12, 3011, 16, 3148, 3719, 521, 471, 1308, 18, 82, 3509, 422, 374, 30, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16411, 972, 12, 2890, 16, 1308, 4672, 309, 261, 291, 1336, 12, 3011, 16, 423, 18, 25681, 13, 578, 1549, 12, 3011, 16, 3148, 3719, 521, 471, 1308, 18, 82, 3509, 422, 374, 30, 32...
CGC = options.CGC check_cgc(CGC)
cgc_path = options.cgc_path check_cgc(cgc_path)
def main(cg_shader, CGC): matrixloadorder = get_matrixloadorder(cg_shader) glsl_vertex, glsl_fragment, log = cg_to_glsl(cg_shader, CGC) print log print fix_glsl(glsl_vertex) print print '// #o3d SplitMarker' print get_matrixloadorder(cg_shader).strip() print print fix_glsl(glsl_fragment)
2a3a06654561be5d0a871c950e7a791bea57bb75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/2a3a06654561be5d0a871c950e7a791bea57bb75/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 26275, 67, 674, 1143, 16, 385, 15396, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 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, 2774, 12, 26275, 67, 674, 1143, 16, 385, 15396, 4672, 3148, 945, 1019, 273, 336, 67, 5667, 945, 1019, 12, 26275, 67, 674, 1143, 13, 5118, 2069, 67, 15281, 16, 5118, 2069, 67, 11956, 16...
self._builder.runner = AtimesRunner(self._builder)
self._runner = StraceRunner(self._builder)
def __call__(self, *args): """ Smart command runner that replaces itself in self._builder.runner the first time it is used. It uses StraceRunner if it can, otherwise AtimesRunner if available, otherwise AlwaysRunner. """
ba26abc46721b875b4b9b2711c30a38c9f1705a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7381/ba26abc46721b875b4b9b2711c30a38c9f1705a5/fabricate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 3536, 19656, 1296, 8419, 716, 12878, 6174, 316, 365, 6315, 9574, 18, 18156, 326, 1122, 813, 518, 353, 1399, 18, 225, 2597, 4692, 3978, 623...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 3536, 19656, 1296, 8419, 716, 12878, 6174, 316, 365, 6315, 9574, 18, 18156, 326, 1122, 813, 518, 353, 1399, 18, 225, 2597, 4692, 3978, 623...
... if not roundtrip(open(testfile)): break
... if not roundtrip(open(testfile)): ... print "Roundtrip failed for file %s" % testfile ... break
>>> dump_tokens("@staticmethod\\ndef foo(x,y): pass")
d997ea08fdd8a7f5d27b36b9b25003e18d14857c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/d997ea08fdd8a7f5d27b36b9b25003e18d14857c/test_tokenize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 4657, 67, 7860, 2932, 36, 3845, 2039, 1695, 82, 536, 8431, 12, 92, 16, 93, 4672, 1342, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 4657, 67, 7860, 2932, 36, 3845, 2039, 1695, 82, 536, 8431, 12, 92, 16, 93, 4672, 1342, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'>' + `foverrides` + '</a></CODE>')
'">' + `foverrides` + '</a></code>')
def _func_details(self, functions, cls, heading='Function Details'): """## Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</TABLE>'
89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 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, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, ...
(001011.0011)
(001011, 0011)
def standard_factorization(self): r""" Returns the standard factorization of self. The *standard factorization* of a word `w` is the unique factorization: `w = uv` where `v` is the longest proper suffix of `w` that qualifies as a Lyndon word. Note that if `w` is a Lyndon word with standard factorization `w = uv`, then `u` and `v` are also Lyndon words and `u < v`. See for instance [1] and [2]. OUTPUT:
15b3eef9c2a56a442197101e799229fc2fce69fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/15b3eef9c2a56a442197101e799229fc2fce69fc/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4529, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 4529, 5578, 1588, 434, 365, 18, 225, 1021, 380, 10005, 5578, 1588, 14, 434, 279, 2076, 1375, 91, 68, 353, 326, 3089, 5578, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4529, 67, 6812, 1588, 12, 2890, 4672, 436, 8395, 2860, 326, 4529, 5578, 1588, 434, 365, 18, 225, 1021, 380, 10005, 5578, 1588, 14, 434, 279, 2076, 1375, 91, 68, 353, 326, 3089, 5578, 1...
gLogger.error(errStr,"%s %s" % (lfn,res['Value']['Failed'][lfn])) oDataOperation.setValueByKey('FinalStatus','Failed')
gLogger.error( errStr, "%s %s" % ( lfn, res['Value']['Failed'][lfn] ) ) oDataOperation.setValueByKey( 'FinalStatus', 'Failed' )
def putAndRegister(self,lfn,file,diracSE,guid=None,path=None,checksum=None,catalog=None): """ Put a local file to a Storage Element and register in the File Catalogues
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
self.jobParameters = []
self.jobParameters = {}
def __init__(self, jobid, source=''):
214881d8826c726afcba88518eb7a72a22e1fd0c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/214881d8826c726afcba88518eb7a72a22e1fd0c/JobReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 350, 16, 1084, 2218, 11, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 350, 16, 1084, 2218, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
for slice_attribute in map(lambda id: all_slice_attributes[id], slice['slice_attribute_ids']): if not attributes.has_key(slice_attribute['name']) or \ slice_attribute['node_id'] is not None: attributes[slice_attribute['name']] = { 'name': slice_attribute['name'], 'value': slice_attribute['value'] } except: attributes={'ignored':{'name':'attributes caching','value':'not implemented yet'}}
slice_attributes = map(lambda id: all_slice_attributes[id], slice['slice_attribute_ids']) for sliver_attribute in filter(lambda a: a['node_id'] == node_id, slice_attributes): sliver_attributes.append(sliver_attribute['name']) attributes.append({'name': sliver_attribute['name'], 'value': sliver_attribute['value']}) for slice_attribute in filter(lambda a: a['node_id'] is None, slice_attributes): if slice_attribute['name'] not in sliver_attributes: attributes.append({'name': slice_attribute['name'], 'value': slice_attribute['value']}) except Exception, err: attributes=[{'name':'attributes caching','value':'not implemented yet'}]
def call(self, auth, node_filter = None):
3d5a85d267e89ad9412199fb93251958e2b9f837 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/3d5a85d267e89ad9412199fb93251958e2b9f837/GetSlivers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 756, 67, 2188, 273, 599, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 756, 67, 2188, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if data != None: for index in range(len(data.domain)): attr = data.domain[index] if attr.varType == orange.VarTypes.Discrete: variableValueIndices = getVariableValueIndices(data.domain[index], sortValuesForDiscreteAttrs) if 0 in [i == variableValueIndices[attr.values[i]] for i in range(len(attr.values))]: line = arr[index].copy() indices = [numpy.where(line == val, 1, 0) for val in range(len(attr.values))] for i in range(len(attr.values)): numpy.putmask(line, indices[i], variableValueIndices[attr.values[i]]) arr[index] = line originalData[index] = line arr[index] = (arr[index]*2.0 + 1.0)/ float(2*len(attr.values)) scaledData[index] = arr[index] + (self.jitterSize/(50.0*max(1,len(attr.values))))*(numpy.random.random(len(fullData)) - 0.5) elif attr.varType == orange.VarTypes.Continuous: diff = self.domainDataStat[index].max - self.domainDataStat[index].min if diff == 0: diff = 1 arr[index] = (arr[index] - self.domainDataStat[index].min) / diff if self.jitterContinuous: line = arr[index] + self.jitterSize/50.0 * (0.5 - numpy.random.random(len(fullData))) line = numpy.absolute(line) ind = numpy.where(line > 1.0, 1, 0) numpy.putmask(line, ind, 2.0 - numpy.compress(ind, line)) scaledData[index] = line else: scaledData[index] = arr[index]
for index in range(len(data.domain)): attr = data.domain[index] if attr.varType == orange.VarTypes.Discrete: variableValueIndices = getVariableValueIndices(data.domain[index], sortValuesForDiscreteAttrs) if 0 in [i == variableValueIndices[attr.values[i]] for i in range(len(attr.values))]: line = noJitteringData[index].copy() indices = [numpy.where(line == val, 1, 0) for val in range(len(attr.values))] for i in range(len(attr.values)): numpy.putmask(line, indices[i], variableValueIndices[attr.values[i]]) noJitteringData[index] = line originalData[index] = line noJitteringData[index] = (noJitteringData[index]*2.0 + 1.0)/ float(2*len(attr.values)) elif attr.varType == orange.VarTypes.Continuous: diff = self.domainDataStat[index].max - self.domainDataStat[index].min or 1 noJitteringData[index] = (noJitteringData[index] - self.domainDataStat[index].min) / diff
def setData(self, data, subsetData = None, **args): if args.get("skipIfSame", 1): if ((data == None and self.rawData == None) or (self.rawData != None and data != None and self.rawData.checksum() == data.checksum())) and \ ((subsetData == None and self.rawSubsetData == None) or (self.rawSubsetData != None and subsetData != None and self.rawSubsetData.checksum() == subsetData.checksum())): return
8ce677dee9eac1034560a6337470c81b757d28d0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/8ce677dee9eac1034560a6337470c81b757d28d0/orngScaleData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 501, 16, 7931, 751, 273, 599, 16, 2826, 1968, 4672, 309, 833, 18, 588, 2932, 7457, 2047, 8650, 3113, 404, 4672, 309, 14015, 892, 422, 599, 471, 365, 18, 1899, 751, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7929, 12, 2890, 16, 501, 16, 7931, 751, 273, 599, 16, 2826, 1968, 4672, 309, 833, 18, 588, 2932, 7457, 2047, 8650, 3113, 404, 4672, 309, 14015, 892, 422, 599, 471, 365, 18, 1899, 751, ...
raise errors.BlockDeviceError("Can't find myself in /proc (minor %d)" % self.minor)
_ThrowError("drbd%d: can't find myself in /proc", self.minor)
def GetProcStatus(self): """Return device data from /proc.
82463074c0c011a83cf2239affbdb44cb2940801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/82463074c0c011a83cf2239affbdb44cb2940801/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 15417, 1482, 12, 2890, 4672, 3536, 990, 2346, 501, 628, 342, 9381, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 15417, 1482, 12, 2890, 4672, 3536, 990, 2346, 501, 628, 342, 9381, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
CONFIG="$BASE/etc/opencore/maildrop_config.py"
CONFIG="$BASE/etc/opencore/maildrop/config.py"
def get_req_setting(self, setting): return self.req_settings.get(setting, self.interpolate(self.defaults[setting]))
158ae4e43566266bb30b1c1654f3ade014dcbd4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12796/158ae4e43566266bb30b1c1654f3ade014dcbd4f/topp_opencore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3658, 67, 8920, 12, 2890, 16, 3637, 4672, 327, 365, 18, 3658, 67, 4272, 18, 588, 12, 8920, 16, 365, 18, 18676, 340, 12, 2890, 18, 7606, 63, 8920, 22643, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3658, 67, 8920, 12, 2890, 16, 3637, 4672, 327, 365, 18, 3658, 67, 4272, 18, 588, 12, 8920, 16, 365, 18, 18676, 340, 12, 2890, 18, 7606, 63, 8920, 22643, 2, -100, -100, -100,...
leftDiff=newInfo.compareEndPoints(oldInfo,"startToStart") rightDiff=newInfo.compareEndPoints(oldInfo,"endToEnd") if speakSelected and leftDiff<0 and not newInfo.isCollapsed:
if speakSelected and startToStart<0 and not newInfo.isCollapsed:
def speakSelectionChange(oldInfo,newInfo,speakSelected=True,speakUnselected=True,speakSelectionDeleted=True): selectedTextList=[] unselectedTextList=[] if newInfo.isCollapsed and oldInfo.isCollapsed: return if newInfo.compareEndPoints(oldInfo,"startToEnd")>=0 or newInfo.compareEndPoints(oldInfo,"endToStart")<=0: if speakSelected and not newInfo.isCollapsed: selectedTextList.append(newInfo.text) if speakUnselected and not oldInfo.isCollapsed: unselectedTextList.append(oldInfo.text) else: leftDiff=newInfo.compareEndPoints(oldInfo,"startToStart") rightDiff=newInfo.compareEndPoints(oldInfo,"endToEnd") if speakSelected and leftDiff<0 and not newInfo.isCollapsed: tempInfo=newInfo.copy() tempInfo.setEndPoint(oldInfo,"endToStart") selectedTextList.append(tempInfo.text) if speakSelected and rightDiff>0 and not newInfo.isCollapsed: tempInfo=newInfo.copy() tempInfo.setEndPoint(oldInfo,"startToEnd") selectedTextList.append(tempInfo.text) if leftDiff>0 and not oldInfo.isCollapsed: tempInfo=oldInfo.copy() tempInfo.setEndPoint(newInfo,"endToStart") unselectedTextList.append(tempInfo.text) if rightDiff<0 and not oldInfo.isCollapsed: tempInfo=oldInfo.copy() tempInfo.setEndPoint(newInfo,"startToEnd") unselectedTextList.append(tempInfo.text) if speakSelected: for text in selectedTextList: if len(text)==1: text=processSymbol(text) speakMessage(_("selected %s")%text) if speakUnselected: for text in unselectedTextList: if len(text)==1: text=processSymbol(text) speakMessage(_("unselected %s")%text)
3917512516550c18d6e13529c8dc07ea6ec0508e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/3917512516550c18d6e13529c8dc07ea6ec0508e/speech.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 6233, 3043, 12, 1673, 966, 16, 2704, 966, 16, 87, 10244, 7416, 33, 5510, 16, 87, 10244, 984, 8109, 33, 5510, 16, 87, 10244, 6233, 7977, 33, 5510, 4672, 3170, 1528, 682, 33,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 10244, 6233, 3043, 12, 1673, 966, 16, 2704, 966, 16, 87, 10244, 7416, 33, 5510, 16, 87, 10244, 984, 8109, 33, 5510, 16, 87, 10244, 6233, 7977, 33, 5510, 4672, 3170, 1528, 682, 33,...
if identity.current.user.user_id == 100548: return 'admin'
def _user_can_set_acls(self, identity, pkg): '''Check that the current user can set acls.
ff20c7a3bb1716b50b3c5b1a85bfe9340a5865c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9953/ff20c7a3bb1716b50b3c5b1a85bfe9340a5865c5/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1355, 67, 4169, 67, 542, 67, 69, 6429, 12, 2890, 16, 4215, 16, 3475, 4672, 9163, 1564, 716, 326, 783, 729, 848, 444, 30906, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 1355, 67, 4169, 67, 542, 67, 69, 6429, 12, 2890, 16, 4215, 16, 3475, 4672, 9163, 1564, 716, 326, 783, 729, 848, 444, 30906, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
binary = f.read(chunksize)
binary = f.read(chunksize).decode('latin-1')
def libc_ver(executable=sys.executable,lib='',version='', chunksize=2048): """ Tries to determine the libc version that the file executable (which defaults to the Python interpreter) is linked against. Returns a tuple of strings (lib,version) which default to the given parameters in case the lookup fails. Note that the function has intimate knowledge of how different libc versions add symbols to the executable and thus is probably only useable for executables compiled using gcc. The file is read and scanned in chunks of chunksize bytes. """ if hasattr(os.path, 'realpath'): # Python 2.2 introduced os.path.realpath(); it is used # here to work around problems with Cygwin not being # able to open symlinks for reading executable = os.path.realpath(executable) f = open(executable,'rb') binary = f.read(chunksize) pos = 0 while 1: m = _libc_search.search(binary,pos) if not m: binary = f.read(chunksize) if not binary: break pos = 0 continue libcinit,glibc,glibcversion,so,threads,soversion = m.groups() if libcinit and not lib: lib = 'libc' elif glibc: if lib != 'glibc': lib = 'glibc' version = glibcversion elif glibcversion > version: version = glibcversion elif so: if lib != 'glibc': lib = 'libc' if soversion > version: version = soversion if threads and version[-len(threads):] != threads: version = version + threads pos = m.end() f.close() return lib,version
4e4dab535ea43c362477f0a66423c9bf9e6d3b3c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/4e4dab535ea43c362477f0a66423c9bf9e6d3b3c/platform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2561, 71, 67, 502, 12, 17751, 33, 9499, 18, 17751, 16, 2941, 2218, 2187, 1589, 2218, 2187, 225, 23256, 33, 21573, 28, 4672, 225, 3536, 10000, 281, 358, 4199, 326, 2561, 71, 1177, 716, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2561, 71, 67, 502, 12, 17751, 33, 9499, 18, 17751, 16, 2941, 2218, 2187, 1589, 2218, 2187, 225, 23256, 33, 21573, 28, 4672, 225, 3536, 10000, 281, 358, 4199, 326, 2561, 71, 1177, 716, ...
frame = InfoFrame("Java-to-Jython Event/Property/Method Browser") frame.show()
def main(): frame = InfoFrame("Java-to-Jython Event/Property/Method Browser") frame.show() if __name__=='main' or __name__ =='__main__': main()
def setupTree(self, top, pedict, ppdict, pmdict): tree_model = SampleModel(top) events = tree_model.addNode("Events",["<<Events of the class and its ancestors>>"]) props = tree_model.addNode("Properties",["<<Properties of the class and its ancestors>>"]) meths = tree_model.addNode("Methods",["<<Methods of the class and its ancestors>>"]) for key in pedict.keys(): tree_model.addNode(key, pedict[key], parent=events) for key in ppdict.keys(): tree_model.addNode(key, ppdict[key], parent=props) for key in pmdict.keys(): tree_model.addNode(key, pmdict[key], parent=meths) self.tree.setModel(tree_model)
c13b73056372c5acd17d365ca05c40d3b4689965 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1300/c13b73056372c5acd17d365ca05c40d3b4689965/jyinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 2471, 12, 2890, 16, 1760, 16, 31840, 933, 16, 8228, 1576, 16, 293, 1264, 933, 4672, 2151, 67, 2284, 273, 11474, 1488, 12, 3669, 13, 2641, 273, 2151, 67, 2284, 18, 1289, 907, 2932...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 2471, 12, 2890, 16, 1760, 16, 31840, 933, 16, 8228, 1576, 16, 293, 1264, 933, 4672, 2151, 67, 2284, 273, 11474, 1488, 12, 3669, 13, 2641, 273, 2151, 67, 2284, 18, 1289, 907, 2932...
checktool(player, wolfpack.finditem(arguments[0]), 1)
checktool(player, wolfpack.finditem(arguments[0]), True)
def applyproperties(self, player, arguments, item, exceptional): # All tailoring items crafted out of leather gain the special color if self.submaterial1 > 0: material = self.parent.getsubmaterial1used(player, arguments) material = self.parent.submaterials1[material] item.color = material[4] item.settag('resname', material[5])
9f268bcf5219f9554c119949e15dff3c48669156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/9f268bcf5219f9554c119949e15dff3c48669156/tailoring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 4738, 12, 2890, 16, 7291, 16, 1775, 16, 761, 16, 1520, 287, 4672, 468, 4826, 5798, 6053, 1516, 276, 5015, 329, 596, 434, 884, 4806, 17527, 326, 4582, 2036, 309, 365, 18, 1717, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 4738, 12, 2890, 16, 7291, 16, 1775, 16, 761, 16, 1520, 287, 4672, 468, 4826, 5798, 6053, 1516, 276, 5015, 329, 596, 434, 884, 4806, 17527, 326, 4582, 2036, 309, 365, 18, 1717, 20...
env['wsgi.multiprocess'] = True
env['wsgi.multiprocess'] = False
def setupEnvironment(self, request): # Called in IO thread env = createCGIEnvironment(request) env['wsgi.version'] = (1, 0) env['wsgi.url_scheme'] = env['REQUEST_SCHEME'] env['wsgi.input'] = InputStream(request.stream) env['wsgi.errors'] = ErrorStream() env['wsgi.multithread'] = True env['wsgi.multiprocess'] = True env['wsgi.run_once'] = False env['wsgi.file_wrapper'] = FileWrapper self.environment = env
e4378c19a82322ae0026bf5eafe1584502d4dbe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e4378c19a82322ae0026bf5eafe1584502d4dbe5/wsgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 5494, 12, 2890, 16, 590, 4672, 468, 11782, 316, 1665, 2650, 1550, 273, 752, 39, 13797, 5494, 12, 2293, 13, 1550, 3292, 28539, 18, 1589, 3546, 1377, 273, 261, 21, 16, 374, 13, 155...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 5494, 12, 2890, 16, 590, 4672, 468, 11782, 316, 1665, 2650, 1550, 273, 752, 39, 13797, 5494, 12, 2293, 13, 1550, 3292, 28539, 18, 1589, 3546, 1377, 273, 261, 21, 16, 374, 13, 155...
select = ids
def read(self, cr, user, ids, fields=None, context=None, load='_classic_read'): if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'read', context=context) if not fields: fields = self._columns.keys() + self._inherit_fields.keys() select = ids if isinstance(ids, (int, long)): select = [ids] result = self._read_flat(cr, user, select, fields, context, load) for r in result: for key, v in r.items(): if v == None: r[key] = False if isinstance(ids, (int, long)): return result and result[0] or False return result
775a4f66e1b5b0272a8aa1c59c8303b2dc5951c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/775a4f66e1b5b0272a8aa1c59c8303b2dc5951c4/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 1466, 33, 7036, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 309, 486, 819, 30, 819, 273, 2618, 365, 18, 601...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 4422, 16, 729, 16, 3258, 16, 1466, 33, 7036, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 309, 486, 819, 30, 819, 273, 2618, 365, 18, 601...
my_color = gtk.gdk.color_parse(my_color_str)
my_color = gtk.gdk.color_parse(my_color_str)
def add_task_tree_to_list(self, tree_store, tid, parent, selected_uid=None,\ active_tasks=[], treeview=True): task = self.req.get_task(tid) if selected_uid and selected_uid == tid : title = self.__build_task_title(task,extended=True) else : title = self.__build_task_title(task,extended=False) duedate = task.get_due_date() left = task.get_days_left() tags = task.get_tags() # Compute color my_color = None color_count = 0.0 color_dict = {"red":0,"green":0,"blue":0} for my_tag in tags: my_color_str = my_tag.get_attribute("color") if my_color_str : my_color = gtk.gdk.color_parse(my_color_str) color_count = color_count + 1 color_dict["red"] = color_dict["red"] + my_color.red color_dict["green"] = color_dict["green"] + my_color.green color_dict["blue"] = color_dict["blue"] + my_color.blue if color_count != 0: red = int(color_dict["red"] / color_count) green = int(color_dict["green"] / color_count) blue = int(color_dict["blue"] / color_count) brightness = (red+green+blue) / 3.0 while brightness < 60000: red = int( (red + 65535) / 2) green = int( (green + 65535) / 2) blue = int( (blue + 65535) / 2) brightness = (red+green+blue) / 3.0 my_color = gtk.gdk.Color(red, green, blue).to_string() if treeview and not parent and len(task.get_subtasks()) == 0: my_row = self.task_ts.insert_before(None, tree_store.get_iter_first(), row=[tid,title,duedate,left,tags,my_color]) else: my_row = self.task_ts.append(parent, [tid,title,duedate,left,tags,my_color]) #If treeview, we add add the active childs if treeview : for c in task.get_subtasks(): cid = c.get_id() if cid in active_tasks: self.add_task_tree_to_list(tree_store, cid, my_row,selected_uid,\ active_tasks=active_tasks)
c5a0b65696467294e7b6a10bde93ac3f353da81b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/c5a0b65696467294e7b6a10bde93ac3f353da81b/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4146, 67, 3413, 67, 869, 67, 1098, 12, 2890, 16, 2151, 67, 2233, 16, 11594, 16, 982, 16, 3170, 67, 1911, 33, 7036, 17211, 2695, 67, 9416, 22850, 6487, 2151, 1945, 33, 5510, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 4146, 67, 3413, 67, 869, 67, 1098, 12, 2890, 16, 2151, 67, 2233, 16, 11594, 16, 982, 16, 3170, 67, 1911, 33, 7036, 17211, 2695, 67, 9416, 22850, 6487, 2151, 1945, 33, 5510, ...
bFound = 1 print "setting url for word " + word.text + ":" + word.soundUrl
bFound = 1 print "setting url for word " + word.text + ":" + word.soundUrl
def fetchSoundForTranslation(word): locale = getLocale(word) wikiLocales = getWikiLocales(locale) bFound = 0 for wikiLocale in wikiLocales: if (bFound == 0): print 'Language:', wikiLocale, ' Word: ', word.text soundfile = getWikiObject(wikiLocale, word.text, None) # check for specific pronounciation for nouns if soundfile == None: soundfile = getWikiObject(wikiLocale, word.text, 'noun') # check for specific pronounciation for verbs if soundfile == None: soundfile = getWikiObject(wikiLocale, word.text, 'verb') if soundfile: url = downloadFromWiki(soundfile) word.soundUrl = url bFound = 1 print "setting url for word " + word.text + ":" + word.soundUrl else: print "No translation found for: ", word.text
99bcb4855e5a13b7de17d114aa434bf19101a79e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1692/99bcb4855e5a13b7de17d114aa434bf19101a79e/wiktionary_sound.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 24331, 1290, 6717, 12, 1095, 4672, 2573, 273, 9595, 12, 1095, 13, 9050, 13310, 273, 13876, 6169, 13310, 12, 6339, 13, 324, 2043, 273, 374, 364, 9050, 3916, 316, 9050, 13310, 30, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 24331, 1290, 6717, 12, 1095, 4672, 2573, 273, 9595, 12, 1095, 13, 9050, 13310, 273, 13876, 6169, 13310, 12, 6339, 13, 324, 2043, 273, 374, 364, 9050, 3916, 316, 9050, 13310, 30, 30...
return ZZ(nf.idealval(self.pari_hnf(), p.__pari_prime))
return ZZ(nf.idealval(self.pari_hnf(), p._pari_prime))
def valuation(self, p): r""" Return the valuation of this ideal at the prime $\mathfrak{p}$. If $\mathfrak{p}$ is not prime, raise a ValueError.
e007a9d9dedee1de94c0b698d8a1c5dcf36277c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/e007a9d9dedee1de94c0b698d8a1c5dcf36277c4/number_field_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21748, 367, 12, 2890, 16, 293, 4672, 436, 8395, 2000, 326, 21748, 367, 434, 333, 23349, 622, 326, 17014, 271, 64, 15949, 74, 354, 79, 95, 84, 22496, 18, 971, 271, 64, 15949, 74, 354, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21748, 367, 12, 2890, 16, 293, 4672, 436, 8395, 2000, 326, 21748, 367, 434, 333, 23349, 622, 326, 17014, 271, 64, 15949, 74, 354, 79, 95, 84, 22496, 18, 971, 271, 64, 15949, 74, 354, ...
f=os.popen("netstat -rn")
if SOLARIS: f=os.popen("netstat -rvn") else: f=os.popen("netstat -rn")
def read_routes(): f=os.popen("netstat -rn") # -f inet ok = 0 mtu = False routes = [] for l in f.readlines(): if not l: break l = l.strip() if l.find("Destination") >= 0: ok = 1 if l.find("Mtu") >= 0: mtu = True continue if ok == 0: continue if not l: break if mtu: dest,gw,fl,ref,use,mtu,netif = l.split()[:7] else: dest,gw,fl,ref,use,netif = l.split()[:6] if fl.find("Lc") >= 0: continue if dest == "default": dest = 0L netmask = 0L else: if "/" in dest: dest,netmask = dest.split("/") netmask = itom(int(netmask)) else: netmask = itom((dest.count(".") + 1) * 8) dest += ".0"*(3-dest.count(".")) dest, = struct.unpack("I",inet_aton(dest)) if not "G" in fl: gw = '0.0.0.0' ifaddr = get_if_addr(netif) routes.append((dest,netmask,gw,netif,ifaddr)) f.close() return routes
4fa3d085793f1f32bf62e096a2be12bf5eb5407d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/4fa3d085793f1f32bf62e096a2be12bf5eb5407d/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 10854, 13332, 309, 27175, 985, 5127, 30, 284, 33, 538, 18, 84, 3190, 2932, 2758, 5642, 300, 4962, 82, 7923, 469, 30, 284, 33, 538, 18, 84, 3190, 2932, 2758, 5642, 300, 27639, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 10854, 13332, 309, 27175, 985, 5127, 30, 284, 33, 538, 18, 84, 3190, 2932, 2758, 5642, 300, 4962, 82, 7923, 469, 30, 284, 33, 538, 18, 84, 3190, 2932, 2758, 5642, 300, 27639, ...
self._error_check(line, pre_out)
def _eval_line(self, line, allow_use_file=False, wait_for_prompt=True, reformat=True, error_check=True): """ EXAMPLES: We check that errors are correctly checked:: sage: maxima._eval_line('1+1;') '2' sage: maxima.eval('sage0: x == x;') Traceback (most recent call last): ... TypeError: error evaluating "sage0: x == x;":... """ if len(line) == 0: return '' line = line.rstrip() if line[-1] != '$' and line[-1] != ';': line += ';'
18bea2c8fdd74c7656bf4d7e11ecb828a4ecfd18 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/18bea2c8fdd74c7656bf4d7e11ecb828a4ecfd18/maxima.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 12, 2890, 16, 980, 16, 1699, 67, 1202, 67, 768, 33, 8381, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 283, 2139, 33, 5510, 16, 555, 67, 1893, 33, 5510, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8622, 67, 1369, 12, 2890, 16, 980, 16, 1699, 67, 1202, 67, 768, 33, 8381, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 283, 2139, 33, 5510, 16, 555, 67, 1893, 33, 5510, 4672, ...
resp.headers['Location'] = req.script_url + 'demo/'
resp.headers['Location'] = req.script_url.rstrip('/') + '/demo/'
def handle(self, req): if req.path.startswith('/demo/static/'): filename = req.path.lstrip('/') static_file = os.path.join(os.path.dirname(__file__), 'templates', filename) type, encoding = mimetypes.guess_type(filename) return Response(open(static_file, 'rb'), content_type=type)
d23b90373af40fa767fe8ae913c0d38275b56d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11249/d23b90373af40fa767fe8ae913c0d38275b56d3d/demo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 16, 1111, 4672, 309, 1111, 18, 803, 18, 17514, 1918, 2668, 19, 27928, 19, 3845, 2473, 4672, 1544, 273, 1111, 18, 803, 18, 80, 6406, 2668, 2473, 13, 760, 67, 768, 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, 1640, 12, 2890, 16, 1111, 4672, 309, 1111, 18, 803, 18, 17514, 1918, 2668, 19, 27928, 19, 3845, 2473, 4672, 1544, 273, 1111, 18, 803, 18, 80, 6406, 2668, 2473, 13, 760, 67, 768, 273, ...
"""Return a ``MapperOption`` that will convert the column property of the given name into a deferred load. Used with ``query.options()``"""
"""Return a ``MapperOption`` that will convert the column property of the given name into a deferred load. Used with ``query.options()`` """
def defer(*keys): """Return a ``MapperOption`` that will convert the column property of the given name into a deferred load. Used with ``query.options()``""" return strategies.DeferredOption(keys, defer=True)
8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2220, 30857, 2452, 4672, 3536, 990, 279, 12176, 4597, 1895, 10335, 716, 903, 1765, 326, 1057, 1272, 434, 326, 864, 508, 1368, 279, 7045, 1262, 18, 225, 10286, 598, 12176, 2271, 18, 2116, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2220, 30857, 2452, 4672, 3536, 990, 279, 12176, 4597, 1895, 10335, 716, 903, 1765, 326, 1057, 1272, 434, 326, 864, 508, 1368, 279, 7045, 1262, 18, 225, 10286, 598, 12176, 2271, 18, 2116, ...
'fi': u'Keskustelu Wikiopistosta'
def __init__(self): family.Family.__init__(self) self.name = 'wikiversity'
090342eb024d0fbbd5b84a77b1ff9ebe2a8706aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/090342eb024d0fbbd5b84a77b1ff9ebe2a8706aa/wikiversity_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 6760, 560, 11, 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, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 6760, 560, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def occur_check(var, x): "Return true if var occurs anywhere in x."
def occur_check(var, x, s): """Return true if variable var occurs anywhere in x (or in subst(s, x), if s has a binding for x)."""
def occur_check(var, x): "Return true if var occurs anywhere in x." if var == x: return True elif isinstance(x, Expr): return var.op == x.op or occur_check(var, x.args) elif not isinstance(x, str) and issequence(x): for xi in x: if occur_check(var, xi): return True return False
8b8527ca4be017ab9086cfa7117d572398073b5f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/16/8b8527ca4be017ab9086cfa7117d572398073b5f/logic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3334, 67, 1893, 12, 1401, 16, 619, 16, 272, 4672, 3536, 990, 638, 309, 2190, 569, 9938, 25651, 316, 619, 261, 280, 316, 27750, 12, 87, 16, 619, 3631, 309, 272, 711, 279, 5085, 364, 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, 3334, 67, 1893, 12, 1401, 16, 619, 16, 272, 4672, 3536, 990, 638, 309, 2190, 569, 9938, 25651, 316, 619, 261, 280, 316, 27750, 12, 87, 16, 619, 3631, 309, 272, 711, 279, 5085, 364, 6...
else:
elif max_NA_rate>=1:
def removeRowsByNARate(cls, snpData, max_NA_rate=1): """ 2008-05-19 if max_NA_rate out of [0,1) range, no calculation 2008-05-19 """ sys.stderr.write("Removing rows whose NA_rate >%s ..."%(max_NA_rate)) if max_NA_rate<1 and max_NA_rate>=0: from FilterStrainSNPMatrix import FilterStrainSNPMatrix remove_rows_data = FilterStrainSNPMatrix.remove_rows_with_too_many_NAs(snpData.data_matrix, max_NA_rate) rows_with_too_many_NAs_set = remove_rows_data.rows_with_too_many_NAs_set else: rows_with_too_many_NAs_set = Set() no_of_rows = len(snpData.row_id_ls)-len(rows_with_too_many_NAs_set) no_of_cols = len(snpData.col_id_ls) newSnpData = SNPData(col_id_ls=snpData.col_id_ls, row_id_ls=[]) newSnpData.data_matrix = num.zeros([no_of_rows, no_of_cols], num.int8) row_index = 0 for i in range(len(snpData.row_id_ls)): row_id = snpData.row_id_ls[i] if i not in rows_with_too_many_NAs_set: newSnpData.row_id_ls.append(row_id) newSnpData.data_matrix[row_index] = snpData.data_matrix[i] row_index += 1 newSnpData.no_of_rows_filtered_by_na = len(rows_with_too_many_NAs_set) sys.stderr.write("%s rows filtered by NA. Done.\n"%(newSnpData.no_of_rows_filtered_by_na)) return newSnpData
a0db0d6d1d040c21cd05d0fc1b5346c1ed01e4df /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/a0db0d6d1d040c21cd05d0fc1b5346c1ed01e4df/SNP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 4300, 858, 50, 985, 340, 12, 6429, 16, 28648, 751, 16, 943, 67, 11277, 67, 5141, 33, 21, 4672, 3536, 4044, 28, 17, 6260, 17, 3657, 309, 943, 67, 11277, 67, 5141, 596, 434, 306,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 4300, 858, 50, 985, 340, 12, 6429, 16, 28648, 751, 16, 943, 67, 11277, 67, 5141, 33, 21, 4672, 3536, 4044, 28, 17, 6260, 17, 3657, 309, 943, 67, 11277, 67, 5141, 596, 434, 306,...
print "Error, The '%s' metadata is not present in %s" % (e, f)
print u" ☓ Skipping %s: impossible to find informations about '%s'" % (f, e)
def process_files(self, files): """Process all the files and build the lists and dicts of articles/categories/etc. """ for f in files: content, metadatas = read_file(f) if 'category' not in metadatas.keys(): category = os.path.dirname(f).replace( os.path.expanduser(self.path)+'/', '')
536245b0066a00647b2c0fe10165ad473fa5b428 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14457/536245b0066a00647b2c0fe10165ad473fa5b428/generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2354, 12, 2890, 16, 1390, 4672, 3536, 2227, 777, 326, 1390, 471, 1361, 326, 6035, 471, 15838, 434, 15828, 19, 8995, 19, 14175, 18, 3536, 364, 284, 316, 1390, 30, 913, 16, 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, 1207, 67, 2354, 12, 2890, 16, 1390, 4672, 3536, 2227, 777, 326, 1390, 471, 1361, 326, 6035, 471, 15838, 434, 15828, 19, 8995, 19, 14175, 18, 3536, 364, 284, 316, 1390, 30, 913, 16, 312...
nvars -- number of variables deg -- degree TESTS:
- ``nvars`` - number of variables - ``deg`` - degree TESTS::
def nterms(nvars, deg): """ Return the number of monomials possible up to a given degree.
16527da1ddc0ac750f609cd58858c5b45d932696 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/16527da1ddc0ac750f609cd58858c5b45d932696/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 10112, 12, 82, 4699, 16, 5843, 4672, 3536, 2000, 326, 1300, 434, 312, 4708, 649, 87, 3323, 731, 358, 279, 864, 10782, 18, 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, 290, 10112, 12, 82, 4699, 16, 5843, 4672, 3536, 2000, 326, 1300, 434, 312, 4708, 649, 87, 3323, 731, 358, 279, 864, 10782, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
import copy
def TestSpamFilter(driver): nspam = driver.manager.bayes.nspam nham = driver.manager.bayes.nham import copy original_bayes = copy.copy(driver.manager.bayes) # Create a spam message in the Inbox - it should get immediately filtered msg = driver.CreateTestMessageInFolder(SPAM, driver.folder_watch) # sleep to ensure filtering. WaitForFilters() # It should no longer be in the Inbox. if driver.FindTestMessage(driver.folder_watch) is not None: TestFailed("The test message appeared to not be filtered") # It should be in the "sure is spam" folder. spam_msg = driver.FindTestMessage(driver.folder_spam) if spam_msg is None: TestFailed("The test message vanished from the Inbox, but didn't appear in Spam") # Check that none of the above caused training. if nspam != driver.manager.bayes.nspam: TestFailed("Something caused a new spam message to appear") if nham != driver.manager.bayes.nham: TestFailed("Something caused a new ham message to appear") # Now move the message back to the inbox - it should get trained. store_msg = driver.manager.message_store.GetMessage(spam_msg) import train if train.been_trained_as_ham(store_msg, driver.manager): TestFailed("This new spam message should not have been trained as ham yet") if train.been_trained_as_spam(store_msg, driver.manager): TestFailed("This new spam message should not have been trained as spam yet") spam_msg.Move(driver.folder_watch) WaitForFilters() spam_msg = driver.FindTestMessage(driver.folder_watch) store_msg = driver.manager.message_store.GetMessage(spam_msg) need_untrain = True try: if nspam != driver.manager.bayes.nspam: TestFailed("There were not the same number of spam messages after a re-train") if nham+1 != driver.manager.bayes.nham: TestFailed("There was not one more ham messages after a re-train") if train.been_trained_as_spam(store_msg, driver.manager): TestFailed("This new spam message should not have been trained as spam yet") if not train.been_trained_as_ham(store_msg, driver.manager): TestFailed("This new spam message should have been trained as ham now") # Now move it back to the Spam folder. # This should see the message un-trained as ham, and re-trained as Spam spam_msg.Move(driver.folder_spam) WaitForFilters() spam_msg = driver.FindTestMessage(driver.folder_spam) if spam_msg is None: TestFailed("Could not find the message in the Spam folder") store_msg = driver.manager.message_store.GetMessage(spam_msg) if nspam +1 != driver.manager.bayes.nspam: TestFailed("There should be one more spam now") if nham != driver.manager.bayes.nham: TestFailed("There should be the same number of hams again") if not train.been_trained_as_spam(store_msg, driver.manager): TestFailed("This new spam message should have been trained as spam by now") if train.been_trained_as_ham(store_msg, driver.manager): TestFailed("This new spam message should have been un-trained as ham") # Move the message to another folder, and make sure we still # identify it correctly as having been trained. # Move to the "unsure" folder, just cos we know about it, and # we know that no special watching of this folder exists. spam_msg.Move(driver.folder_unsure) spam_msg = driver.FindTestMessage(driver.folder_unsure) if spam_msg is None: TestFailed("Could not find the message in the Unsure folder") store_msg = driver.manager.message_store.GetMessage(spam_msg) if not train.been_trained_as_spam(store_msg, driver.manager): TestFailed("Message was not identified as Spam after moving") # Now undo the damage we did. was_spam = train.untrain_message(store_msg, driver.manager) if not was_spam: TestFailed("Untraining this message did not indicate it was spam") if train.been_trained_as_spam(store_msg, driver.manager) or \ train.been_trained_as_ham(store_msg, driver.manager): TestFailed("Untraining this message kept it has ham/spam") need_untrain = False finally: if need_untrain: train.untrain_message(store_msg, driver.manager) # Check all the counts are back where we started. if nspam != driver.manager.bayes.nspam: TestFailed("Spam count didn't get back to the same") if nham != driver.manager.bayes.nham: TestFailed("Ham count didn't get back to the same") if driver.manager.bayes.wordinfo != original_bayes.wordinfo: TestFailed("The bayes object's 'wordinfo' did not compare the same at the end of all this!") if driver.manager.bayes.probcache != original_bayes.probcache: TestFailed("The bayes object's 'probcache' did not compare the same at the end of all this!") spam_msg.Delete() print "Created a Spam message, and saw it get filtered and trained."
dd7298bdea1152d90803967bf28763a9a3f36f01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/dd7298bdea1152d90803967bf28763a9a3f36f01/tester.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7766, 3389, 301, 1586, 12, 7407, 4672, 28390, 301, 273, 3419, 18, 4181, 18, 70, 528, 281, 18, 82, 1752, 301, 24043, 301, 273, 3419, 18, 4181, 18, 70, 528, 281, 18, 82, 31698, 2282, 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, 7766, 3389, 301, 1586, 12, 7407, 4672, 28390, 301, 273, 3419, 18, 4181, 18, 70, 528, 281, 18, 82, 1752, 301, 24043, 301, 273, 3419, 18, 4181, 18, 70, 528, 281, 18, 82, 31698, 2282, 6...
nrows = 10
def test00_CompareTable(self): "Comparing written unaligned time data with read data in a Table."
2953f06c72e2521b548ca4dd99aecff040aeab6e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12687/2953f06c72e2521b548ca4dd99aecff040aeab6e/test_timetype.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 67, 8583, 1388, 12, 2890, 4672, 315, 799, 12583, 5941, 640, 20677, 813, 501, 598, 855, 501, 316, 279, 3555, 1199, 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, 1842, 713, 67, 8583, 1388, 12, 2890, 4672, 315, 799, 12583, 5941, 640, 20677, 813, 501, 598, 855, 501, 316, 279, 3555, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
encoded_value = username.encode("utf-8") self.writeInt16(len(encoded_value)) self.wbuf.extend(encoded_value)
self.writeString(username)
def authenticate(self, username, password): # Requires sending a length preceded username and password even if # authentication is turned off.
0515f0d0d17ea986decb6e7913e866bb9efafc60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12204/0515f0d0d17ea986decb6e7913e866bb9efafc60/fastserializer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8929, 12, 2890, 16, 2718, 16, 2201, 4672, 468, 16412, 5431, 279, 769, 29953, 2718, 471, 2201, 5456, 309, 468, 5107, 353, 21826, 3397, 18, 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, 8929, 12, 2890, 16, 2718, 16, 2201, 4672, 468, 16412, 5431, 279, 769, 29953, 2718, 471, 2201, 5456, 309, 468, 5107, 353, 21826, 3397, 18, 2, -100, -100, -100, -100, -100, -100, -100, -10...
d.name( handle ) d.alias = handle
def exportHandles( mb ): """include handle classes. These are shared_ptr<> typedefs. """ handles_to_export = ['HAlignandum', 'HMultipleAlignment', 'HAlignator', 'HTranslator', 'HFragmentor', 'HAlignment', 'HScorer', 'HWeightor', 'HRenderer', 'HLogOddor', 'HRegularizor', 'HIterator2D', 'HAlignatum', 'HDistor', 'HTreetor', 'HTree', 'HPhyloMatrix', ] for handle in handles_to_export: pointer = "boost::shared_ptr<alignlib::%s>" % handle[1:] try: d = mb.class_( pointer ) except RuntimeError: print "could not find handle class %s, searching with %s" % (handle, pointer) continue d.include() d.name( handle ) d.alias = handle
f4a983dbc63dd789a09cba5fcafa553bb45a7c5a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8012/f4a983dbc63dd789a09cba5fcafa553bb45a7c5a/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 8788, 12, 4903, 262, 30, 3536, 6702, 1640, 3318, 18, 225, 8646, 854, 5116, 67, 6723, 29667, 618, 12537, 18, 3536, 7372, 67, 869, 67, 6530, 273, 10228, 44, 10044, 464, 379, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8788, 12, 4903, 262, 30, 3536, 6702, 1640, 3318, 18, 225, 8646, 854, 5116, 67, 6723, 29667, 618, 12537, 18, 3536, 7372, 67, 869, 67, 6530, 273, 10228, 44, 10044, 464, 379, 2187, ...
def __init__(self,data=None,axes=None,*aw,**kw):
def __init__( self, data = None, axes = None, *aw, **kw ):
def __init__(self,data=None,axes=None,*aw,**kw): self.ax_contain = axes self.canvas = None self.figure = None if self.ax_contain: self.figure = self.ax_contain.get_figure() self.canvas = self.figure.canvas self.dpi = self.ax_contain.figure.get_dpi() self.ax_contain.set_axis_off() self.prefs = evalPrefs(*aw,**kw) self.coords = {} self.palette = Palette() if type(data) == types.DictType: self.gdata = GraphData(data) elif type(data) == types.InstanceType and data.__class__ == GraphData: self.gdata = data
34ec1e9add6e7beaae414fa998b4771d25b40ccb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/34ec1e9add6e7beaae414fa998b4771d25b40ccb/PlotBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 501, 273, 599, 16, 6515, 273, 599, 16, 380, 2219, 16, 2826, 9987, 262, 30, 225, 365, 18, 651, 67, 28744, 273, 6515, 365, 18, 15424, 273, 599, 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, 365, 16, 501, 273, 599, 16, 6515, 273, 599, 16, 380, 2219, 16, 2826, 9987, 262, 30, 225, 365, 18, 651, 67, 28744, 273, 6515, 365, 18, 15424, 273, 599, 365, 18, ...
sub = bs.first('span', {'class':'clsHdrTPun'}).next.string main = bs.first('span', {'class':'clsHdrMajor'}).next.string
sub = bs.first('h5').string main = bs.first('h2').string
def _handle_tietokone(url): """http://www.tietokone.fi/uutta/uutinen.asp?news_id=*""" bs = getUrl(url).getBS() sub = bs.first('span', {'class':'clsHdrTPun'}).next.string main = bs.first('span', {'class':'clsHdrMajor'}).next.string return "%s - %s" % (main, sub)
a7f5cfa584e654cf42b778378403a4e6e55abb3e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14781/a7f5cfa584e654cf42b778378403a4e6e55abb3e/module_urltitle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 88, 6213, 601, 476, 12, 718, 4672, 3536, 2505, 2207, 5591, 18, 88, 6213, 601, 476, 18, 22056, 19, 89, 322, 2351, 19, 89, 322, 267, 275, 18, 28264, 35, 18443, 67, 350, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4110, 67, 88, 6213, 601, 476, 12, 718, 4672, 3536, 2505, 2207, 5591, 18, 88, 6213, 601, 476, 18, 22056, 19, 89, 322, 2351, 19, 89, 322, 267, 275, 18, 28264, 35, 18443, 67, 350, ...
self.app2.UntitledNotepad.SetFocus() self.app2.UntitledNotepad.SetFocus()
def testBug1452832(self): "Failing test for sourceforge bug 1452832" typetext(self.app1, "some text") self.app1.UntitledNotepad.SetFocus() copytext(self.app1)
0fd1ab87ff7619445152c2285ece33c6f1374709 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/0fd1ab87ff7619445152c2285ece33c6f1374709/test_clipboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 19865, 30379, 6030, 1578, 12, 2890, 4672, 315, 3754, 310, 1842, 364, 1084, 1884, 908, 7934, 5045, 25, 6030, 1578, 6, 3815, 27830, 12, 2890, 18, 2910, 21, 16, 315, 19068, 977, 7923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19865, 30379, 6030, 1578, 12, 2890, 4672, 315, 3754, 310, 1842, 364, 1084, 1884, 908, 7934, 5045, 25, 6030, 1578, 6, 3815, 27830, 12, 2890, 18, 2910, 21, 16, 315, 19068, 977, 7923,...
elif len(decs) < 1: print "warning: ExprsMeta: found no %s to use on %r function %r" % (decname, attr, val) for base in bases: print "base %r has dict keys %r" % (base, base.__dict__.keys()) else: use_dec = decs[0]
if use_dec: assert callable(use_dec) oldfunc = val printnim("stub for newfunc = oldfunc needs fixing to use _e_decorator_draw") newfunc = oldfunc ns[attr] = newfunc continue
def __new__(cls, name, bases, ns): # Notes: # - this code runs once per class, so it needn't be fast. # - cls is NOT the class object being defined -- that doesn't exist yet, since it's our job to create it and return it! # (It's the class ExprsMeta.) # - But we know which class is being defined, since we have its name in the argument <name>. data_for_attr = {} processed_vals = [] orig_ns_keys = ns.keys() # only used in exception text, for debugging # handle _options [deprecated since 061101] by turning it into equivalent _DEFAULT_ decls _options = ns.pop('_options', None) if _options is not None: print "_options (defined in class %s) is deprecated, since a later formula rhs won't see attr in namespace" % name assert type(_options) is type({}) for optname, optval in _options.items(): # _DEFAULT_optname = optval attr = '_DEFAULT_' + optname assert not ns.has_key(attr), \ "error: can't define %r both as %r and inside _options in the same class %r (since ExprsMeta is its metaclass); ns contained %r" % \ ( optname, attr, name, orig_ns_keys ) ns[attr] = optval # no need to check for ns[optname] here -- this will be caught below -- but the error message will be misleading # since it will pretend you defined it using _DEFAULT_; so we'll catch that case here, at least # (though this doesn't catch a conflict with some other way of defining optname; that'll still have misleading error # msg below). assert not ns.has_key(optname), \ "error: can't define %r directly and inside _options in the same class %r (since ExprsMeta is its metaclass); ns contained %r" % \ ( optname, name, orig_ns_keys ) del attr continue del optname, optval del _options # look for special vals, or vals assigned to special prefixes, in the new class object's original namespace # (since we will modify these in the namespace we'll actually use to create it) for attr, val in ns.iteritems():
e46ca48f7f323725ab24a3da0cf7c27b7a8d1d70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/e46ca48f7f323725ab24a3da0cf7c27b7a8d1d70/ExprsMeta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 508, 16, 8337, 16, 3153, 4672, 468, 29584, 30, 468, 300, 333, 981, 7597, 3647, 1534, 667, 16, 1427, 518, 1608, 82, 1404, 506, 4797, 18, 468, 300, 2028, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 508, 16, 8337, 16, 3153, 4672, 468, 29584, 30, 468, 300, 333, 981, 7597, 3647, 1534, 667, 16, 1427, 518, 1608, 82, 1404, 506, 4797, 18, 468, 300, 2028, ...
This differs from the rest as it does not print a header, just the raw file data.
This differs from the rest as it does not print a header, just the raw file data.
def render(self, ctx): try: session = sessions[ctx.args['session'][0]] except KeyError: return http.Response(stream = "Invalid session.") try: cell_id = int(ctx.args['cell'][0]) cell = session.worksheet.get_cell_with_id(cell_id) try: timeout = float(ctx.args['timeout'][0]) except KeyError, ValueError: timeout = -1 return self.start_comp(cell, timeout) except KeyError: status = session.get_status() return http.Response(stream = "%s\n%s\n" % (simple_jsonize(status), SEP))
cd28d54e6430def4fe705e11d0dba35298b2aa57 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/cd28d54e6430def4fe705e11d0dba35298b2aa57/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 775, 30, 1339, 273, 8856, 63, 5900, 18, 1968, 3292, 3184, 3546, 63, 20, 13563, 1335, 4999, 30, 327, 1062, 18, 1064, 12, 3256, 273, 315, 1941, 1339, 1199...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 775, 30, 1339, 273, 8856, 63, 5900, 18, 1968, 3292, 3184, 3546, 63, 20, 13563, 1335, 4999, 30, 327, 1062, 18, 1064, 12, 3256, 273, 315, 1941, 1339, 1199...
self.openedurl = '%s:%s' % (type, url)
def open(self, fullurl, data=None): fullurl = unwrap(fullurl) if self.tempcache and self.tempcache.has_key(fullurl): filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') return addinfourl(fp, headers, fullurl) type, url = splittype(fullurl) if not type: type = 'file' self.openedurl = '%s:%s' % (type, url) if self.proxies.has_key(type): proxy = self.proxies[type] type, proxy = splittype(proxy) host, selector = splithost(proxy) url = (host, fullurl) # Signal special case to open_*() name = 'open_' + type if '-' in name: # replace - with _ name = string.join(string.split(name, '-'), '_') if not hasattr(self, name): if data is None: return self.open_unknown(fullurl) else: return self.open_unknown(fullurl, data) try: if data is None: return getattr(self, name)(url) else: return getattr(self, name)(url, data) except socket.error, msg: raise IOError, ('socket error', msg), sys.exc_info()[2]
8a666e7c56192f42288a30a53adf5299fda29557 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8a666e7c56192f42288a30a53adf5299fda29557/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 12, 2890, 16, 1983, 718, 16, 501, 33, 7036, 4672, 1983, 718, 273, 11014, 12, 2854, 718, 13, 309, 365, 18, 874, 2436, 807, 471, 365, 18, 874, 2436, 807, 18, 5332, 67, 856, 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, 1696, 12, 2890, 16, 1983, 718, 16, 501, 33, 7036, 4672, 1983, 718, 273, 11014, 12, 2854, 718, 13, 309, 365, 18, 874, 2436, 807, 471, 365, 18, 874, 2436, 807, 18, 5332, 67, 856, 12, ...
print _("Warning: networking thread has to convert unicode string %(object)s message %(type)s") % {'object':object, 'type':self.__class__}
log.addwarning(_("Warning: networking thread has to convert unicode string %(object)s message %(type)s") % {'object':object, 'type':self.__class__})
def packObject(self, object): """ Returns object (integer, long or string packed into a binary array.""" if type(object) is types.IntType: return struct.pack("<i", object) elif type(object) is types.LongType: return struct.pack("<L", object) elif type(object) is types.StringType: return struct.pack("<i", len(object))+object elif type(object) is types.UnicodeType: print _("Warning: networking thread has to convert unicode string %(object)s message %(type)s") % {'object':object, 'type':self.__class__} encoded = object.encode("utf-8",'replace') return struct.pack("<i", len(encoded))+encoded print _("Warning: unknown object type %s") % type(object) +" "+ ("in message %(type)s") % {'type':self.__class__} return ""
c41fe06d527031ac5ee480da53678b9e4c561ae8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8738/c41fe06d527031ac5ee480da53678b9e4c561ae8/slskmessages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2298, 921, 12, 2890, 16, 733, 4672, 3536, 2860, 733, 261, 7745, 16, 1525, 578, 533, 12456, 1368, 279, 3112, 526, 12123, 309, 618, 12, 1612, 13, 353, 1953, 18, 1702, 559, 30, 327, 1958,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2298, 921, 12, 2890, 16, 733, 4672, 3536, 2860, 733, 261, 7745, 16, 1525, 578, 533, 12456, 1368, 279, 3112, 526, 12123, 309, 618, 12, 1612, 13, 353, 1953, 18, 1702, 559, 30, 327, 1958,...
self.addButton.set_property("visible", edit)
self.addCombo.set_property("visible", edit) self.prevButton.set_property("visible", not edit) self.nextButton.set_property("visible", not edit)
def editButton_clicked(self, button=None, edit=True): self.edit = edit self.addButton.set_property("visible", edit) self.undoButton.set_property("visible", edit) self.saveButton.set_property("visible", edit) self.editButton.set_property("visible", not edit) self.imagechangeButton.set_property("visible", edit) self.imageremoveButton.set_property("visible", edit and self.has_photo) self.namechangeButton.set_property("visible", edit)
b8c98d17b15a17c88b10a847f15fc082e5e7a6c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2651/b8c98d17b15a17c88b10a847f15fc082e5e7a6c7/arkadas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 3616, 67, 7475, 329, 12, 2890, 16, 3568, 33, 7036, 16, 3874, 33, 5510, 4672, 365, 18, 4619, 273, 3874, 365, 18, 1289, 16156, 18, 542, 67, 4468, 2932, 8613, 3113, 3874, 13, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 3616, 67, 7475, 329, 12, 2890, 16, 3568, 33, 7036, 16, 3874, 33, 5510, 4672, 365, 18, 4619, 273, 3874, 365, 18, 1289, 16156, 18, 542, 67, 4468, 2932, 8613, 3113, 3874, 13, 365, ...
kmc.use_context('foo') kmc.use_context('foo') kmc.use_context('foo') kmc.use_context('bar') kmc.use_context('foo') kmc.use_context('bar') kmc.use_context('bar') self.assertEqual(1, press('j'))
keymanager.use_context('foo') keymanager.use_context('foo') keymanager.use_context('foo') keymanager.use_context('bar') keymanager.use_context('foo') keymanager.use_context('bar') keymanager.use_context('bar') self.assertEqual(1, press('j')) def test_alias_to_direction(self): def func(arg): return arg.direction.down() km = KeyMap() directions = KeyMap() kb = KeyBuffer(km, directions) press = self._mkpress(kb) km.map('<dir>', func) directions.map('j', dir=Direction(down=42)) self.assertEqual(42, press('j')) km.map('o', alias='j') self.assertEqual(42, press('o')) def test_both_directory_and_any_key(self): def func(arg): return arg.direction.down() def func2(arg): return "yay" km = KeyMap() directions = KeyMap() kb = KeyBuffer(km, directions) press = self._mkpress(kb) km.map('abc<dir>', func) directions.map('j', dir=Direction(down=42)) self.assertEqual(42, press('abcj')) km.unmap('abc<dir>') km.map('abc<any>', func2) self.assertEqual("yay", press('abcd')) km.map('abc<dir>', func) km.map('abc<any>', func2) self.assertEqual("yay", press('abcd'))
def getdown(arg): return arg.direction.down()
ef011c914dcf6061af7b30c85db53336594cab81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5729/ef011c914dcf6061af7b30c85db53336594cab81/tc_newkeys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2378, 12, 3175, 4672, 327, 1501, 18, 9855, 18, 2378, 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, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 2378, 12, 3175, 4672, 327, 1501, 18, 9855, 18, 2378, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.socket = ClientSocket(self) self.socket.connect(('localhost', 7272)) self.socket.push("nonsense\n")
def __init__(self, parent, id, title="pyLoad"): wx.Frame.__init__(self,parent,id,title, size=(800,500)) appPath = dirname(abspath(__file__)) + sep
94c1c737c5455762bbea312f891856b5c0deb497 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/94c1c737c5455762bbea312f891856b5c0deb497/pyMainGui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 1546, 2074, 2563, 6, 4672, 225, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 350, 16, 2649, 16, 963, 28657, 17374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 612, 16, 2077, 1546, 2074, 2563, 6, 4672, 225, 7075, 18, 3219, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 350, 16, 2649, 16, 963, 28657, 17374, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 732) else quickfix.DoubleField.__init__(self, 732, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 1578, 13, 469, 9549, 904, 18, 5265, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 1578, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, ...
return (self.order() % 2 == 1) and \ (2*self.size() > max(self.degree())*(self.order()-1))
return (self.order() % 2 == 1) and ( 2 * self.size() > max(self.degree()) * (self.order() - 1))
def is_overfull(self): r""" Tests whether the current graph is overfull.
6f8059b4d06ca961c4eb6133af3e23efa6bc12cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/6f8059b4d06ca961c4eb6133af3e23efa6bc12cf/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1643, 2854, 12, 2890, 4672, 436, 8395, 7766, 87, 2856, 326, 783, 2667, 353, 1879, 2854, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1643, 2854, 12, 2890, 4672, 436, 8395, 7766, 87, 2856, 326, 783, 2667, 353, 1879, 2854, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if self.pkgwork['update']: self.logger.info("Packages to update:") self.logger.info([pkg.get('name') for pkg in self.pkgwork['update']]) if self.pkgwork['add']: self.logger.info("Packages to add:") self.logger.info([pkg.get('name') for pkg in self.pkgwork['add']]) if self.pkgwork['remove']: self.logger.info("Packages to remove:") self.logger.info(self.pkgwork['remove']) if [entry for entry in self.states if not (self.states[entry] or entry.tag == 'Package')]: self.logger.info("Entries to update:") self.logger.info(["%s: %s" % (entry.tag, entry.get('name')) for entry in self.states if not (self.states[entry] or entry.tag == 'Package')]) if self.extra_services: self.logger.info("Services to remove:") self.logger.info(self.extra_services)
def Install(self): '''Correct detected misconfigurations''' if self.setup['dryrun']: self.logger.info("Dry-run mode: no changes will be made") else: self.logger.info("Updating the system") self.logger.info("") self.HandleExtra()
d6029424fa91ec496f162be1749a7e08a9fb2a0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/d6029424fa91ec496f162be1749a7e08a9fb2a0f/Toolset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 12, 2890, 4672, 9163, 16147, 8316, 7524, 25856, 26418, 309, 365, 18, 8401, 3292, 25011, 2681, 3546, 30, 365, 18, 4901, 18, 1376, 2932, 40, 1176, 17, 2681, 1965, 30, 1158, 3478, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10284, 12, 2890, 4672, 9163, 16147, 8316, 7524, 25856, 26418, 309, 365, 18, 8401, 3292, 25011, 2681, 3546, 30, 365, 18, 4901, 18, 1376, 2932, 40, 1176, 17, 2681, 1965, 30, 1158, 3478, 90...