rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
groups.append(row['name'])
groups.append(row['name'] or '')
def get_groups(self, by='component'): cursor = self.db.cursor () groups = [] if by in ['status', 'resolution', 'severity', 'priority']: cursor.execute("SELECT name FROM enum WHERE type = %s " "AND name != '' ORDER BY value", by) elif by in ['component', 'milestone', 'version']: cursor.execute("SELECT name FROM %s " "WHERE name != '' ORDER BY name" % by) elif by == 'owner': cursor.execute("SELECT DISTINCT owner AS name FROM ticket " "ORDER BY owner") elif by not in Ticket.std_fields: fields = get_custom_fields(self.env) field = [f for f in fields if f['name'] == by] if not field: return [] return [o for o in field[0]['options'] if o != ''] while 1: row = cursor.fetchone() if not row: break groups.append(row['name']) return groups
04ff6f64443c20c95c14a3cedff6abd6933863f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/04ff6f64443c20c95c14a3cedff6abd6933863f3/Milestone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4650, 12, 2890, 16, 635, 2218, 4652, 11, 4672, 3347, 273, 365, 18, 1966, 18, 9216, 1832, 3252, 273, 5378, 309, 635, 316, 10228, 2327, 2187, 296, 19182, 2187, 296, 27341, 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, 336, 67, 4650, 12, 2890, 16, 635, 2218, 4652, 11, 4672, 3347, 273, 365, 18, 1966, 18, 9216, 1832, 3252, 273, 5378, 309, 635, 316, 10228, 2327, 2187, 296, 19182, 2187, 296, 27341, 2187, ...
self.currentToken[-1][1] += data
self.currentToken.attributes[-1][1] += data
def beforeAttributeValueState(self): data = consumeChar() if data in spaceCharacters: pass elif data == u"\"": self.changeState("attributeValueDoubleQuoted") elif data == u"&": self.changeState("attributeValueUnQuoted") self.characterQueue.append(data); elif data == u"'": self.changeState("attributeValueSingleQuoted") elif data == u">": self.emitCurrentToken() elif data == u"<" or data == EOF: self.emitCurrentTokenWithParseError(data) else: self.currentToken[-1][1] += data self.changeState("attributeValueUnQuoted") return True
1d2858234d026c30deb6847d834929a98cf1313b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/1d2858234d026c30deb6847d834929a98cf1313b/tokenizer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 14942, 1119, 12, 2890, 4672, 501, 273, 7865, 2156, 1435, 309, 501, 316, 3476, 11600, 30, 1342, 1327, 501, 422, 582, 6, 2412, 6877, 365, 18, 3427, 1119, 2932, 4589, 620, 5265, 15919...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1865, 14942, 1119, 12, 2890, 4672, 501, 273, 7865, 2156, 1435, 309, 501, 316, 3476, 11600, 30, 1342, 1327, 501, 422, 582, 6, 2412, 6877, 365, 18, 3427, 1119, 2932, 4589, 620, 5265, 15919...
newname = obj_pool.get('ir.sequence').get(cr, uid,type_rec.sequence_id.code)
def _create_legalization(self, cr, uid, data, context): obj_pool = pooler.get_pool(cr.dbname) obj_certi = obj_pool.get('cci_missions.certificate') data_certi = obj_certi.browse(cr, uid, data['ids']) list_leglization = [] leg_create = 0 leg_reject = 0 leg_rej_reason = "" type_id = data['form']['leg_type_id'] type_rec = obj_pool.get('cci_missions.dossier_type').browse(cr, uid, type_id) for data in data_certi: leg_create = leg_create + 1 prod_lines = [] newname = obj_pool.get('ir.sequence').get(cr, uid,type_rec.sequence_id.code) map(lambda x: prod_lines.append(x.id), data.product_ids) if data.order_partner_id.membership_state in ('none','canceled'): #the boolean "Apply the member price" should be set to TRUE or FALSE when the partner is changed in regard of the membership state of him. is_member = False else: is_member = True leg_id =obj_pool.get('cci_missions.legalization').create(cr, uid, { 'name': newname, 'type_id': type_id, 'date': data.date, 'order_partner_id': data.order_partner_id.id, 'quantity_original': data.quantity_original, #'text_on_invoice': data.text_on_invoice, 'asker_name': data.asker_name, 'sender_name': data.sender_name, 'state': data.state, 'goods': data.goods, 'goods_value': data.goods_value,
471367738d3ca51b517f54eef4a9c538e5b7f031 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/471367738d3ca51b517f54eef4a9c538e5b7f031/create_legalization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 2013, 1588, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1081, 67, 6011, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1081, 67, 7593, 77, 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, 2640, 67, 2013, 1588, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1081, 67, 6011, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1081, 67, 7593, 77, 273, ...
print "Done"
def split_by_department(members): s = dict() for d in AFDELINGEN.keys(): tmp = dict() for id in members.keys(): pc = parse_postcode(members[id][POSTCODE]) for r in AFDELINGEN[d]: if (pc >= r[0]) and (pc <= r[1]): tmp[id] = members[id] if tmp: s[d] = tmp return s
1a1947d98b1412ba04ce5fdc4ae2ba2f8aa5bec5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6177/1a1947d98b1412ba04ce5fdc4ae2ba2f8aa5bec5/ledenlijst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 1637, 67, 323, 15750, 12, 7640, 4672, 272, 273, 2065, 1435, 364, 302, 316, 10888, 24733, 1360, 1157, 18, 2452, 13332, 1853, 273, 2065, 1435, 364, 612, 316, 4833, 18, 2452, 1333...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1416, 67, 1637, 67, 323, 15750, 12, 7640, 4672, 272, 273, 2065, 1435, 364, 302, 316, 10888, 24733, 1360, 1157, 18, 2452, 13332, 1853, 273, 2065, 1435, 364, 612, 316, 4833, 18, 2452, 1333...
>>> U = np.empty((m, min(m, n)), a.dtype)
>>> U = np.empty((min(m, n), m), a.dtype)
def svd_device(a, a_dtype, a_shape, full_matrices=1, compute_uv=1): """ Singular Value Decomposition. Factorizes the matrix `a` into two unitary matrices, ``U`` and ``Vh``, and a 1-dimensional array of singular values, ``s`` (real, non-negative), such that ``a == U S Vh``, where ``S`` is the diagonal matrix ``np.diag(s)``. Parameters ---------- a : c_void_p Pointer to device memory containing matrix of shape ``(M, N)`` to decompose. a_dtype : type Type of matrix data. a_shape : tuple Shape of matrix data ``(M, N)``. full_matrices : bool, optional If True (default), ``u`` and ``v.H`` have the shapes ``(M, M)`` and ``(N, N)``, respectively. Otherwise, the shapes are ``(M, K)`` and ``(K, N)``, resp., where ``K = min(M, N)``. compute_uv : bool, optional Whether or not to compute ``u`` and ``v.H`` in addition to ``s``. True by default. Returns ------- u : c_void_p Pointer to device memory containing unitary matrix. The shape of `U` is ``(M, M)`` or ``(M, K)`` depending on value of `full_matrices`. s : c_void_p Pointer to device memory containing the singular values, sorted so that ``s[i] >= s[i+1]``. `S` is a 1-D array of length ``min(M, N)`` v.H : c_void_p Pointer to device memory containing unitary matrix of shape ``(N, N)`` or ``(K, N)``, depending on `full_matrices`. Raises ------ LinAlgError If SVD computation does not converge. Notes ----- Because of the limitations of the free version of CULA, the argument is cast to single precision. If `a` is a matrix object (as opposed to an `ndarray`), then so are all the return values. Examples -------- >>> import cula >>> cula.culaInitialize() 0 >>> a = np.random.randn(9, 6) + 1j*np.random.randn(9, 6) >>> a = np.asarray(a, np.complex64) >>> m, n = a.shape >>> at = a.T.copy() >>> a_ptr = cula.cuda_malloc(a.nbytes) >>> cula.cuda_memcpy_htod(a_ptr, at.ctypes.data, a.nbytes) >>> U_ptr, s_ptr, Vh_ptr = cula.svd_device(a_ptr, a.dtype, a.shape, full_matrices=False) >>> U = np.empty((m, min(m, n)), a.dtype) >>> s = np.empty(min(m, n), np.float32) >>> Vh = np.empty((n, min(m, n)), a.dtype) >>> cula.cuda_memcpy_dtoh(U.ctypes.data, U_ptr, U.nbytes) >>> cula.cuda_memcpy_dtoh(s.ctypes.data, s_ptr, s.nbytes) >>> cula.cuda_memcpy_dtoh(Vh.ctypes.data, Vh_ptr, Vh.nbytes) >>> S = np.diag(s) >>> np.allclose(a, np.dot(U, np.dot(S, Vh.T))) True """ # The free version of CULA only supports single precision floating # point numbers: real_dtype = np.float32 real_dtype_nbytes = np.nbytes[real_dtype] if a_dtype == np.complex64: cula_func = _libcula.culaDeviceCgesvd a_dtype_nbytes = np.nbytes[a_dtype] elif a_dtype == np.float32: cula_func = _libcula.culaDeviceSgesvd a_dtype_nbytes = np.nbytes[a_dtype] else: raise ValueError('unsupported type') cula_func.restype = int cula_func.argtypes = [ctypes.c_char, ctypes.c_char, ctypes.c_int, ctypes.c_int, ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_int] (m, n) = a_shape # Set LDA: lda = max(1, m) # Set S: s = cuda_malloc(min(m, n)*real_dtype_nbytes) # Set JOBU and JOBVT: if compute_uv: if full_matrices: jobu = 'A' jobvt = 'A' else: jobu = 'S' jobvt = 'S' else: jobu = 'N' jobvt = 'N' # Set LDU and transpose of U: ldu = m if jobu == 'A': u = cuda_malloc(ldu*m*a_dtype_nbytes) elif jobu == 'S': u = cuda_malloc(min(m, n)*ldu*a_dtype_nbytes) else: ldu = 1 u = cuda_malloc(a_dtype_nbytes) # Set LDVT and transpose of VT: if jobvt == 'A': ldvt = n vt = cuda_malloc(n*n*a_dtype_nbytes) elif jobvt == 'S': ldvt = min(m, n) vt = cuda_malloc(n*ldvt*a_dtype_nbytes) else: ldvt = 1 vt = cuda_malloc(a_dtype_nbytes) status = cula_func(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt) if status != 0: status = culaInitialize() culaCheckStatus(status) status = cula_func(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt) if status > 0: raise LinAlgError, 'SVD did not converge' if compute_uv: return u, s, vt else: cuda_free(u) cuda_free(vt) return s
7fc4e451024ef5d36885b07be6a15417c4ae54c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14753/7fc4e451024ef5d36885b07be6a15417c4ae54c3/cula.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25656, 67, 5964, 12, 69, 16, 279, 67, 8972, 16, 279, 67, 4867, 16, 1983, 67, 7373, 12660, 33, 21, 16, 3671, 67, 16303, 33, 21, 4672, 3536, 348, 17830, 1445, 26824, 3276, 18, 225, 264...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25656, 67, 5964, 12, 69, 16, 279, 67, 8972, 16, 279, 67, 4867, 16, 1983, 67, 7373, 12660, 33, 21, 16, 3671, 67, 16303, 33, 21, 4672, 3536, 348, 17830, 1445, 26824, 3276, 18, 225, 264...
def __init__(self, metadatahandler, overlay_bridge, session, prio):
def __init__(self, remoteTorrentHandler, metadatahandler, overlay_bridge, session, prio): self.remoteTorrentHandler = remoteTorrentHandler
def __init__(self, metadatahandler, overlay_bridge, session, prio): self.metadatahandler = metadatahandler self.overlay_bridge = overlay_bridge self.session = session self.prio = prio self.queue = Queue.Queue() self.sources = {} self.doRequest()
a564efa1f208960ea76909f5ea4be6c6d2be7ed8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/a564efa1f208960ea76909f5ea4be6c6d2be7ed8/RemoteTorrentHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2632, 27266, 547, 1503, 16, 1982, 4176, 16, 9218, 67, 18337, 16, 1339, 16, 14705, 83, 4672, 365, 18, 7222, 27266, 547, 1503, 273, 2632, 27266, 547, 1503, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2632, 27266, 547, 1503, 16, 1982, 4176, 16, 9218, 67, 18337, 16, 1339, 16, 14705, 83, 4672, 365, 18, 7222, 27266, 547, 1503, 273, 2632, 27266, 547, 1503, ...
self.__temp_dir = "."
def __init__( self ):
03d768509b4c7e580bf8896746b9db8672aa7762 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13212/03d768509b4c7e580bf8896746b9db8672aa7762/eolfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
errStr = "ReplicationScheduler.execute: Failed to determine replication tree." gLogger.error(errStr,res['Message']) oRequest.setSubRequestFileAttributeValue(ind,'transfer',lfn,'Status','Failed') break
gLogger.error("ReplicationScheduler.execute: Failed to determine replication tree.",res['Message']) continue
def execute(self): """ The main agent execution method """
c1f8eb1d2bbc7cd4df2a54c42faff5c04a709853 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c1f8eb1d2bbc7cd4df2a54c42faff5c04a709853/ReplicationScheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 4672, 3536, 1021, 2774, 4040, 4588, 707, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def precompile_hook (self): pass def prelink_hook (self):
def msvc_prelink_hack (self, sources, ext, extra_args):
def find_swig (self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. """
1a5dae80130b8295865f2c9455b28a72efc63ac3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/1a5dae80130b8295865f2c9455b28a72efc63ac3/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 5328, 360, 261, 2890, 4672, 3536, 990, 326, 508, 434, 326, 16392, 3047, 9070, 18, 225, 2755, 9480, 16, 333, 353, 2537, 315, 5328, 360, 6, 1493, 518, 1410, 506, 316, 326, 7767...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 67, 5328, 360, 261, 2890, 4672, 3536, 990, 326, 508, 434, 326, 16392, 3047, 9070, 18, 225, 2755, 9480, 16, 333, 353, 2537, 315, 5328, 360, 6, 1493, 518, 1410, 506, 316, 326, 7767...
return self.seconds * 1000000000L + self.nanoseconds
return self.__seconds * 1000000000L + self.__nanoseconds
def ns(self): """ Convert a LIGOTimeGPS to a count of nanoseconds as a long.
d76a8cdc25081f007a8ffbb0773fb7fe77a2a127 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/d76a8cdc25081f007a8ffbb0773fb7fe77a2a127/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3153, 12, 2890, 4672, 3536, 4037, 279, 511, 3047, 51, 950, 28983, 358, 279, 1056, 434, 6468, 23272, 487, 279, 1525, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3153, 12, 2890, 4672, 3536, 4037, 279, 511, 3047, 51, 950, 28983, 358, 279, 1056, 434, 6468, 23272, 487, 279, 1525, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
strict_host_check, private_key))
strict_host_check, private_key, quiet=quiet))
def BuildCmd(self, hostname, user, command, batch=True, ask_key=False, tty=False, use_cluster_key=True, strict_host_check=True, private_key=None): """Build an ssh command to execute a command on a remote node.
2892a4c95c388b0bbe0d1816396b8a5f218d8464 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/2892a4c95c388b0bbe0d1816396b8a5f218d8464/ssh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 5931, 12, 2890, 16, 5199, 16, 729, 16, 1296, 16, 2581, 33, 5510, 16, 6827, 67, 856, 33, 8381, 16, 21520, 33, 8381, 16, 999, 67, 7967, 67, 856, 33, 5510, 16, 5490, 67, 2564, 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, 3998, 5931, 12, 2890, 16, 5199, 16, 729, 16, 1296, 16, 2581, 33, 5510, 16, 6827, 67, 856, 33, 8381, 16, 21520, 33, 8381, 16, 999, 67, 7967, 67, 856, 33, 5510, 16, 5490, 67, 2564, 6...
""" Return the unit with the given name. EXAMPLES:: sage: units.area Collection area of units: acre are barn hectare rood section square_chain square_meter township sage: units.area.barn barn Units are cached:: sage: units.area.acre is units.area.acre True """ if self.__units.has_key(name): return self.__units[name] if len(unit_to_type) == 0: evalunitdict() try: v = self.__data[name] except KeyError: raise AttributeError if isinstance(v, dict): U = Units(self.__data[name], name) else: U = str_to_unit(name) self.__units[name] = U return U
""" Return the unit with the given name. EXAMPLES:: sage: units.area Collection area of units: acre are barn hectare rood section square_chain square_meter township sage: units.area.barn barn Units are cached:: sage: units.area.acre is units.area.acre True """ if self.__units.has_key(name): return self.__units[name] if len(unit_to_type) == 0: evalunitdict() try: v = self.__data[name] except KeyError: raise AttributeError if isinstance(v, dict): U = Units(self.__data[name], name) else: U = str_to_unit(name) self.__units[name] = U return U
def __getattr__(self, name):
d9145e61c2e167a847618a21778e0e532a04af5d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/d9145e61c2e167a847618a21778e0e532a04af5d/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return str(int(elts[0]) * 3600 + float(elts[1]))
return str(int(elts[0]) * 60 + float(elts[1]))
def to_seconds(time_string): elts = time_string.split(':') if len(elts) == 1: return time_string return str(int(elts[0]) * 3600 + float(elts[1]))
01a53930335e09f0df4becd8b68ad4f92dbb2644 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/01a53930335e09f0df4becd8b68ad4f92dbb2644/kernbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 7572, 12, 957, 67, 1080, 4672, 415, 3428, 273, 813, 67, 1080, 18, 4939, 2668, 2497, 13, 309, 562, 12, 292, 3428, 13, 422, 404, 30, 327, 813, 67, 1080, 327, 609, 12, 474, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 358, 67, 7572, 12, 957, 67, 1080, 4672, 415, 3428, 273, 813, 67, 1080, 18, 4939, 2668, 2497, 13, 309, 562, 12, 292, 3428, 13, 422, 404, 30, 327, 813, 67, 1080, 327, 609, 12, 474, 1...
boxSender = self
def __init__(self, boxReceiver=None, locator=None): # For backwards compatibility. When AMP did not separate parsing logic # (L{BinaryBoxProtocol}), request-response logic (L{BoxDispatcher}) and # command routing (L{CommandLocator}), it did not have a constructor. # Now it does, so old subclasses might have defined their own that did # not upcall. If this flag isn't set, we'll call the constructor in # makeConnection before anything actually happens. self._ampInitialized = True if boxReceiver is None: boxReceiver = self if locator is None: locator = self boxSender = self BoxDispatcher.__init__(self, locator) BinaryBoxProtocol.__init__(self, boxReceiver)
2db63d5366d2b845c7e65dd811c64491751f027f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12595/2db63d5366d2b845c7e65dd811c64491751f027f/amp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3919, 12952, 33, 7036, 16, 8871, 33, 7036, 4672, 468, 2457, 12727, 8926, 18, 225, 5203, 432, 4566, 5061, 486, 9004, 5811, 4058, 468, 261, 48, 95, 5905, 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, 1001, 2738, 972, 12, 2890, 16, 3919, 12952, 33, 7036, 16, 8871, 33, 7036, 4672, 468, 2457, 12727, 8926, 18, 225, 5203, 432, 4566, 5061, 486, 9004, 5811, 4058, 468, 261, 48, 95, 5905, 3...
print '@'*8, token, stack
def balance(html, limit_words=None, ellipsis=' ...'): word_count = 0 tokens = tag_re.split(html) out = [] stack = [] for token in tokens: print '@'*8, token, stack if not token.startswith('<'): if limit_words and word_count > limit_words: break words = token.split() word_count += len(words) if limit_words and word_count > limit_words: crop = limit_words - word_count out.append(' '.join(words[:crop]) + ellipsis) else: out.append(token) continue if token == '<![CDATA[': continue if token == ']]>': continue if not token.endswith('>'): continue # invalid element = token[1:-1].split()[0].lower() if not element: continue # invalid if element in banned: element = 'pre' token = '<pre>' if element.startswith('/'): element = element[1:] if element in banned: element = 'pre' token = '</pre>' if element in stack: top = None while stack and top != element: top = stack.pop() out.append('</%s>' % top) continue else: continue if element in block and stack and stack[-1] not in block: # close previous block if any for i in xrange(len(stack) - 1, -1, -1): if stack[i] in block: break stack, previous_block = stack[:i], stack[i:] previous_block.reverse() for tag in previous_block: out.append('</%s>' % tag) if element in closing and not token.endswith('/>'): stack.append(element) out.append(token) # flush the stack out.extend(['</%s>' % element for element in reversed(stack)]) return ''.join(out)
b1648ed2fb31b85138acfbb39c1853a435229ad6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10695/b1648ed2fb31b85138acfbb39c1853a435229ad6/normalize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11013, 12, 2620, 16, 1800, 67, 3753, 33, 7036, 16, 28992, 2218, 25956, 4672, 2076, 67, 1883, 273, 374, 2430, 273, 1047, 67, 266, 18, 4939, 12, 2620, 13, 596, 273, 5378, 2110, 273, 5378...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11013, 12, 2620, 16, 1800, 67, 3753, 33, 7036, 16, 28992, 2218, 25956, 4672, 2076, 67, 1883, 273, 374, 2430, 273, 1047, 67, 266, 18, 4939, 12, 2620, 13, 596, 273, 5378, 2110, 273, 5378...
def tryProtocolCombo (server_protocol, client_protocol, expectedToWork, certsreqs=None):
def try_protocol_combo(server_protocol, client_protocol, expect_success, certsreqs=None):
def tryProtocolCombo (server_protocol, client_protocol, expectedToWork, certsreqs=None):
cb62a4cb12d8f0f9904d111d93c76ea857434a52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/cb62a4cb12d8f0f9904d111d93c76ea857434a52/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def action_cancel(self,cr,uid,ids,conect=None):
def action_cancel(self, cr, uid, ids, context=None):
def action_cancel(self,cr,uid,ids,conect=None): return { 'view_type': 'form', "view_mode": 'form', 'res_model': 'ir.actions.configuration.wizard', 'type': 'ir.actions.act_window', 'target':'new', }
7f170d648ce806a9582087e82434ea26e4f2d585 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/7f170d648ce806a9582087e82434ea26e4f2d585/crm_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 327, 288, 296, 1945, 67, 723, 4278, 296, 687, 2187, 315, 1945, 67, 3188, 6877, 296, 687, 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, 225, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 327, 288, 296, 1945, 67, 723, 4278, 296, 687, 2187, 315, 1945, 67, 3188, 6877, 296, 687, 2187, ...
pass
self.clean()
def tearDown(self): # self.clean() pass
5a243185d07d5f0787854a2209c790556bacf714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/5a243185d07d5f0787854a2209c790556bacf714/test_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 468, 365, 18, 6200, 1435, 2890, 18, 6200, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 468, 365, 18, 6200, 1435, 2890, 18, 6200, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
host = hosts.create_host(hostname, user, port,
host = hosts.create_host(hostname, user=user, port=port,
def reboot(machine): hostname, user, passwd, port = parse_machine(machine, ssh_user, ssh_port, ssh_pass) host = hosts.create_host(hostname, user, port, initialize=False, password=passwd) host.reboot()
d53df032188aa484d2b6a3dbce1b79577e00c3b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/d53df032188aa484d2b6a3dbce1b79577e00c3b5/server_job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22852, 12, 9149, 4672, 5199, 16, 729, 16, 19093, 16, 1756, 273, 1109, 67, 9149, 12, 9149, 16, 7056, 67, 1355, 16, 7056, 67, 655, 16, 7056, 67, 5466, 13, 225, 1479, 273, 7206, 18, 264...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22852, 12, 9149, 4672, 5199, 16, 729, 16, 19093, 16, 1756, 273, 1109, 67, 9149, 12, 9149, 16, 7056, 67, 1355, 16, 7056, 67, 655, 16, 7056, 67, 5466, 13, 225, 1479, 273, 7206, 18, 264...
Return a new Weierstrass model of self under the standard transformation `(u,r,s,,t)`
Return a new Weierstrass model of self under the standard transformation `(u,r,s,t)`
def change_weierstrass_model(self, *urst): r""" Return a new Weierstrass model of self under the standard transformation `(u,r,s,,t)`
60581bf6d640bfa4b7f71a19999bd0feb09d2c88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/60581bf6d640bfa4b7f71a19999bd0feb09d2c88/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 1814, 20778, 313, 428, 67, 2284, 12, 2890, 16, 380, 18593, 4672, 436, 8395, 2000, 279, 394, 1660, 20778, 313, 428, 938, 434, 365, 3613, 326, 4529, 8620, 1375, 12, 89, 16, 86,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2549, 67, 1814, 20778, 313, 428, 67, 2284, 12, 2890, 16, 380, 18593, 4672, 436, 8395, 2000, 279, 394, 1660, 20778, 313, 428, 938, 434, 365, 3613, 326, 4529, 8620, 1375, 12, 89, 16, 86,...
this field. This is always a polynomial in the variable "x".
this field. By default, this is a polynomial in the variable "x".
def pari_polynomial(self): """ PARI polynomial corresponding to polynomial that defines this field. This is always a polynomial in the variable "x".
bf41e06add27789237d0cb0311bc55b4c09fbea4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/bf41e06add27789237d0cb0311bc55b4c09fbea4/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 77, 67, 3915, 13602, 12, 2890, 4672, 3536, 3939, 45, 16991, 4656, 358, 16991, 716, 11164, 333, 652, 18, 282, 1220, 353, 3712, 279, 16991, 316, 326, 2190, 315, 92, 9654, 2, 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, 779, 77, 67, 3915, 13602, 12, 2890, 4672, 3536, 3939, 45, 16991, 4656, 358, 16991, 716, 11164, 333, 652, 18, 282, 1220, 353, 3712, 279, 16991, 316, 326, 2190, 315, 92, 9654, 2, -100, -...
common.message(_('You must select a record to use the relation !'))
common.message(_('You must select a record to use the relation!'), self._window)
def click_and_relate(self, action): data = {} context = {} act = action.copy() obj_id = self._view.modelfield.get(self._view.model) if not obj_id: common.message(_('You must select a record to use the relation !')) return False screen = Screen(self.attrs['relation'], self._window) screen.load([obj_id]) act['domain'] = screen.current_model.expr_eval(act['domain'], check_load=False) act['context'] = str(screen.current_model.expr_eval(act['context'], check_load=False)) return Action._exec_action(act, data, context)
79cdbbd000e109358678aacc9eaf1844e693b67c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/79cdbbd000e109358678aacc9eaf1844e693b67c/many2one.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4682, 67, 464, 67, 2878, 340, 12, 2890, 16, 1301, 4672, 501, 273, 2618, 819, 273, 2618, 1328, 273, 1301, 18, 3530, 1435, 1081, 67, 350, 273, 365, 6315, 1945, 18, 2284, 1518, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4682, 67, 464, 67, 2878, 340, 12, 2890, 16, 1301, 4672, 501, 273, 2618, 819, 273, 2618, 1328, 273, 1301, 18, 3530, 1435, 1081, 67, 350, 273, 365, 6315, 1945, 18, 2284, 1518, 18, 588, ...
'diff failed',
'scons and installer installations differ',
def confirm(question): print question if raw_input() != 'y': sys.exit(2)
55a113cf5107f964a8ac8c0ebfb11518a0d3f572 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7064/55a113cf5107f964a8ac8c0ebfb11518a0d3f572/release.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 12, 4173, 4672, 1172, 5073, 309, 1831, 67, 2630, 1435, 480, 296, 93, 4278, 2589, 18, 8593, 12, 22, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6932, 12, 4173, 4672, 1172, 5073, 309, 1831, 67, 2630, 1435, 480, 296, 93, 4278, 2589, 18, 8593, 12, 22, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
rawsource = unescape( string[match.start():matchend+endmatch.end()], 1)
rawsource = unescape(string[matchstart:textend], 1)
def interpreted_or_phrase_ref(self, match, lineno): pattern = self.patterns.interpreted_or_phrase_ref string = match.string matchstart = match.start('backquote') matchend = match.end('backquote') rolestart = match.start('role') role = match.group('role') position = '' if role: role = role[1:-1] position = 'prefix' elif self.quoted_start(match): return (string[:matchend], [], string[matchend:], []) endmatch = pattern.search(string[matchend:]) if endmatch and endmatch.start(1): # 1 or more chars escaped = endmatch.string[:endmatch.start(1)] text = unescape(escaped, 0) rawsource = unescape( string[match.start():matchend+endmatch.end()], 1) if rawsource[-1:] == '_': if role: msg = self.reporter.warning( 'Mismatch: inline interpreted text start-string and' ' role with phrase-reference end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return (string[:matchstart], [prb], string[matchend:], [msg]) return self.phrase_ref( string[:matchstart], string[matchend:][endmatch.end():], text, rawsource) else: return self.interpreted( string[:rolestart], string[matchend:][endmatch.end():], endmatch, role, position, lineno, escaped, rawsource, text) msg = self.reporter.warning( 'Inline interpreted text or phrase reference start-string ' 'without end-string at line %s.' % lineno) text = unescape(string[matchstart:matchend], 1) rawsource = unescape(string[matchstart:matchend], 1) prb = self.problematic(text, rawsource, msg) return string[:matchstart], [prb], string[matchend:], [msg]
018a79821ccb1056404d43dbe32e444d1a0e03c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/018a79821ccb1056404d43dbe32e444d1a0e03c1/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 1936, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, 1937, 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, 19898, 67, 280, 67, 9429, 67, 1734, 12, 2890, 16, 845, 16, 7586, 4672, 1936, 273, 365, 18, 13317, 18, 24713, 329, 67, 280, 67, 9429, 67, 1734, 533, 273, 845, 18, 1080, 845, 1937, 273...
sigaction (SIGPIPE, &sa, NULL)
sigaction(SIGPIPE, &sa, NULL)
#ifdef WINDOWS
592872e308788b926d7358eb0ec411e83ee451d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/930/592872e308788b926d7358eb0ec411e83ee451d0/net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 24482, 22973, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 536, 24482, 22973, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'_ctypes/cfield.c', '_ctypes/malloc_closure.c']
'_ctypes/cfield.c']
def detect_ctypes(self, inc_dirs, lib_dirs): self.use_system_libffi = False include_dirs = [] extra_compile_args = [] extra_link_args = [] sources = ['_ctypes/_ctypes.c', '_ctypes/callbacks.c', '_ctypes/callproc.c', '_ctypes/stgdict.c', '_ctypes/cfield.c', '_ctypes/malloc_closure.c'] depends = ['_ctypes/ctypes.h']
864cc6703a7c4399295b3601f49e0065639443bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/864cc6703a7c4399295b3601f49e0065639443bf/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 299, 989, 12, 2890, 16, 7290, 67, 8291, 16, 2561, 67, 8291, 4672, 365, 18, 1202, 67, 4299, 67, 2941, 1403, 77, 273, 1083, 2341, 67, 8291, 273, 5378, 2870, 67, 11100, 67, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 299, 989, 12, 2890, 16, 7290, 67, 8291, 16, 2561, 67, 8291, 4672, 365, 18, 1202, 67, 4299, 67, 2941, 1403, 77, 273, 1083, 2341, 67, 8291, 273, 5378, 2870, 67, 11100, 67, 19...
dockSelf.bottomPanel.setPreferredSize(Dimension(dimWidth, dimHeight))
dockSelf.bottomPanel.setPreferredSize(Dimension(900, 280))
def __init__(dockSelf): GraphModifier.self = dockSelf GraphModifier.tempColor = None # dummy variable dockSelf.currentColor = red # get only the node names nodes = [] for i in nodeIndex: nodes.append(i[0]) # get only the edge names edges = [] for i in edgeIndex: edges.append(i[0]) dockSelf.objects = general + nodes + edges # layout panel dockSelf.layoutPanel = JPanel() # top: main controls bottom: hidden controls dockSelf.layoutPanel.setLayout(BoxLayout(dockSelf.layoutPanel, BoxLayout.Y_AXIS)) dockSelf.topPanel = JPanel() # the top panel macDimH = 40 winDimH = 50 macDimW = 900 winDimW = 570 # Here we assume people are using either mac or windows. # If I had a way to test for linux and tweak the sizes I'd do it here. if System.getProperty("os.name") == "Mac OS X": dimWidth = macDimW dimHeight = macDimH print "Its a mac!" else: dimWidth = winDimW dimHeight = winDimH dockSelf.topPanel.setPreferredSize(Dimension(dimWidth, dimHeight)) dockSelf.layoutPanel.add(dockSelf.topPanel) dockSelf.buttonPanel = JPanel(GridLayout(2, 5)) # the panel for the buttons dockSelf.buttonPanel.setPreferredSize(Dimension(dimWidth, dimHeight)) dockSelf.layoutPanel.add(dockSelf.buttonPanel) dockSelf.bottomPanel = JPanel() # the bottom panel dockSelf.bottomPanel.setPreferredSize(Dimension(dimWidth, dimHeight)) dockSelf.layoutPanel.add(dockSelf.bottomPanel) # object box dockSelf.objectBox = JComboBox(dockSelf.objects) dockSelf.objectBox.setEditable(true) dockSelf.objectEditor = dockSelf.objectBox.getEditor().getEditorComponent() dockSelf.objectEditor.setDocument(EDoc(dockSelf.objectBox, dockSelf.objectBox.getModel(), dockSelf)) obf = objectBoxFilter(dockSelf) dockSelf.objectBox.addActionListener(obf) # color panel dockSelf.colorPanel = JPanel(GridLayout(2, 40)) dockSelf.colorPanel.setVisible(false) # colors dockSelf.colorInfo = colorInfo GraphModifier.currentIndex = 0 dockSelf.colors = {} # create the color buttons for theColor in dockSelf.colorInfo: colorName = theColor[0] dockSelf.colors[colorName] = JButton("#") dockSelf.colors[colorName].setBackground(Color(theColor[1], theColor[2], theColor[3])) dockSelf.colors[colorName].setForeground(Color(theColor[1], theColor[2], theColor[3])) dockSelf.colors[colorName].setPreferredSize(Dimension(14, 14)) dockSelf.colors[colorName].actionPerformed = lambda event: setColor(event, GraphModifier.self) dockSelf.colorPanel.add(dockSelf.colors[theColor[0]]) #node style panel dockSelf.nodeStylePanel = JPanel(GridLayout(1, 8)) dockSelf.nodeStylePanel.setVisible(false) #node styles dockSelf.nodeStyleIndexToButton = {} #create the node style buttons dockSelf.nodeStylePanelButtons = {} for nodeStyleIndex in displayedNodeStyleIndexes: iconFileName = nodeStyleIndexToFileName[nodeStyleIndex] nodeStyleIcon = ImageIcon(nodeStyleImageDirectory + iconFileName) dockSelf.nodeStylePanelButtons[nodeStyleIndex] = JButton(nodeStyleIcon) dockSelf.nodeStylePanelButtons[nodeStyleIndex].setPreferredSize(Dimension(32,32)) dockSelf.nodeStylePanelButtons[nodeStyleIndex].actionPerformed = lambda event: setNodeStyle(event, GraphModifier.self) dockSelf.nodeStylePanel.add(dockSelf.nodeStylePanelButtons[nodeStyleIndex]) # size panel dockSelf.sizePanel = JPanel(GridLayout(20,20)) # assuming this is for a node, do edges later dockSelf.widthSlider = JSlider(1, 100, int(g.nodes[0].width)) dockSelf.widthSlider.setPreferredSize(Dimension(100, 2)) dockSelf.wsl = widthSliderListener(dockSelf) dockSelf.widthSlider.addChangeListener(dockSelf.wsl) dockSelf.widthSlider.setMajorTickSpacing(99) dockSelf.widthSlider.setMinorTickSpacing(10) dockSelf.widthSlider.setPaintLabels(true) dockSelf.heightSlider = JSlider(1, 100, int(g.nodes[0].height)) dockSelf.heightSlider.setPreferredSize(Dimension(100, 2)) dockSelf.hsl = heightSliderListener(dockSelf) dockSelf.heightSlider.addChangeListener(dockSelf.hsl) dockSelf.heightSlider.setMajorTickSpacing(99) dockSelf.heightSlider.setMinorTickSpacing(10) dockSelf.heightSlider.setPaintLabels(true) dockSelf.sameWidthHeightCheck = JCheckBox() dockSelf.doneSizeButton = JButton("Change Size") dockSelf.doneSizeButton.actionPerformed = lambda event: changeAttribute(GraphModifier.self) # add the components into the sizePanel dockSelf.sizeWidthLabel = JLabel("Width: " + str(dockSelf.widthSlider.getValue())) dockSelf.sizeHeightLabel = JLabel("Height: " + str(dockSelf.heightSlider.getValue())) dockSelf.sizePanel.add(dockSelf.sizeWidthLabel) dockSelf.sizePanel.add(dockSelf.sizeHeightLabel) dockSelf.sizePanel.add(JLabel("Width = Height?")) dockSelf.sizePanel.add(JLabel("")) dockSelf.sizePanel.add(dockSelf.widthSlider) dockSelf.sizePanel.add(dockSelf.heightSlider) dockSelf.sizePanel.add(dockSelf.sameWidthHeightCheck) dockSelf.sizePanel.add(dockSelf.doneSizeButton) # change label panel dockSelf.changeLabelPanel = JPanel() dockSelf.changeLabelText = JTextField(50) dockSelf.doneChangeLabelButton = JButton("Change") dockSelf.doneChangeLabelButton.actionPerformed = lambda event: changeLabel(GraphModifier.self) # add the components into the change label panel dockSelf.changeLabelPanel.add(JLabel("Label Text: ")) dockSelf.changeLabelPanel.add(dockSelf.changeLabelText) dockSelf.changeLabelPanel.add(dockSelf.doneChangeLabelButton) # change history panel dockSelf.changeHistoryPanel = JPanel() dockSelf.changeHistoryLeftPanel = JPanel() dockSelf.changeHistoryRightPanel = JPanel() dockSelf.changeHistoryListModel = DefaultListModel() dockSelf.changeHistoryList = JList(dockSelf.changeHistoryListModel) dockSelf.changeHistoryListScroller = JScrollPane(dockSelf.changeHistoryList) #dockSelf.changeHistoryListScroller.setPreferredSize(Dimension(300, 200)) dockSelf.exportChangeHistoryButton = JButton("Export Change History") dockSelf.exportChangeHistoryButton.actionPerformed = lambda event: exportChangeHistory() dockSelf.exportGDFButton = JButton("Export GDF") dockSelf.exportGDFButton.actionPerformed = lambda event: exportGDFFile() dockSelf.changeHistoryLeftPanel.add(dockSelf.changeHistoryListScroller) dockSelf.changeHistoryRightPanel.add(dockSelf.exportChangeHistoryButton) dockSelf.changeHistoryRightPanel.add(dockSelf.exportGDFButton) dockSelf.changeHistoryPanel.add(dockSelf.changeHistoryLeftPanel) dockSelf.changeHistoryPanel.add(dockSelf.changeHistoryRightPanel) # colour button dockSelf.colourButton = JButton("Colour") dockSelf.colourButton.actionPerformed = lambda event: updateBottomPanel(GraphModifier.self, GraphModifier.self.colorPanel)# this line has problems # show button dockSelf.showButton = JButton("Show") dockSelf.showButton.actionPerformed = lambda event: setVisible(true, GraphModifier.self) # show objects # hide button dockSelf.hideButton = JButton("Hide") dockSelf.hideButton.actionPerformed = lambda event: setVisible(false, GraphModifier.self) # hide objects # size button dockSelf.sizeButton = JButton("Size") dockSelf.sizeButton.actionPerformed = lambda event: setSizePanel(GraphModifier.self) # show label button dockSelf.showLabelButton = JButton("Show Label") dockSelf.showLabelButton.actionPerformed = lambda event: setLabelVisible(true, GraphModifier.self) # hide label button dockSelf.hideLabelButton = JButton("Hide Label") dockSelf.hideLabelButton.actionPerformed = lambda event: setLabelVisible(false, GraphModifier.self) # change label button dockSelf.changeLabelButton = JButton("Change Label") dockSelf.changeLabelButton.actionPerformed = lambda event: updateBottomPanel(GraphModifier.self, GraphModifier.self.changeLabelPanel) #node style dockSelf.nodeStyleButton = JButton("Node Shape") dockSelf.nodeStyleButton.actionPerformed = lambda event: updateBottomPanel(GraphModifier.self, GraphModifier.self.nodeStylePanel) # center button dockSelf.centerButton = JButton("Center") dockSelf.centerButton.actionPerformed = lambda event: centerGraph(GraphModifier.self) # export change history dockSelf.changeHistoryButton = JButton("Change History") dockSelf.changeHistoryButton.actionPerformed = lambda event: updateBottomPanel(GraphModifier.self, GraphModifier.self.changeHistoryPanel) dockSelf.nodeProperties = nodePropertiesList dockSelf.edgeProperties = edgePropertiesList dockSelf.nodePropertiesInfo = nodeProperties dockSelf.edgePropertiesInfo = edgeProperties # property box dockSelf.propertyBox = JComboBox(dockSelf.nodeProperties) dockSelf.propertyBox.setEditable(false) dockSelf.propertiesShown = "nodes" # what properties are currently shown in the property box dockSelf.currentPropertyType = type("string") pbl = propertyBoxListener(dockSelf) dockSelf.propertyBox.addActionListener(pbl) # operator box dockSelf.numberOperators = ["==", "!=", "<=", "<", ">=", ">"] dockSelf.stringOperators = ["==", "!="] dockSelf.operatorBox = JComboBox(dockSelf.numberOperators) dockSelf.operatorBox.setEditable(false) # value box dockSelf.valueBox = JComboBox() dockSelf.valueBoxValue = TDoc() # other trackers dockSelf.currentAction = "" # keeps track of what button is pressed # put list into scroll pane dockSelf.add(dockSelf.layoutPanel) dockSelf.topPanel.add(JLabel("Object: ")) dockSelf.topPanel.add(dockSelf.objectBox) dockSelf.topPanel.add(JLabel("Property: ")) dockSelf.topPanel.add(dockSelf.propertyBox) dockSelf.topPanel.add(JLabel("Operator: ")) dockSelf.topPanel.add(dockSelf.operatorBox) dockSelf.topPanel.add(JLabel("Value: ")) dockSelf.topPanel.add(dockSelf.valueBox) dockSelf.buttonPanel.add(dockSelf.colourButton) dockSelf.buttonPanel.add(dockSelf.showButton) dockSelf.buttonPanel.add(dockSelf.hideButton) dockSelf.buttonPanel.add(dockSelf.sizeButton) dockSelf.buttonPanel.add(dockSelf.showLabelButton) dockSelf.buttonPanel.add(dockSelf.hideLabelButton) dockSelf.buttonPanel.add(dockSelf.changeLabelButton) dockSelf.buttonPanel.add(dockSelf.nodeStyleButton) dockSelf.buttonPanel.add(dockSelf.centerButton) dockSelf.buttonPanel.add(dockSelf.changeHistoryButton) # set intial value of object box to all dockSelf.objectBox.setSelectedIndex(0) # make it big enough to fit everything dockSelf.setPreferredSize(java.awt.Dimension(900, 360)) ui.dock(dockSelf)
49b4c7bc20e8d1e1c5f3ea641b38294c9add393a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2706/49b4c7bc20e8d1e1c5f3ea641b38294c9add393a/graphModifier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 72, 975, 10084, 4672, 5601, 9829, 18, 2890, 273, 5822, 10084, 5601, 9829, 18, 5814, 2957, 273, 599, 468, 9609, 2190, 5822, 10084, 18, 2972, 2957, 273, 1755, 225, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 72, 975, 10084, 4672, 5601, 9829, 18, 2890, 273, 5822, 10084, 5601, 9829, 18, 5814, 2957, 273, 599, 468, 9609, 2190, 5822, 10084, 18, 2972, 2957, 273, 1755, 225, 468...
offset += 1
def parseDoubleQuotedString(): global s, slen, offset #print "parse dqs:", offset start = offset while True: offset += 1 if offset >= slen: break if s[offset] == "\\": s.pop(offset) slen -= 1 offset += 1 elif s[offset] == '"': offset += 1 break return s[start+1:offset-1].tostring()
b53c338b34f74636d6b1209dffbbd319cd8d1570 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14305/b53c338b34f74636d6b1209dffbbd319cd8d1570/compactjson.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20575, 15919, 780, 13332, 2552, 272, 16, 272, 1897, 16, 1384, 468, 1188, 315, 2670, 302, 12926, 2773, 16, 1384, 787, 273, 1384, 1323, 1053, 30, 309, 1384, 1545, 272, 1897, 30, 898, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20575, 15919, 780, 13332, 2552, 272, 16, 272, 1897, 16, 1384, 468, 1188, 315, 2670, 302, 12926, 2773, 16, 1384, 787, 273, 1384, 1323, 1053, 30, 309, 1384, 1545, 272, 1897, 30, 898, 309, ...
(xml_fd, xml) = tempfile.mkstemp('.xml') (svg_fd, svg) = tempfile.mkstemp('.svg') (pdf_fd, pdf) = tempfile.mkstemp('.pdf')
(xml_fd, xml) = tempfile.mkstemp('.xml') (svg_fd, svg) = tempfile.mkstemp('.svg') (pdf_fd, pdf) = tempfile.mkstemp('.pdf')
def pdf(self): import os, tempfile
ff36d31a2a014c3bd68fff8ac2fb7c01edd04a01 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12856/ff36d31a2a014c3bd68fff8ac2fb7c01edd04a01/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 12, 2890, 4672, 1930, 1140, 16, 13275, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 12, 2890, 4672, 1930, 1140, 16, 13275, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if self.wantAvatarPhysicsIndicator: onScreenDebug.add("velocity", velocity.pPrintValues())
if __debug__: if self.wantAvatarPhysicsIndicator: onScreenDebug.add("velocity", velocity.pPrintValues())
def setPriorParentVector(self): assert(self.debugPrint("doDeltaPos()")) print "self.__oldDt", self.__oldDt, "self.__oldPosDelta", self.__oldPosDelta onScreenDebug.add("__oldDt", "% 10.4f"%self.__oldDt) onScreenDebug.add("self.__oldPosDelta", self.__oldPosDelta.pPrintValues()) velocity = self.__oldPosDelta*(1/self.__oldDt) assert(self.debugPrint(" __oldPosDelta=%s"%(self.__oldPosDelta,))) assert(self.debugPrint(" velocity=%s"%(velocity,))) self.priorParent.setVector(Vec3(velocity)) if self.wantAvatarPhysicsIndicator: onScreenDebug.add("velocity", velocity.pPrintValues())
4d92e63fdd59070a3d2b21f20eb98c01489610bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4d92e63fdd59070a3d2b21f20eb98c01489610bc/PhysicsWalker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17004, 2432, 3054, 5018, 12, 2890, 4672, 1815, 12, 2890, 18, 4148, 5108, 2932, 2896, 9242, 1616, 10031, 3719, 225, 1172, 315, 2890, 16186, 1673, 19739, 3113, 365, 16186, 1673, 19739, 16, 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, 17004, 2432, 3054, 5018, 12, 2890, 4672, 1815, 12, 2890, 18, 4148, 5108, 2932, 2896, 9242, 1616, 10031, 3719, 225, 1172, 315, 2890, 16186, 1673, 19739, 3113, 365, 16186, 1673, 19739, 16, 3...
def __init__(self): self.log(2,"info",_("XiboLogScreen logger started")) def log(self, level, category, message): print "LOG: " + str(level) + " " + category + " " + message
def __init__(self,level): if level == "" or int(level) < 0: level=0 self.level = int(level) self.log(2,"info",_("XiboLogScreen logger started at level ") + str(level)) def log(self, severity, category, message): if self.level >= severity: print "LOG: " + str(severity) + " " + category + " " + message
def __init__(self): self.log(2,"info",_("XiboLogScreen logger started"))
4998fc1141ff2de15b1dbc951b8f8ecd2a37434a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5464/4998fc1141ff2de15b1dbc951b8f8ecd2a37434a/XiboClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1330, 12, 22, 10837, 1376, 3113, 67, 2932, 60, 495, 83, 1343, 7956, 1194, 5746, 6, 3719, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1330, 12, 22, 10837, 1376, 3113, 67, 2932, 60, 495, 83, 1343, 7956, 1194, 5746, 6, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -10...
if not o.core_port: terminateProcess(gui.p.pid)
terminateProcess(gui.p.pid)
def main(cfg_file=cfg_file): parser = OptionParser() parser.add_option('-t', '--test', default='test', help='the test directory (default %default)') o, args = parser.parse_args() test_options = readTestOptions(o.test) old_dir = getcwd() chdir(join(getcwd(), dirname(argv[0]), dirname(cfg_file))) cfg_file = join(getcwd(), basename(cfg_file)) loadConfiguration(cfg_file) storage.loadStorage() conn = [0, 'black_box_test', 'localhost', 6666] storage.addConnection(conn) default_conn = storage.option('default_connection') storage.setOption('default_connection', conn[0]) path.append(config['servers']['path']) path.append(config['resources']['path']) chdir(old_dir) if exists(join(o.test, 'localhost_server.py')): copy(join(o.test, 'localhost_server.py'), config['servers']['path']) # this import must stay here, after the appending of resources path to path from devclient.gui import Gui try: gui = Gui(cfg_file) cwd = dirname(argv[0]) if dirname(argv[0]) else None cmd = ['python', '-u', 'server_test.py'] if 'delay' in test_options: cmd.append('-d') cmd.append(test_options['delay']) cmd.append(o.test + '/data.txt') gui.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, cwd=cwd) try: buf = gui.p.stdout.read(6) # read READY\n from stdout except IOError: time.sleep(.5) Gui.startAction = startAction QTimer.singleShot(2000, gui.startAction) gui.mainLoop() except exception.IPCError: if not o.core_port: terminateProcess(gui.p.pid) except Exception, e: print 'Fatal Exception:', e if not o.core_port: terminateProcess(gui.p.pid) finally: storage.deleteConnection(conn) storage.setOption('default_connection', default_conn) fn = join(config['servers']['path'], 'localhost_server.py') if exists(fn): unlink(fn)
cbe9d679393f87353f3ce9074aade598a013355b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8560/cbe9d679393f87353f3ce9074aade598a013355b/black_box.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 7066, 67, 768, 33, 7066, 67, 768, 4672, 225, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2668, 17, 88, 2187, 3534, 3813, 2187, 805, 2218, 3813, 2187, 2809, 2218, 5787, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7066, 67, 768, 33, 7066, 67, 768, 4672, 225, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2668, 17, 88, 2187, 3534, 3813, 2187, 805, 2218, 3813, 2187, 2809, 2218, 5787, ...
nodes = [ name ]
nodes = [ self.name ]
def __init__(self, parent, name, description, value): self.parent = parent self.name = name self.description = description self.value = value self.options = [ ] nodes = [ name ] while parent: nodes.insert(0, parent.name) parent = parent.parent self.path = ".".join(nodes)
cd1da66868e748e65faa498ebd346bf8a3a2b7a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11628/cd1da66868e748e65faa498ebd346bf8a3a2b7a7/prelude.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 2477, 16, 460, 4672, 365, 18, 2938, 273, 982, 365, 18, 529, 273, 508, 365, 18, 3384, 273, 2477, 365, 18, 1132, 273, 460, 365, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 2477, 16, 460, 4672, 365, 18, 2938, 273, 982, 365, 18, 529, 273, 508, 365, 18, 3384, 273, 2477, 365, 18, 1132, 273, 460, 365, 18, 2...
(("iframe", "noembed", "noframes", "noscript"), self.startTagCdata),
("iframe", self.startTagIFrame), (("noembed", "noframes", "noscript"), self.startTagCdata),
def __init__(self, parser, tree): Phase.__init__(self, parser, tree)
60e94ec2778f0402e02ba1984821ce17fb6e904a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9368/60e94ec2778f0402e02ba1984821ce17fb6e904a/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 4672, 19459, 16186, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 4672, 19459, 16186, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
module_ids = module.search([('name', '=', name)])
module_ids = module.search([ ('name', '=', name), ('state', '!=', 'installed'), ]) if not module_ids: return
def install_module(name): module = RPCProxy('ir.module.module') module_ids = module.search([('name', '=', name)]) module.button_install(module_ids, CONTEXT) SOCK.send(('wizard', 'create', DB_NAME, USER, SESSION, 'ir.module.module.install_upgrade')) wiz_id = SOCK.receive() SOCK.send(('wizard', 'execute', DB_NAME, USER, SESSION, wiz_id, {}, 'start', CONTEXT)) SOCK.receive() SOCK.send(('wizard', 'delete', wiz_id)) SOCK.receive()
4a1e3286854253559aea5f6f6c3a5f1c015e9df1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/4a1e3286854253559aea5f6f6c3a5f1c015e9df1/test_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 2978, 12, 529, 4672, 1605, 273, 8295, 3886, 2668, 481, 18, 2978, 18, 2978, 6134, 1605, 67, 2232, 273, 1605, 18, 3072, 3816, 7707, 529, 2187, 15196, 2187, 508, 3631, 7707, 2019,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 2978, 12, 529, 4672, 1605, 273, 8295, 3886, 2668, 481, 18, 2978, 18, 2978, 6134, 1605, 67, 2232, 273, 1605, 18, 3072, 3816, 7707, 529, 2187, 15196, 2187, 508, 3631, 7707, 2019,...
def get_file_url(self): """ returns the absolute downloadable filepath """ self.user = re.search(r"/user/(.+)", self.parent.url).group(1) max_videos = "" if self.config['max_videos']: max_videos = "?max-results=" + self.config['max_videos'] url = "http://gdata.youtube.com/feeds/api/users/" + self.user + "/uploads" + max_videos return url
def get_file_url(self): """ returns the absolute downloadable filepath """ self.user = re.search(r"/user/(.+)", self.parent.url).group(1) max_videos = "" if self.config['max_videos']: max_videos = "?max-results=" + self.config['max_videos'] url = "http://gdata.youtube.com/feeds/api/users/" + self.user + "/uploads" + max_videos return url
10e72bdba4f856e5cccd3feaafa910948e1411b3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9838/10e72bdba4f856e5cccd3feaafa910948e1411b3/YoutubeChannel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 718, 12, 2890, 4672, 3536, 1135, 326, 4967, 4224, 429, 3608, 3536, 365, 18, 1355, 273, 283, 18, 3072, 12, 86, 6, 19, 1355, 19, 21133, 2225, 16, 365, 18, 2938, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 768, 67, 718, 12, 2890, 4672, 3536, 1135, 326, 4967, 4224, 429, 3608, 3536, 365, 18, 1355, 273, 283, 18, 3072, 12, 86, 6, 19, 1355, 19, 21133, 2225, 16, 365, 18, 2938, 18, ...
user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass)
if ':' in user_pass: user, password = user_pass.split(':', 1) user_pass = base64.encodestring('%s:%s' % (unquote(user), unquote(password))) req.add_header('Proxy-Authorization', 'Basic ' + user_pass)
def proxy_open(self, req, proxy, type): orig_type = req.get_type() type, r_type = splittype(proxy) host, XXX = splithost(r_type) if '@' in host: user_pass, host = host.split('@', 1) user_pass = base64.encodestring(unquote(user_pass)).strip() req.add_header('Proxy-Authorization', 'Basic '+user_pass) host = unquote(host) req.set_proxy(host, type) if orig_type == type: # let other handlers take care of it # XXX this only makes sense if the proxy is before the # other handlers return None else: # need to start over, because the other handlers don't # grok the proxy's URL type return self.parent.open(req)
a35a9a201facf233fb674c7e30d23c3715d77642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a35a9a201facf233fb674c7e30d23c3715d77642/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 618, 16, 436, 67, 723, 273, 1416, 723, 12, 5656, 13, 1479, 16, 11329, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 3190, 12, 2890, 16, 1111, 16, 2889, 16, 618, 4672, 1647, 67, 723, 273, 1111, 18, 588, 67, 723, 1435, 618, 16, 436, 67, 723, 273, 1416, 723, 12, 5656, 13, 1479, 16, 11329, ...
self.o.assy.addmol(numol) bond_at_singlets(hs,sing)
bond_at_singlets(hs,sing) self.o.assy.addmol(numol) return numol, "copy of %r" % m.name
def pasteBond(self, sing): m = self.pastable if len(m.singlets)==0: return if len(m.singlets)>1 and not m.hotspot: return numol = self.pastable.copy(None) # bruce 041116 added by (implicitly, by default) cauterize = 1 # to mol.copy(); change this to cauterize = 0 here if unwanted, # and for other uses of mol.copy in this file. hs = numol.hotspot or numol.singlets[0] self.o.assy.addmol(numol) bond_at_singlets(hs,sing)
a462aeabdb9106b7e540945131bccb10c32631a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/a462aeabdb9106b7e540945131bccb10c32631a5/depositMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19401, 9807, 12, 2890, 16, 4864, 4672, 312, 273, 365, 18, 84, 689, 429, 309, 562, 12, 81, 18, 2470, 17307, 13, 631, 20, 30, 327, 309, 562, 12, 81, 18, 2470, 17307, 13, 34, 21, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19401, 9807, 12, 2890, 16, 4864, 4672, 312, 273, 365, 18, 84, 689, 429, 309, 562, 12, 81, 18, 2470, 17307, 13, 631, 20, 30, 327, 309, 562, 12, 81, 18, 2470, 17307, 13, 34, 21, 471,...
'''dldir [PATH] ... display or change download directory'''
'''dldir [PATH] ... display or change download directory'''
def do_dldir(self,arg): '''dldir [PATH] ... display or change download directory''' if arg == '': print self.options.dldir return arg = expand_path(arg) # resolve environment variables and '~'s if not os_path_exists(arg): #we could also check for write access if you want print >> stderr, 'Error: wrong argument; must be a valid path' else: self.options.dldir = arg print arg
dd84159756778af9a20710245188c70555fadd0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11589/dd84159756778af9a20710245188c70555fadd0e/arte+7.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5761, 1214, 12, 2890, 16, 3175, 4672, 9163, 5761, 1214, 306, 4211, 65, 1372, 2562, 578, 2549, 4224, 1867, 26418, 309, 1501, 422, 875, 30, 1172, 365, 18, 2116, 18, 5761, 1214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 5761, 1214, 12, 2890, 16, 3175, 4672, 9163, 5761, 1214, 306, 4211, 65, 1372, 2562, 578, 2549, 4224, 1867, 26418, 309, 1501, 422, 875, 30, 1172, 365, 18, 2116, 18, 5761, 1214, ...
EXAMPLES:
EXAMPLES::
def victor_miller_basis(k, prec=10, cusp_only=False, var='q'): r""" Compute and return the Victor-Miller basis for modular forms of weight k and level 1 to precision $O(q^prec)$. if \code{cusp\_only} is True, return only a basis for the cuspidal subspace. INPUT: k -- an integer prec -- (default: 10) a positive integer cusp_only -- bool (default: False) var -- string (default: 'q' OUTPUT: A sequence whose entries are power series in ZZ[[var]]. EXAMPLES: sage: victor_miller_basis(1, 6) [] sage: victor_miller_basis(0, 6) [ 1 + O(q^6) ] sage: victor_miller_basis(2, 6) [] sage: victor_miller_basis(4, 6) [ 1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + O(q^6) ] sage: victor_miller_basis(6, 6, var='w') [ 1 - 504*w - 16632*w^2 - 122976*w^3 - 532728*w^4 - 1575504*w^5 + O(w^6) ] sage: victor_miller_basis(6, 6) [ 1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6) [ 1 + 196560*q^2 + 16773120*q^3 + 398034000*q^4 + 4629381120*q^5 + O(q^6), q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6, cusp_only=True) [ q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6, cusp_only=True) [ q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6) [ 1 + 52416000*q^3 + 39007332000*q^4 + 6609020221440*q^5 + O(q^6), q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(32, 6) [ 1 + 2611200*q^3 + 19524758400*q^4 + 19715347537920*q^5 + O(q^6), q + 50220*q^3 + 87866368*q^4 + 18647219790*q^5 + O(q^6), q^2 + 432*q^3 + 39960*q^4 - 1418560*q^5 + O(q^6) ] sage: victor_miller_basis(40,200)[1:] == victor_miller_basis(40,200,cusp_only=True) True sage: victor_miller_basis(200,40)[1:] == victor_miller_basis(200,40,cusp_only=True) True """ k = Integer(k) if k%2 == 1 or k==2: return Sequence([]) elif k < 0: raise ValueError, "k must be non-negative" elif k == 0: return Sequence([PowerSeriesRing(ZZ,var)(1).add_bigoh(prec)], cr=True) e = k.mod(12) if e == 2: e += 12 n = (k-e) // 12 if n == 0 and cusp_only: return Sequence([]) # If prec is less than or equal to the dimension of the space of # cusp forms, which is just n, then we know the answer, and we # simply return it. if prec <= n: q = PowerSeriesRing(ZZ,var).gen(0) err = bigO(q**prec) ls = [0] * (n+1) if not cusp_only: ls[0] = 1 + err for i in range(1,prec): ls[i] = q**i + err for i in range(prec,n+1): ls[i] = err return Sequence(ls, cr=True) F6 = ((-504)*eisenstein_series_qexp(6,prec,var=var)).change_ring(ZZ) if e == 0: A = F6.parent()(1) elif e == 4: A = (240*eisenstein_series_qexp(4,prec,var=var)).change_ring(ZZ) elif e == 6: A = F6 elif e == 8: A = (480*eisenstein_series_qexp(8,prec,var=var)).change_ring(ZZ) elif e == 10: A = (-264*eisenstein_series_qexp(10,prec,var=var)).change_ring(ZZ) else: # e == 14 A = (-24*eisenstein_series_qexp(14,prec,var=var)).change_ring(ZZ) if n == 0: return Sequence([A], cr=True) F6_squared = F6**2 D = delta_qexp(prec,var=var) Fprod = F6_squared Dprod = D R = A.parent() if cusp_only: ls = [R(0)] + [A] * n start = 1 else: ls = [A] * (n+1) start = 0 for i in range(1,n+1): ls[n-i] *= Fprod ls[i] *= Dprod Fprod *= F6_squared Dprod *= D Dprod = Dprod.add_bigoh(prec) if cusp_only: M = Matrix(ZZ, n, prec, [x.list() for x in ls[1:]]) for i in range(n): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i+1]) else: M = Matrix(ZZ, n+1, prec, [x.list() for x in ls]) for i in range(1,n+1): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i]) return Sequence([ R(x.list()).add_bigoh(prec) for x in M.rows() ], cr=True)
ce1ded778fda31fd58c301fea166e25be2477096 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/ce1ded778fda31fd58c301fea166e25be2477096/vm_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
f = open(wikipedia.datafilepath(appdir, 'exclusion_list.dump', 'w'))
f = open(wikipedia.datafilepath(appdir, 'exclusion_list.dump'), 'w')
def exclusion_list_dump(): f = open(wikipedia.datafilepath(appdir, 'exclusion_list.dump', 'w')) f.write('\n'.join(excl_list)) f.close() print "Exclusion list dump saved."
df982418feb2fee96037cb0fe13fcf2215c639bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/df982418feb2fee96037cb0fe13fcf2215c639bd/copyright.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21244, 67, 1098, 67, 8481, 13332, 284, 273, 1696, 12, 11999, 13744, 18, 892, 10561, 12, 2910, 1214, 16, 296, 338, 15335, 67, 1098, 18, 8481, 19899, 296, 91, 6134, 284, 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, 21244, 67, 1098, 67, 8481, 13332, 284, 273, 1696, 12, 11999, 13744, 18, 892, 10561, 12, 2910, 1214, 16, 296, 338, 15335, 67, 1098, 18, 8481, 19899, 296, 91, 6134, 284, 18, 2626, 2668, ...
if depth < 0: depth = 0
if depth > maxDepth: maxDepth = depth if debug: print depth, maxDepth
def findDepth(self, insts): depth = 0 maxDepth = 0 for i in insts: opname = i[0] delta = self.effect.get(opname, 0) if delta > 1: depth = depth + delta elif delta < 0: if depth > maxDepth: maxDepth = depth depth = depth + delta else: if depth > maxDepth: maxDepth = depth # now check patterns for pat, pat_delta in self.patterns: if opname[:len(pat)] == pat: delta = pat_delta depth = depth + delta break # if we still haven't found a match if delta == 0: meth = getattr(self, opname, None) if meth is not None: depth = depth + meth(i[1]) if depth < 0: depth = 0 return maxDepth
7b358a65a3617245e4258bd0917666b170879137 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7b358a65a3617245e4258bd0917666b170879137/pyassem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 6148, 12, 2890, 16, 1804, 87, 4672, 3598, 273, 374, 22074, 273, 374, 364, 277, 316, 1804, 87, 30, 30273, 273, 277, 63, 20, 65, 3622, 273, 365, 18, 13867, 18, 588, 12, 556, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 6148, 12, 2890, 16, 1804, 87, 4672, 3598, 273, 374, 22074, 273, 374, 364, 277, 316, 1804, 87, 30, 30273, 273, 277, 63, 20, 65, 3622, 273, 365, 18, 13867, 18, 588, 12, 556, 529,...
if page.title() == page.titleWithoutNamespace(): pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) else: ask2 = wikipedia.input(u'Do you want to remove the namespace prefix "%s:"? [(Y)es, (N)o]'% page.site().namespace(page.namespace()))
pagemove = (u'%s%s%s' % (self.pagestart, pagetitle, self.pageend)) if namesp: ask2 = wikipedia.input(u'Do you want to remove the namespace prefix "%s:"? [(Y)es, (N)o]'% namesp)
def treat(self,page): pagetitle = page.title() wikipedia.output(u'\n>>>> %s <<<<' % pagetitle) if self.prefix: pagetitle = page.titleWithoutNamespace() pagemove = (u'%s%s' % (self.prefix, pagetitle)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete) elif self.appendAll == False: ask = wikipedia.input('What do you want to do: (c)hange page name, (a)ppend to page name, (n)ext page or (q)uit?') if ask in ['c', 'C']: pagemove = wikipedia.input(u'New page name:') self.moveOne(page,pagemove,self.delete) elif ask in ['a', 'A']: self.pagestart = wikipedia.input(u'Append This to the start:') self.pageend = wikipedia.input(u'Append This to the end:') if page.title() == page.titleWithoutNamespace(): pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) else: ask2 = wikipedia.input(u'Do you want to remove the namespace prefix "%s:"? [(Y)es, (N)o]'% page.site().namespace(page.namespace())) if ask2 in ['y', 'Y']: pagemove = (u'%s%s%s' % (self.pagestart, page. titleWithoutNamespace(), self.pageend)) else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (A)ll, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['a', 'A']: self.appendAll = True self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) elif ask in ['n', 'N']: pass elif ask in ['q', 'Q']: sys.exit() else: self.treat(page) else: pagemove = (u'%s%s%s' % (self.pagestart, page.title(), self.pageend)) if self.always == False: ask2 = wikipedia.input(u'Change the page title to "%s"? [(Y)es, (N)o, (Q)uit]' % pagemove) if ask2 in ['y', 'Y']: self.moveOne(page,pagemove,self.delete) elif ask2 in ['q', 'Q']: sys.exit() elif ask2 in ['n', 'N']: pass else: self.treat(page) else: self.moveOne(page,pagemove,self.delete)
bd3514937b98bef29f1bfde1f2a14a9940dcaf84 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/bd3514937b98bef29f1bfde1f2a14a9940dcaf84/movepages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10116, 12, 2890, 16, 2433, 4672, 4262, 278, 1280, 273, 1363, 18, 2649, 1435, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 4262, 278, 1280, 13, 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, 10116, 12, 2890, 16, 2433, 4672, 4262, 278, 1280, 273, 1363, 18, 2649, 1435, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 4262, 278, 1280, 13, 309, 365, ...
sys.stdout.write(data)
self.fd.write(data) self.flush()
def write(self, data, level): sys.stdout.write(data)
3d7d63966162f8881fad278dc8cc728a7e5a1f77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/3d7d63966162f8881fad278dc8cc728a7e5a1f77/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 501, 16, 1801, 4672, 2589, 18, 10283, 18, 2626, 12, 892, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 501, 16, 1801, 4672, 2589, 18, 10283, 18, 2626, 12, 892, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def register(self, func, state = initialState, nextState = None, isIterable = 0, onFinish = None, onFailure = None, stopValue = None): ''' This allows the registration of callback functions which are applied whenever an appropriate event of a given state is encountered. Each callback item, run, start, and finish can either be a function or it can be a tuple with function first, and the default final state second. If a final state is provided, then the function can just return a value. Otherwise, if the final state is None or not provided, then the function must return a tuple. ''' isIterable = getattr(func,'isIterable',isIterable) nextState = getattr(func,'nextState',nextState) onFinish = getattr(func,'onFinish',onFinish) onFailure = getattr(func,'onFailure',onFailure) stopValue = getattr(func,'stopValue',stopValue) tpl = (func, nextState, isIterable, onFinish, onFailure, stopValue) self.states[state] = tpl def __setitem__(self,key,val): self.register(key,val) def _lookup(self,state): ''' Searches for the appropriate handler in the current flow, scouring through 'base' flows if they are provided. ''' func = self.states.get(state,None) if not func: for base in self.bases: func = base.states.get(state,None) if func: break if func: return func errmsg = "\nstate '%s' not found for:%s" raise KeyError(errmsg % (state, str(self))) def run(self, data = None, state=initialState):
def addStage(self, callable, onFinish = None, isIterable = None, isDynamic = None, stopValue = None, onFailure = None): ''' This appends an additional stage to the singly-linked list, starting with stageHead. ''' stage = FlowStage(callable, onFinish, isIterable, isDynamic, stopValue, onFailure) link = FlowStageLink(stage) if not self.stageHead: self.stageHead = link self.stageTail = link else: self.stageTail.next = link self.stageTail = link def run(self, data = None, linktail = None):
def register(self, func, state = initialState, nextState = None, isIterable = 0, onFinish = None, onFailure = None, stopValue = None): ''' This allows the registration of callback functions which are applied whenever an appropriate event of a given state is encountered. Each callback item, run, start, and finish can either be a function or it can be a tuple with function first, and the default final state second. If a final state is provided, then the function can just return a value. Otherwise, if the final state is None or not provided, then the function must return a tuple. ''' isIterable = getattr(func,'isIterable',isIterable) nextState = getattr(func,'nextState',nextState) onFinish = getattr(func,'onFinish',onFinish) onFailure = getattr(func,'onFailure',onFailure) stopValue = getattr(func,'stopValue',stopValue) tpl = (func, nextState, isIterable, onFinish, onFailure, stopValue) self.states[state] = tpl
4cf3103eb894bde67fe5e1250725e8ef11de7f5a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/4cf3103eb894bde67fe5e1250725e8ef11de7f5a/flow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2890, 16, 1326, 16, 919, 273, 2172, 1119, 16, 25509, 273, 599, 16, 353, 13668, 273, 374, 16, 603, 11641, 273, 599, 16, 27748, 273, 599, 16, 2132, 620, 273, 599, 4672, 9163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2890, 16, 1326, 16, 919, 273, 2172, 1119, 16, 25509, 273, 599, 16, 353, 13668, 273, 374, 16, 603, 11641, 273, 599, 16, 27748, 273, 599, 16, 2132, 620, 273, 599, 4672, 9163, ...
version = '0.3',
version = '0.4',
def copy_transformed_tree(self, install_specs, dst_root=None, src_root=None, substitutions={}): """ Copy parts of a source tree to a destination tree with a different tree structure and/or names.
8373ed289960d38e2084f22c195cd2aa48ab695e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1166/8373ed289960d38e2084f22c195cd2aa48ab695e/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 6547, 329, 67, 3413, 12, 2890, 16, 3799, 67, 15115, 16, 3046, 67, 3085, 33, 7036, 16, 1705, 67, 3085, 33, 7036, 16, 23368, 12938, 4672, 3536, 5631, 2140, 434, 279, 1084, 2151...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 6547, 329, 67, 3413, 12, 2890, 16, 3799, 67, 15115, 16, 3046, 67, 3085, 33, 7036, 16, 1705, 67, 3085, 33, 7036, 16, 23368, 12938, 4672, 3536, 5631, 2140, 434, 279, 1084, 2151...
context.currentRecord.code = [ pa + 030000 ]
context.currentRecord.code = [ channel + 030000 ]
def parse_DNPTR(self, context, operands): pa = None expr = Expression(context, operands) if expr.complete: channel = expr.value if context.memmap.isChannel(channel): context.currentRecord.code = [ pa + 030000 ] context.currentRecord.complete = True else: context.error("operand must be a channel number")
bb0c9481857559544ff51b048aec8112dfafa7d9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/bb0c9481857559544ff51b048aec8112dfafa7d9/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 8609, 1856, 54, 12, 2890, 16, 819, 16, 14883, 4672, 6790, 273, 599, 3065, 273, 5371, 12, 2472, 16, 14883, 13, 309, 3065, 18, 6226, 30, 1904, 273, 3065, 18, 1132, 309, 819, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 8609, 1856, 54, 12, 2890, 16, 819, 16, 14883, 4672, 6790, 273, 599, 3065, 273, 5371, 12, 2472, 16, 14883, 13, 309, 3065, 18, 6226, 30, 1904, 273, 3065, 18, 1132, 309, 819, ...
if p.usesShmem():
if p.decl.type.isToplevel():
def makeHandlerMethod(name, switch, hasReply, dispatches=0): params = [ Decl(Type('Message', const=1, ref=1), msgvar.name) ] if hasReply: params.append(Decl(Type('Message', ref=1, ptr=1), replyvar.name)) method = MethodDefn(MethodDecl(name, virtual=True, params=params, ret=_Result.Type())) if dispatches: routevar = ExprVar('__route') routedecl = StmtDecl( Decl(_actorIdType(), routevar.name), init=ExprCall(ExprSelect(msgvar, '.', 'routing_id')))
0aa0991994d9640e22a59798324bc37b7a1d4a9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/0aa0991994d9640e22a59798324bc37b7a1d4a9c/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1503, 1305, 12, 529, 16, 1620, 16, 711, 7817, 16, 3435, 281, 33, 20, 4672, 859, 273, 306, 16110, 12, 559, 2668, 1079, 2187, 1866, 33, 21, 16, 1278, 33, 21, 3631, 1234, 1401, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1503, 1305, 12, 529, 16, 1620, 16, 711, 7817, 16, 3435, 281, 33, 20, 4672, 859, 273, 306, 16110, 12, 559, 2668, 1079, 2187, 1866, 33, 21, 16, 1278, 33, 21, 3631, 1234, 1401, 18...
if stock.name in self.subpools:
if isinstance(stock, StockPool):
def unregister(self, stock): dir, branch = self._parse_stock(stock) stock_name = basename(dir) if branch: stock_name += "#" + branch matches = [ stock for stock in self.stocks.values() if stock.link == dir and (not branch or stock.branch == branch) ] if not matches: raise Error("no matches for unregister")
6d8e479ce6858e29690ba17f229cbe7addab6e2f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5275/6d8e479ce6858e29690ba17f229cbe7addab6e2f/pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 12, 2890, 16, 12480, 4672, 1577, 16, 3803, 273, 365, 6315, 2670, 67, 15381, 12, 15381, 13, 12480, 67, 529, 273, 4882, 12, 1214, 13, 309, 3803, 30, 12480, 67, 529, 1011, 13092, 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, 10232, 12, 2890, 16, 12480, 4672, 1577, 16, 3803, 273, 365, 6315, 2670, 67, 15381, 12, 15381, 13, 12480, 67, 529, 273, 4882, 12, 1214, 13, 309, 3803, 30, 12480, 67, 529, 1011, 13092, 3...
if 'Analysis against batch' in key:
if 'Analysis against Batch' in key:
def analyse(self):
82c831407f7342907fe991f75ab507ec669c96c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/82c831407f7342907fe991f75ab507ec669c96c7/CCP4IntraRadiationDamageDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31087, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31087, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
ICAL.uid, ICAL.summary, ICAL.description,
ICAL.uid, ICAL.summary, ICAL.description,
def exportEvent(self, sts, event): w = self._w
04829bd0c6467d1a5ceb640d5981b3facc7553d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/04829bd0c6467d1a5ceb640d5981b3facc7553d5/toIcal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 1133, 12, 2890, 16, 27099, 16, 871, 4672, 341, 273, 365, 6315, 91, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 1133, 12, 2890, 16, 27099, 16, 871, 4672, 341, 273, 365, 6315, 91, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if ordinal is None: msg = self.reporter.error( ('Enumerated list start value invalid at line %s: ' '"%s" (sequence %r)' % (self.state_machine.abs_line_number(), text, sequence))) self.parent += msg indented, line_offset, blank_finish = \ self.state_machine.get_known_indented(match.end()) bq = self.block_quote(indented, line_offset) self.parent += bq if not blank_finish: self.parent += self.unindent_warning( 'Enumerated list') return [], next_state, []
if not self.is_enumerated_list_item(ordinal, sequence, format): raise statemachine.TransitionCorrection('text')
def enumerator(self, match, context, next_state): """Enumerated List Item""" format, sequence, text, ordinal = self.parse_enumerator(match) if ordinal is None: msg = self.reporter.error( ('Enumerated list start value invalid at line %s: ' '"%s" (sequence %r)' % (self.state_machine.abs_line_number(), text, sequence))) self.parent += msg indented, line_offset, blank_finish = \ self.state_machine.get_known_indented(match.end()) bq = self.block_quote(indented, line_offset) self.parent += bq if not blank_finish: self.parent += self.unindent_warning( 'Enumerated list') return [], next_state, [] if ordinal != 1: msg = self.reporter.info( ('Enumerated list start value not ordinal-1 at line %s: ' '"%s" (ordinal %s)' % (self.state_machine.abs_line_number(), text, ordinal))) self.parent += msg enumlist = nodes.enumerated_list() self.parent += enumlist enumlist['enumtype'] = sequence if ordinal != 1: enumlist['start'] = ordinal enumlist['prefix'] = self.enum.formatinfo[format].prefix enumlist['suffix'] = self.enum.formatinfo[format].suffix listitem, blank_finish = self.list_item(match.end()) enumlist += listitem offset = self.state_machine.line_offset + 1 # next line newline_offset, blank_finish = self.nested_list_parse( self.state_machine.input_lines[offset:], input_offset=self.state_machine.abs_line_offset() + 1, node=enumlist, initial_state='EnumeratedList', blank_finish=blank_finish, extra_settings={'lastordinal': ordinal, 'format': format}) self.goto_line(newline_offset) if not blank_finish: self.parent += self.unindent_warning('Enumerated list') return [], next_state, []
67604a1c88bd372a821eedfd740b5ecf5dcf9e21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/67604a1c88bd372a821eedfd740b5ecf5dcf9e21/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24679, 12, 2890, 16, 845, 16, 819, 16, 1024, 67, 2019, 4672, 3536, 3572, 19007, 987, 4342, 8395, 740, 16, 3102, 16, 977, 16, 12675, 273, 365, 18, 2670, 67, 7924, 7385, 12, 1916, 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, 24679, 12, 2890, 16, 845, 16, 819, 16, 1024, 67, 2019, 4672, 3536, 3572, 19007, 987, 4342, 8395, 740, 16, 3102, 16, 977, 16, 12675, 273, 365, 18, 2670, 67, 7924, 7385, 12, 1916, 13, ...
reslist=filter( lambda x: x[0] and (not x[1]), searchres )
reslist=filter( lambda x: not x[1], searchres )
def select_words( self, tabkeys, onechar=False ): ''' Get phrases from database by tab_key objects ( which should be equal or less than the max key length) This method is called in table.py by passing UserInput held data Return result[:] ''' # firstly, we make sure the len we used is equal or less than the max key length _len = min( len(tabkeys),self._mlen ) _condition = '' _condition += ''.join ( map (lambda x: 'AND m%d = ? ' %x, range(_len) ) ) if onechar: # for some users really like to select only single characters _condition += 'AND clen=1 ' # you can increase the x in _len + x to include more result, but in the most case, we only need one more key result, so we don't need the extra overhead :) # we start search for 1 key more, if nothing, then 2 key more and so on # this is the max len we need to add into the select cause. w_len = self._mlen - _len +1 # we start from 2, because it is < in the sqlite select, which need 1 more. x_len = 2 while x_len <= w_len + 1: sqlstr = '''SELECT * FROM (SELECT * FROM main.phrases WHERE mlen < %(mk)d %(condition)s UNION ALL SELECT * FROM user_db.phrases WHERE mlen < %(mk)d %(condition)s UNION ALL SELECT * FROM mudb.phrases WHERE mlen < %(mk)d %(condition)s ) ORDER BY mlen ASC, user_freq DESC, freq DESC;''' % { 'mk':_len+x_len, 'condition':_condition} # we have redefine the __int__(self) in class tabdict.tab_key to return the key id, so we can use map to got key id :) _tabkeys = map(int,tabkeys[:_len]) _tabkeys += _tabkeys + _tabkeys result = self.db.execute(sqlstr, _tabkeys).fetchall() #self.db.commit() # if we find word, we stop this while, if len(result) >0: break x_len += 1 # here in order to get high speed, I use complicated map # to subtitute for sysdb={} usrdb={} mudb={} _cand = [] #searchres = map ( lambda res: res[-2] and [ True, [(res[:-2],[res[:-1],res[-1:]])] ]\ # or [ False, [(res[:-2] , [res[:-1],res[-1:]])] ] \ # , result ) searchres = map ( lambda res: [ bool(res[-2]), bool(res[-1]), [(res[:-2],[res[:-1],res[-1:]])] ], result) # for sysdb reslist=filter( lambda x: x[0] and (not x[1]), searchres ) map (lambda x: sysdb.update(x[2]), reslist) # for usrdb reslist=filter( lambda x: (not x[0]) and x[1], searchres ) map (lambda x: usrdb.update(x[2]), reslist) # for mudb reslist=filter( lambda x: x[0] and x[1], searchres ) map (lambda x: mudb.update(x[2]), reslist)
5788a2abe5571ead36cef99b87853ffbb90f9652 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/544/5788a2abe5571ead36cef99b87853ffbb90f9652/tabsqlitedb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 3753, 12, 365, 16, 3246, 2452, 16, 1245, 3001, 33, 8381, 262, 30, 9163, 968, 31413, 628, 2063, 635, 3246, 67, 856, 2184, 261, 1492, 1410, 506, 3959, 578, 5242, 2353, 326, 943...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 67, 3753, 12, 365, 16, 3246, 2452, 16, 1245, 3001, 33, 8381, 262, 30, 9163, 968, 31413, 628, 2063, 635, 3246, 67, 856, 2184, 261, 1492, 1410, 506, 3959, 578, 5242, 2353, 326, 943...
try: address.index(u'<') except ValueError:
index = address.rfind(u'<') if index == -1:
def getEmailAddress(cls, view, nameOrAddressString, fullName=u'', create=True): """ Factory Method -------------- When creating a new EmailAddress, we check for an existing item first. We do look them up in the repository to prevent duplicates, but there's nothing to keep bad ones from accumulating, although repository garbage collection should eventually remove them.
4226215c87ccbcd1fc1ec354332468d0928d69ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9228/4226215c87ccbcd1fc1ec354332468d0928d69ee/mail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17297, 1887, 12, 6429, 16, 1476, 16, 26840, 1887, 780, 16, 12424, 33, 89, 11, 2187, 752, 33, 5510, 4672, 3536, 7822, 2985, 300, 16982, 5203, 4979, 279, 394, 8166, 1887, 16, 732, 866, 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, 17297, 1887, 12, 6429, 16, 1476, 16, 26840, 1887, 780, 16, 12424, 33, 89, 11, 2187, 752, 33, 5510, 4672, 3536, 7822, 2985, 300, 16982, 5203, 4979, 279, 394, 8166, 1887, 16, 732, 866, 3...
self.board_size = size
self.board_size = new_size
def handle_loadsgf(self, args): try: pathname = args[0] except IndexError: gtp.report_bad_arguments() if len(args) > 1: move_number = gtp.interpret_int(args[1]) else: move_number = 10000 try: f = open(pathname) s = f.read() f.close() except EnvironmentError: raise gtp.GtpError("cannot load file") try: sgf = sgf_reader.read_sgf(s) except ValueError: raise gtp.GtpError("cannot load file") new_size = sgf.get_size() if new_size not in self.acceptable_sizes: raise gtp.GtpError("unacceptable size") self.board_size = size try: komi_s = sgf.nodes[0].get("KM") except KeyError: komi = 0.0 else: try: komi = float(komi_s) except ValueError: raise gtp.GtpError("bad komi") seen_moves = 0 new_move_history = [] colour_map = {'B' : BLACK, 'W' : WHITE} for node in sgf.nodes: if seen_moves >= move_number: break if node.has_prop("AB") or node.has_prop("AW"): raise gtp.GtpError( "setup stones (including handicap) not supported") colour, move = node.get_move() if colour is None: continue seen_moves += 1 new_move_history.append((colour_map[colour], move)) try: self.reset_to_moves(new_move_history) except ValueError: try: self.reset_to_moves(self.move_history) except ValueError: raise gtp.GtpError("bad move in file and corrupt history") raise gtp.GtpError("bad move in file") self.set_komi(komi) self.move_history = new_move_history
67c2bb273f4be10ba7991b1ca6fc770aac2509d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6121/67c2bb273f4be10ba7991b1ca6fc770aac2509d5/gtp_boards.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 945, 1055, 74, 12, 2890, 16, 833, 4672, 775, 30, 9806, 273, 833, 63, 20, 65, 1335, 10195, 30, 314, 6834, 18, 6006, 67, 8759, 67, 7099, 1435, 309, 562, 12, 1968, 13, 405, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 1055, 74, 12, 2890, 16, 833, 4672, 775, 30, 9806, 273, 833, 63, 20, 65, 1335, 10195, 30, 314, 6834, 18, 6006, 67, 8759, 67, 7099, 1435, 309, 562, 12, 1968, 13, 405, ...
opcodes = diff2._get_opcodes(['A'], ['A', 'B', ''],
opcodes = Diff._get_opcodes(['A'], ['A', 'B', ''],
def test_insert_blank_line(self): opcodes = diff2._get_opcodes(['A', 'B'], ['A', 'B', ''], ignore_blank_lines=0) self.assertEqual(('equal', 0, 2, 0, 2), opcodes.next()) self.assertEqual(('insert', 2, 2, 2, 3), opcodes.next())
f0e6a3afeb9f648f246fa50a5aac86386a0128b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f0e6a3afeb9f648f246fa50a5aac86386a0128b9/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6387, 67, 12111, 67, 1369, 12, 2890, 4672, 1061, 7000, 273, 3122, 22, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 17337, 10228, 37, 2187, 296, 38, 2187, 875, 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, 1842, 67, 6387, 67, 12111, 67, 1369, 12, 2890, 4672, 1061, 7000, 273, 3122, 22, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 17337, 10228, 37, 2187, 296, 38, 2187, 875, 6487,...
assert package.license.title == u'GNU General Public License version 3.0 (GPLv3)'
assert package.license.title == u'OSI Approved::GNU General Public License version 3.0 (GPLv3)', package.license.title
def test_create_package(self): package = model.Package.by_name(self.name) assert package.name == self.name assert package.notes == self.notes assert package.license.id == u'gpl-3.0' assert package.license.title == u'GNU General Public License version 3.0 (GPLv3)' # Check unregistered license_id causes license to be 'None'. package.license_id = u'zzzzzzz' assert package.license == None
2734b17f5bd2e98abb4c394d57658215acd6e37d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/2734b17f5bd2e98abb4c394d57658215acd6e37d/test_package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2640, 67, 5610, 12, 2890, 4672, 2181, 273, 938, 18, 2261, 18, 1637, 67, 529, 12, 2890, 18, 529, 13, 1815, 2181, 18, 529, 422, 365, 18, 529, 1815, 2181, 18, 12903, 422, 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, 1842, 67, 2640, 67, 5610, 12, 2890, 4672, 2181, 273, 938, 18, 2261, 18, 1637, 67, 529, 12, 2890, 18, 529, 13, 1815, 2181, 18, 529, 422, 365, 18, 529, 1815, 2181, 18, 12903, 422, 365,...
assert not f.has_focus()
assert not f.is_padded()
def exercise_flex_constructors(): f = flex.double() assert f.size() == 0 assert f.capacity() == 0 assert f.accessor().nd() == 1 assert tuple(f.accessor().origin()) == (0,) assert tuple(f.accessor().all()) == (0,) assert tuple(f.accessor().last()) == (0,) assert tuple(f.accessor().last(1)) == (0,) assert tuple(f.accessor().last(0)) == (-1,) assert tuple(f.accessor().focus()) == (0,) assert tuple(f.accessor().focus(1)) == (0,) assert tuple(f.accessor().focus(0)) == (-1,) assert f.accessor().is_0_based() assert not f.accessor().is_padded() assert f.accessor().is_trivial_1d() assert f.nd() == 1 assert not f.has_origin() assert tuple(f.origin()) == (0,) assert tuple(f.all()) == (0,) assert tuple(f.last()) == (0,) assert tuple(f.last(1)) == (0,) assert tuple(f.last(0)) == (-1,) assert not f.has_focus() assert tuple(f.focus()) == (0,) assert tuple(f.focus(1)) == (0,) assert tuple(f.focus(0)) == (-1,) assert f.focus_size_1d() == 0 assert f.is_0_based() assert not f.is_padded() assert f.is_trivial_1d() assert tuple(f) == () f = flex.double(flex.grid((2,3,5))) assert f.size() == 30 assert f.capacity() == 30 assert list(f) == [0] * 30 f = flex.double(flex.grid((2,3,5)), 42) assert f.size() == 30 assert list(f) == [42] * 30 f = flex.double(2) assert f.size() == 2 assert tuple(f) == (0,0) f = flex.double(1, 42) assert f.size() == 1 assert tuple(f) == (42,) f = flex.double((1,2,3,4,5)) assert f.size() == 5 assert tuple(f) == (1,2,3,4,5) f = flex.double([2,1,3,5]) assert f.size() == 4 assert tuple(f) == (2,1,3,5) f = flex.double(xrange(10,13)) assert f.size() == 3 assert tuple(f) == (10,11,12) assert flex.to_list(f) == [10,11,12]
bbf8bb0a447c23a4aef85ae21b929ee322041ec6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/bbf8bb0a447c23a4aef85ae21b929ee322041ec6/tst_flex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 27592, 67, 10062, 1383, 13332, 284, 273, 16600, 18, 9056, 1435, 1815, 284, 18, 1467, 1435, 422, 374, 1815, 284, 18, 16017, 1435, 422, 374, 1815, 284, 18, 3860, 280, 7675, 4880...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 27592, 67, 10062, 1383, 13332, 284, 273, 16600, 18, 9056, 1435, 1815, 284, 18, 1467, 1435, 422, 374, 1815, 284, 18, 16017, 1435, 422, 374, 1815, 284, 18, 3860, 280, 7675, 4880...
def setaccely(self, speed): '''set the goal speed''' self.accely = speed def setaccelx(self, angvel): '''set the goal angular velocity''' self.accelx = angvel
def setaccelx(self, accelx): '''set the goal x accelleration''' self.accelx = accelx def setaccely(self, accely): '''set the goal y accelleration''' self.accely = accely
def setaccely(self, speed): '''set the goal speed''' self.accely = speed
a88763d0651e3694631bd311df26113d428bb8b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9601/a88763d0651e3694631bd311df26113d428bb8b7/game.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8981, 2357, 12, 2890, 16, 8632, 4672, 9163, 542, 326, 17683, 8632, 26418, 365, 18, 8981, 2357, 273, 8632, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 8981, 2357, 12, 2890, 16, 8632, 4672, 9163, 542, 326, 17683, 8632, 26418, 365, 18, 8981, 2357, 273, 8632, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
imm = imm2bin(imm, 11)
if imm < 0: imm = 2**12 - 2 + imm imm = int2bin(imm, 11) else: imm = int2bin(imm, 11)
def parse_jump(instruc = "", word_buf = ""): if instruc == "" or word_buf == "": print "ERROR: someone accidentally the code in parse_jump" return "-1" instruc = sanitize(instruc) ins = instruc[0] regS = instruc[1] if ins == "jsr": word_buf += "1" imm = hexorint(imm) if imm > 2**10 or imm < -(2**10) + 1: print "ERROR: Immediate value " + str(imm) +" is out of range." print "IMM in JSR IMM must be greater than -(2**10) + 1 and less than 2**10" return "-1" imm = imm2bin(imm, 11) word_buf += imm elif ins == "jsrr": word_buf += "0" word_buf += "00" word_buf += reg2bin(regS) word_buf += "000000" elif ins == "jmpr": word_buf += "0" word_buf += "00" word_buf += reg2bin(regS) word_buf += "000000" elif ins == "jmp": word_buf += "1" imm = hexorint(imm) if imm > 2**10 or imm < -(2**10) + 1: print "ERROR: Immediate value " + str(imm) +" is out of range." print "IMM in JMP IMM must be greater than -(2**10) + 1 and less than 2**10" return "-1" imm = imm2bin(imm, 11) word_buf += imm else: print "ERROR: Someone accidentally'd the code in parse_jump" return "-1" return word_buf
3544f255124af0db34ea242b135b6b6390308500 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4891/3544f255124af0db34ea242b135b6b6390308500/assembler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 24574, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 24574, 12, 267, 701, 5286, 273, 23453, 2076, 67, 4385, 273, 1408, 4672, 309, 16170, 5286, 422, 1408, 578, 2076, 67, 4385, 422, 1408, 30, 1172, 315, 3589, 30, 18626, 25961, 1230...
"t3.newvalue,t1.author"
" t3.newvalue,t1.author,t.summary"
def get_timeline_events(self, req, start, stop, filters): if 'ticket' in filters: absurls = req.args.get('format') == 'rss' # Kludge sql = []
002831a283f63c0dbdcd402238fe51d0497fc231 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/002831a283f63c0dbdcd402238fe51d0497fc231/Ticket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 16282, 11, 316, 3415, 30, 2417, 10518, 273, 1111, 18, 1968, 18, 588, 2668, 2139, 6134, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 26237, 67, 5989, 12, 2890, 16, 1111, 16, 787, 16, 2132, 16, 3415, 4672, 309, 296, 16282, 11, 316, 3415, 30, 2417, 10518, 273, 1111, 18, 1968, 18, 588, 2668, 2139, 6134, 422, ...
import database, time
import time
def handler(self, **args): """Return information about a factoid to the person requesting it""" import database, time from irclib import Event
e1e6b64160001d2d23ad7d039dc8a4073fa7d332 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10749/e1e6b64160001d2d23ad7d039dc8a4073fa7d332/factoids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 2826, 1968, 4672, 3536, 990, 1779, 2973, 279, 5410, 839, 358, 326, 6175, 18709, 518, 8395, 1930, 813, 628, 9482, 830, 495, 1930, 2587, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1838, 12, 2890, 16, 2826, 1968, 4672, 3536, 990, 1779, 2973, 279, 5410, 839, 358, 326, 6175, 18709, 518, 8395, 1930, 813, 628, 9482, 830, 495, 1930, 2587, 2, -100, -100, -100, -100, -100...
self.mode.editwin.setFlag(self.flag) self.mode.editwin.moveSelected(multiplier)
self.mode.setFlag(self.flag) self.mode.moveSelected(multiplier)
def action(self, index=-1, multiplier=1): if self.flag: self.mode.editwin.setFlag(self.flag) self.mode.editwin.moveSelected(multiplier)
5cfb102115321ea923828cfe2331e4b8f8a43e20 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/5cfb102115321ea923828cfe2331e4b8f8a43e20/dired.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 309, 365, 18, 6420, 30, 365, 18, 3188, 18, 4619, 8082, 18, 542, 4678, 12, 2890, 18, 6420, 13, 365, 18, 3188, 18, 4619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 309, 365, 18, 6420, 30, 365, 18, 3188, 18, 4619, 8082, 18, 542, 4678, 12, 2890, 18, 6420, 13, 365, 18, 3188, 18, 4619, ...
self.foundTitleTag= False
self.inTitleTag= False self.foundTitle= False
def __init__ (self, deferred): HTMLParser.__init__ (self) self.foundTitleTag= False self.deferred= deferred self.title= u''
7c75257e75d4263cbfee9c20448d9532e16b54d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5759/7c75257e75d4263cbfee9c20448d9532e16b54d6/url.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 7045, 4672, 3982, 2678, 16186, 2738, 972, 261, 2890, 13, 365, 18, 267, 4247, 1805, 33, 1083, 365, 18, 7015, 4247, 33, 1083, 365, 18, 26622, 33, 7045, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 261, 2890, 16, 7045, 4672, 3982, 2678, 16186, 2738, 972, 261, 2890, 13, 365, 18, 267, 4247, 1805, 33, 1083, 365, 18, 7015, 4247, 33, 1083, 365, 18, 26622, 33, 7045, 36...
output.write("Content-Type: text/plain\n\n" + \ "There is something wrong with your setup.\n" + \ "Check your config files and verify that your " + \
output.write("Content-Type: text/plain\n\n" + "There is something wrong with your setup.\n" + "Check your config files and verify that your " +
def blosxom_handler(request): """ This is the default blosxom handler. It calls the renderer callback to get a renderer. If there is no renderer, it uses the blosxom renderer. It calls the pathinfo callback to process the path_info http variable. It calls the filelist callback to build a list of entries to display. It calls the prepare callback to do any additional preparation before rendering the entries. Then it tells the renderer to render the entries. @param request: A standard request object @type request: L{Pyblosxom.pyblosxom.Request} object """ config = request.getConfiguration() data = request.getData() # go through the renderer callback to see if anyone else # wants to render. this renderer gets stored in the data dict # for downstream processing. rend = tools.run_callback('renderer', {'request': request}, donefunc = lambda x: x != None, defaultfunc = lambda x: None) if not rend: # get the renderer we want to use rend = config.get("renderer", "blosxom") # import the renderer rend = tools.importname("Pyblosxom.renderers", rend) # get the renderer object rend = rend.Renderer(request, config.get("stdoutput", sys.stdout)) data['renderer'] = rend # generate the timezone variable data["timezone"] = time.tzname[time.localtime()[8]] # process the path info to determine what kind of blog entry(ies) # this is tools.run_callback("pathinfo", {"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_process_path_info) # call the filelist callback to generate a list of entries data["entry_list"] = tools.run_callback("filelist", {"request": request}, donefunc=lambda x:x != None, defaultfunc=blosxom_file_list_handler) # figure out the blog-level mtime which is the mtime of the head of # the entry_list entry_list = data["entry_list"] if isinstance(entry_list, list) and len(entry_list) > 0: mtime = entry_list[0].get("mtime", time.time()) else: mtime = time.time() mtime_tuple = time.localtime(mtime) mtime_gmtuple = time.gmtime(mtime) data["latest_date"] = time.strftime('%a, %d %b %Y', mtime_tuple) # Make sure we get proper 'English' dates when using standards loc = locale.getlocale(locale.LC_ALL) locale.setlocale(locale.LC_ALL, 'C') data["latest_w3cdate"] = time.strftime('%Y-%m-%dT%H:%M:%SZ', mtime_gmtuple) data['latest_rfc822date'] = time.strftime('%a, %d %b %Y %H:%M GMT', mtime_gmtuple) # set the locale back locale.setlocale(locale.LC_ALL, loc) # we pass the request with the entry_list through the prepare callback # giving everyone a chance to transform the data. the request is # modified in place. tools.run_callback("prepare", {"request": request}) # now we pass the entry_list through the renderer entry_list = data["entry_list"] renderer = data['renderer'] if renderer and not renderer.rendered: if entry_list: renderer.setContent(entry_list) # Log it as success tools.run_callback("logrequest", {'filename':config.get('logfile',''), 'return_code': '200', 'request': request}) else: renderer.addHeader('Status', '404 Not Found') renderer.setContent( {'title': 'The page you are looking for is not available', 'body': 'Somehow I cannot find the page you want. ' + 'Go Back to <a href="%s">%s</a>?' % (config["base_url"], config["blog_title"])}) # Log it as failure tools.run_callback("logrequest", {'filename':config.get('logfile',''), 'return_code': '404', 'request': request}) renderer.render() elif not renderer: output = config.get('stdoutput', sys.stdout) output.write("Content-Type: text/plain\n\n" + \ "There is something wrong with your setup.\n" + \ "Check your config files and verify that your " + \ "configuration is correct.\n") cache = tools.get_cache(request) if cache: cache.close()
2d889182f07a1e20247eba2168cf4d18f81fcdab /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11836/2d889182f07a1e20247eba2168cf4d18f81fcdab/pyblosxom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 383, 30319, 362, 67, 4176, 12, 2293, 4672, 3536, 1220, 353, 326, 805, 324, 383, 30319, 362, 1838, 18, 225, 2597, 4097, 326, 5690, 1348, 358, 336, 279, 5690, 18, 225, 971, 1915, 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, 324, 383, 30319, 362, 67, 4176, 12, 2293, 4672, 3536, 1220, 353, 326, 805, 324, 383, 30319, 362, 1838, 18, 225, 2597, 4097, 326, 5690, 1348, 358, 336, 279, 5690, 18, 225, 971, 1915, 35...
return roles + set(x[0] for x in cu)
roles.update(x[0] for x in cu) return roles
def getAuthorizedRoles(self, cu, user, password, allowAnonymous = True, remoteIp = None): """ Given a user and password, return the list of roles that are authorized via these credentials """
1ea6928135e026fdc7a7db75883b1dd4d2132077 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8747/1ea6928135e026fdc7a7db75883b1dd4d2132077/netauth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15341, 6898, 12, 2890, 16, 15985, 16, 729, 16, 2201, 16, 1699, 18792, 273, 1053, 16, 2632, 5273, 273, 599, 4672, 3536, 16803, 279, 729, 471, 2201, 16, 327, 326, 666, 434, 4900, 71...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15341, 6898, 12, 2890, 16, 15985, 16, 729, 16, 2201, 16, 1699, 18792, 273, 1053, 16, 2632, 5273, 273, 599, 4672, 3536, 16803, 279, 729, 471, 2201, 16, 327, 326, 666, 434, 4900, 71...
if not args: args = '--block=4096 --block=8192 --threads=10 --size=1024 --numruns=2' profilers = self.job.profilers if not profilers.only(): for i in range(iterations): utils.system('./tiobench.pl --dir %s %s' %(dir, args)) if profilers.present(): profilers.start(self) utils.system('./tiobench.pl --dir %s %s' %(dir, args)) profilers.stop(self) profilers.report(self)
utils.system('./tiobench.pl --dir %s %s' %(self.dir, self.args))
def execute(self, dir = None, iterations=1, args = None): if not dir: dir = self.tmpdir os.chdir(self.srcdir) if not args: args = '--block=4096 --block=8192 --threads=10 --size=1024 --numruns=2' profilers = self.job.profilers if not profilers.only(): for i in range(iterations): utils.system('./tiobench.pl --dir %s %s' %(dir, args))
7c562a2d336bbd79105649c39c0d5a12cd90a33c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10349/7c562a2d336bbd79105649c39c0d5a12cd90a33c/tiobench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1577, 273, 599, 16, 11316, 33, 21, 16, 833, 273, 599, 4672, 309, 486, 1577, 30, 1577, 273, 365, 18, 5645, 1214, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 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, 1836, 12, 2890, 16, 1577, 273, 599, 16, 11316, 33, 21, 16, 833, 273, 599, 4672, 309, 486, 1577, 30, 1577, 273, 365, 18, 5645, 1214, 1140, 18, 343, 1214, 12, 2890, 18, 4816, 1214, 13,...
self.stdout = None
self.stdout = []
def __init__(self): self.stdout = None self._buf = None
0b51b745c8040c36bb45a85570254bf78ece4547 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11821/0b51b745c8040c36bb45a85570254bf78ece4547/capture.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 10283, 273, 5378, 365, 6315, 4385, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 10283, 273, 5378, 365, 6315, 4385, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
else
else:
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 950) else quickfix.CharField.__init__(self, 950, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 3361, 13, 469, 30, 9549, 904, 18, 2156, 974, 16186, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 2468, 3361, 13, 469, 30, 9549, 904, 18, 2156, 974, 16186, 27...
tmp = ['0' if s[(4 * x)] == 0 else '1' for x in range((len(s) / 4))] n[row + orow][ocol:ocol + 128] = tmp row += 1
tmp = [1 if s[(x*4)]==s[(x*4)+1]==s[(x*4)+2]==s[(x*4)+3] else 0 for x in range(int(len(s)/4))] n[row+orow][ocol:ocol+128] = tmp row+=1
def post(self): delList = [] key = self.request.params.get('k', None) now = time.time() seed = self.request.params.get('seed', int(now / 15)) tile = Tile.get(db.Key.from_path('Tiles', key)) if tile: #if it does exist, turn it into a binary 256x256 matrix n = [] row = 0 for s in png.Reader(bytes=tile.band).asRGBA()[2]: n.append(['0' if s[(4 * x)] == 0 else '1' for x in range((len(s) / 4))]) else: #if tile doesn't exist, create 256x256 matrix n = [['1' for i in range(256)] for i in range(256)] tile = Tile(key=db.Key.from_path('Tiles', key)) for qt in range(4): #cycle through each of the four higher resolution tiles that make up this single tile tmpK = key.split("/") tmpK[1] = tmpK[1] + str(qt) tmpK = '/'.join(tmpK)
d8c9f1983df3f32f242b3e5ecc7fa8cf679c37ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14219/d8c9f1983df3f32f242b3e5ecc7fa8cf679c37ba/cron.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 4672, 1464, 682, 273, 5378, 498, 273, 365, 18, 2293, 18, 2010, 18, 588, 2668, 79, 2187, 599, 13, 2037, 273, 813, 18, 957, 1435, 5009, 273, 365, 18, 2293, 18, 2010, 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, 1603, 12, 2890, 4672, 1464, 682, 273, 5378, 498, 273, 365, 18, 2293, 18, 2010, 18, 588, 2668, 79, 2187, 599, 13, 2037, 273, 813, 18, 957, 1435, 5009, 273, 365, 18, 2293, 18, 2010, 18...
"paint" : lambda row: paint_host_count(0, row["hostgroup_num_hosts_down"])
"paint" : lambda row: paint_host_count(1, row["hostgroup_num_hosts_down"])
def paint_host_list(row): h = "<div class=objectlist>" for host, state, checked in row["hostgroup_members_with_state"]: link = "view.py?view_name=host&site=%s&host=%s" % ( htmllib.urlencode(row["site"]), htmllib.urlencode(host)) if checked: css = "hstate%d" % state else: css = "hstatep" h += "<div class=\"%s\"><a href=\"%s\">%s</a></div>" % (css, link, host) h += "</div>" return "", h
9e5e756cd2b5a841e8d5fa876ef07a7938d19825 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/9e5e756cd2b5a841e8d5fa876ef07a7938d19825/painters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 67, 2564, 67, 1098, 12, 492, 4672, 366, 273, 3532, 2892, 667, 33, 1612, 1098, 2984, 364, 1479, 16, 919, 16, 5950, 316, 1027, 9614, 2564, 1655, 67, 7640, 67, 1918, 67, 2019, 1192...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12574, 67, 2564, 67, 1098, 12, 492, 4672, 366, 273, 3532, 2892, 667, 33, 1612, 1098, 2984, 364, 1479, 16, 919, 16, 5950, 316, 1027, 9614, 2564, 1655, 67, 7640, 67, 1918, 67, 2019, 1192...
print """TEST-UNEXPECTED-FAIL | %s | test failed, see following log:
print """TEST-UNEXPECTED-FAIL | %s | test failed (with xpcshell return code: %d), see following log:
def processLeakLog(leakLogFile): """Process the leak log.""" # For the time being, don't warn (nor "info") if the log file is not there. (Bug 469523) if not os.path.exists(leakLogFile): return
3c0f04e10219745ce240c4395b0536f30d3efc6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/3c0f04e10219745ce240c4395b0536f30d3efc6b/runxpcshelltests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1682, 581, 1343, 12, 298, 581, 19103, 4672, 3536, 2227, 326, 20891, 613, 12123, 468, 2457, 326, 813, 3832, 16, 2727, 1404, 1894, 261, 29561, 315, 1376, 7923, 309, 326, 613, 585, 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, 1207, 1682, 581, 1343, 12, 298, 581, 19103, 4672, 3536, 2227, 326, 20891, 613, 12123, 468, 2457, 326, 813, 3832, 16, 2727, 1404, 1894, 261, 29561, 315, 1376, 7923, 309, 326, 613, 585, 35...
print 'if param[ 70 ] & 4 == 4:' if param['70'] & 8 == 8: f13 = 1.0 / 3.0; f23 = 2.0 / 3.0 path = CreatePath() pts = map(lambda x, y: self.trafo(x, y), param['10'],param['20']) curve = path.AppendBezier straight = path.AppendLine
def spline(self): param={ '70': 0, # Spline flag '71': 0, # Degree of the spline curve '72': 0, # Number of knots '73': 0, # Number of control points '74': 0, # Number of fit points '40': [], # Knot value '10': [], # Control points X '20': [], # Control points Y #'30': [], # Control points Z } param.update(self.general_param) param = self.read_param(param) print param print 'SPLINE', param['70'] print 'Контрольных точек', param['73'], (1, len(param['10'])-2, 2) closed = param['70'] & 1 if param['70'] & 4 == 4: print 'if param[ 70 ] & 4 == 4:' if param['70'] & 8 == 8: f13 = 1.0 / 3.0; f23 = 2.0 / 3.0 path = CreatePath() pts = map(lambda x, y: self.trafo(x, y), param['10'],param['20']) curve = path.AppendBezier straight = path.AppendLine last = pts[0] cur = pts[1] start = node = pts[0]
02df12c26818fd938357920396a246a253220885 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3123/02df12c26818fd938357920396a246a253220885/dxfloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22826, 12, 2890, 4672, 579, 5899, 202, 11, 7301, 4278, 374, 16, 468, 11484, 558, 2982, 296, 11212, 4278, 374, 16, 468, 463, 1332, 992, 434, 326, 22826, 8882, 296, 9060, 4278, 374, 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, 22826, 12, 2890, 4672, 579, 5899, 202, 11, 7301, 4278, 374, 16, 468, 11484, 558, 2982, 296, 11212, 4278, 374, 16, 468, 463, 1332, 992, 434, 326, 22826, 8882, 296, 9060, 4278, 374, 16, ...
cost, joint_histogram = optimize_function(imdata['parms'], optfunc_args)
cost, joint_histogram = optimize_function(P, optfunc_args)
def check_alignment(image1, image2, imdata, method='ncc', lite=0, smhist=0, alpha=0.0, beta=0.0, gamma=0.0, Tx=0, Ty=0, Tz=0, ret_histo=0): # # to test the cost function and view the joint histogram # for 2 images. used for debug # imdata['parms'][0] = alpha imdata['parms'][1] = beta imdata['parms'][2] = gamma imdata['parms'][3] = Tx imdata['parms'][4] = Ty imdata['parms'][5] = Tz M = build_rotate_matrix(imdata['parms']) optfunc_args = (image1, image2, imdata['step'], imdata['fwhm'], lite, smhist, method, ret_histo) if ret_histo: cost, joint_histogram = optimize_function(imdata['parms'], optfunc_args) return cost, joint_histogram else: cost = optimize_function(imdata['parms'], optfunc_args) return cost
a0a06507bdbd3322039b726463a7cc1c63e59774 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/a0a06507bdbd3322039b726463a7cc1c63e59774/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 14409, 12, 2730, 21, 16, 1316, 22, 16, 709, 892, 16, 707, 2218, 82, 952, 2187, 328, 1137, 33, 20, 16, 3029, 11488, 33, 20, 16, 4190, 33, 20, 18, 20, 16, 6796, 33, 20, 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, 866, 67, 14409, 12, 2730, 21, 16, 1316, 22, 16, 709, 892, 16, 707, 2218, 82, 952, 2187, 328, 1137, 33, 20, 16, 3029, 11488, 33, 20, 16, 4190, 33, 20, 18, 20, 16, 6796, 33, 20, 18...
.. rubric:: Common Usage:
Most of the time, ``__repr__`` methods are only called during user interaction, and therefore need not be fast; and indeed there are objects ``x`` in Sage such ``x.__repr__()`` is time consuming.
... def __repr__(self):
e006c91b9bfa527b35027c367d07937f23205a37 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/e006c91b9bfa527b35027c367d07937f23205a37/lazy_format.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 565, 1652, 1001, 12715, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 565, 1652, 1001, 12715, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
"""
"""
def flimage_close(pImage): """ flimage_close(pImage) -> num. """ retval = _flimage_close(pImage) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 4412, 12, 84, 2040, 4672, 3536, 1183, 2730, 67, 4412, 12, 84, 2040, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 2730, 67, 4412, 12, 84, 2040, 13, 327, 5221, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 4412, 12, 84, 2040, 4672, 3536, 1183, 2730, 67, 4412, 12, 84, 2040, 13, 317, 818, 18, 3536, 225, 5221, 273, 389, 2242, 2730, 67, 4412, 12, 84, 2040, 13, 327, 5221, 28...
StoreDsc(options.outfile, Platform)
StoreDsc(outputFile, Platform)
def Main(): global options global args global workspace options,args = myOptionParser() workspace = "" if (options.workspace == None): print "ERROR: E0000: WORKSPACE not defined.\n Please set the WORKSPACE environment variable to the location of the EDK II install directory." sys.exit(1) else: workspace = options.workspace #print workspace if (options.debug): print "Using Workspace:", workspace try: options.verbose +=1 except: options.verbose = 1 pass InputFile = args[0] if InputFile != "": filename = InputFile if ((options.verbose > 1) | (options.autowrite)): print "FileName:",InputFile else: print "ERROR: E0001 - You must specify an input filename" sys.exit(1) if (options.outfile): outputFile = options.outfile else: outputFile = filename.replace('.fpd', '.dsc') if ((options.verbose > 2) or (options.debug)): print "Output Filename:", outputFile try: Platform = LoadFpd(filename) StoreDsc(options.outfile, Platform) return 0 except Exception, e: print e return 1
7ce4f2b81097f570f96651d4c4aaf63b4dfc011e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/7ce4f2b81097f570f96651d4c4aaf63b4dfc011e/fpd2dsc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12740, 13332, 2552, 702, 2552, 833, 2552, 6003, 702, 16, 1968, 273, 3399, 1895, 2678, 1435, 225, 6003, 273, 1408, 225, 309, 261, 2116, 18, 14915, 422, 599, 4672, 1172, 315, 3589, 30, 512...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12740, 13332, 2552, 702, 2552, 833, 2552, 6003, 702, 16, 1968, 273, 3399, 1895, 2678, 1435, 225, 6003, 273, 1408, 225, 309, 261, 2116, 18, 14915, 422, 599, 4672, 1172, 315, 3589, 30, 512...
@test_support.cpython_only
@support.cpython_only
def test_range_optimization(self): x = range(1) self.assertEqual(type(reversed(x)), type(iter(x)))
aab38cec3a0b88dcb48d4b9b67941e39a0eeb83f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/aab38cec3a0b88dcb48d4b9b67941e39a0eeb83f/test_enumerate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3676, 67, 16689, 1588, 12, 2890, 4672, 619, 273, 1048, 12, 21, 13, 365, 18, 11231, 5812, 12, 723, 12, 266, 7548, 12, 92, 13, 3631, 618, 12, 2165, 12, 92, 20349, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3676, 67, 16689, 1588, 12, 2890, 4672, 619, 273, 1048, 12, 21, 13, 365, 18, 11231, 5812, 12, 723, 12, 266, 7548, 12, 92, 13, 3631, 618, 12, 2165, 12, 92, 20349, 2, -100, ...
global thread if thread: thread.cancel() time.sleep(0.03) thread.join() thread = None
global thread if thread: thread.cancel() time.sleep(0.03) thread.join() thread = None
def onUnload(): global thread if thread: thread.cancel() time.sleep(0.03) thread.join() thread = None
771d37015bf8a6525e056f8e5ccaeb55f7cfd741 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/771d37015bf8a6525e056f8e5ccaeb55f7cfd741/spawns.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 984, 945, 13332, 2552, 2650, 309, 2650, 30, 2650, 18, 10996, 1435, 813, 18, 19607, 12, 20, 18, 4630, 13, 2650, 18, 5701, 1435, 2650, 273, 599, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 603, 984, 945, 13332, 2552, 2650, 309, 2650, 30, 2650, 18, 10996, 1435, 813, 18, 19607, 12, 20, 18, 4630, 13, 2650, 18, 5701, 1435, 2650, 273, 599, 225, 2, -100, -100, -100, -100, -100...
client = self.clients.getByCID(cid) if not client: return None self.verbose('OnAction: %s: %s' % (client.name, actiontype) )
return None self.verbose('OnAction: %s: %s %s' % (client.name, actiontype, data) )
def OnAction(self, cid, actiontype, data, match=None): #Need example client = self.clients.getByCID(cid) if not client: self.debug('No client found') #self.OnClientuserinfo(action, data, match) client = self.clients.getByCID(cid) if not client: return None self.verbose('OnAction: %s: %s' % (client.name, actiontype) ) return b3.events.Event(b3.events.EVT_CLIENT_ACTION, actiontype, client)
582bbd5d3a9bd40a10418ac4e629a9aea28fa159 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/582bbd5d3a9bd40a10418ac4e629a9aea28fa159/iourt41.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1803, 12, 2890, 16, 7504, 16, 1301, 723, 16, 501, 16, 845, 33, 7036, 4672, 468, 14112, 3454, 1004, 273, 365, 18, 16931, 18, 588, 858, 25992, 12, 13478, 13, 309, 486, 1004, 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, 2755, 1803, 12, 2890, 16, 7504, 16, 1301, 723, 16, 501, 16, 845, 33, 7036, 4672, 468, 14112, 3454, 1004, 273, 365, 18, 16931, 18, 588, 858, 25992, 12, 13478, 13, 309, 486, 1004, 30, ...
s.append('<%s%s%s>' % (self.name, attributeString, close))
s.append('<%s%s%s>' % (encodedName, attributeString, close))
def decode(self, prettyPrint=False, indentLevel=0, eventualEncoding=DEFAULT_OUTPUT_ENCODING): """Returns a string or Unicode representation of this tag and its contents. To get Unicode, pass None for encoding."""
7300e101f39b7a1a436c6765d140c987cbc58a45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/7300e101f39b7a1a436c6765d140c987cbc58a45/BeautifulSoup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 2890, 16, 30410, 33, 8381, 16, 3504, 2355, 33, 20, 16, 871, 1462, 4705, 33, 5280, 67, 15527, 67, 14672, 4672, 3536, 1356, 279, 533, 578, 9633, 4335, 434, 333, 1047, 471, 2097...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 12, 2890, 16, 30410, 33, 8381, 16, 3504, 2355, 33, 20, 16, 871, 1462, 4705, 33, 5280, 67, 15527, 67, 14672, 4672, 3536, 1356, 279, 533, 578, 9633, 4335, 434, 333, 1047, 471, 2097...
if not os.path.isdir(path):
if not os.path.isdir(path):
def createMiroChannelSubdirectory(item): '''Create the Miro Channel subdirectory in MythVideo abort if the subdirectory cannot be made ''' global localhostname, vid_graphics_dirs, storagegroups, channel_id, flat, simulation, verbose miro = u'Miro' path = u"%s%s/%s" % (vid_graphics_dirs[u'mythvideo'], miro, item[u'channelTitle']) if item[u'channel_icon']: ext = getExtention(item[u'channel_icon']) cover_filename = u"folder.jpg" cover_filename_path = u"%s/%s" % (path, cover_filename) cover_filename_path2 = cover_filename_path[:-3]+u'png' if os.path.isdir(path): if item[u'channel_icon']: if os.path.isfile(os.path.realpath(cover_filename_path)) or os.path.isfile(os.path.realpath(cover_filename_path2)): return else: try: # Somthing is wrong with the subdirectory coverart - fix it os.remove(cover_filename_path) except OSError: pass else: return if simulation: logger.info(u"Simulation: Make subdirectory(%s)" % (path)) else: if not os.path.isdir(path): try: os.mkdir(path) except OSError: logger.critical(u"Creation of MythVideo 'Miro' subdirectory path (%s) failed.\nThis may be due to a permissions error." % (path)) sys.exit(False) if item[u'channel_icon']: if simulation: logger.info(u"Simulation: Copying subdirectory cache icon(%s) cover file(%s)" % (item[u'channel_icon'], cover_filename_path)) else: try: if not os.path.isfile(os.path.realpath(cover_filename_path)): useImageMagick(u'convert "%s" "%s"' % (item[u'channel_icon'], cover_filename_path)) except OSError: logger.critical(u"Copying subdirectory cache icon(%s) cover file(%s) failed.\nThis may be due to a permissions error." % (item[u'channel_icon'], cover_filename_path)) sys.exit(False) # end createMiroChannelSubdirectory()
cefa7947527c8e9e2184befa6fb1cdca04096461 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/cefa7947527c8e9e2184befa6fb1cdca04096461/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 49, 11373, 2909, 1676, 5149, 12, 1726, 4672, 9163, 1684, 326, 490, 11373, 5307, 29869, 316, 8005, 451, 10083, 6263, 309, 326, 29869, 2780, 506, 7165, 9163, 2552, 1191, 10358, 16, 1833...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 49, 11373, 2909, 1676, 5149, 12, 1726, 4672, 9163, 1684, 326, 490, 11373, 5307, 29869, 316, 8005, 451, 10083, 6263, 309, 326, 29869, 2780, 506, 7165, 9163, 2552, 1191, 10358, 16, 1833...
self.gridLayout.addWidget(self.lineEdit_magNorth, 1, 1, 1, 1)
self.verticalLayout_12.addWidget(self.lineEdit_magNorth)
def setupUi(self, ui): ui.setObjectName("ui") ui.resize(625, 637) self.verticalLayout_12 = QtGui.QVBoxLayout(ui) self.verticalLayout_12.setObjectName("verticalLayout_12") self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_13 = QtGui.QHBoxLayout() self.horizontalLayout_13.setObjectName("horizontalLayout_13") self.label = QtGui.QLabel(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy) self.label.setObjectName("label") self.horizontalLayout_13.addWidget(self.label) self.comboBox_layers = QtGui.QComboBox(ui) self.comboBox_layers.setObjectName("comboBox_layers") self.horizontalLayout_13.addWidget(self.comboBox_layers) self.verticalLayout_3.addLayout(self.horizontalLayout_13) self.horizontalLayout_14 = QtGui.QHBoxLayout() self.horizontalLayout_14.setObjectName("horizontalLayout_14") self.label_5 = QtGui.QLabel(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth()) self.label_5.setSizePolicy(sizePolicy) self.label_5.setObjectName("label_5") self.horizontalLayout_14.addWidget(self.label_5) self.lineEdit_crs = QtGui.QLineEdit(ui) self.lineEdit_crs.setEnabled(False) self.lineEdit_crs.setObjectName("lineEdit_crs") self.horizontalLayout_14.addWidget(self.lineEdit_crs) self.pushButton_crsChg = QtGui.QPushButton(ui) self.pushButton_crsChg.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_crsChg.sizePolicy().hasHeightForWidth()) self.pushButton_crsChg.setSizePolicy(sizePolicy) self.pushButton_crsChg.setObjectName("pushButton_crsChg") self.horizontalLayout_14.addWidget(self.pushButton_crsChg) self.verticalLayout_3.addLayout(self.horizontalLayout_14) self.verticalLayout_12.addLayout(self.verticalLayout_3) self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.verticalLayout_6 = QtGui.QVBoxLayout() self.verticalLayout_6.setObjectName("verticalLayout_6") self.plainTextEdit_note = QtGui.QPlainTextEdit(ui) self.plainTextEdit_note.setEnabled(True) self.plainTextEdit_note.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.plainTextEdit_note.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) self.plainTextEdit_note.setReadOnly(True) self.plainTextEdit_note.setObjectName("plainTextEdit_note") self.verticalLayout_6.addWidget(self.plainTextEdit_note) self.groupBox = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) self.groupBox.setSizePolicy(sizePolicy) self.groupBox.setObjectName("groupBox") self.verticalLayout_7 = QtGui.QVBoxLayout(self.groupBox) self.verticalLayout_7.setObjectName("verticalLayout_7") self.horizontalLayout_6 = QtGui.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setObjectName("label_2") self.horizontalLayout_6.addWidget(self.label_2) spacerItem = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem) self.lineEdit_vertexX0 = QtGui.QLineEdit(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_vertexX0.sizePolicy().hasHeightForWidth()) self.lineEdit_vertexX0.setSizePolicy(sizePolicy) self.lineEdit_vertexX0.setObjectName("lineEdit_vertexX0") self.horizontalLayout_6.addWidget(self.lineEdit_vertexX0) self.pushButton_startCapture = QtGui.QPushButton(self.groupBox) self.pushButton_startCapture.setObjectName("pushButton_startCapture") self.horizontalLayout_6.addWidget(self.pushButton_startCapture) spacerItem1 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem1) self.verticalLayout_7.addLayout(self.horizontalLayout_6) self.horizontalLayout_7 = QtGui.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.label_3 = QtGui.QLabel(self.groupBox) self.label_3.setObjectName("label_3") self.horizontalLayout_7.addWidget(self.label_3) spacerItem2 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem2) self.lineEdit_vertexY0 = QtGui.QLineEdit(self.groupBox) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_vertexY0.sizePolicy().hasHeightForWidth()) self.lineEdit_vertexY0.setSizePolicy(sizePolicy) self.lineEdit_vertexY0.setObjectName("lineEdit_vertexY0") self.horizontalLayout_7.addWidget(self.lineEdit_vertexY0) spacerItem3 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem3) self.verticalLayout_7.addLayout(self.horizontalLayout_7) self.horizontalLayout_8 = QtGui.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.label_4 = QtGui.QLabel(self.groupBox) self.label_4.setObjectName("label_4") self.horizontalLayout_8.addWidget(self.label_4) spacerItem4 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem4) self.lineEdit_vertexZ0 = QtGui.QLineEdit(self.groupBox) self.lineEdit_vertexZ0.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_vertexZ0.sizePolicy().hasHeightForWidth()) self.lineEdit_vertexZ0.setSizePolicy(sizePolicy) self.lineEdit_vertexZ0.setObjectName("lineEdit_vertexZ0") self.horizontalLayout_8.addWidget(self.lineEdit_vertexZ0) spacerItem5 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem5) self.verticalLayout_7.addLayout(self.horizontalLayout_8) self.verticalLayout_6.addWidget(self.groupBox) self.groupBox_2 = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth()) self.groupBox_2.setSizePolicy(sizePolicy) self.groupBox_2.setObjectName("groupBox_2") self.verticalLayout_8 = QtGui.QVBoxLayout(self.groupBox_2) self.verticalLayout_8.setObjectName("verticalLayout_8") self.horizontalLayout_9 = QtGui.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.label_8 = QtGui.QLabel(self.groupBox_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth()) self.label_8.setSizePolicy(sizePolicy) self.label_8.setObjectName("label_8") self.horizontalLayout_9.addWidget(self.label_8) spacerItem6 = QtGui.QSpacerItem(2, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_9.addItem(spacerItem6) self.lineEdit_nextAzimuth = QtGui.QLineEdit(self.groupBox_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_nextAzimuth.sizePolicy().hasHeightForWidth()) self.lineEdit_nextAzimuth.setSizePolicy(sizePolicy) self.lineEdit_nextAzimuth.setObjectName("lineEdit_nextAzimuth") self.horizontalLayout_9.addWidget(self.lineEdit_nextAzimuth) spacerItem7 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_9.addItem(spacerItem7) self.verticalLayout_8.addLayout(self.horizontalLayout_9) self.horizontalLayout_10 = QtGui.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.label_9 = QtGui.QLabel(self.groupBox_2) self.label_9.setObjectName("label_9") self.horizontalLayout_10.addWidget(self.label_9) self.lineEdit_nextDistance = QtGui.QLineEdit(self.groupBox_2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_nextDistance.sizePolicy().hasHeightForWidth()) self.lineEdit_nextDistance.setSizePolicy(sizePolicy) self.lineEdit_nextDistance.setObjectName("lineEdit_nextDistance") self.horizontalLayout_10.addWidget(self.lineEdit_nextDistance) spacerItem8 = QtGui.QSpacerItem(26, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_10.addItem(spacerItem8) self.verticalLayout_8.addLayout(self.horizontalLayout_10) self.horizontalLayout_11 = QtGui.QHBoxLayout() self.horizontalLayout_11.setObjectName("horizontalLayout_11") self.label_10 = QtGui.QLabel(self.groupBox_2) self.label_10.setObjectName("label_10") self.horizontalLayout_11.addWidget(self.label_10) spacerItem9 = QtGui.QSpacerItem(6, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_11.addItem(spacerItem9) self.lineEdit_nextVertical = QtGui.QLineEdit(self.groupBox_2) self.lineEdit_nextVertical.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_nextVertical.sizePolicy().hasHeightForWidth()) self.lineEdit_nextVertical.setSizePolicy(sizePolicy) self.lineEdit_nextVertical.setObjectName("lineEdit_nextVertical") self.horizontalLayout_11.addWidget(self.lineEdit_nextVertical) spacerItem10 = QtGui.QSpacerItem(15, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.horizontalLayout_11.addItem(spacerItem10) self.pushButton_vertexInsert = QtGui.QPushButton(self.groupBox_2) self.pushButton_vertexInsert.setObjectName("pushButton_vertexInsert") self.horizontalLayout_11.addWidget(self.pushButton_vertexInsert) spacerItem11 = QtGui.QSpacerItem(28, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_11.addItem(spacerItem11) self.verticalLayout_8.addLayout(self.horizontalLayout_11) self.verticalLayout_6.addWidget(self.groupBox_2) self.horizontalLayout_4.addLayout(self.verticalLayout_6) self.verticalLayout_4 = QtGui.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.surveyGrpBox = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.surveyGrpBox.sizePolicy().hasHeightForWidth()) self.surveyGrpBox.setSizePolicy(sizePolicy) self.surveyGrpBox.setObjectName("surveyGrpBox") self.layoutWidget = QtGui.QWidget(self.surveyGrpBox) self.layoutWidget.setGeometry(QtCore.QRect(11, 20, 94, 51)) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout_10 = QtGui.QVBoxLayout(self.layoutWidget) self.verticalLayout_10.setObjectName("verticalLayout_10") self.radioButton_irrSurvey = QtGui.QRadioButton(self.layoutWidget) self.radioButton_irrSurvey.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_irrSurvey.sizePolicy().hasHeightForWidth()) self.radioButton_irrSurvey.setSizePolicy(sizePolicy) self.radioButton_irrSurvey.setCheckable(True) self.radioButton_irrSurvey.setChecked(False) self.radioButton_irrSurvey.setObjectName("radioButton_irrSurvey") self.verticalLayout_10.addWidget(self.radioButton_irrSurvey) self.radioButton_polySurvey = QtGui.QRadioButton(self.layoutWidget) self.radioButton_polySurvey.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_polySurvey.sizePolicy().hasHeightForWidth()) self.radioButton_polySurvey.setSizePolicy(sizePolicy) self.radioButton_polySurvey.setChecked(True) self.radioButton_polySurvey.setObjectName("radioButton_polySurvey") self.verticalLayout_10.addWidget(self.radioButton_polySurvey) self.verticalLayout_4.addWidget(self.surveyGrpBox) self.groupBox_3 = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_3.sizePolicy().hasHeightForWidth()) self.groupBox_3.setSizePolicy(sizePolicy) self.groupBox_3.setObjectName("groupBox_3") self.layoutWidget1 = QtGui.QWidget(self.groupBox_3) self.layoutWidget1.setGeometry(QtCore.QRect(10, 17, 241, 63)) self.layoutWidget1.setObjectName("layoutWidget1") self.gridLayout = QtGui.QGridLayout(self.layoutWidget1) self.gridLayout.setObjectName("gridLayout") self.radioButton_defaultNorth = QtGui.QRadioButton(self.layoutWidget1) self.radioButton_defaultNorth.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_defaultNorth.sizePolicy().hasHeightForWidth()) self.radioButton_defaultNorth.setSizePolicy(sizePolicy) self.radioButton_defaultNorth.setCheckable(True) self.radioButton_defaultNorth.setChecked(True) self.radioButton_defaultNorth.setObjectName("radioButton_defaultNorth") self.gridLayout.addWidget(self.radioButton_defaultNorth, 0, 0, 1, 1) self.radioButton_magNorth = QtGui.QRadioButton(self.layoutWidget1) self.radioButton_magNorth.setEnabled(True) self.radioButton_magNorth.setChecked(False) self.radioButton_magNorth.setObjectName("radioButton_magNorth") self.gridLayout.addWidget(self.radioButton_magNorth, 1, 0, 1, 1) self.lineEdit_magNorth = QtGui.QLineEdit(self.layoutWidget1) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lineEdit_magNorth.sizePolicy().hasHeightForWidth()) self.lineEdit_magNorth.setSizePolicy(sizePolicy) self.lineEdit_magNorth.setObjectName("lineEdit_magNorth") self.gridLayout.addWidget(self.lineEdit_magNorth, 1, 1, 1, 1) self.verticalLayout_4.addWidget(self.groupBox_3) self.groupBox_7 = QtGui.QGroupBox(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_7.sizePolicy().hasHeightForWidth()) self.groupBox_7.setSizePolicy(sizePolicy) self.groupBox_7.setObjectName("groupBox_7") self.layoutWidget2 = QtGui.QWidget(self.groupBox_7) self.layoutWidget2.setGeometry(QtCore.QRect(10, 10, 201, 41)) self.layoutWidget2.setObjectName("layoutWidget2") self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget2) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.radioButton_defaultUnits = QtGui.QRadioButton(self.layoutWidget2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_defaultUnits.sizePolicy().hasHeightForWidth()) self.radioButton_defaultUnits.setSizePolicy(sizePolicy) self.radioButton_defaultUnits.setObjectName("radioButton_defaultUnits") self.horizontalLayout_2.addWidget(self.radioButton_defaultUnits) self.radioButton_englishUnits = QtGui.QRadioButton(self.layoutWidget2) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_englishUnits.sizePolicy().hasHeightForWidth()) self.radioButton_englishUnits.setSizePolicy(sizePolicy) self.radioButton_englishUnits.setObjectName("radioButton_englishUnits") self.horizontalLayout_2.addWidget(self.radioButton_englishUnits) spacerItem12 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem12) self.verticalLayout_4.addWidget(self.groupBox_7) self.groupBox_6 = QtGui.QGroupBox(ui) self.groupBox_6.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox_6.sizePolicy().hasHeightForWidth()) self.groupBox_6.setSizePolicy(sizePolicy) self.groupBox_6.setObjectName("groupBox_6") self.verticalLayout_5 = QtGui.QVBoxLayout(self.groupBox_6) self.verticalLayout_5.setObjectName("verticalLayout_5") self.radioButton_azimuthAngle = QtGui.QRadioButton(self.groupBox_6) self.radioButton_azimuthAngle.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_azimuthAngle.sizePolicy().hasHeightForWidth()) self.radioButton_azimuthAngle.setSizePolicy(sizePolicy) self.radioButton_azimuthAngle.setCheckable(True) self.radioButton_azimuthAngle.setChecked(True) self.radioButton_azimuthAngle.setObjectName("radioButton_azimuthAngle") self.verticalLayout_5.addWidget(self.radioButton_azimuthAngle) self.radioButton_bearingAngle = QtGui.QRadioButton(self.groupBox_6) self.radioButton_bearingAngle.setEnabled(True) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_bearingAngle.sizePolicy().hasHeightForWidth()) self.radioButton_bearingAngle.setSizePolicy(sizePolicy) self.radioButton_bearingAngle.setChecked(False) self.radioButton_bearingAngle.setObjectName("radioButton_bearingAngle") self.verticalLayout_5.addWidget(self.radioButton_bearingAngle) self.radioButton_polarCoordAngle = QtGui.QRadioButton(self.groupBox_6) self.radioButton_polarCoordAngle.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.radioButton_polarCoordAngle.sizePolicy().hasHeightForWidth()) self.radioButton_polarCoordAngle.setSizePolicy(sizePolicy) self.radioButton_polarCoordAngle.setChecked(False) self.radioButton_polarCoordAngle.setObjectName("radioButton_polarCoordAngle") self.verticalLayout_5.addWidget(self.radioButton_polarCoordAngle) self.verticalLayout_4.addWidget(self.groupBox_6) self.horizontalLayout_4.addLayout(self.verticalLayout_4) self.verticalLayout_12.addLayout(self.horizontalLayout_4) self.horizontalLayout_12 = QtGui.QHBoxLayout() self.horizontalLayout_12.setObjectName("horizontalLayout_12") self.verticalLayout_11 = QtGui.QVBoxLayout() self.verticalLayout_11.setObjectName("verticalLayout_11") self.groupBox_8 = QtGui.QGroupBox(ui) self.groupBox_8.setObjectName("groupBox_8") self.verticalLayout_9 = QtGui.QVBoxLayout(self.groupBox_8) self.verticalLayout_9.setObjectName("verticalLayout_9") self.table_segmentList = QtGui.QTableWidget(self.groupBox_8) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.table_segmentList.sizePolicy().hasHeightForWidth()) self.table_segmentList.setSizePolicy(sizePolicy) self.table_segmentList.setObjectName("table_segmentList") self.table_segmentList.setColumnCount(3) self.table_segmentList.setRowCount(0) item = QtGui.QTableWidgetItem() self.table_segmentList.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.table_segmentList.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.table_segmentList.setHorizontalHeaderItem(2, item) self.verticalLayout_9.addWidget(self.table_segmentList) self.verticalLayout_11.addWidget(self.groupBox_8) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.pushButton_segListLoad = QtGui.QPushButton(ui) self.pushButton_segListLoad.setEnabled(True) self.pushButton_segListLoad.setObjectName("pushButton_segListLoad") self.horizontalLayout_3.addWidget(self.pushButton_segListLoad) self.pushButton_segListSave = QtGui.QPushButton(ui) self.pushButton_segListSave.setEnabled(True) self.pushButton_segListSave.setObjectName("pushButton_segListSave") self.horizontalLayout_3.addWidget(self.pushButton_segListSave) spacerItem13 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem13) self.pushButton_segListClear = QtGui.QPushButton(ui) self.pushButton_segListClear.setObjectName("pushButton_segListClear") self.horizontalLayout_3.addWidget(self.pushButton_segListClear) self.verticalLayout_11.addLayout(self.horizontalLayout_3) self.horizontalLayout_12.addLayout(self.verticalLayout_11) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint) self.verticalLayout.setObjectName("verticalLayout") self.pushButton_segListRowUp = QtGui.QPushButton(ui) self.pushButton_segListRowUp.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_segListRowUp.sizePolicy().hasHeightForWidth()) self.pushButton_segListRowUp.setSizePolicy(sizePolicy) self.pushButton_segListRowUp.setObjectName("pushButton_segListRowUp") self.verticalLayout.addWidget(self.pushButton_segListRowUp) self.pushButton_segListRowDn = QtGui.QPushButton(ui) self.pushButton_segListRowDn.setEnabled(False) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_segListRowDn.sizePolicy().hasHeightForWidth()) self.pushButton_segListRowDn.setSizePolicy(sizePolicy) self.pushButton_segListRowDn.setObjectName("pushButton_segListRowDn") self.verticalLayout.addWidget(self.pushButton_segListRowDn) spacerItem14 = QtGui.QSpacerItem(20, 28, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem14) self.pushButton_segListRowDel = QtGui.QPushButton(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_segListRowDel.sizePolicy().hasHeightForWidth()) self.pushButton_segListRowDel.setSizePolicy(sizePolicy) self.pushButton_segListRowDel.setObjectName("pushButton_segListRowDel") self.verticalLayout.addWidget(self.pushButton_segListRowDel) self.horizontalLayout_12.addLayout(self.verticalLayout) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.pushButton_objectDraw = QtGui.QPushButton(ui) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pushButton_objectDraw.sizePolicy().hasHeightForWidth()) self.pushButton_objectDraw.setSizePolicy(sizePolicy) self.pushButton_objectDraw.setObjectName("pushButton_objectDraw") self.verticalLayout_2.addWidget(self.pushButton_objectDraw) spacerItem15 = QtGui.QSpacerItem(28, 78, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem15) self.pushButton_dlgClose = QtGui.QPushButton(ui) self.pushButton_dlgClose.setObjectName("pushButton_dlgClose") self.verticalLayout_2.addWidget(self.pushButton_dlgClose) self.horizontalLayout_12.addLayout(self.verticalLayout_2) self.verticalLayout_12.addLayout(self.horizontalLayout_12) self.label_2.setBuddy(self.lineEdit_vertexX0) self.label_3.setBuddy(self.lineEdit_vertexY0) self.label_4.setBuddy(self.lineEdit_vertexZ0) self.label_8.setBuddy(self.lineEdit_nextAzimuth) self.label_9.setBuddy(self.lineEdit_nextDistance) self.label_10.setBuddy(self.lineEdit_nextVertical)
2503e9f807f1add21e1e4ab81249139c1d70195c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8312/2503e9f807f1add21e1e4ab81249139c1d70195c/Ui_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5915, 4672, 5915, 18, 542, 16707, 2932, 4881, 7923, 5915, 18, 15169, 12, 26, 2947, 16, 1666, 6418, 13, 365, 18, 17824, 3744, 67, 2138, 273, 23425, 18, 53, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5915, 4672, 5915, 18, 542, 16707, 2932, 4881, 7923, 5915, 18, 15169, 12, 26, 2947, 16, 1666, 6418, 13, 365, 18, 17824, 3744, 67, 2138, 273, 23425, 18, 53, 58...
prec = tokens[i-1] if t.line > prec.line and prec.typ == Token.punct \ and prec.string == ')':
if t.line > t.prec.line and t.prec.typ == Token.punct \ and t.prec.string == ')':
def check_singlular_opening_braces(tokens, lines, warnings): "Check for inappropriate { on a separate line" for i, t in enumerate(tokens): if t.bracelevel == 0 or t.typ != Token.punct or t.string != '{': continue prec = tokens[i-1] if t.line > prec.line and prec.typ == Token.punct \ and prec.string == ')': w = 'Opening brace on a separate line (col %d)' warnings.append((t.line, w % t.col))
6ef4f8f80b65ddd3424b5c94f1c8a2c566383415 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6176/6ef4f8f80b65ddd3424b5c94f1c8a2c566383415/check-coding-style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2470, 80, 2490, 67, 3190, 310, 67, 15397, 764, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 316, 438, 5986, 566, 340, 288, 603, 279, 9004, 980, 6, 364, 277, 16, 268, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2470, 80, 2490, 67, 3190, 310, 67, 15397, 764, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 316, 438, 5986, 566, 340, 288, 603, 279, 9004, 980, 6, 364, 277, 16, 268, ...
"can't pickle %s objects" % `t.__name__`
"can't pickle %s object: %s" % (`t.__name__`, `object`)
def save(self, object, pers_save = 0): memo = self.memo
08a92cb56874537b88a224e9fcd6a3d89a5a703b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/08a92cb56874537b88a224e9fcd6a3d89a5a703b/pickle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 733, 16, 13508, 67, 5688, 273, 374, 4672, 11063, 273, 365, 18, 19521, 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, 1923, 12, 2890, 16, 733, 16, 13508, 67, 5688, 273, 374, 4672, 11063, 273, 365, 18, 19521, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.groupdict.has_key(name): raise error, "can only use each group name once"
ogid = self.groupdict.get(name, None) if ogid is not None: raise error, ("redefinition of group name %s as group %d; " + "was group %d") % (`name`, gid, ogid)
def opengroup(self, name=None): gid = self.groups self.groups = gid + 1 if name: if self.groupdict.has_key(name): raise error, "can only use each group name once" self.groupdict[name] = gid self.open.append(gid) return gid
7533587d4363d0841232f58d61adc15fa32b4825 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7533587d4363d0841232f58d61adc15fa32b4825/sre_parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 1655, 12, 2890, 16, 508, 33, 7036, 4672, 11399, 273, 365, 18, 4650, 365, 18, 4650, 273, 11399, 397, 404, 309, 508, 30, 320, 15780, 273, 365, 18, 1655, 1576, 18, 588, 12, 529, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 1655, 12, 2890, 16, 508, 33, 7036, 4672, 11399, 273, 365, 18, 4650, 365, 18, 4650, 273, 11399, 397, 404, 309, 508, 30, 320, 15780, 273, 365, 18, 1655, 1576, 18, 588, 12, 529, 1...
if r1 == c1: r1=r0 d0,d1=min(r1,c0),max(r1,c0)
if r1 == c1: r1 = r0 d0,d1 = min(r1,c0),max(r1,c0)
def _merge(self,c0,c1): '''Merge region c0 & c1''' self.W[self.W==c1]=c0 self.neighbours[c0].remove(c1) self.neighbours[c1].remove(c0) self.neighbours[c0].update(self.neighbours[c1]) del self.neighbours[c1] for v in self.neighbours.values(): if c1 in v: v.remove(c1) v.add(c0) b=self.border_id[min(c0,c1),max(c0,c1)] del self.border_id[min(c0,c1),max(c0,c1)] self.B[self.B==b]=0 for (r0,r1),b in self.border_id.items(): if r0 == c1 or r1 == c1: del self.border_id[r0,r1] if r1 == c1: r1=r0 d0,d1=min(r1,c0),max(r1,c0) if (d0,d1) in self.border_id: self.B[self.B==b] = self.border_id[d0,d1] else: self.border_id[d0,d1]=b
2b38e0c5d09a366f325eb6e3e42c1a13520a2298 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12199/2b38e0c5d09a366f325eb6e3e42c1a13520a2298/roysam.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2702, 12, 2890, 16, 71, 20, 16, 71, 21, 4672, 9163, 6786, 3020, 276, 20, 473, 276, 21, 26418, 365, 18, 59, 63, 2890, 18, 59, 631, 71, 21, 65, 33, 71, 20, 365, 18, 11166, 439...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2702, 12, 2890, 16, 71, 20, 16, 71, 21, 4672, 9163, 6786, 3020, 276, 20, 473, 276, 21, 26418, 365, 18, 59, 63, 2890, 18, 59, 631, 71, 21, 65, 33, 71, 20, 365, 18, 11166, 439...
return if event.eventtype() == 'mode': if len(event.arguments()) < 2: self.error(2, debug_str, debug=True) self.error(1, '2 arguments are needed for a '+event.eventtype()+' event', debug=True) return if event.arguments()[1] != self.nickname or not 'o' in event.arguments()[0]: self.error(1, 'ignoring IRC mode "'+event.arguments()[0]+'" for "'+event.arguments()[1]+'"', debug=True) return self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.target(), irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if re.search('\+[^\-]*o', event.arguments()[0]): bridge.irc_op = True self.error(say_levels.notice, 'bot has IRC operator privileges in '+event.target()) elif re.search('\-[^\+]*o', event.arguments()[0]): if bridge.irc_op: self.error(say_levels.notice, 'bot lost IRC operator privileges in '+event.target(), send_to_admins=True) bridge.irc_op = False
def _irc_event_handler(self, connection, event): """[Internal] Manage IRC events""" # Answer ping if event.eventtype() == 'ping': connection.pong(connection.get_server_name()) return # Events we always want to ignore if 'all' in event.eventtype() or 'motd' in event.eventtype() or event.eventtype() in ['nicknameinuse', 'nickcollision', 'erroneusnickname']: return if event.eventtype() in ['pong', 'privnotice', 'ctcp', 'nochanmodes', 'notexttosend', 'currenttopic', 'topicinfo', '328', 'pubnotice', '042', 'umode', 'welcome', 'yourhost', 'created', 'myinfo', 'featurelist', 'luserclient', 'luserop', 'luserchannels', 'luserme', 'n_local', 'n_global', 'endofnames', 'luserunknown', 'luserconns', 'inviteonlychan', 'bannedfromchan', 'channelisfull', 'badchannelkey']: self.error(1, 'ignoring IRC '+event.eventtype(), debug=True) return nickname = None if event.source() and '!' in event.source(): nickname = event.source().split('!')[0] # A string representation of the event event_str = '\nconnection='+connection.__str__()+'\neventtype='+event.eventtype()+'\nsource='+repr(event.source())+'\ntarget='+repr(event.target())+'\narguments='+repr(event.arguments()) debug_str = 'Received IRC event.'+event_str printed_event = False if event.eventtype() in ['pubmsg', 'action', 'privmsg', 'quit', 'part', 'nick', 'kick']: if nickname == None: return handled = False if event.eventtype() in ['quit', 'part'] and nickname == self.nickname: return if event.eventtype() in ['quit', 'part', 'nick', 'kick']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return else: self.error(2, debug_str, debug=True) printed_event = True if event.eventtype() == 'kick' and len(event.arguments()) < 1: self.error(say_levels.debug, 'at least 1 argument is needed for a '+event.eventtype()+' event', no_debug_add=event_str) return if event.eventtype() in ['pubmsg', 'action']: if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bot connection', debug=True) return if nickname == self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' sent by self', debug=True) return for bridge in self.bridges: if connection.server != bridge.irc_server: continue try: from_ = bridge.get_participant(nickname) except Bridge.NoSuchParticipantException: continue # Private message if event.eventtype() == 'privmsg': if event.target() == None: return try: to_ = bridge.get_participant(event.target().split('!')[0]) self.error(2, debug_str, debug=True) from_.say_on_xmpp_to(to_.nickname, event.arguments()[0]) return except Bridge.NoSuchParticipantException: if event.target().split('!')[0] == self.nickname: # Message is for the bot self.error(2, debug_str, debug=True) connection.privmsg(from_.nickname, self.respond(event.arguments()[0])) return else: continue # kick handling if event.eventtype() == 'kick': if event.target().lower() == bridge.irc_room: try: kicked = bridge.get_participant(event.arguments()[0]) if isinstance(kicked.irc_connection, irclib.ServerConnection): kicked.irc_connection.join(bridge.irc_room) else: if len(event.arguments()) > 1: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' with reason: '+event.arguments()[1]) else: bridge.remove_participant('irc', kicked.nickname, 'Kicked by '+nickname+' (no reason was given)') return except Bridge.NoSuchParticipantException: self.error(say_levels.debug, 'a participant that was not here has been kicked ? WTF ?', no_debug_add=event_str) return else: continue # Leaving events if event.eventtype() == 'quit' or event.eventtype() == 'part' and event.target().lower() == bridge.irc_room: if len(event.arguments()) > 0: leave_message = event.arguments()[0] elif event.eventtype() == 'quit': leave_message = 'Left server.' elif event.eventtype() == 'part': leave_message = 'Left channel.' else: leave_message = '' bridge.remove_participant('irc', from_.nickname, leave_message) handled = True continue # Nickname change if event.eventtype() == 'nick': from_.change_nickname(event.target(), 'xmpp') handled = True continue # Chan message if event.eventtype() in ['pubmsg', 'action']: if bridge.irc_room == event.target().lower() and bridge.irc_server == connection.server: self.error(2, debug_str, debug=True) message = event.arguments()[0] if event.eventtype() == 'action': action = True else: action = False from_.say_on_xmpp(message, action=action) return else: continue if handled: return if event.eventtype() in ['disconnect', 'kill', 'error']: if len(event.arguments()) > 0 and event.arguments()[0] == 'Connection reset by peer': self.error(2, debug_str, debug=True) else: self.error(say_levels.debug, debug_str, send_to_admins=True) return # Chan errors if event.eventtype() in ['cannotsendtochan', 'notonchannel']: self.error(2, debug_str, debug=True) bridge = self.get_bridge(irc_room=event.arguments()[0], irc_server=connection.server) if event.eventtype() == 'cannotsendtochan': if connection.real_nickname == self.nickname: bridge._join_irc_failed(event.eventtype()) else: p = bridge.get_participant(connection.real_nickname) p._close_irc_connection(event.eventtype()) p.irc_connection = event.eventtype() elif event.eventtype() == 'notonchannel': if connection.real_nickname == self.nickname: bridge.restart(message='Restarting bridge because we received the IRC event '+event.eventtype()) else: p = bridge.get_participant(connection.real_nickname) p.irc_connection.join(bridge.irc_room) return # Ignore events not received on bot connection if connection.real_nickname != self.nickname: self.error(1, 'ignoring IRC '+event.eventtype()+' not received on bridge connection', debug=True) return # Joining events if event.eventtype() in ['namreply', 'join']: if event.eventtype() == 'namreply': bridge = self.get_bridge(irc_room=event.arguments()[1].lower(), irc_server=connection.server) for nickname in re.split('(?:^[&@\+%]?|(?: [&@\+%]?)*)', event.arguments()[2].strip()): if nickname == '' or nickname == self.nickname: continue bridge.add_participant('irc', nickname) return elif event.eventtype() == 'join': bridge = self.get_bridge(irc_room=event.target().lower(), irc_server=connection.server) bridge.add_participant('irc', nickname) return # Mode event if event.eventtype() == 'mode': if len(event.arguments()) < 2: self.error(2, debug_str, debug=True) self.error(1, '2 arguments are needed for a '+event.eventtype()+' event', debug=True) return if event.arguments()[1] != self.nickname or not 'o' in event.arguments()[0]: self.error(1, 'ignoring IRC mode "'+event.arguments()[0]+'" for "'+event.arguments()[1]+'"', debug=True) return self.error(2, debug_str, debug=True) bridges = self.iter_bridges(irc_room=event.target(), irc_server=connection.server) if len(bridges) > 1: raise Exception, 'more than one bridge for one irc chan, WTF ?' bridge = bridges[0] if re.search('\+[^\-]*o', event.arguments()[0]): # bot is channel operator bridge.irc_op = True self.error(say_levels.notice, 'bot has IRC operator privileges in '+event.target()) elif re.search('\-[^\+]*o', event.arguments()[0]): # bot lost channel operator privileges if bridge.irc_op: self.error(say_levels.notice, 'bot lost IRC operator privileges in '+event.target(), send_to_admins=True) bridge.irc_op = False return # Unhandled events if not printed_event: self.error(say_levels.debug, 'The following IRC event was not handled:'+event_str+'\n', send_to_admins=True) else: self.error(1, 'event not handled', debug=True) self._send_message_to_admins(say_levels.debug, 'The following IRC event was not handled:'+event_str)
7af2a8a810665cc96ac01e14451dec4dfa2e27ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/7af2a8a810665cc96ac01e14451dec4dfa2e27ba/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 481, 71, 67, 2575, 67, 4176, 12, 2890, 16, 1459, 16, 871, 4672, 3536, 63, 3061, 65, 24247, 467, 11529, 2641, 8395, 225, 468, 21019, 10087, 309, 871, 18, 2575, 723, 1435, 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, 389, 481, 71, 67, 2575, 67, 4176, 12, 2890, 16, 1459, 16, 871, 4672, 3536, 63, 3061, 65, 24247, 467, 11529, 2641, 8395, 225, 468, 21019, 10087, 309, 871, 18, 2575, 723, 1435, 422, 296,...
re_grp = re.compile(r'&&|<<|>>|->|::|\.\*|->\*|\|\|')
re_grp = re.compile(r'&&|<<|>>|->|::|\.\*|->\*|\|\||\+\+|--|\*\*+|\.\.\.')
def tokenize(lines): "`Parse' a C file returning a sequence of Tokens" re_com = re.compile(r'/\*.*?\*/|//.*') re_mac = re.compile(r'#.*') re_str = re.compile(r'"([^\\"]+|\\"|\\[^"])*"') re_chr = re.compile(r'\'(?:.|\\.|\\[0-7]{3}|\\x[0-9a-f]{2})\'') re_id = re.compile(r'\b[A-Za-z_]\w*\b') # this eats some integers too re_dbl = re.compile(r'\b(\d*\.\d+|\d+\.?)(?:[Ee][-+]?\d+)?[FfLl]?\b') re_int = re.compile(r'\b(?:0[xX][a-fA-F0-9]+|0[0-7]+|[-+]?\d+)[LlUu]*\b') re_eq = re.compile(r'(?:[-+*%/&|!<>=^]|&&|>>|<<|\|\|)?=') re_grp = re.compile(r'&&|<<|>>|->|::|\.\*|->\*|\|\|') re_sin = re.compile(r'[][(){};:?,.+~!%^&*|/^<>]|-') re_tokens = re_com, re_str, re_chr, re_id, re_dbl, re_int, \ re_eq, re_grp, re_sin token_ids = { re_com: 0, re_str: Token.string, re_chr: Token.char, re_id: Token.ident, re_dbl: Token.double, re_int: Token.integer, re_eq: Token.punct, re_grp: Token.punct, re_sin: Token.punct } tokens = [] in_comment = False in_macro = False for i, l in enumerate(lines): l, col = blstrip(l, 0) # special processing when we are inside a multiline comment or macro if in_comment: base = l.find('*/') if base == -1: continue l = l[base+2:] col += base+2 l, col = blstrip(l, col) in_comment = False elif in_macro: in_macro = l.endswith('\\') continue elif l.startswith('#'): if l.endswith('\\'): in_macro = True continue while l: if l.startswith('/*') and l.find('*/') == -1: in_comment = True break for r in re_tokens: m = r.match(l) if m: if token_ids[r]: tokens.append(Token(i, col, token_ids[r], m.group())) col += m.end() l, col = blstrip(l[m.end():], col) break if not m: sys.stderr.write('*** ERROR: Completely ugly code ' + '(trying to sync): %s\n' % l) l = '' # Make tokens a doubly linked list for i, t in enumerate(tokens): if i: t.prec = tokens[i-1] else: t.prec = None try: t.succ = tokens[i+1] except IndexError: t.succ = None return tokens
9b67737d3ecfce51d6a8231cbcb581d5a83a17d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/9b67737d3ecfce51d6a8231cbcb581d5a83a17d8/check-coding-style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13672, 12, 3548, 4672, 11972, 3201, 11, 279, 385, 585, 5785, 279, 3102, 434, 13899, 6, 283, 67, 832, 273, 283, 18, 11100, 12, 86, 11, 24441, 14, 4509, 10936, 5549, 96, 759, 25664, 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, 13672, 12, 3548, 4672, 11972, 3201, 11, 279, 385, 585, 5785, 279, 3102, 434, 13899, 6, 283, 67, 832, 273, 283, 18, 11100, 12, 86, 11, 24441, 14, 4509, 10936, 5549, 96, 759, 25664, 13, ...
return True
def on_button_press(self, widget, event): from gui.editors import (EditPerson, EditEvent, EditFamily, EditSource, EditPlace, EditRepository, EditNote, EditMedia) # Here we intercept mouse clicks on selected items so that we can # drag multiple items without the click selecting only one target = self.get_path_at_pos(int(event.x), int(event.y)) if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1: model, paths = self.get_selection().get_selected_rows() for path in paths: node = model.get_iter(path) if node is not None: o = model.get_value(node,1) objclass = o._objclass handle = o._handle if objclass == 'Person': person = self.dbstate.db.get_person_from_handle(handle) if person: try: EditPerson(self.dbstate, self.uistate, [], person) return True # handled event except Errors.WindowActiveError: pass elif objclass == 'Event': event = self.dbstate.db.get_event_from_handle(handle) if event: try: EditEvent(self.dbstate, self.uistate, [], event) return True # handled event except Errors.WindowActiveError: pass elif objclass == 'Family': ref = self.dbstate.db.get_family_from_handle(handle) if ref: try: EditFamily(self.dbstate, self.uistate, [], ref) return True # handled event except Errors.WindowActiveError: pass elif objclass == 'Source': ref = self.dbstate.db.get_source_from_handle(handle) if ref: try: EditSource(self.dbstate, self.uistate, [], ref) return True # handled event except Errors.WindowActiveError: pass elif objclass == 'Place': ref = self.dbstate.db.get_place_from_handle(handle) if ref: try: EditPlace(self.dbstate, self.uistate, [], ref) return True # handled event except Errors.WindowActiveError: pass elif objclass == 'Repository': ref = self.dbstate.db.get_repository_from_handle(handle) if ref: try: EditRepository(self.dbstate, self.uistate, [], ref) return True # handled event except Errors.WindowActiveError: pass elif objclass == 'Note': ref = self.dbstate.db.get_note_from_handle(handle) if ref: try: EditNote(self.dbstate, self.uistate, [], ref) return True # handled event except Errors.WindowActiveError: pass elif objclass in ['Media', 'MediaObject']: ref = self.dbstate.db.get_object_from_handle(handle) if ref: try: EditMedia(self.dbstate, self.uistate, [], ref) return True # handled event except Errors.WindowActiveError: pass return False # otherwise: if (target and event.type == gtk.gdk.BUTTON_PRESS and not (event.state & (gtk.gdk.CONTROL_MASK|gtk.gdk.SHIFT_MASK)) and self.get_selection().path_is_selected(target[0])): # disable selection self.get_selection().set_select_function(lambda *ignore: False) self.defer_select = target[0]
79ac3267e2982e4846e501b6981904955d86acb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1491/79ac3267e2982e4846e501b6981904955d86acb7/ClipboardGramplet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5391, 67, 1028, 12, 2890, 16, 3604, 16, 871, 4672, 628, 13238, 18, 4619, 1383, 1930, 261, 4666, 8346, 16, 15328, 1133, 16, 15328, 9203, 16, 15328, 1830, 16, 15328, 6029, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5391, 67, 1028, 12, 2890, 16, 3604, 16, 871, 4672, 628, 13238, 18, 4619, 1383, 1930, 261, 4666, 8346, 16, 15328, 1133, 16, 15328, 9203, 16, 15328, 1830, 16, 15328, 6029, 16, 1...
def __init__(self, keyword, default=None):
"""Read-only parameter for display only.""" def __init__(self, keyword, default=None, help=''):
def __init__(self, keyword, default=None): self.keyword = keyword self.category = None if default is not None: self.default = default
1f6160b06a4444687324525ba5d4c2d9892fbf5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/1f6160b06a4444687324525ba5d4c2d9892fbf5c/userparams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3536, 1994, 17, 3700, 1569, 364, 2562, 1338, 12123, 1652, 1001, 2738, 972, 12, 2890, 16, 4932, 16, 805, 33, 7036, 16, 2809, 2218, 11, 4672, 365, 18, 11041, 273, 4932, 365, 18, 4743, 273, 599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3536, 1994, 17, 3700, 1569, 364, 2562, 1338, 12123, 1652, 1001, 2738, 972, 12, 2890, 16, 4932, 16, 805, 33, 7036, 16, 2809, 2218, 11, 4672, 365, 18, 11041, 273, 4932, 365, 18, 4743, 273, 599...
'../scons-out/docs/obj/documentation/html/jsdocs')
'../scons-out/docs/obj/documentation/reference/jsdocs')
def main(): """Builds the O3D API docs and externs and the o3djs docs.""" global _java_exe _java_exe = sys.argv[1] js_list_filename = MakePath('../samples/o3djs/js_list.scons') idl_list_filename = MakePath('../plugin/idl_list.scons') js_list_basepath = os.path.dirname(js_list_filename) idl_list_basepath = os.path.dirname(idl_list_filename) docs_js_outpath = MakePath('../scons-out/docs/obj/documentation/apijs') externs_js_outpath = MakePath('../scons-out/docs/obj/externs') o3d_docs_ezt_outpath = MakePath('../scons-out/docs/obj/documentation/html') o3d_docs_html_outpath = MakePath('../scons-out/docs/obj/local_html') o3djs_docs_ezt_outpath = MakePath( '../scons-out/docs/obj/documentation/html/jsdocs') o3djs_docs_html_outpath = MakePath( '../scons-out/docs/obj/local_html/jsdocs') o3d_externs_path = MakePath('../scons-out/docs/obj/o3d-externs.js') compiled_o3djs_outpath = MakePath( '../scons-out/docs/obj/documentation/base.js') externs_path = MakePath('externs/externs.js') o3d_extra_externs_path = MakePath('externs/o3d-extra-externs.js') Import(js_list_filename) Import(idl_list_filename) idl_files = AppendBasePath(idl_list_basepath, GlobalsDict['O3D_IDL_SOURCES']) o3djs_files = AppendBasePath(js_list_basepath, GlobalsDict['O3D_JS_SOURCES']) # we need to put base.js first? o3djs_files = ( filter(lambda x: x.endswith('base.js'), o3djs_files) + filter(lambda x: not x.endswith('base.js'), o3djs_files)) docs_js_files = [os.path.join( docs_js_outpath, os.path.splitext(os.path.basename(f))[0] + '.js') for f in GlobalsDict['O3D_IDL_SOURCES']] BuildJavaScriptForDocsFromIDLs(idl_files, docs_js_outpath) BuildO3DDocsFromJavaScript([o3d_extra_externs_path] + docs_js_files, o3d_docs_ezt_outpath, o3d_docs_html_outpath) BuildJavaScriptForExternsFromIDLs(idl_files, externs_js_outpath) BuildO3DExternsFile(externs_js_outpath, o3d_extra_externs_path, o3d_externs_path) BuildO3DJSDocs(o3djs_files + [o3d_externs_path], o3djs_docs_ezt_outpath, o3djs_docs_html_outpath) BuildCompiledO3DJS(o3djs_files, externs_path, o3d_externs_path, compiled_o3djs_outpath)
9d9f2f5d1a2c2c49b0ce17b27baaf2eca3663f36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/9d9f2f5d1a2c2c49b0ce17b27baaf2eca3663f36/build_docs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 7746, 326, 531, 23, 40, 1491, 3270, 471, 18885, 87, 471, 326, 320, 23, 72, 2924, 3270, 12123, 2552, 389, 6290, 67, 14880, 389, 6290, 67, 14880, 273, 2589, 18, 19485, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 3536, 7746, 326, 531, 23, 40, 1491, 3270, 471, 18885, 87, 471, 326, 320, 23, 72, 2924, 3270, 12123, 2552, 389, 6290, 67, 14880, 389, 6290, 67, 14880, 273, 2589, 18, 19485, ...
defs.update(user_defs)
self.defs.update(user_defs)
def __init__(self, main_section, filename, sane_config = 1, user_defs = {}): """Initialize Config and read from file.
08f012b3699e316af1a769f52a988c02039bdc35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14597/08f012b3699e316af1a769f52a988c02039bdc35/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2774, 67, 3464, 16, 1544, 16, 30426, 67, 1425, 273, 404, 16, 729, 67, 12537, 273, 2618, 4672, 3536, 7520, 1903, 471, 855, 628, 585, 18, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2774, 67, 3464, 16, 1544, 16, 30426, 67, 1425, 273, 404, 16, 729, 67, 12537, 273, 2618, 4672, 3536, 7520, 1903, 471, 855, 628, 585, 18, 2, -100, -100, ...
if self._Sources == None:
if self.Sources == None:
def _GetHeaderInfo(self): RecordList = self._Table.Query(MODEL_META_DATA_HEADER, Arch=self._Arch, Platform=self._Platform) for Record in RecordList: Name = Record[0] if Name in self: self[Name] = Record[1] elif Name == 'EFI_SPECIFICATION_VERSION': if self._Specification == None: self._Specification = sdict() self._Specification[Name] = Record[1] elif Name == 'EDK_RELEASE_VERSION': if self._Specification == None: self._Specification = sdict() self._Specification[Name] = Record[1] elif Name == 'LIBRARY_CLASS': if self._LibraryClass == None: self._LibraryClass = [] ValueList = GetSplitValueList(Record[1]) LibraryClass = ValueList[0] if len(ValueList) > 1: SupModuleList = GetSplitValueList(ValueList[1], ' ') else: SupModuleList = SUP_MODULE_LIST self._LibraryClass.append(LibraryClassObject(LibraryClass, SupModuleList)) elif Name == 'ENTRY_POINT': if self._ModuleEntryPointList == None: self._ModuleEntryPointList = [] self._ModuleEntryPointList.append(Record[1]) elif Name == 'UNLOAD_IMAGE': if self._ModuleUnloadImageList == None: self._ModuleUnloadImageList = [] if Record[1] == '': continue self._ModuleUnloadImageList.append(Record[1]) elif Name == 'CONSTRUCTOR': if self._ConstructorList == None: self._ConstructorList = [] if Record[1] == '': continue self._ConstructorList.append(Record[1]) elif Name == 'DESTRUCTOR': if self._DestructorList == None: self._DestructorList = [] if Record[1] == '': continue self._DestructorList.append(Record[1]) elif Name == TAB_INF_DEFINES_CUSTOM_MAKEFILE: TokenList = GetSplitValueList(Record[1]) self._CustomMakefile = {} if len(TokenList) < 2: self._CustomMakefile['MSFT'] = TokenList[0] self._CustomMakefile['GCC'] = TokenList[0] else: if TokenList[0] not in ['MSFT', 'GCC']: EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No supported family [%s]" % TokenList[0], File=self.DescFilePath, Line=Record[-1]) self._CustomMakefile[TokenList[0]] = TokenList[1] # # R8.x modules # if self._AutoGenVersion < 0x00010005: # _AutoGenVersion may be None, which is less than anything if self._ComponentType in self._MODULE_TYPE_: self._ModuleType = self._MODULE_TYPE_[self._ComponentType] if self._ComponentType == 'LIBRARY': self._LibraryClass = [LibraryClassObject(self._BaseName, SUP_MODULE_LIST)] # make use some [nmake] section macros RecordList = self._Table.Query(MODEL_META_DATA_NMAKE, Arch=self._Arch, Platform=self._Platform) for Name,Value,Dummy,Arch,Platform,ID,LineNo in RecordList: if Name == "IMAGE_ENTRY_POINT": if self._ModuleEntryPointList == None: self._ModuleEntryPointList = [] self._ModuleEntryPointList.append(Value) elif Name == "DPX_SOURCE": File = NormPath(Value, self._Macros) if not ValidFile(File, self._ModuleDir): EdkLogger.error('build', FILE_NOT_FOUND, ExtraData=File, File=self.DescFilePath, Line=LineNo) if self._Sources == None: self._Sources = [] self._Sources.append(ModuleSourceFileClass(File, "", "", "", "")) else: ToolList = self._NMAKE_FLAG_PATTERN_.findall(Name) if len(ToolList) == 0 or len(ToolList) != 1: EdkLogger.warn("build", "Don't know how to do with macro [%s]" % Name, File=self.DescFilePath, Line=LineNo) else: if self._BuildOptions == None: self._BuildOptions = sdict()
68a18e88ea19a2ac7e66563510a6ddd120753056 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/68a18e88ea19a2ac7e66563510a6ddd120753056/WorkspaceDatabase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 1864, 966, 12, 2890, 4672, 5059, 682, 273, 365, 6315, 1388, 18, 1138, 12, 17391, 67, 19294, 67, 4883, 67, 7557, 16, 16959, 33, 2890, 6315, 12269, 16, 11810, 33, 2890, 6315, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 967, 1864, 966, 12, 2890, 4672, 5059, 682, 273, 365, 6315, 1388, 18, 1138, 12, 17391, 67, 19294, 67, 4883, 67, 7557, 16, 16959, 33, 2890, 6315, 12269, 16, 11810, 33, 2890, 6315, 8...
bdb_vnum2 = cfunc('tcbdbvnum2', libtc, int, ('bdb', c_void_p, 1), ('kstr', c_char_p, 1))
bdb_vnum2 = cfunc_fast('tcbdbvnum2', libtc, int, ('bdb', c_void_p, 1), ('kstr', c_char_p, 1))
def __del__(self): if self and libtc: libtc.tcmapdel(self)
7118e16f0063ec4401b854e79c82ea20c50ca6c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4926/7118e16f0063ec4401b854e79c82ea20c50ca6c0/tc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 309, 365, 471, 2561, 5111, 30, 2561, 5111, 18, 5111, 1458, 3771, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 309, 365, 471, 2561, 5111, 30, 2561, 5111, 18, 5111, 1458, 3771, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def save_auth_tokens(token_dict, user):
def save_auth_tokens(token_dict, user=None):
def save_auth_tokens(token_dict, user): """Associates the tokens with the current user and writes to the datastore. If there us no current user, the tokens are not written and this function returns None. Returns: The key of the datastore entity containing the user's tokens, or None if there was no current user. """ if user is None: user = users.get_current_user() if user is None: return None memcache.set('gdata_pickled_tokens:%s' % user, pickle.dumps(token_dict)) user_tokens = TokenCollection.all().filter('user =', user).get() if user_tokens: user_tokens.pickled_tokens = pickle.dumps(token_dict) return user_tokens.put() else: user_tokens = TokenCollection( user=user, pickled_tokens=pickle.dumps(token_dict)) return user_tokens.put()
1d6d51f049357b5a4078588c354206cf2106748b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/1d6d51f049357b5a4078588c354206cf2106748b/appengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1944, 67, 7860, 12, 2316, 67, 1576, 16, 729, 33, 7036, 4672, 3536, 28469, 326, 2430, 598, 326, 783, 729, 471, 7262, 358, 326, 9290, 18, 225, 971, 1915, 584, 1158, 783, 729, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1944, 67, 7860, 12, 2316, 67, 1576, 16, 729, 33, 7036, 4672, 3536, 28469, 326, 2430, 598, 326, 783, 729, 471, 7262, 358, 326, 9290, 18, 225, 971, 1915, 584, 1158, 783, 729, ...
body = pm.Body(1e100, 1e100)
body = pm.Body(pm.inf, pm.inf)
def main(): pygame.init() screen = pygame.display.set_mode((600, 600)) clock = pygame.time.Clock() running = True ### Physics stuff pm.init_pymunk() space = pm.Space() space.gravity = Vec2d(0.0, -900.0) #space.resize_static_hash() #space.resize_active_hash() ## Balls balls = [] ### Mouse mouse_body = pm.Body(1e100, 1e100) mouse_shape = pm.Circle(mouse_body, 3, Vec2d(0,0)) mouse_shape.collision_type = COLLTYPE_MOUSE space.add(mouse_body, mouse_shape) space.add_collisionpair_func(COLLTYPE_MOUSE, COLLTYPE_DEFAULT, mouse_coll_func, ("hello", "world")) ### Static line line_point1 = None static_lines = [] run_physics = True while running: for event in pygame.event.get(): if event.type == QUIT: running = False elif event.type == KEYDOWN and event.key == K_ESCAPE: running = False elif event.type == MOUSEBUTTONDOWN and event.button == 1: p = event.pos[X], flipy(event.pos[Y]) body = pm.Body(10, 100) body.position = p shape = pm.Circle(body, 10, Vec2d(0,0)) shape.friction = 0.5 space.add(body, shape) balls.append(shape) elif event.type == MOUSEBUTTONDOWN and event.button == 3: if line_point1 is None: line_point1 = Vec2d(event.pos[X], flipy(event.pos[Y])) elif event.type == MOUSEBUTTONUP and event.button == 3: if line_point1 is not None: line_point2 = Vec2d(event.pos[X], flipy(event.pos[Y])) print line_point1, line_point2 body = pm.Body(1e100, 1e100) shape= pm.Segment(body, line_point1, line_point2, 0.0) shape.friction = 0.99 space.add_static(shape) static_lines.append(shape) line_point1 = None elif event.type == KEYDOWN and event.key == K_SPACE: run_physics = not run_physics p = pygame.mouse.get_pos() mouse_pos = Vec2d(p[X],flipy(p[Y])) mouse_body.position = mouse_pos if pygame.key.get_mods() & KMOD_SHIFT and pygame.mouse.get_pressed()[0]: body = pm.Body(10, 10) body.position = mouse_pos shape = pm.Circle(body, 10, Vec2d(0,0)) space.add(body, shape) balls.append(shape) ### Update physics if run_physics: dt = 1.0/60.0 for x in range(1): space.step(dt) ### Draw stuff screen.fill(THECOLORS["white"]) # Display some text font = pygame.font.Font(None, 16) text = """LMB: Create ball
d2174a58a1ddbeb2d82870eb3f74d9a31d341174 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8535/d2174a58a1ddbeb2d82870eb3f74d9a31d341174/demo_balls_and_lines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 2395, 13957, 18, 2738, 1435, 5518, 273, 2395, 13957, 18, 5417, 18, 542, 67, 3188, 12443, 28133, 16, 14707, 3719, 7268, 273, 2395, 13957, 18, 957, 18, 14027, 1435, 3549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13332, 225, 2395, 13957, 18, 2738, 1435, 5518, 273, 2395, 13957, 18, 5417, 18, 542, 67, 3188, 12443, 28133, 16, 14707, 3719, 7268, 273, 2395, 13957, 18, 957, 18, 14027, 1435, 3549, ...
self._validate(self.inventory)
self._validateParameters(self.inventory)
def _configure(self): """ Set members based on inventory. """ SpatialDB._configure(self) self._validate(self.inventory) self.gravityDir = self.inventory.gravityDir self.acceleration = self.inventory.acceleration return
e563405812ca5f8e6ed4510d26a73a2913860f32 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8643/e563405812ca5f8e6ed4510d26a73a2913860f32/GravityField.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14895, 12, 2890, 4672, 3536, 1000, 4833, 2511, 603, 13086, 18, 3536, 21874, 2290, 6315, 14895, 12, 2890, 13, 365, 6315, 5662, 2402, 12, 2890, 18, 26024, 13, 365, 18, 2752, 16438, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14895, 12, 2890, 4672, 3536, 1000, 4833, 2511, 603, 13086, 18, 3536, 21874, 2290, 6315, 14895, 12, 2890, 13, 365, 6315, 5662, 2402, 12, 2890, 18, 26024, 13, 365, 18, 2752, 16438, 16...
if k != 'ToD' and k != 'driver':
logging.debug("key = %s" % k) if k != 'ToD' and k != 'driver' and k != 'passengers':
def to_dict(self): res = {} for k in Ride._properties: ## special case ToD if k != 'ToD' and k != 'driver': res[k] = getattr(self,k) #eval('self.'+k) res['ToD'] = str(self.ToD) res['driver'] = self.driver.email() return res
57db3a24142204b68607377d1ef151cec83a015d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9768/57db3a24142204b68607377d1ef151cec83a015d/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1576, 12, 2890, 4672, 400, 273, 2618, 364, 417, 316, 534, 831, 6315, 4738, 30, 282, 7541, 4582, 648, 2974, 40, 2907, 18, 4148, 2932, 856, 273, 738, 87, 6, 738, 417, 13, 309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1576, 12, 2890, 4672, 400, 273, 2618, 364, 417, 316, 534, 831, 6315, 4738, 30, 282, 7541, 4582, 648, 2974, 40, 2907, 18, 4148, 2932, 856, 273, 738, 87, 6, 738, 417, 13, 309,...
Note ----
Notes -----
def amin(a, axis=None, out=None): """ Return the minimum along an axis. Parameters ---------- a : array_like Input data. axis : int, optional Axis along which to operate. By default a flattened input is used. out : ndarray, optional Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output. Returns ------- amin : ndarray A new array or a scalar with the result, or a reference to `out` if it was specified. Examples -------- >>> a = np.arange(4).reshape((2,2)) >>> a array([[0, 1], [2, 3]]) >>> np.amin(a) # Minimum of the flattened array 0 >>> np.amin(a, axis=0) # Minima along the first axis array([0, 1]) >>> np.amin(a, axis=1) # Minima along the second axis array([0, 2]) Note ---- NaN values are propagated, that is if at least one item is nan, the corresponding min value will be nan as well. To ignore NaN values (matlab behavior), please use nanmin. See Also -------- nanmin: nan values are ignored instead of being propagated fmin: same behavior as the C99 fmin function """ try: amin = a.min except AttributeError: return _wrapit(a, 'min', axis, out) return amin(axis, out)
b51762ef676ac8b0c2d6e0a4d75da988572c2383 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/b51762ef676ac8b0c2d6e0a4d75da988572c2383/fromnumeric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 1154, 12, 69, 16, 2654, 33, 7036, 16, 596, 33, 7036, 4672, 3536, 2000, 326, 5224, 7563, 392, 2654, 18, 225, 7012, 12181, 279, 294, 526, 67, 5625, 2741, 501, 18, 2654, 294, 509, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 279, 1154, 12, 69, 16, 2654, 33, 7036, 16, 596, 33, 7036, 4672, 3536, 2000, 326, 5224, 7563, 392, 2654, 18, 225, 7012, 12181, 279, 294, 526, 67, 5625, 2741, 501, 18, 2654, 294, 509, ...