rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
self.pos = self.pos + length return self.fp.read(length) | data = self.fp.read(length) self.pos = self.fp.tell() return data | def read(self, length = None): if self.pos >= self.stop: return '' remaining = self.stop - self.pos if length is None or length < 0: length = remaining elif length > remaining: length = remaining self.fp.seek(self.pos) self.pos = self.pos + length return self.fp.read(length) | 5e2f3fce2233c6cc5720814fb07fb30a4d661f14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5e2f3fce2233c6cc5720814fb07fb30a4d661f14/mailbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
769,
273,
599,
4672,
309,
365,
18,
917,
1545,
365,
18,
5681,
30,
327,
875,
4463,
273,
365,
18,
5681,
300,
365,
18,
917,
309,
769,
353,
599,
578,
769,
411,
374,
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,
855,
12,
2890,
16,
769,
273,
599,
4672,
309,
365,
18,
917,
1545,
365,
18,
5681,
30,
327,
875,
4463,
273,
365,
18,
5681,
300,
365,
18,
917,
309,
769,
353,
599,
578,
769,
411,
374,
3... |
if self._index > 3: diff2 = idx2name2len[self._index-1][name] - idx2name2len[self._index-2][name] diff3 = idx2name2len[self._index-2][name] - idx2name2len[self._index-3][name] | if (self._index > 3 and id in idx2id2len[self._index-2] and id in idx2id2len[self._index-3]): diff2 = idx2id2len[self._index-1][id] - idx2id2len[self._index-2][id] diff3 = idx2id2len[self._index-2][id] - idx2id2len[self._index-3][id] | def run(self): self._leakDetector._index2containerName2len[self._index] = {} self._leakDetector.notify.debug(repr(self._leakDetector._id2ref)) ids = self._leakDetector.getContainerIds() # record the current len of each container for id in ids: yield None try: container = self._leakDetector.getContainerById(id) except Exception, e: # this container no longer exists self.notify.debug('container %s no longer exists; caught exception in getContainerById (%s)' % (name, e)) self._leakDetector.removeContainerById(id) continue if container is None: # this container no longer exists self.notify.debug('container %s no longer exists; getContainerById returned None (%s)' % (name, e)) self._leakDetector.removeContainerById(id) continue cLen = len(container) name = self._leakDetector.getContainerNameById(id) self._leakDetector._index2containerName2len[self._index][name] = cLen # compare the current len of each container to past lens if self._index > 0: idx2name2len = self._leakDetector._index2containerName2len for name in idx2name2len[self._index]: yield None if name in idx2name2len[self._index-1]: diff = idx2name2len[self._index][name] - idx2name2len[self._index-1][name] if diff > 0: if diff > idx2name2len[self._index-1][name]: minutes = (self._leakDetector._index2delay[self._index] - self._leakDetector._index2delay[self._index-1]) / 60. self.notify.warning('container %s grew > 200%% in %s minutes' % (name, minutes)) if self._index > 3: diff2 = idx2name2len[self._index-1][name] - idx2name2len[self._index-2][name] diff3 = idx2name2len[self._index-2][name] - idx2name2len[self._index-3][name] if self._index <= 5: msg = ('%s consistently increased in length over the last 3 periods (currently %s items)' % (name, idx2name2len[self._index][name])) self.notify.warning(msg) else: # if size has consistently increased over the last 5 checks, send out a warning diff4 = idx2name2len[self._index-3][name] - idx2name2len[self._index-4][name] diff5 = idx2name2len[self._index-4][name] - idx2name2len[self._index-5][name] if diff > 0 and diff2 > 0 and diff3 > 0 and diff4 > 0 and diff5 > 0: msg = ('%s consistently increased in length over the last 5 periods (currently %s items), notifying system' % (name, idx2name2len[self._index][name])) self.notify.warning(msg) messenger.send(self._leakDetector.getLeakEvent(), [msg]) yield Job.Done | 88950518abcce43f6828c7e417218c4bdb6988d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/88950518abcce43f6828c7e417218c4bdb6988d8/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
6315,
298,
581,
12594,
6315,
1615,
22,
3782,
461,
22,
1897,
63,
2890,
6315,
1615,
65,
273,
2618,
365,
6315,
298,
581,
12594,
18,
12336,
18,
4148,
12,
12715,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
365,
6315,
298,
581,
12594,
6315,
1615,
22,
3782,
461,
22,
1897,
63,
2890,
6315,
1615,
65,
273,
2618,
365,
6315,
298,
581,
12594,
18,
12336,
18,
4148,
12,
12715,
... |
r""" A simple periodic sequence. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000035;a | def __init__(self): r""" | def _eval(self, n): return Integer(2*n) | 8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
14,
82,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
389,
8622,
12,
2890,
16,
290,
4672,
327,
2144,
12,
22,
14,
82,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return False | def login(self): if hasattr(self, 'rtm'): try: self.token = self.rtm.getToken() except: self.token = None if(self.getToken() == False): return False try: self.rtm = rtm.createRTM("2a440fdfe9d890c343c25a91afd84c7e",\ "ca078fee48d0bbfa", self.token) except: self.token = None return False utility.smartSaveToFile(self.config_dir, 'token', self.token) #NOTE: a timeline is an undo list for RTM. It can be used for # journaling(timeline rollback is atomical) self.timeline = self.rtm.timelines.create().timeline return True | a6bbccf54defa8f02cf00960e68e259c3eb24c61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7036/a6bbccf54defa8f02cf00960e68e259c3eb24c61/rtm_proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3925,
12,
2890,
4672,
309,
3859,
12,
2890,
16,
296,
3797,
81,
11,
4672,
775,
30,
365,
18,
2316,
273,
365,
18,
3797,
81,
18,
588,
1345,
1435,
1335,
30,
365,
18,
2316,
273,
599,
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,
3925,
12,
2890,
4672,
309,
3859,
12,
2890,
16,
296,
3797,
81,
11,
4672,
775,
30,
365,
18,
2316,
273,
365,
18,
3797,
81,
18,
588,
1345,
1435,
1335,
30,
365,
18,
2316,
273,
599,
309,
... | |
doc = self.__testMethodDoc | doc = self._testMethodDoc | def shortDescription(self): """Returns a one-line description of the test, or None if no description has been provided. | 81cdb4ebe1e8062168f44f12c80e0426344add31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/81cdb4ebe1e8062168f44f12c80e0426344add31/unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3025,
3291,
12,
2890,
4672,
3536,
1356,
279,
1245,
17,
1369,
2477,
434,
326,
1842,
16,
578,
599,
309,
1158,
2477,
711,
2118,
2112,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3025,
3291,
12,
2890,
4672,
3536,
1356,
279,
1245,
17,
1369,
2477,
434,
326,
1842,
16,
578,
599,
309,
1158,
2477,
711,
2118,
2112,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
QVariant(QString.fromUtf8(dbpath))).toString()) | QVariant(QString.fromUtf8(dbpath.encode('utf-8')))).toString()) | def read_settings(self): settings = Settings() settings.beginGroup("Main Window") geometry = settings.value('main window geometry', QVariant()).toByteArray() self.restoreGeometry(geometry) settings.endGroup() dbpath = os.path.join(os.path.expanduser(u'~'), u'library1.db').encode('utf-8') self.database_path = qstring_to_unicode(settings.value("database path", QVariant(QString.fromUtf8(dbpath))).toString()) set_sidebar_directories(None) set_filename_pat(qstring_to_unicode(settings.value('filename pattern', QVariant(get_filename_pat())).toString())) | 96b150089196c8d7e7f09256eede504a633a6ed5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/96b150089196c8d7e7f09256eede504a633a6ed5/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
4272,
12,
2890,
4672,
1947,
273,
8709,
1435,
1947,
18,
10086,
1114,
2932,
6376,
6076,
7923,
5316,
273,
1947,
18,
1132,
2668,
5254,
2742,
5316,
2187,
2238,
9356,
1435,
2934,
869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
4272,
12,
2890,
4672,
1947,
273,
8709,
1435,
1947,
18,
10086,
1114,
2932,
6376,
6076,
7923,
5316,
273,
1947,
18,
1132,
2668,
5254,
2742,
5316,
2187,
2238,
9356,
1435,
2934,
869,
... |
return False | return True | def __GetRegionLayout(self, fd): if not self.__GetHexNumber(): raise Warning("expected Region Offset At Line %d" % self.CurrentLineNumber) region = Region.region() region.Offset = self.__Token if not self.__IsToken( "|"): raise Warning("expected '|' At Line %d" % self.CurrentLineNumber) if not self.__GetHexNumber(): raise Warning("expected Region Size At Line %d" % self.CurrentLineNumber) region.Size = self.__Token if not self.__GetNextWord(): return False if not self.__Token in ("SET", "FV", "FILE", "DATA"): region.PcdOffset = self.__Token if not self.__IsToken( "|"): raise Warning("expected '|' At Line %d" % self.CurrentLineNumber) if not self.__GetNextWord(): raise Warning("expected Region PCD Size At Line %d" % self.CurrentLineNumber) region.PcdSize = self.__Token if not self.__GetNextWord(): return False | a83bd801068d42d6c1460cf15ea4f6626d50d403 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/a83bd801068d42d6c1460cf15ea4f6626d50d403/FdfParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
967,
5165,
3744,
12,
2890,
16,
5194,
4672,
309,
486,
365,
16186,
967,
7037,
1854,
13332,
1002,
9728,
2932,
3825,
9164,
9874,
2380,
5377,
738,
72,
6,
738,
365,
18,
3935,
31063,
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,
1001,
967,
5165,
3744,
12,
2890,
16,
5194,
4672,
309,
486,
365,
16186,
967,
7037,
1854,
13332,
1002,
9728,
2932,
3825,
9164,
9874,
2380,
5377,
738,
72,
6,
738,
365,
18,
3935,
31063,
13,
... |
for file in file_list: self.merge_file(file) | for f in file_list: self.merge_file(f) | def merge_files(self, file_list): for file in file_list: self.merge_file(file) | ffe3236b77f5bc67836d652a93444216bf220f36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/ffe3236b77f5bc67836d652a93444216bf220f36/OptionsClass.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
67,
2354,
12,
2890,
16,
585,
67,
1098,
4672,
364,
585,
316,
585,
67,
1098,
30,
365,
18,
2702,
67,
768,
12,
768,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
67,
2354,
12,
2890,
16,
585,
67,
1098,
4672,
364,
585,
316,
585,
67,
1098,
30,
365,
18,
2702,
67,
768,
12,
768,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
non-negative), such that ``a == U S Vh``, where ``S`` is the | non-negative), such that ``a == U.T S Vh.T``, where ``S`` is the | 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... |
for v in Version.select(Version.q.productID==category.product.id): s = '/%s' % (v.name) if path.find(s) != -1: | for v in Version.selectBy(product=category.product): s = '.*(^|/)%s(/|$).*' % (v.name) if re.compile(s).match(path): | def guess_ver_arch_from_path(category, path): arch = None for a in Arch.select(): if path.find(a.name) != -1: arch = a if path.find('SRPMS') != -1: arch = Arch.select(Arch.q.name=='source') ver = None for v in Version.select(Version.q.productID==category.product.id): s = '/%s' % (v.name) if path.find(s) != -1: ver = v return (ver, arch) | f1406ace1a0f410118e6afa6ba45613e21f641b6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13031/f1406ace1a0f410118e6afa6ba45613e21f641b6/initial.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7274,
67,
502,
67,
991,
67,
2080,
67,
803,
12,
4743,
16,
589,
4672,
6637,
273,
599,
364,
279,
316,
16959,
18,
4025,
13332,
309,
589,
18,
4720,
12,
69,
18,
529,
13,
480,
300,
21,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7274,
67,
502,
67,
991,
67,
2080,
67,
803,
12,
4743,
16,
589,
4672,
6637,
273,
599,
364,
279,
316,
16959,
18,
4025,
13332,
309,
589,
18,
4720,
12,
69,
18,
529,
13,
480,
300,
21,
30... |
except AttributeError: self.__gens = {} self.__regulator = {} | def regulator(self, use_database=True, verbose=None, proof=None): """ Returns the regulator of this curve, which must be defined over Q. | 85f3809214b6ec678e9b957ac6e313713a85da38 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/85f3809214b6ec678e9b957ac6e313713a85da38/ell_rational_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
960,
11775,
12,
2890,
16,
999,
67,
6231,
33,
5510,
16,
3988,
33,
7036,
16,
14601,
33,
7036,
4672,
3536,
2860,
326,
960,
11775,
434,
333,
8882,
16,
1492,
1297,
506,
2553,
1879,
2238,
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,
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,
960,
11775,
12,
2890,
16,
999,
67,
6231,
33,
5510,
16,
3988,
33,
7036,
16,
14601,
33,
7036,
4672,
3536,
2860,
326,
960,
11775,
434,
333,
8882,
16,
1492,
1297,
506,
2553,
1879,
2238,
18... | |
sb_frame2.pack(side = LEFT, fill = BOTH) | sb_frame2.pack(side=LEFT, fill=BOTH) | def build_status_bar(self): status_bar = self.status_bar canvas = self.canvas | 5bd05aab08ecc99debb8be46af1003105e4183ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/5bd05aab08ecc99debb8be46af1003105e4183ab/mainwindow.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
2327,
67,
3215,
12,
2890,
4672,
1267,
67,
3215,
273,
365,
18,
2327,
67,
3215,
5953,
273,
365,
18,
15424,
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,
1361,
67,
2327,
67,
3215,
12,
2890,
4672,
1267,
67,
3215,
273,
365,
18,
2327,
67,
3215,
5953,
273,
365,
18,
15424,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self._draw_geometry(glpane, color, highlighted = True) | self._draw_geometry(glpane, env.prefs[hoverHighlightingColor_prefs_key], highlighted = True) return | def draw_in_abs_coords(self, glpane, color): """ Draws the reference geometry with highlighting. """ self._draw_geometry(glpane, color, highlighted = True) | 68aed34a81ab1c88f85d79b44e3046e5db32b8a2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/68aed34a81ab1c88f85d79b44e3046e5db32b8a2/ReferenceGeometry.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
267,
67,
5113,
67,
9076,
12,
2890,
16,
5118,
29009,
16,
2036,
4672,
3536,
10184,
87,
326,
2114,
5316,
598,
8839,
310,
18,
3536,
365,
6315,
9446,
67,
14330,
12,
7043,
29009,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
67,
267,
67,
5113,
67,
9076,
12,
2890,
16,
5118,
29009,
16,
2036,
4672,
3536,
10184,
87,
326,
2114,
5316,
598,
8839,
310,
18,
3536,
365,
6315,
9446,
67,
14330,
12,
7043,
29009,
1... |
for name,f in self._unbound_fields: f = getattr(self.__class__, name, None) | for name, f in self._unbound_fields: | def __init__(self, formdata=None, obj=None, prefix='', idprefix='', **kwargs): if prefix: prefix += '_' self._idprefix = idprefix | c23ea158d607fe220af6490f5b9e1935f6a6a9b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8614/c23ea158d607fe220af6490f5b9e1935f6a6a9b6/form.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
30642,
33,
7036,
16,
1081,
33,
7036,
16,
1633,
2218,
2187,
612,
3239,
2218,
2187,
2826,
4333,
4672,
309,
1633,
30,
1633,
1011,
4427,
365,
6315,
350,
3239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
30642,
33,
7036,
16,
1081,
33,
7036,
16,
1633,
2218,
2187,
612,
3239,
2218,
2187,
2826,
4333,
4672,
309,
1633,
30,
1633,
1011,
4427,
365,
6315,
350,
3239,
... |
id = take(arange(len(coords)), order) | id = arange(len(coords))[order] | def plot(self): """Create a plot now. Does not respect the interval timer. | 1f2dd3935fed37f1cea965585c0c6d0971a3f5e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/1f2dd3935fed37f1cea965585c0c6d0971a3f5e5/primiplotter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
2890,
4672,
3536,
1684,
279,
3207,
2037,
18,
225,
9637,
486,
8762,
326,
3673,
5441,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
12,
2890,
4672,
3536,
1684,
279,
3207,
2037,
18,
225,
9637,
486,
8762,
326,
3673,
5441,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
setStuffColor(boardvbox.get_style().bg[ccalign.child.state]) | setStuffColor(dockAlign.get_style().bg[gtk.STATE_NORMAL]) | def setStuffColor (color): for boardvbox in notebooks["board"].get_children(): ccalign, boardcontrol = boardvbox.get_children() ccalign.child.modify_bg(ccalign.child.state, color) boardcontrol.view.modify_bg(boardcontrol.view.state, color) | 25aaf887991909b5219825b9198c03bd8187b010 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5339/25aaf887991909b5219825b9198c03bd8187b010/gamewidget.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
510,
3809,
2957,
261,
3266,
4672,
364,
11094,
90,
2147,
316,
4721,
12567,
9614,
3752,
6,
8009,
588,
67,
5906,
13332,
276,
771,
724,
16,
11094,
7098,
273,
11094,
90,
2147,
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,
444,
510,
3809,
2957,
261,
3266,
4672,
364,
11094,
90,
2147,
316,
4721,
12567,
9614,
3752,
6,
8009,
588,
67,
5906,
13332,
276,
771,
724,
16,
11094,
7098,
273,
11094,
90,
2147,
18,
588,
... |
read_and_call(uhandle, consumer.num_sequences, start='Number of Sequences') | attempt_read_and_call(uhandle, consumer.num_sequences, start='Number of Sequences') | def _scan_parameters(self, uhandle, consumer): # Matrix: BLOSUM62 # Gap Penalties: Existence: 11, Extension: 1 # Number of Hits to DB: 50604 # Number of Sequences: 1323 # Number of extensions: 1526 # Number of successful extensions: 6 # Number of sequences better than 10.0: 5 # Number of HSP's better than 10.0 without gapping: 5 # Number of HSP's successfully gapped in prelim test: 0 # Number of HSP's that attempted gapping in prelim test: 1 # Number of HSP's gapped (non-prelim): 5 # length of query: 140 # length of database: 223,339 # effective HSP length: 39 # effective length of query: 101 # effective length of database: 171,742 # effective search space: 17345942 # effective search space used: 17345942 # T: 11 # A: 40 # X1: 16 ( 7.4 bits) # X2: 38 (14.8 bits) # X3: 64 (24.9 bits) # S1: 41 (21.9 bits) # S2: 42 (20.8 bits) | 9cf337202ffcb7031dc68664b847a12547d05c07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/9cf337202ffcb7031dc68664b847a12547d05c07/NCBIStandalone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9871,
67,
3977,
12,
2890,
16,
582,
4110,
16,
4765,
4672,
468,
7298,
30,
605,
1502,
14020,
8898,
468,
611,
438,
453,
275,
2390,
606,
30,
22558,
802,
30,
4648,
16,
10021,
30,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9871,
67,
3977,
12,
2890,
16,
582,
4110,
16,
4765,
4672,
468,
7298,
30,
605,
1502,
14020,
8898,
468,
611,
438,
453,
275,
2390,
606,
30,
22558,
802,
30,
4648,
16,
10021,
30,
404,
... |
self.create_exe(arcname, fullname) | self.create_exe(arcname, fullname, self.bitmap) | def run (self): if (sys.platform != "win32" and (self.distribution.has_ext_modules() or self.distribution.has_c_libraries())): raise DistutilsPlatformError \ ("distribution contains extensions and/or C libraries; " "must be compiled on a Windows 32 platform") | 3ebf407c81a312e0550c5d87829d71a450ebe9aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3ebf407c81a312e0550c5d87829d71a450ebe9aa/bdist_wininst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
309,
261,
9499,
18,
9898,
480,
315,
8082,
1578,
6,
471,
261,
2890,
18,
16279,
18,
5332,
67,
408,
67,
6400,
1435,
578,
365,
18,
16279,
18,
5332,
67,
71,
67,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
309,
261,
9499,
18,
9898,
480,
315,
8082,
1578,
6,
471,
261,
2890,
18,
16279,
18,
5332,
67,
408,
67,
6400,
1435,
578,
365,
18,
16279,
18,
5332,
67,
71,
67,
314... |
m.setCoordinate(elem.name+'_%d' % n, coord) nodenames = [elem.name+'_%d' % n for n in corners] | model.setCoordinate(elename+'_%d' % n, coord) nodenames = [elename+'_%d' % n for n in corners] | def subdivideHex(model, elem, refinenodes): """subdivide a Hex8 element |elem| around the nodes |lnodes| remove |elem| from the model |model| and insert the subelements """ assert(elem.shape.name == 'Hex8') # swap the element corners depending on the refine node / edge swapcorners = [ [0, 1, 2, 3, 4, 5, 6, 7], # u 0 [1, 2, 3, 0, 5, 6, 7, 4], # u 1 [2, 3, 0, 1, 6, 7, 4, 5], # u 2 [3, 0, 1, 2, 7, 4, 5, 6], # u 3 [4, 7, 6, 5, 0, 3, 2, 1], # o 0 [5, 4, 7, 6, 1, 0, 3, 2], # o 1 [6, 5, 4, 7, 2, 1, 0, 3], # o 2 [7, 6, 5, 4, 3, 2, 1, 0], # o 3 [0, 4, 5, 1, 3, 7, 6, 2], # s 0 [1, 5, 6, 2, 0, 4, 7, 3], # s 1 [2, 6, 7, 3, 1, 5, 4, 0], # s 2 [7, 3, 0, 4, 6, 2, 1, 5], # s 3 ] # useful default value refinenode = 0 # one edge needs to be refined if len(refinenodes) == 1: corneridx = [[ 0, 1, 5, 4, 16, 17, 21, 20], [ 1, 3, 15, 5, 17, 51, 63, 21], [ 4, 5, 15, 12, 20, 21, 63, 60], [16, 17, 21, 20, 48, 51, 63, 60] ] import types if type(refinenodes) == types.ListType: refinenode = refinenodes[0] else: refinenode = refinenodes elif len(refinenodes) == 2: corneridx = [ [ 0, 1, 5, 4, 16, 17, 21, 20], [ 1, 2, 6, 5, 17, 18, 22, 21], [ 5, 6, 10, 9, 21, 22, 42, 41], [ 2, 3, 7, 6, 18, 19, 23, 22], [17, 18, 22, 21, 33, 34, 42, 41], [ 4, 5, 9, 12, 20, 21, 41, 60], [ 6, 7, 15, 10, 22, 23, 63, 42], [ 9, 10, 15, 12, 41, 42, 63, 60], [16, 17, 21, 20, 48, 33, 41, 60], [18, 19, 23, 22, 34, 51, 63, 42], [33, 34, 42, 41, 48, 51, 63, 60], ] edgeindex = { (0, 1): 0, (1, 2): 1, (2, 3): 2, (0, 3): 3, (4, 5): 5, (5, 6): 6, (6, 7): 7, (4, 7): 4, (0, 4): 8, (1, 5): 9, (2, 6): 10, (3, 7): 11 } refinenodes.sort() refinenode = edgeindex[tuple(refinenodes)] elif len(refinenodes) == 4: corneridx = [ [ 0, 1, 5, 4, 16, 17, 21, 20], [ 1, 2, 6, 5, 17, 18, 22, 21], [ 2, 3, 7, 6, 18, 19, 23, 22], [ 4, 5, 9, 8, 20, 21, 25, 24], [ 5, 6, 10, 9, 21, 22, 26, 25], [ 6, 7, 11, 10, 22, 23, 27, 26], [ 8, 9, 13, 12, 24, 25, 29, 28], [ 9, 10, 14, 13, 25, 26, 30, 29], [10, 11, 15, 14, 26, 27, 31, 30], [17, 18, 22, 21, 33, 34, 72, 71], [22, 23, 27, 26, 72, 39, 43, 73], [25, 26, 30, 29, 74, 73, 46, 45], [20, 21, 25, 24, 36, 71, 74, 40], [21, 22, 26, 25, 71, 72, 73, 74], [16, 17, 21, 20, 48, 33, 71, 36], [18, 19, 23, 22, 34, 51, 39, 72], [26, 27, 31, 30, 73, 43, 63, 46], [24, 25, 29, 28, 40, 74, 45, 60], [71, 72, 73, 74, 33, 34, 46, 45], [36, 71, 74, 40, 48, 33, 45, 60], [72, 39, 43, 73, 34, 51, 63, 46], [33, 34, 46, 45, 48, 51, 63, 60], ] edgeindex = { (0, 1, 2, 3): 0, # unten (4, 5, 6, 7): 5, # oben (0, 1, 4, 5): 8, # !!!!!!!! falsche Transfromation (1, 2, 6, 5): 9, # rechts (2, 3, 6, 7): 10, # hinten (0, 3, 4, 7): 11, # links } refinenodes.sort() refinenode = edgeindex[tuple(refinenodes)] elif len(refinenodes) == 8: corneridx = [ [ 0, 1, 5, 4, 16, 17, 21, 20], [ 1, 2, 6, 5, 17, 18, 22, 21], [ 2, 3, 7, 6, 18, 19, 23, 22], [ 4, 5, 9, 8, 20, 21, 25, 24], [ 5, 6, 10, 9, 21, 22, 26, 25], [ 6, 7, 11, 10, 22, 23, 27, 26], [ 8, 9, 13, 12, 24, 25, 29, 28], [ 9, 10, 14, 13, 25, 26, 30, 29], [10, 11, 15, 14, 26, 27, 31, 30], [16, 17, 21, 20, 32, 33, 37, 36], [17, 18, 22, 21, 33, 34, 38, 37], [18, 19, 23, 22, 34, 35, 39, 38], [20, 21, 25, 24, 36, 37, 41, 40], [21, 22, 26, 25, 37, 38, 42, 41], [22, 23, 27, 26, 38, 39, 43, 42], [24, 25, 29, 28, 40, 41, 45, 44], [25, 26, 30, 29, 41, 42, 46, 45], [26, 27, 31, 30, 42, 43, 47, 46], [32, 33, 37, 36, 48, 49, 53, 52], [33, 34, 38, 37, 49, 50, 54, 53], [34, 35, 39, 38, 50, 51, 55, 54], [36, 37, 41, 40, 52, 53, 57, 56], [37, 38, 42, 41, 53, 54, 58, 57], [38, 39, 43, 42, 54, 55, 59, 58], [40, 41, 45, 44, 56, 57, 61, 60], [41, 42, 46, 45, 57, 58, 62, 61], [42, 43, 47, 46, 58, 59, 63, 62], ] else: print 'not implemented, nonsense' pass # change the order of the corner nodes of the element according to the # refinement nodes # this is no problem since the element gets removed at the end e.nodes = [e.nodes[x] for x in swapcorners[refinenode]] e.nodcoord = [e.nodcoord[x] for x in swapcorners[refinenode]] # additional nodes on a 2.5th level, only for 4 node side if len(refinenodes) == 4: coord = elem.findGlobalCoord(N.array([1., 1., 1.5])/3.*2.-1.) m.setCoordinate(elem.name+'_71', coord) coord = elem.findGlobalCoord(N.array([2., 1., 1.5])/3.*2.-1.) m.setCoordinate(elem.name+'_72', coord) coord = elem.findGlobalCoord(N.array([2., 2., 1.5])/3.*2.-1.) m.setCoordinate(elem.name+'_73', coord) coord = elem.findGlobalCoord(N.array([1., 2., 1.5])/3.*2.-1.) m.setCoordinate(elem.name+'_74', coord) cornerlist = [0,3,15,12,48,51,63,60] for i, corners in enumerate(corneridx): for n in corners: if n < 64 and not n in cornerlist: lcoord = N.array((n%4, n//4 %4, n//16))/3.*2. -1. coord = elem.findGlobalCoord(lcoord) m.setCoordinate(elem.name+'_%d' % n, coord) nodenames = [elem.name+'_%d' % n for n in corners] # the order in the list is crucial! for n, nn in zip(elem.nodes, [elem.name+'_%d' % n for n in cornerlist]): try: nodenames[nodenames.index(nn)] = n except: pass m.setElement(elem.name + '_%s' % i, 'Hex8', nodenames) m.removeElement(e.name) | a06f60abf58eb66adcf5b72de6f94dfa2c242c77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2567/a06f60abf58eb66adcf5b72de6f94dfa2c242c77/Adaptive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25741,
831,
7037,
12,
2284,
16,
3659,
16,
25994,
275,
1145,
4672,
3536,
1717,
2892,
831,
279,
15734,
28,
930,
571,
10037,
96,
6740,
326,
2199,
571,
2370,
1145,
96,
1206,
571,
10037,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
25741,
831,
7037,
12,
2284,
16,
3659,
16,
25994,
275,
1145,
4672,
3536,
1717,
2892,
831,
279,
15734,
28,
930,
571,
10037,
96,
6740,
326,
2199,
571,
2370,
1145,
96,
1206,
571,
10037,
96,
... |
def wrap_paste_tls_with_corols(): """Paste uses threadlocals, in a module called paste.util.threadinglocal. If you are running Paste under an eventlet web server that uses greenlets instead of threads, you can use wrap_paste_tls_with_corols to replace the paste.util.threadinglocal.local class with one that uses the current greenlet id as the 'thread' id instead of the current thread. | try: import threading __original_threadlocal__ = threading.local except ImportError: pass def wrap_threading_local_with_coro_local(): """monkey patch threading.local with something that is greenlet aware. Since greenlets cannot cross threads, so this should be semantically identical to threadlocal.local | def wrap_paste_tls_with_corols(): """Paste uses threadlocals, in a module called paste.util.threadinglocal. If you are running Paste under an eventlet web server that uses greenlets instead of threads, you can use wrap_paste_tls_with_corols to replace the paste.util.threadinglocal.local class with one that uses the current greenlet id as the 'thread' id instead of the current thread. """ from eventlet import api from paste.util import threadinglocal def get_ident(): return id(api.getcurrent()) class local(object): def __init__(self): self.__dict__['__objs'] = {} def __getattr__(self, attr, g=get_ident): print "getattr", self, attr, g try: return self.__dict__['__objs'][g()][attr] except KeyError: raise AttributeError( "No variable %s defined for the thread %s" % (attr, g())) def __setattr__(self, attr, value, g=get_ident): self.__dict__['__objs'].setdefault(g(), {})[attr] = value def __delattr__(self, attr, g=get_ident): try: del self.__dict__['__objs'][g()][attr] except KeyError: raise AttributeError( "No variable %s defined for thread %s" % (attr, g())) threadinglocal.local = local | 1637ce726c16fd5c3e451e8950b527f888d29b82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/1637ce726c16fd5c3e451e8950b527f888d29b82/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
775,
30,
1930,
17254,
1001,
8830,
67,
5930,
3729,
972,
273,
17254,
18,
3729,
1335,
11308,
30,
1342,
282,
1652,
2193,
67,
5930,
310,
67,
3729,
67,
1918,
67,
3850,
83,
67,
3729,
13332,
3536,
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,
775,
30,
1930,
17254,
1001,
8830,
67,
5930,
3729,
972,
273,
17254,
18,
3729,
1335,
11308,
30,
1342,
282,
1652,
2193,
67,
5930,
310,
67,
3729,
67,
1918,
67,
3850,
83,
67,
3729,
13332,
3536,
2... |
print cf.sections() print "Has section 'Foo'?", cf.has_section("Foo") | verify(cf.sections() == [], "new ConfigParser should have no defined sections") verify(not cf.has_section("Foo"), "new ConfigParser should have no acknowledged sections") | def query_errors(): print print "Testing query interface..." cf = ConfigParser.ConfigParser() print cf.sections() print "Has section 'Foo'?", cf.has_section("Foo") try: cf.options("Foo") except ConfigParser.NoSectionError, e: print "Caught expected NoSectionError:", e else: print "Failed to catch expected NoSectionError from options()" try: cf.set("foo", "bar", "value") except ConfigParser.NoSectionError, e: print "Caught expected NoSectionError:", e else: print "Failed to catch expected NoSectionError from set()" expect_get_error(cf, ConfigParser.NoSectionError, "foo", "bar") cf.add_section("foo") expect_get_error(cf, ConfigParser.NoOptionError, "foo", "bar") | 3b4eacb6f09a74b34c9b912c4a532ce3c0bf8daa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3b4eacb6f09a74b34c9b912c4a532ce3c0bf8daa/test_cfgparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
67,
4324,
13332,
1172,
1172,
315,
22218,
843,
1560,
7070,
6080,
273,
25076,
18,
809,
2678,
1435,
3929,
12,
8522,
18,
11657,
1435,
422,
5378,
16,
315,
2704,
25076,
1410,
1240,
1158,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
843,
67,
4324,
13332,
1172,
1172,
315,
22218,
843,
1560,
7070,
6080,
273,
25076,
18,
809,
2678,
1435,
3929,
12,
8522,
18,
11657,
1435,
422,
5378,
16,
315,
2704,
25076,
1410,
1240,
1158,
... |
self.interval = interval | self.__interval = interval | def __init__(self, interval, function, *args, **kwargs): """ Create a PeriodicTimer that will repeatedly call function with arguments args and keyword arguments kwargs, after interval seconds have passed. """ threading.Thread.__init__(self) self.setDaemon(True) # Do not keep program running self.interval = interval self.function = function self.args = args self.kwargs = kwargs self.finished = threading.Event() self.__logger = logging.getLogger(__name__) | 9309008f769451c24a2114d1b377a0ccf8828835 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9837/9309008f769451c24a2114d1b377a0ccf8828835/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3673,
16,
445,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1788,
279,
12698,
335,
6777,
716,
903,
30412,
745,
445,
598,
1775,
833,
471,
4932,
1775,
1205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3673,
16,
445,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1788,
279,
12698,
335,
6777,
716,
903,
30412,
745,
445,
598,
1775,
833,
471,
4932,
1775,
1205,
... |
authorizer = Configuration.authAuthorizer if type(authorizer) == type(''): authorizer = Configuration.authAuthorizer = _getClass(authorizer)( *Configuration.authAuthorizerCtorArgs) | authorizer = getAuthorizer() | def checkAuthorization(conn, sessionDict): """ any, and sends a preemptive 401 response, if necessary. """ if not Configuration.authActivated: return DEBUG(AUTH, 'checking authorization') authorizer = Configuration.authAuthorizer if type(authorizer) == type(''): #if string, load module and replace authorizer = Configuration.authAuthorizer = _getClass(authorizer)( *Configuration.authAuthorizerCtorArgs) if not authorizer.checkCredentials(conn): DEBUG(AUTH, 'not authenticated') authorizer.authFailed(conn) else: DEBUG(AUTH, 'auth returned true') | 74b5e17bbe55b564adbea79cf8b931564949e786 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/74b5e17bbe55b564adbea79cf8b931564949e786/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
6063,
12,
4646,
16,
1339,
5014,
4672,
3536,
1281,
16,
471,
9573,
279,
675,
5744,
688,
14052,
766,
16,
309,
4573,
18,
3536,
309,
486,
4659,
18,
1944,
28724,
30,
327,
225,
6369,
12,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
6063,
12,
4646,
16,
1339,
5014,
4672,
3536,
1281,
16,
471,
9573,
279,
675,
5744,
688,
14052,
766,
16,
309,
4573,
18,
3536,
309,
486,
4659,
18,
1944,
28724,
30,
327,
225,
6369,
12,... |
self.username_editor.regexp = re.compile('^[a-z1-9][a-z0-9_.-]{1,65}[a-z0-9]$') | self.username_editor.regexp = re.compile('^[a-z1-9][a-z0-9_.-]{1,65}[a-z0-9]$', re.I | re.L) | def __init__(self, parent=None): super(AddAccountDialog, self).__init__(parent) with Resources.directory: self.setupUi(self) self.background_frame.setStyleSheet("") self.button_group = QButtonGroup(self) self.button_group.setObjectName("button_group") self.button_group.addButton(self.add_account_button, self.panel_view.indexOf(self.add_account_panel)) self.button_group.addButton(self.create_account_button, self.panel_view.indexOf(self.create_account_panel)) font = self.title_label.font() font.setPointSizeF(self.info_label.fontInfo().pointSizeF() + 3) font.setFamily("Sans Serif") self.title_label.setFont(font) font_metrics = self.create_status_label.fontMetrics() self.create_status_label.setMinimumHeight(font_metrics.height() + 2*(font_metrics.height() + font_metrics.leading())) # reserve space for 3 lines font_metrics = self.email_note_label.fontMetrics() self.email_note_label.setMinimumWidth(font_metrics.width(u'The E-mail address is used when sending voicemail')) # hack to make text justification look nice everywhere self.add_account_button.setChecked(True) self.panel_view.setCurrentWidget(self.add_account_panel) self.new_password_editor.textChanged.connect(self._SH_PasswordTextChanged) self.button_group.buttonClicked[int].connect(self._SH_PanelChangeRequest) self.accept_button.clicked.connect(self._SH_AcceptButtonClicked) self.display_name_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.name_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.username_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.sip_address_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.password_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.new_password_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.verify_password_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.email_address_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.display_name_editor.regexp = re.compile('^.*$') self.name_editor.regexp = re.compile('^.+$') self.username_editor.regexp = re.compile('^[a-z1-9][a-z0-9_.-]{1,65}[a-z0-9]$') self.sip_address_editor.regexp = re.compile('^[^@]+@.+$') self.password_editor.regexp = re.compile('^.*$') self.new_password_editor.regexp = re.compile('^.{8,}$') self.verify_password_editor.regexp = re.compile('^$') self.email_address_editor.regexp = re.compile('^[^@]+@.+$') | 510237d72cbe54f457ae240ae9f72c89afd1413f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3447/510237d72cbe54f457ae240ae9f72c89afd1413f/accounts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
4672,
2240,
12,
986,
3032,
6353,
16,
365,
2934,
972,
2738,
972,
12,
2938,
13,
598,
8128,
18,
5149,
30,
365,
18,
8401,
13943,
12,
2890,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
4672,
2240,
12,
986,
3032,
6353,
16,
365,
2934,
972,
2738,
972,
12,
2938,
13,
598,
8128,
18,
5149,
30,
365,
18,
8401,
13943,
12,
2890,
1... |
total_rating = 0 | total_rating = sum([ int(trip.rating) for trip in trips if trip.rating ]) | def calculate_rating_average(trips): total_rating = 0 rating = 0 for trip in trips: if trip.rating: total_rating += int(trip.rating) if len(trips): rating = int( (total_rating + 0.0) / len(trips) + 0.5 ) rating = { 'on': [ 1 for x in range(rating) ], 'off': [ 1 for x in range(5-rating) ], } return rating | a8f947240df38c3562a26ef57ab39c390fc88976 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9909/a8f947240df38c3562a26ef57ab39c390fc88976/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
67,
17326,
67,
15621,
12,
313,
7146,
4672,
2078,
67,
17326,
273,
2142,
3816,
509,
12,
25125,
18,
17326,
13,
364,
20654,
316,
433,
7146,
309,
20654,
18,
17326,
308,
13,
13953,
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,
4604,
67,
17326,
67,
15621,
12,
313,
7146,
4672,
2078,
67,
17326,
273,
2142,
3816,
509,
12,
25125,
18,
17326,
13,
364,
20654,
316,
433,
7146,
309,
20654,
18,
17326,
308,
13,
13953,
273,
... |
logStatusMsg( u"Unknown Error: %s" % unicode(m), 1, 0) | logStatusMsg( u"Unknown Error: %s" % unicodeC(m), 1, 0) | def main( ): global _runOnce getConfig(filename=configFile) if os.getcwd() != getConfig()['global']['workingDir'] or os.getcwd() != os.path.realpath( getConfig()['global']['workingDir'] ): os.chdir(getConfig()['global']['workingDir']) if isRunning() and os.name != 'nt': logStatusMsg('RSSDler is already running. exiting.', 1) raise SystemExit(1) logStatusMsg(u"writing daemonInfo", 5) try: codecs.open( os.path.join(getConfig()['global']['workingDir'], getConfig()['global']['daemonInfo']), 'w', 'utf-8').write(unicode(os.getpid())) except IOError, m: logStatusMsg( unicode(m) + os.linesep + u"Could not write to, or not set, daemonInfo", 1 ) sharedData = getSharedData() if not _runOnce: _runOnce = getConfig()['global']['runOnce'] while True: try: sharedData.scanning = True logStatusMsg( u"[Waking up] %s" % time.asctime() , 4) startTime = time.time() run() logStatusMsg( u"Processing took %d seconds" % (time.time() - startTime) , 4) except Warning, message: logStatusMsg( u"Warning: %s" % unicode(message), 1 ) except Fatal, message: logStatusMsg( u"Fatal: %s" % unicode(message), 1 ) sharedData.scanning = False getSaved().save() getSaved().unlock() raise SystemExit except Exception, m: logStatusMsg( u"Unknown Error: %s" % unicode(m), 1, 0) # to send this to logfile or not...? raise SystemExit sharedData.scanning = False if _runOnce: logStatusMsg( u"[Complete] %s" % time.asctime() , 4) break logStatusMsg( u"[Sleeping] %s" % time.asctime() , 4) elapsed = time.time() - getSaved().lastChecked #checkSleep has a 10 second resolution, let's sleep for 9, just to be on the safe side time.sleep(9) if getConfig()['global']['scanMins'] * 60 < time.time() - getSaved().lastChecked: checkSleep ( getConfig()['global']['scanMins'] * 60 - elapsed ) else: checkSleep( getConfig()['global']['scanMins'] * 60 ) | 15efa811c3a3c7e375db44557ec2cc39fdd58d98 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/15efa811c3a3c7e375db44557ec2cc39fdd58d98/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
262,
30,
2552,
389,
2681,
12212,
4367,
12,
3459,
33,
1425,
812,
13,
309,
1140,
18,
588,
11089,
1435,
480,
4367,
1435,
3292,
6347,
21712,
20478,
1621,
3546,
578,
1140,
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,
2774,
12,
262,
30,
2552,
389,
2681,
12212,
4367,
12,
3459,
33,
1425,
812,
13,
309,
1140,
18,
588,
11089,
1435,
480,
4367,
1435,
3292,
6347,
21712,
20478,
1621,
3546,
578,
1140,
18,
588,
... |
verify(l.__add__.__objclass__ is list) | if not is_jython: verify(l.__add__.__objclass__ is list) | def methodwrapper(): # <type 'method-wrapper'> did not support any reflection before 2.5 if verbose: print "Testing method-wrapper objects..." l = [] vereq(l.__add__, l.__add__) vereq(l.__add__, [].__add__) verify(l.__add__ != [5].__add__) verify(l.__add__ != l.__mul__) verify(l.__add__.__name__ == '__add__') verify(l.__add__.__self__ is l) verify(l.__add__.__objclass__ is list) vereq(l.__add__.__doc__, list.__add__.__doc__) try: hash(l.__add__) except TypeError: pass else: raise TestFailed("no TypeError from hash([].__add__)") t = () t += (7,) vereq(t.__add__, (7,).__add__) vereq(hash(t.__add__), hash((7,).__add__)) | 2a6d6662c013293f87a554bf7745031060d02e3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6753/2a6d6662c013293f87a554bf7745031060d02e3a/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
707,
8376,
13332,
468,
411,
723,
296,
2039,
17,
8376,
29256,
5061,
486,
2865,
1281,
5463,
1865,
576,
18,
25,
309,
3988,
30,
1172,
315,
22218,
707,
17,
8376,
2184,
7070,
225,
328,
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,
707,
8376,
13332,
468,
411,
723,
296,
2039,
17,
8376,
29256,
5061,
486,
2865,
1281,
5463,
1865,
576,
18,
25,
309,
3988,
30,
1172,
315,
22218,
707,
17,
8376,
2184,
7070,
225,
328,
273,
... |
waitingStatusList = ['Submitted','Ready','Scheduled','Waiting'] timeLimitToConsider = Time.toString( Time.dateTime() - Time.hour * self.am_getOption( "maxPilotWaitingHours") ) | waitingStatusList = ['Submitted', 'Ready', 'Scheduled', 'Waiting'] timeLimitToConsider = Time.toString( Time.dateTime() - Time.hour * self.am_getOption( "maxPilotWaitingHours" ) ) | def execute(self): """Main Agent code: 1.- Query TaskQueueDB for existing TQs 2.- Add their Priorities 3.- Submit pilots """ | 2167c40fe092d0205e599c452b700e4f2aaec45c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/2167c40fe092d0205e599c452b700e4f2aaec45c/TaskQueueDirector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
3536,
6376,
8669,
981,
30,
404,
18,
17,
2770,
3837,
3183,
2290,
364,
2062,
399,
53,
87,
576,
18,
17,
1436,
3675,
30326,
1961,
890,
18,
17,
17320,
24970,
6968,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6376,
8669,
981,
30,
404,
18,
17,
2770,
3837,
3183,
2290,
364,
2062,
399,
53,
87,
576,
18,
17,
1436,
3675,
30326,
1961,
890,
18,
17,
17320,
24970,
6968,
353... |
rule_name = '%s_%s' % (r['rule_name'], config_name) | rule_name = r['rule_name'] | def _GenerateNativeRules(p, rules, output_dir, config_name, c_data, spec, options): """Generate a native rules file. Arguments: p: the target project rules: the set of rules to include output_dir: the directory in which the project/gyp resides config_name: the configuration this is for c_data: the configuration dict spec: the project dict options: global generator options """ rules_filename = '%s_%s%s.rules' % (spec['target_name'], config_name, options.suffix) rules_file = MSVSToolFile.Writer(os.path.join(output_dir, rules_filename)) rules_file.Create('%s_%s' % (spec['target_name'], config_name)) # Add each rule. for r in rules: rule_name = '%s_%s' % (r['rule_name'], config_name) rule_ext = r['extension'] inputs = [_FixPath(i) for i in r.get('inputs', [])] outputs = [_FixPath(i) for i in r.get('outputs', [])] cmd = _PrepareAction(c_data, r, has_input_path=True) rules_file.AddCustomBuildRule(name=rule_name, description=r.get('message', rule_name), extensions=[rule_ext], additional_dependencies=inputs, outputs=outputs, cmd=cmd) # Write out rules file. rules_file.Write() # Add rules file to project. p.AddToolFile(rules_filename) | e9705b6d08602d271d2d71150d616a2e30ebe9dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/e9705b6d08602d271d2d71150d616a2e30ebe9dc/msvs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4625,
9220,
4478,
12,
84,
16,
2931,
16,
876,
67,
1214,
16,
642,
67,
529,
16,
276,
67,
892,
16,
857,
16,
702,
4672,
3536,
4625,
279,
6448,
2931,
585,
18,
225,
13599,
30,
293,
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,
389,
4625,
9220,
4478,
12,
84,
16,
2931,
16,
876,
67,
1214,
16,
642,
67,
529,
16,
276,
67,
892,
16,
857,
16,
702,
4672,
3536,
4625,
279,
6448,
2931,
585,
18,
225,
13599,
30,
293,
3... |
self._jmim.opt_dJ(JMI_DER_CPPAD, JMI_DER_DENSE_ROW_MAJOR, independent_variables, jac) | self._m.jmimodel.opt_dJ(pyjmi.JMI_DER_CPPAD, pyjmi.JMI_DER_DENSE_ROW_MAJOR, independent_variables, mask, jac) | def getCostJacobian(self, independent_variables, mask=None): """ Returns the jacobian for the cost function with respect to the independent variable independent_variable. @param independent_variable: A mask consisting of the independent variables (JMI_DER_X etc.) requested. @todo: independent_variable should not be a mask. It is not pythonesque. @return: The cost gradient/jacobian. """ assert self._jmim._n_z.value != 0 if mask is None: mask = N.ones(self._jmim._n_z.value, dtype=int) n_cols, n_nz = self._jmim.opt_dJ_dim(JMI_DER_CPPAD, JMI_DER_DENSE_ROW_MAJOR, independent_variables, mask) jac = N.zeros(n_nz, dtype=c_jmi_real_t) self._jmim.opt_dJ(JMI_DER_CPPAD, JMI_DER_DENSE_ROW_MAJOR, independent_variables, jac) return jac.reshape( (1, len(jac)) ) | 733964346bd705d3e3fa78795693f8a99289c936 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/733964346bd705d3e3fa78795693f8a99289c936/shooting.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
669,
46,
1077,
26968,
12,
2890,
16,
14807,
67,
7528,
16,
3066,
33,
7036,
4672,
3536,
2860,
326,
20138,
26968,
364,
326,
6991,
445,
598,
8762,
358,
326,
14807,
2190,
14807,
67,
6105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1927,
669,
46,
1077,
26968,
12,
2890,
16,
14807,
67,
7528,
16,
3066,
33,
7036,
4672,
3536,
2860,
326,
20138,
26968,
364,
326,
6991,
445,
598,
8762,
358,
326,
14807,
2190,
14807,
67,
6105... |
except KeyboardInterrupt: | except KeyboardInterrupt: | def main(self): i = 0 line = "" first_line = True | 645d25738befc536d100a12a0d39f00ae2dea2d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11578/645d25738befc536d100a12a0d39f00ae2dea2d6/repl.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
277,
273,
374,
980,
273,
1408,
1122,
67,
1369,
273,
1053,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2890,
4672,
277,
273,
374,
980,
273,
1408,
1122,
67,
1369,
273,
1053,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
node = get_existing_node(self.env, repos, path, rev) rev = repos.normalize_rev(rev) hidden_properties = [p.strip() for p in self.config.get('browser', 'hide_properties').split(',')] | if rev: rev = repos.normalize_rev(rev) rev_or_latest = rev or repos.youngest_rev node = get_existing_node(self.env, repos, path, rev_or_latest) hidden_properties = self.config.getlist('browser', 'hide_properties') | def process_request(self, req): path = req.args.get('path', '/') rev = req.args.get('rev') | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
589,
273,
1111,
18,
1968,
18,
588,
2668,
803,
2187,
2023,
13,
5588,
273,
1111,
18,
1968,
18,
588,
2668,
9083,
6134,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
12,
2890,
16,
1111,
4672,
589,
273,
1111,
18,
1968,
18,
588,
2668,
803,
2187,
2023,
13,
5588,
273,
1111,
18,
1968,
18,
588,
2668,
9083,
6134,
2,
-100,
-100,
-100,
-100,... |
"""A Startup that runs its target in the reactor thread as a callback""" | """ A Startup that runs its target in the reactor thread as a callback """ | def invokeTarget(self, target): """Run a target in a new RepositoryThread w/a new repository view""" thread = RepositoryThread( name=str(self.itsPath), target=target, args=(fork_item(self),) ) thread.setDaemon(True) # main thread can exit even if this one hasn't thread.start() | a4177140d86f97bf70e8b70ed3ab5654fb939104 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/a4177140d86f97bf70e8b70ed3ab5654fb939104/startup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4356,
2326,
12,
2890,
16,
1018,
4672,
3536,
1997,
279,
1018,
316,
279,
394,
6281,
3830,
341,
19,
69,
394,
3352,
1476,
8395,
2650,
273,
6281,
3830,
12,
508,
33,
701,
12,
2890,
18,
1282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4356,
2326,
12,
2890,
16,
1018,
4672,
3536,
1997,
279,
1018,
316,
279,
394,
6281,
3830,
341,
19,
69,
394,
3352,
1476,
8395,
2650,
273,
6281,
3830,
12,
508,
33,
701,
12,
2890,
18,
1282,... |
def backup_cvs_venkman(): """Backup (obsolete) Cvs checkout of Venkman. """ venkmanpath = os.path.join(topsrcdir, 'mozilla', 'extensions', 'venkman') if not os.path.exists(os.path.join(venkmanpath, 'CVS')): | def backup_cvs_extension(extensionName, extensionDir, extensionPath): """Backup (obsolete) cvs checkout of extensionName. """ if not os.path.exists(os.path.join(extensionPath, 'CVS')): | def backup_cvs_venkman(): """Backup (obsolete) Cvs checkout of Venkman. """ venkmanpath = os.path.join(topsrcdir, 'mozilla', 'extensions', 'venkman') # Do nothing if there is no Venkman cvs directory. if not os.path.exists(os.path.join(venkmanpath, 'CVS')): return venkmancvspath = venkmanpath + '-cvs' print "Moving venkman to venkman-cvs..." try: os.rename(venkmanpath, venkmancvspath) except: # Print the exception without its traceback. sys.excepthook(sys.exc_info()[0], sys.exc_info()[1], None) sys.exit("Error: Venkman directory renaming failed!") | ffe6fd8ce73d2006ebf656f80d3ff9a6a95d26a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11044/ffe6fd8ce73d2006ebf656f80d3ff9a6a95d26a1/client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
67,
71,
6904,
67,
3995,
79,
4728,
13332,
3536,
6248,
261,
10992,
19513,
13,
385,
6904,
13926,
434,
776,
13775,
4728,
18,
3536,
225,
331,
13775,
4728,
803,
273,
1140,
18,
803,
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,
5114,
67,
71,
6904,
67,
3995,
79,
4728,
13332,
3536,
6248,
261,
10992,
19513,
13,
385,
6904,
13926,
434,
776,
13775,
4728,
18,
3536,
225,
331,
13775,
4728,
803,
273,
1140,
18,
803,
18,
... |
elif data == u"<": self.stream.queue.append(data) self.tokenQueue.append({"type": "ParseError", "data": _("Unexpected < character. Expected = or end of tag.")}) self.emitCurrentToken() | def afterAttributeNameState(self): data = self.stream.char() if data in spaceCharacters: self.stream.charsUntil(spaceCharacters, True) elif data == u"=": self.state = self.states["beforeAttributeValue"] elif data == u">": self.emitCurrentToken() elif data in asciiLetters: self.currentToken["data"].append([data, ""]) self.state = self.states["attributeName"] elif data == u"/": self.processSolidusInTag() self.state = self.states["beforeAttributeName"] elif data == u"<": self.stream.queue.append(data) self.tokenQueue.append({"type": "ParseError", "data": _("Unexpected < character. Expected = or end of tag.")}) self.emitCurrentToken() elif data == EOF: self.tokenQueue.append({"type": "ParseError", "data": _("Unexpected end of file. Expected = or end of tag.")}) self.emitCurrentToken() else: self.currentToken["data"].append([data, ""]) self.state = self.states["attributeName"] return True | 6924dc890dff78531b2c2e567786f55af6118a94 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9368/6924dc890dff78531b2c2e567786f55af6118a94/tokenizer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1839,
19240,
1119,
12,
2890,
4672,
501,
273,
365,
18,
3256,
18,
3001,
1435,
309,
501,
316,
3476,
11600,
30,
365,
18,
3256,
18,
7549,
9716,
12,
2981,
11600,
16,
1053,
13,
1327,
501,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1839,
19240,
1119,
12,
2890,
4672,
501,
273,
365,
18,
3256,
18,
3001,
1435,
309,
501,
316,
3476,
11600,
30,
365,
18,
3256,
18,
7549,
9716,
12,
2981,
11600,
16,
1053,
13,
1327,
501,
422... | |
test_support.run_unittest(WinregTests) | test_support.run_unittest(LocalWinregTests, RemoteWinregTests, Win64WinregTests) | def test_main(): test_support.run_unittest(WinregTests) | e33fa887d39f026dadd8bcb182725c90f7d51ece /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/e33fa887d39f026dadd8bcb182725c90f7d51ece/test_winreg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1842,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
2042,
18049,
1574,
14650,
16,
6304,
18049,
1574,
14650,
16,
21628,
1105,
18049,
1574,
14650,
13,
225,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5254,
13332,
1842,
67,
13261,
18,
2681,
67,
4873,
3813,
12,
2042,
18049,
1574,
14650,
16,
6304,
18049,
1574,
14650,
16,
21628,
1105,
18049,
1574,
14650,
13,
225,
2,
-100,
-100,
... |
PATH = "%s/share/doc/specto/" % sys.prefix | PATH = "%s/share/" % PREFIX | def get_path(category=None): """ Return the correct path. """ if not os.path.exists('data') or not os.path.exists('spectlib'): if not category: PATH = "%s/share/specto/" % sys.prefix elif category=="doc": PATH = "%s/share/doc/specto/" % sys.prefix elif category=="src": PATH = os.path.dirname(os.path.abspath(__file__)) else: if not category: PATH =os.path.join(os.getcwd(), "data/") elif category=="doc": PATH = os.path.join(os.getcwd(), "data/doc/") elif category=="src": PATH = os.path.dirname(os.path.abspath(__file__)) if category == "specto": try: PATH = os.path.join(os.environ['XDG_CONFIG_HOME'], "specto") except KeyError: PATH = os.path.join(os.environ['HOME'], ".config", "specto") if not os.path.exists(PATH): os.makedirs(PATH) os.chmod(PATH, 0700) # Meet XDG spec if category == "tmp": try: PATH = os.path.join(os.environ['XDG_CACHE_HOME'], "specto") except KeyError: PATH = os.path.join(os.environ['HOME'], ".cache", "specto") if not os.path.exists(PATH): os.makedirs(PATH) os.chmod(PATH, 0700) # Meet XDG spec return PATH | cd6c3e3c9b4d25b6b93cb36f41ec74052d9ffe02 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10818/cd6c3e3c9b4d25b6b93cb36f41ec74052d9ffe02/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
803,
12,
4743,
33,
7036,
4672,
3536,
2000,
326,
3434,
589,
18,
3536,
309,
486,
1140,
18,
803,
18,
1808,
2668,
892,
6134,
578,
486,
1140,
18,
803,
18,
1808,
2668,
13234,
2941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
803,
12,
4743,
33,
7036,
4672,
3536,
2000,
326,
3434,
589,
18,
3536,
309,
486,
1140,
18,
803,
18,
1808,
2668,
892,
6134,
578,
486,
1140,
18,
803,
18,
1808,
2668,
13234,
2941,
... |
cmd = "cd %s; tar cvjf %s %s/*" | cmd = "tar cvjf %s %s/*" % (tarred_test_path, test_path) | def extract(vm, remote_path, dest_dir="."): """ Extract a .tar.bz2 file on the guest. | 9a0ed8a302f92cd95aef5e2febbdd589f45c65ce /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/9a0ed8a302f92cd95aef5e2febbdd589f45c65ce/autotest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
3489,
16,
2632,
67,
803,
16,
1570,
67,
1214,
1546,
1199,
4672,
3536,
8152,
279,
263,
11718,
18,
25292,
22,
585,
603,
326,
13051,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
12,
3489,
16,
2632,
67,
803,
16,
1570,
67,
1214,
1546,
1199,
4672,
3536,
8152,
279,
263,
11718,
18,
25292,
22,
585,
603,
326,
13051,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
for invitorMembership in GroupMember.objects.filter(group = group, student = invitor): newGroupMember = GroupMember(group = group, student = member, \ activity = invitorMembership.activity, confirmed = False) newGroupMember.save() | for invitorMembership in GroupMember.objects.filter(group = group, student = invitor): newGroupMember = GroupMember(group = group, student = member, \ activity = invitorMembership.activity, confirmed = False) newGroupMember.save() | def invite(request, course_slug, group_slug): #TODO need to validate the student who is invited, cannot be the invitor him/herself. course = get_object_or_404(CourseOffering, slug = course_slug) group = get_object_or_404(Group, courseoffering = course, slug = group_slug) person = get_object_or_404(Person, userid = request.user.username) invitor = get_object_or_404(Member, person = person, offering=course) error_info=None from django import forms class StudentReceiverForm(forms.Form): name = forms.CharField() if request.method == "POST": student_receiver_form = StudentReceiverForm(request.POST) #student_receiver_form.activate_addform_validation(course_slug,group_slug) if student_receiver_form.is_valid(): name = student_receiver_form.cleaned_data['name'] newPerson = get_object_or_404(Person, userid=name) member = Member.objects.get(person = newPerson, offering = course) if GroupMember.objects.filter(student=member,group=group): error_info="Student %s has already exists" % (newPerson) else: #member = Member.objects.get(person = newPerson, offering = course) for invitorMembership in GroupMember.objects.filter(group = group, student = invitor): newGroupMember = GroupMember(group = group, student = member, \ activity = invitorMembership.activity, confirmed = False) newGroupMember.save() if error_info: messages.add_message(request, messages.ERROR, error_info) else: messages.add_message(request, messages.SUCCESS, 'Your invitation to "%s" has been sent out.' % (newPerson)) return HttpResponseRedirect(reverse('groups.views.groupmanage', kwargs={'course_slug': course_slug})) else: student_receiver_form = StudentReceiverForm() context = {'course': course, 'form': student_receiver_form} return render_to_response("groups/invite.html", context, context_instance=RequestContext(request)) | c3cbed79270c9decab13a0e384f9d2869215775b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6634/c3cbed79270c9decab13a0e384f9d2869215775b/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19035,
12,
2293,
16,
4362,
67,
6436,
16,
1041,
67,
6436,
4672,
225,
468,
6241,
1608,
358,
1954,
326,
18110,
10354,
353,
2198,
16261,
16,
2780,
506,
326,
2198,
1811,
366,
381,
19,
76,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19035,
12,
2293,
16,
4362,
67,
6436,
16,
1041,
67,
6436,
4672,
225,
468,
6241,
1608,
358,
1954,
326,
18110,
10354,
353,
2198,
16261,
16,
2780,
506,
326,
2198,
1811,
366,
381,
19,
76,
4... |
return DELETE_DASHBOARD | for collection in memberItem.collections or []: if collection in pim_ns.mine.sources: return DELETE_DASHBOARD | def GetItemRemovalState(selectedCollection, item, view): """ Determine how an item that's supposed to be removed ought to be handled. It may be simply removed, or its collection membership may indicate that it should be deleted, or it could be treated as read-only. """ app_ns = schema.ns('osaf.app', view) pim_ns = schema.ns('osaf.pim', view) allCollection = pim_ns.allCollection sidebarCollections = app_ns.sidebarCollection readonlyCollections = [col for col in sidebarCollections if sharing.isReadOnly(col)] # you can always remove from the trash if selectedCollection is pim_ns.trashCollection: return REMOVE_NORMAL elif selectedCollection in readonlyCollections: return READ_ONLY_SELECTED else: memberItem = getProxy(u'ui', item).getMembershipItem() if selectedCollection is allCollection: # Items in the dashboard can't be removed, they're always deleted if GetReadOnlyCollection(item, view) is None: return DELETE_DASHBOARD else: return IN_READ_ONLY_COLLECTION else: if len(memberItem.appearsIn) > 1: return REMOVE_NORMAL else: return DELETE_LAST | 6e8c2002eb74d9d92f642eb7deff631c2c664a97 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/6e8c2002eb74d9d92f642eb7deff631c2c664a97/DeleteDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1180,
24543,
1119,
12,
8109,
2532,
16,
761,
16,
1476,
4672,
3536,
10229,
3661,
392,
761,
716,
1807,
18405,
358,
506,
3723,
320,
9540,
358,
506,
7681,
18,
225,
2597,
2026,
506,
8616,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1180,
24543,
1119,
12,
8109,
2532,
16,
761,
16,
1476,
4672,
3536,
10229,
3661,
392,
761,
716,
1807,
18405,
358,
506,
3723,
320,
9540,
358,
506,
7681,
18,
225,
2597,
2026,
506,
8616,... |
if sys.platform == 'mac': _MWERKSDIR="Moes:Applications (Mac OS 9):Metrowerks CodeWarrior 7.0:Metrowerks CodeWarrior" else: _MWERKSDIR="/Volumes/Moes/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/" INCLUDEDIR=os.path.join(_MWERKSDIR, "MacOS Support", "Universal", "Interfaces", "CIncludes") | INCLUDEDIR="/Users/jack/src/Universal/Interfaces/CIncludes" | def _pardir(p): return os.path.split(p)[0] | 10d176f77e04ad95c3e501f8b65a0b9ad931a098 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/10d176f77e04ad95c3e501f8b65a0b9ad931a098/bgenlocations.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
84,
1060,
481,
12,
84,
4672,
327,
1140,
18,
803,
18,
4939,
12,
84,
25146,
20,
65,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
84,
1060,
481,
12,
84,
4672,
327,
1140,
18,
803,
18,
4939,
12,
84,
25146,
20,
65,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cursect = None | cursect = None | def __read(self, fp): """Parse a sectioned setup file. | 8203d9b3441c1cba254101518f985ee4667f50ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/8203d9b3441c1cba254101518f985ee4667f50ab/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
12,
2890,
16,
4253,
4672,
3536,
3201,
279,
2442,
329,
3875,
585,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
12,
2890,
16,
4253,
4672,
3536,
3201,
279,
2442,
329,
3875,
585,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
params['lestart'] = int(now.strftime("%Y-%m-%dT%H:%M:%SZ")) | params['lestart'] = int(now.strftime("%Y%m%d%H%M%S")) | def parseNewUserLog(self): #if __name__ != '__main__': # if self._checkQueue: # for nm in self._checkQueue: # yield userlib.User(self.site, nm) try: if config.use_api and self.site.versionnumber() >= 13: x = self.site.api_address() del x else: raise NotImplementedError except NotImplementedError: for x in self._parseNewUserLogOld(): yield x return params = { 'action':'query', 'list':'logevents', 'letype':'newusers', 'ledir':'older', 'leprop':'ids|type|user', 'lelimit':int(globalvar.queryLimit), } if globalvar.timeoffset != 0: now = self.site.server_time() - timedelta(minutes=globalvar.timeoffset) params['lestart'] = int(now.strftime("%Y-%m-%dT%H:%M:%SZ")) elif globalvar.offset != 0: params['lestart'] = globalvar.offset count = 0 wikipedia.output("Querying new user log from API....") while True: lev = query.GetData(params, self.site) for x in lev['query']['logevents']: someone_found = True count += 1 if not globalvar.welcomeAuto and x['action'] == 'autocreate': showStatus(3) wikipedia.output(u'%s has been created automatically.' % x['user']) continue if "userhidden" in x: continue yield userlib.User(self.site, x['user']) if count < globalvar.queryLimit and 'query-continue' in lev: params['lestart'] = lev['query-continue']['logevents']['lestart'] else: break if someone_found: showStatus(5) wikipedia.output(u'There is nobody to be welcomed...') else: wikipedia.output(u'\nLoaded all users...') | 10e39ce531c687b83bbc3bc61e3b5cca57f9bf45 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/10e39ce531c687b83bbc3bc61e3b5cca57f9bf45/welcome.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
1908,
1299,
1343,
12,
2890,
4672,
468,
430,
1001,
529,
972,
480,
4940,
5254,
972,
4278,
468,
565,
309,
365,
6315,
1893,
3183,
30,
468,
3639,
364,
8442,
316,
365,
6315,
1893,
3183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1908,
1299,
1343,
12,
2890,
4672,
468,
430,
1001,
529,
972,
480,
4940,
5254,
972,
4278,
468,
565,
309,
365,
6315,
1893,
3183,
30,
468,
3639,
364,
8442,
316,
365,
6315,
1893,
3183,
... |
>>> closer() | ... def _m235(): | 79d08acd5bd9202d73755c1c590660d0a80b44f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/79d08acd5bd9202d73755c1c590660d0a80b44f5/test_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
389,
81,
30803,
13332,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
377,
1652,
389,
81,
30803,
13332,
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,
-... | |
return True def on_configure_event(self, event): | def on_configure_event(self, widget, event): | def on_delete(self, widget, event): app.widgetapp.on_close() return True | 595b69edcbec83c178deedea413e843a471469fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/595b69edcbec83c178deedea413e843a471469fb/window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
3733,
12,
2890,
16,
3604,
16,
871,
4672,
595,
18,
6587,
2910,
18,
265,
67,
4412,
1435,
327,
1053,
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,
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,
603,
67,
3733,
12,
2890,
16,
3604,
16,
871,
4672,
595,
18,
6587,
2910,
18,
265,
67,
4412,
1435,
327,
1053,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
'trytond.modules.' + info['name'].lower(): info.get('xml', []), | 'trytond.modules.' + info['name'].lower(): info.get('xml', []) \ + info.get('translation', []), | def add_defaults(self): sdist.sdist.add_defaults(self) if self.distribution.has_pure_modules(): build_py = self.get_finalized_command('build_py') data = [] for package in build_py.packages: src_dir = build_py.get_package_dir(package) data.extend(build_py.find_data_files(package, src_dir)) self.filelist.extend(data) | c7d0c546124a528211230e060b81e25460f987b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9304/c7d0c546124a528211230e060b81e25460f987b2/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7606,
12,
2890,
4672,
272,
4413,
18,
87,
4413,
18,
1289,
67,
7606,
12,
2890,
13,
309,
365,
18,
16279,
18,
5332,
67,
84,
594,
67,
6400,
13332,
1361,
67,
2074,
273,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
7606,
12,
2890,
4672,
272,
4413,
18,
87,
4413,
18,
1289,
67,
7606,
12,
2890,
13,
309,
365,
18,
16279,
18,
5332,
67,
84,
594,
67,
6400,
13332,
1361,
67,
2074,
273,
365,
18,
... |
for s, v in L: for sign in "", "+", "-": | for s, v in test_conv_no_sign: for prefix in "", " ", "\t", " \t\t ": ss = prefix + s vv = v try: self.assertEqual(int(ss), vv) except v: pass for s, v in test_conv_sign: for sign in "+", "-": | def test_int(self): self.assertEqual(int(314), 314) self.assertEqual(int(3.14), 3) self.assertEqual(int(314), 314) # Check that conversion from float truncates towards zero self.assertEqual(int(-3.14), -3) self.assertEqual(int(3.9), 3) self.assertEqual(int(-3.9), -3) self.assertEqual(int(3.5), 3) self.assertEqual(int(-3.5), -3) # Different base: self.assertEqual(int("10",16), 16) # Test conversion from strings and various anomalies for s, v in L: for sign in "", "+", "-": for prefix in "", " ", "\t", " \t\t ": ss = prefix + sign + s vv = v if sign == "-" and v is not ValueError: vv = -v try: self.assertEqual(int(ss), vv) except v: pass | 734ff1fd2c90a0fc3017a7049fc5c83298ccba3a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/734ff1fd2c90a0fc3017a7049fc5c83298ccba3a/test_builtin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
474,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
474,
12,
23,
3461,
3631,
890,
3461,
13,
365,
18,
11231,
5812,
12,
474,
12,
23,
18,
3461,
3631,
890,
13,
365,
18,
11231,
5812,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
474,
12,
2890,
4672,
365,
18,
11231,
5812,
12,
474,
12,
23,
3461,
3631,
890,
3461,
13,
365,
18,
11231,
5812,
12,
474,
12,
23,
18,
3461,
3631,
890,
13,
365,
18,
11231,
5812,... |
if is_base2(range) and is_base2(upper) and range > 4: if range == 2: | if is_base2(rng) and is_base2(upper) and rng > 4: if rng == 2: | def auto_ticks(data_bounds, bounds_info = default_bounds): """ Find locations for axis tick marks. Calculate the location for tick marks on an axis. data_bounds is a sequence of 2 numbers specifying the maximum and minimum values of the data along this axis. bounds_info is a sequence of 3 values that specify how the axis end points and tick interval are calculated. An array of tick mark locations is returned from the function. The first and last tick entries are the axis end points. data_bounds -- (lower,upper). The maximum and minimum values of the data long this axis. If any of the settings in bounds_info are 'auto' or 'fit', the axis properties are calculated automatically from these settings. bounds_info -- (lower,upper,interval). Each entry can either be a numerical value or a string. If a number,the axis property is set to that value. If the entry is 'auto', the property is calculated automatically. lower and upper can also be 'fit' in which case the axis end points are set equal to the values in data_bounds. """ # pretty ugly code... # man, this needs some testing. if is_number(bounds_info[0]): lower = bounds_info[0] else: lower = data_bounds[0] if is_number(bounds_info[1]): upper = bounds_info[1] else: upper = data_bounds[1] interval = bounds_info[2] #print 'raw interval:', interval if interval in ['linear','auto']: range = abs(upper - lower) if range == 0.: # anything more intelligent to do here? interval = .5 lower,upper = data_bounds + array((-.5,.5)) if is_base2(range) and is_base2(upper) and range > 4: if range == 2: interval = 1 elif range == 4: interval = 4 else: interval = range / 4 # maybe we want it 8 else: interval = auto_interval((lower,upper)) elif type(interval) in [type(0.0),type(0)]: pass else: #print 'interval: ', interval raise ValueError, interval + " is an unknown value for interval: " \ " expects 'auto' or 'linear', or a number" # If the lower or upper bound are set to 'auto', # calculate them based on the newly chosen interval. #print 'interval:', interval auto_lower,auto_upper = auto_bounds(data_bounds,interval) # if the lower and upper bound span 0, make sure ticks # will hit exactly on zero. if lower < 0 and upper > 0: hi_ticks = arange(0,auto_upper+interval,interval) low_ticks = - arange(interval,-auto_lower+interval,interval) ticks = concatenate((low_ticks[::-1],hi_ticks)) else: # othersize the ticks start and end on the lower and # upper values. ticks = arange(auto_lower,auto_upper+interval,interval) if bounds_info[0] == 'fit': ticks[0] = lower if bounds_info[1] == 'fit': ticks[-1] = upper return ticks | 35ea2c2d87fbbfafca1db7236ceb79a8d525d834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/35ea2c2d87fbbfafca1db7236ceb79a8d525d834/plot_utility.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3656,
67,
11767,
12,
892,
67,
10576,
16,
4972,
67,
1376,
273,
805,
67,
10576,
4672,
3536,
4163,
7838,
364,
2654,
4024,
13999,
18,
225,
9029,
326,
2117,
364,
4024,
13999,
603,
392,
2654,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3656,
67,
11767,
12,
892,
67,
10576,
16,
4972,
67,
1376,
273,
805,
67,
10576,
4672,
3536,
4163,
7838,
364,
2654,
4024,
13999,
18,
225,
9029,
326,
2117,
364,
4024,
13999,
603,
392,
2654,
... |
security.declareProtected(ManageGroups, 'searchGroups') | def getGroupById(self, group_id): group = self.acl_users.getGroup(group_id) if group is not None: group = self.wrapGroup(group) return group | dcc106a45b46f83ccf9c0b93271d31df765dfc3e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12230/dcc106a45b46f83ccf9c0b93271d31df765dfc3e/groups.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11751,
5132,
12,
2890,
16,
1041,
67,
350,
4672,
1041,
273,
365,
18,
10150,
67,
5577,
18,
588,
1114,
12,
1655,
67,
350,
13,
309,
1041,
353,
486,
599,
30,
1041,
273,
365,
18,
4113,
111... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11751,
5132,
12,
2890,
16,
1041,
67,
350,
4672,
1041,
273,
365,
18,
10150,
67,
5577,
18,
588,
1114,
12,
1655,
67,
350,
13,
309,
1041,
353,
486,
599,
30,
1041,
273,
365,
18,
4113,
111... | |
clam.add_subtask("Functional Tests", [ "cd %(sandbox)s/CLAM"%localDefinitions, "cd test", "scons test_data_path=%(sandbox)s/testdata clam_prefix=%(installPath)s"%localDefinitions, "cd FunctionalTests", | clam.add_subtask('Functional Tests', [ 'cd %(sandbox)s/CLAM'%localDefinitions, 'cd test', 'scons test_data_path=%(sandbox)s/testdata clam_prefix=%(installPath)s'%localDefinitions, 'cd FunctionalTests', | def set_qtdir_to_qt3(x) : os.environ['QTDIR']=localDefinitions['qt3dir'] | 45b134e97af928f2c496e6230f188f705de98e96 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1456/45b134e97af928f2c496e6230f188f705de98e96/clam_testfarm_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
23311,
1214,
67,
869,
67,
23311,
23,
12,
92,
13,
294,
1140,
18,
28684,
3292,
53,
56,
4537,
3546,
33,
3729,
7130,
3292,
23311,
23,
1214,
3546,
225,
2,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
23311,
1214,
67,
869,
67,
23311,
23,
12,
92,
13,
294,
1140,
18,
28684,
3292,
53,
56,
4537,
3546,
33,
3729,
7130,
3292,
23311,
23,
1214,
3546,
225,
2,
-100,
-100,
-100,
-100,
... |
<tr><th class="navbar" align="center"> <p class="nomargin"> $self._prj_link$ </p></th></tr></table></th> | <tr><th class="navbar" align="center" >$self._prj_link.strip()$</th> </tr></table></th> | def callgraph_link(self, callgraph): if callgraph is None: return '' return ('<br /><span class="codelink"><a href="javascript: void(0);" ' 'onclick="toggleCallGraph(\'%s-div\');return false;">' 'call graph</a></span> ' % callgraph.uid) | 5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
4660,
67,
1232,
12,
2890,
16,
745,
4660,
4672,
309,
745,
4660,
353,
599,
30,
327,
875,
327,
7707,
32,
2848,
342,
4438,
3969,
667,
1546,
71,
1009,
754,
14050,
69,
3897,
1546,
11242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
745,
4660,
67,
1232,
12,
2890,
16,
745,
4660,
4672,
309,
745,
4660,
353,
599,
30,
327,
875,
327,
7707,
32,
2848,
342,
4438,
3969,
667,
1546,
71,
1009,
754,
14050,
69,
3897,
1546,
11242... |
service.stopService() | return service.stopService() else: return None | def removeService(self, service): if service.name: del self.namedServices[service.name] self.services.remove(service) if self.running: service.stopService() | 1df6bc7fc0bc1c3e319634e02cec46e16325eddb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/1df6bc7fc0bc1c3e319634e02cec46e16325eddb/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
1179,
12,
2890,
16,
1156,
4672,
309,
1156,
18,
529,
30,
1464,
365,
18,
13188,
5676,
63,
3278,
18,
529,
65,
365,
18,
8387,
18,
4479,
12,
3278,
13,
309,
365,
18,
8704,
30,
1156,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1206,
1179,
12,
2890,
16,
1156,
4672,
309,
1156,
18,
529,
30,
1464,
365,
18,
13188,
5676,
63,
3278,
18,
529,
65,
365,
18,
8387,
18,
4479,
12,
3278,
13,
309,
365,
18,
8704,
30,
1156,
... |
expect(gc.collect(), 0, "boom") | expect(gc.collect(), 4, "boom") | def test_boom(): a = Boom() b = Boom() a.attr = b b.attr = a gc.collect() garbagelen = len(gc.garbage) del a, b # a<->b are in a trash cycle now. Collection will invoke Boom.__getattr__ # (to see whether a and b have __del__ methods), and __getattr__ deletes # the internal "attr" attributes as a side effect. That causes the # trash cycle to get reclaimed via refcounts falling to 0, thus mutating # the trash graph as a side effect of merely asking whether __del__ # exists. This used to (before 2.3b1) crash Python. expect(gc.collect(), 0, "boom") expect(len(gc.garbage), garbagelen, "boom") | f6b8045ca5262f0d83eea3a279828a3f136f167f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f6b8045ca5262f0d83eea3a279828a3f136f167f/test_gc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1075,
362,
13332,
279,
273,
605,
4252,
1435,
324,
273,
605,
4252,
1435,
279,
18,
1747,
273,
324,
324,
18,
1747,
273,
279,
225,
8859,
18,
14676,
1435,
314,
6779,
346,
292,
275... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1075,
362,
13332,
279,
273,
605,
4252,
1435,
324,
273,
605,
4252,
1435,
279,
18,
1747,
273,
324,
324,
18,
1747,
273,
279,
225,
8859,
18,
14676,
1435,
314,
6779,
346,
292,
275... |
else: | def openconn(desthost, destport,localip=None, localport=None,timeout=5.0): """ <Purpose> Opens a connection, returning a socket-like object <Arguments> desthost: The host to open communcations with destport: The port to use for communication localip (optional): The local ip to use for the communication localport (optional): The local port to use for communication (0 for a random port) timeout (optional): The maximum amount of time to wait to connect <Exceptions> As from socket.connect, etc. <Side Effects> None. <Returns> A socket-like object that can be used for communication. Use send, recv, and close just like you would an actual socket object in python. """ # Check that both localip and localport are given if either is specified if localip != None and localport == None or localport != None and localip == None: raise Exception("Localip and localport must be specified simultaneously.") # Set the default value of localip if not localip or localip == '0.0.0.0': localip = None else: # Check that the localip is valid if given if not is_valid_ip_address(localip): raise Exception("Local IP address is invalid.") # Assign the default value of localport if none is given. if localport == None: localport = 0 # Check the remote IP for validity if not is_valid_ip_address(desthost): raise Exception("Destination host IP address is invalid.") if not is_valid_network_port(destport): raise Exception("Destination port number must be an integer, between 1 and 65535.") # Allow the localport to be 0, which is the default. if not is_valid_network_port(localport, True): raise Exception("Local port number must be an integer, between 1 and 65535.") # Check that the timeout is a number, greater than 0 if not (type(timeout) == float or type(timeout) == int or type(timeout) == long) or timeout <= 0.0: raise Exception("Timeout parameter must be a numeric value greater than 0.") # Armon: Check if the specified local ip is allowed # this check only makes sense if the localip is specified if localip and not ip_is_allowed(localip): raise Exception, "IP '"+str(localip)+"' is not allowed." # If there is a preference, but no localip, then get one elif user_ip_interface_preferences and not localip: # Use whatever getmyip returns localip = getmyip() restrictions.assertisallowed('openconn',desthost,destport,localip,localport) # Get our start time starttime = nonportable.getruntime() # Armon: Check for any pre-existing sockets. If they are being closed, wait for them. # This will also serve to check if repy has a pre-existing socket open on this same tuple exists = True while exists and nonportable.getruntime() - starttime < timeout: # Update the status (exists, status) = nonportable.osAPI.existsOutgoingNetworkSocket(localip,localport,desthost,destport) if exists: # Check the socket state if "ESTABLISH" in status or "CLOSE_WAIT" in status: # Check if the socket is from this repy vessel handle = find_outgoing_tcp_commhandle(localip, localport, desthost, destport) message = "Network socket is in use by an external process!" if handle != None: message = " Duplicate handle exists with name: "+str(handle) raise Exception, message else: # Wait for socket cleanup time.sleep(RETRY_INTERVAL) else: # Check if a socket exists still and we timed out if exists: raise Exception, "Timed out checking for socket cleanup!" if localport: nanny.tattle_check('connport',localport) handle = idhelper.getuniqueid() nanny.tattle_add_item('outsockets',handle) try: s = get_real_socket(localip,localport) # add the socket to the comminfo table comminfo[handle] = {'type':'TCP','remotehost':None, 'remoteport':None,'localip':localip,'localport':localport,'socket':s, 'outgoing':True} except: # the socket wasn't passed to the user prog... nanny.tattle_remove_item('outsockets',handle) raise try: thissock = emulated_socket(handle) # We set a timeout before we connect. This allows us to timeout slow # connections... oldtimeout = comminfo[handle]['socket'].gettimeout() # Set the new timeout comminfo[handle]['socket'].settimeout(timeout) # Store exceptions until we exit the loop, default to timed out # in case we are given a very small timeout connect_exception = Exception("Connection timed out!") # Ignore errors and retry if we have not yet reached the timeout while nonportable.getruntime() - starttime < timeout: try: comminfo[handle]['socket'].connect((desthost,destport)) break except Exception,e: # Check if this is recoverable, only continue if it is if not is_recoverable_network_exception(e): raise else: # Store the exception connect_exception = e # Sleep a bit, avoid excessive iterations of the loop time.sleep(0.2) else: # Raise any exception that was raised if connect_exception != None: raise connect_exception comminfo[handle]['remotehost']=desthost comminfo[handle]['remoteport']=destport except: cleanup(handle) raise else: # and restore the old timeout... comminfo[handle]['socket'].settimeout(oldtimeout) return thissock | 86ad74d7f2a9e42e79c68ad230d00a596e6fabc6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/86ad74d7f2a9e42e79c68ad230d00a596e6fabc6/emulcomm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
4646,
12,
10488,
2564,
16,
1570,
655,
16,
3729,
625,
33,
7036,
16,
1191,
655,
33,
7036,
16,
4538,
33,
25,
18,
20,
4672,
3536,
411,
10262,
4150,
34,
6066,
773,
279,
1459,
16,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4646,
12,
10488,
2564,
16,
1570,
655,
16,
3729,
625,
33,
7036,
16,
1191,
655,
33,
7036,
16,
4538,
33,
25,
18,
20,
4672,
3536,
411,
10262,
4150,
34,
6066,
773,
279,
1459,
16,
57... | |
syslog("processing client "+peer":"+ignore+" with server "+currid+" ("+ip+":"+port+")") | syslog.syslog("mysql-proxy: processing client "+peer+":"+str(ignore)+" with server "+str(currid)+" ("+ip+":"+str(port)+")") | def process_client(sock, addr, ip, port): cont = 1 asock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) asock.connect((ip,port)) #sock.setblocking(0) #asock.setblocking(0) #try and except below wer placed for the use of #non-blocking sockets. this was just a test and should be removed #from the final version. while cont == 1: if os.fork() != 0: while cont == 1: try: msg = sock.recv(RECV_BUFF_SIZE) if msg == "": cont = 0 asock.send(msg) except: cont = 1 else: while cont == 1: try: msg = asock.recv(RECV_BUFF_SIZE) if msg == "": cont = 0 sock.send(msg) except: cont = 1 | 131ec486bb5b99c83023c78f469ad942cd791115 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/848/131ec486bb5b99c83023c78f469ad942cd791115/proxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2625,
12,
15031,
16,
3091,
16,
2359,
16,
1756,
4672,
466,
273,
404,
487,
975,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2625,
12,
15031,
16,
3091,
16,
2359,
16,
1756,
4672,
466,
273,
404,
487,
975,
273,
2987,
18,
7814,
12,
7814,
18,
6799,
67,
18819,
16,
2987,
18,
3584,
3507,
67,
13693,
13,
4... |
env['PYTHONPATH'] = pywebsocket_base + os.path.pathsep + env['PYTHONPATH'] | env['PYTHONPATH'] = (pywebsocket_base + os.path.pathsep + env.get('PYTHONPATH', '')) | def Start(self): if not self._webkit_tests: logging.info('No need to start PyWebSocket server.') return if self.IsRunning(): raise PyWebSocketNotStarted('PyWebSocket is already running.') | 1e7c64df25a5fd0d96d40455e10197ad34d0bbbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/1e7c64df25a5fd0d96d40455e10197ad34d0bbbe/websocket_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3603,
12,
2890,
4672,
309,
486,
365,
6315,
29319,
67,
16341,
30,
2907,
18,
1376,
2668,
2279,
1608,
358,
787,
4707,
19217,
1438,
1093,
13,
327,
309,
365,
18,
2520,
7051,
13332,
1002,
4707... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3603,
12,
2890,
4672,
309,
486,
365,
6315,
29319,
67,
16341,
30,
2907,
18,
1376,
2668,
2279,
1608,
358,
787,
4707,
19217,
1438,
1093,
13,
327,
309,
365,
18,
2520,
7051,
13332,
1002,
4707... |
args=(tlock1, 1, ev))) tthread2 = self._addThread(target=_Acquire, args=(tlock2, 1, ev)) tthread3 = self._addThread(target=_Acquire, args=(tlock3, 0, ev)) | args=(tlock1, 1, releaseev, ev))) acquireev.append(ev) ev = threading.Event() tthread2 = self._addThread(target=_Acquire, args=(tlock2, 1, releaseev, ev)) acquireev.append(ev) ev = threading.Event() tthread3 = self._addThread(target=_Acquire, args=(tlock3, 0, releaseev, ev)) acquireev.append(ev) for i in acquireev: i.wait() | def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | 73c25d355ee1a28e09c36d9af7d57886b180fe23 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/73c25d355ee1a28e09c36d9af7d57886b180fe23/ganeti.locking_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
27761,
12,
739,
16,
5116,
16,
2113,
4672,
2176,
18,
1077,
1039,
12,
11574,
33,
11574,
13,
775,
30,
2113,
18,
7048,
1435,
3095,
30,
2176,
18,
9340,
1435,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
27761,
12,
739,
16,
5116,
16,
2113,
4672,
2176,
18,
1077,
1039,
12,
11574,
33,
11574,
13,
775,
30,
2113,
18,
7048,
1435,
3095,
30,
2176,
18,
9340,
1435,
2,
-100,
-100,
-100,
-100,... |
def dcc_RESUME(self, user, channel, data): | def dcc_SEND_RESUME(self, user, channel, data): | def dcc_RESUME(self, user, channel, data): data = text.splitQuoted(data) if len(data) < 3: raise IRCBadMessage, "malformed DCC RESUME request: %r" % (data,) (filename, port, resumePos) = data[:3] self.dccDoResume(user, filename, port, resumePos) | e962a8bb8dcad31eea345dc001bf1c2a593d3f2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e962a8bb8dcad31eea345dc001bf1c2a593d3f2c/irc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
952,
67,
21675,
67,
862,
30590,
12,
2890,
16,
729,
16,
1904,
16,
501,
4672,
501,
273,
977,
18,
4939,
15919,
12,
892,
13,
309,
562,
12,
892,
13,
411,
890,
30,
1002,
467,
11529,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
952,
67,
21675,
67,
862,
30590,
12,
2890,
16,
729,
16,
1904,
16,
501,
4672,
501,
273,
977,
18,
4939,
15919,
12,
892,
13,
309,
562,
12,
892,
13,
411,
890,
30,
1002,
467,
11529,
... |
'en': u'UnNews talk', 'ja': u'UnNews talk', | def __init__(self): family.Family.__init__(self) self.name = 'uncyclopedia' | 5291e54d99c50e05679c62b06fbab03ab3f57e0d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/5291e54d99c50e05679c62b06fbab03ab3f57e0d/uncyclopedia_family.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
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,
6755,
18,
9203,
16186,
2738,
972,
12,
2890,
13,
365,
18,
529,
273,
296,
551,
93,
7550,
1845,
1155,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... | |
generator=None, icon=None, atom_id=None, link=None, logo=None, rights=None, subtitle=None, title=None, updated=None, entry=None, | generator=None, icon=None, atom_id=None, link=None, logo=None, rights=None, subtitle=None, title=None, updated=None, entry=None, | def __init__(self, author=None, category=None, contributor=None, generator=None, icon=None, atom_id=None, link=None, logo=None, rights=None, subtitle=None, title=None, updated=None, entry=None, total_results=None, start_index=None, items_per_page=None, interrupted=None, timezone=None, extension_elements=None, extension_attributes=None, text=None): gdata.BatchFeed.__init__(self, author=author, category=category, contributor=contributor, generator=generator, icon=icon, atom_id=atom_id, link=link, logo=logo, rights=rights, subtitle=subtitle, title=title, updated=updated, entry=entry, total_results=total_results, start_index=start_index, items_per_page=items_per_page, interrupted=interrupted, extension_elements=extension_elements, extension_attributes=extension_attributes, text=text) self.timezone = timezone | 6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6580/6a016768dbbd7d5ee9c62bcd2d2ce3bf7f6d1048/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2869,
33,
7036,
16,
3150,
33,
7036,
16,
31123,
33,
7036,
16,
4456,
33,
7036,
16,
4126,
33,
7036,
16,
3179,
67,
350,
33,
7036,
16,
1692,
33,
7036,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2869,
33,
7036,
16,
3150,
33,
7036,
16,
31123,
33,
7036,
16,
4456,
33,
7036,
16,
4126,
33,
7036,
16,
3179,
67,
350,
33,
7036,
16,
1692,
33,
7036,
16,
... |
print u'Attribut non trait\xe9 :', self.item_getting[0], " ", k, "=", attrs[k] | def matrix(a, b, c, d, e, f): return (a , b, c, d, e, f) | b0960edd4ee4dd41f5a02508b5bede9378e8a56b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/b0960edd4ee4dd41f5a02508b5bede9378e8a56b/anim.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3148,
12,
69,
16,
324,
16,
276,
16,
302,
16,
425,
16,
284,
4672,
327,
261,
69,
269,
324,
16,
276,
16,
302,
16,
425,
16,
284,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3148,
12,
69,
16,
324,
16,
276,
16,
302,
16,
425,
16,
284,
4672,
327,
261,
69,
269,
324,
16,
276,
16,
302,
16,
425,
16,
284,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
class HanDeDictBuilder(CEDICTFormatBuilder): """ Builds the HanDeDict dictionary. """ def filterSpacing(self, entry): """ Converts wrong spacing in readings of entries in HanDeDict. @type entry: tuple @param entry: a dictionary entry @rtype: tuple @return: the given entry with corrected spacing """ if type(entry) == type({}): headword = entry['HeadwordTraditional'] reading = entry['Reading'] else: headword, headwordSimplified, reading, translation = entry readingEntities = [] precedingIsNonReading = False for idx, entity in enumerate(reading.split(' ')): if idx < len(headword) and entity == headword[idx]: if not precedingIsNonReading: readingEntities.append(' ') precedingIsNonReading = True elif idx != 0: readingEntities.append(' ') precedingIsNonReading = False readingEntities.append(entity) reading = ''.join(readingEntities) if type(entry) == type({}): entry['Reading'] = reading return entry else: return [headword, headwordSimplified, reading, translation] PROVIDES = 'HanDeDict' FILE_NAMES = ['handedict-*.zip', 'handedict-*.tar.bz2', 'handedict.u8'] ENCODING = 'utf-8' FILTER = filterSpacing | class TimestampedCEDICTFormatBuilder(CEDICTFormatBuilder): """ Shared functionality for dictionaries whose file names include a timestamp. """ EXTRACT_TIMESTAMP = None """Regular expression to extract the timestamp from the file name.""" ARCHIVE_CONTENT_TEMPLATE = None """Path template to timestamped file inside archive.""" | def getArchiveContentName(self, filePath): return 'cedictgr.b5' | b4cbd2c90091af501cb52fb7e9a1f649f0e90bc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11128/b4cbd2c90091af501cb52fb7e9a1f649f0e90bc8/build.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7465,
1350,
461,
12,
2890,
16,
4612,
4672,
327,
296,
311,
1576,
3197,
18,
70,
25,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7465,
1350,
461,
12,
2890,
16,
4612,
4672,
327,
296,
311,
1576,
3197,
18,
70,
25,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A = sage.matrix.matrix_space.MatrixSpace(Q,len(v))(0) | A = sage.matrix.matrix_space.MatrixSpace(QQ, len(v))(0) | def trace_pairing(self, v): """ Returns the trace pairing on the elements of the list v. """ import sage.matrix.matrix_space A = sage.matrix.matrix_space.MatrixSpace(Q,len(v))(0) for i in range(len(v)): for j in range(i,len(v)): t = (v[i]*v[j]).trace() A[i,j] = t A[j,i] = t return A | 43f8843c72a7b540aa8c8372f583216476d11299 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/43f8843c72a7b540aa8c8372f583216476d11299/number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2606,
67,
6017,
310,
12,
2890,
16,
331,
4672,
3536,
2860,
326,
2606,
3082,
310,
603,
326,
2186,
434,
326,
666,
331,
18,
3536,
1930,
272,
410,
18,
5667,
18,
5667,
67,
2981,
432,
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,
2606,
67,
6017,
310,
12,
2890,
16,
331,
4672,
3536,
2860,
326,
2606,
3082,
310,
603,
326,
2186,
434,
326,
666,
331,
18,
3536,
1930,
272,
410,
18,
5667,
18,
5667,
67,
2981,
432,
273,
... |
len(nnames) <= len(instanceinfo[inst].all_nodes) | len(nnames) <= len(instanceinfo[inst].all_nodes) and compat.all(isinstance(s, (tuple, list)) and len(s) == 2 for s in statuses) | def _CollectDiskInfo(self, nodelist, node_image, instanceinfo): """Gets per-disk status information for all instances. | d41d07d42108f87b3b54b8611798820a1555b4bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/d41d07d42108f87b3b54b8611798820a1555b4bc/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10808,
6247,
966,
12,
2890,
16,
30068,
16,
756,
67,
2730,
16,
791,
1376,
4672,
3536,
3002,
1534,
17,
10863,
1267,
1779,
364,
777,
3884,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
10808,
6247,
966,
12,
2890,
16,
30068,
16,
756,
67,
2730,
16,
791,
1376,
4672,
3536,
3002,
1534,
17,
10863,
1267,
1779,
364,
777,
3884,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
extension_attributes=extension_attributes) | extension_attributes=extension_attributes, text=text) | def __init__(self, author=None, category=None, contributor=None, generator=None, icon=None, atom_id=None, link=None, logo=None, rights=None, subtitle=None, title=None, updated=None, entry=None, total_results=None, start_index=None, items_per_page=None, text=None, extension_elements=None, extension_attributes=None): gdata.GDataFeed.__init__(self, author=author, category=category, contributor=contributor, generator=generator, icon=icon, atom_id=atom_id, link=link, logo=logo, rights=rights, subtitle=subtitle, title=title, updated=updated, entry=entry, total_results=total_results, start_index=start_index, items_per_page=items_per_page, text=text, extension_elements=extension_elements, extension_attributes=extension_attributes) | 0ba6315ab8118b874d87e51c8f024bfc6f59e8a9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6580/0ba6315ab8118b874d87e51c8f024bfc6f59e8a9/gcalendar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2869,
33,
7036,
16,
3150,
33,
7036,
16,
31123,
33,
7036,
16,
4456,
33,
7036,
16,
4126,
33,
7036,
16,
3179,
67,
350,
33,
7036,
16,
1692,
33,
7036,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2869,
33,
7036,
16,
3150,
33,
7036,
16,
31123,
33,
7036,
16,
4456,
33,
7036,
16,
4126,
33,
7036,
16,
3179,
67,
350,
33,
7036,
16,
1692,
33,
7036,
16,
... |
return 1 | return 1 | def main(): from optparse import OptionParser parser = OptionParser(description = "Produce a patch file from a CMT project. " "The patch contains the changes with respect " "to the CVS repository, including new files " "that are present only locally. Run the script " "from the cmt directory of a package." ) parser.add_option("-x", "--exclude", action="append", type="string", metavar="PATTERN", dest="exclusions", help="Pattern to exclude new files from the patch") parser.add_option("-o", "--output", action="store", type="string", help="Name of the file to send the output to. Standard " "output is used if not specified") parser.add_option("-v", "--verbose", action="store_true", help="Print some progress information on standard error") parser.add_option("--debug", action="store_true", help="Print debug information on standard error") parser.set_defaults(exclusions = []) opts, args = parser.parse_args() if opts.debug: logging.basicConfig(level = logging.DEBUG) elif opts.verbose: logging.basicConfig(level = logging.INFO) # default exclusions opts.exclusions += [ "*.py[co]", "*.patch", "cmt/cleanup.*", "cmt/setup.*", "cmt/*.make", "cmt/Makefile", "cmt/*.nmake", "cmt/*.nmakesav", "cmt/NMake", "cmt/install.history", "cmt/build.*.log", "cmt/version.cmt", "genConf", "slc3_ia32_gcc323*", "slc4_ia32_gcc34*", "slc4_amd64_gcc34*", "slc4_amd64_gcc43*", "win32_vc71*", "i686-slc3-gcc323*", "i686-slc4-gcc34*", "i686-slc4-gcc41*", "x86_64-slc4-gcc34*", "x86_64-slc4-gcc41*", "i686-slc5-gcc43*", "x86_64-slc5-gcc43*", "x86_64-slc5-icc*", ] if "CMTCONFIG" in os.environ: opts.exclusions.append(os.environ["CMTCONFIG"]) # check if we are in the cmt directory before broadcasting if not (os.path.basename(os.getcwd()) == "cmt" and os.path.exists("requirements")): logging.error("This script must be executed from the cmt directory of a package.") return 1 pkgs = broadcast_packages() num_pkgs = len(pkgs) count = 0 patch = "" for name, path in pkgs: count += 1 logging.info("Processing %s from %s (%d/%d)", name, os.path.dirname(path), count, num_pkgs) patch += diff_pkg(name, path, opts.exclusions) if sys.platform.startswith("win"): # fix newlines chars patch = patch.replace("\r","") if opts.output: logging.info("Writing patch file %r", opts.output) open(opts.output,"w").write(patch) else: sys.stdout.write(patch) return 0 | 45993a34c5f74021aee867971469dbe2b823fad7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9140/45993a34c5f74021aee867971469dbe2b823fad7/make_patch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
628,
2153,
2670,
1930,
18862,
2082,
273,
18862,
12,
3384,
273,
315,
25884,
279,
4729,
585,
628,
279,
385,
6152,
1984,
18,
315,
315,
1986,
4729,
1914,
326,
3478,
598,
8762,
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,
2774,
13332,
628,
2153,
2670,
1930,
18862,
2082,
273,
18862,
12,
3384,
273,
315,
25884,
279,
4729,
585,
628,
279,
385,
6152,
1984,
18,
315,
315,
1986,
4729,
1914,
326,
3478,
598,
8762,
3... |
atts['height'] = int(im.size[1] * (float(atts['scale']) / 100)) | atts['height'] = im.size[1] | def visit_image(self, node): atts = node.attributes.copy() if atts.has_key('class'): del atts['class'] # prevent duplication with node attrs atts['src'] = atts['uri'] del atts['uri'] if atts.has_key('scale'): if Image and not (atts.has_key('width') and atts.has_key('height')): try: im = Image.open(str(atts['src'])) except (IOError, # Source image can't be found or opened UnicodeError): # PIL doesn't like Unicode paths. pass else: if not atts.has_key('width'): atts['width'] = int(im.size[0] * (float(atts['scale']) / 100)) if not atts.has_key('height'): atts['height'] = int(im.size[1] * (float(atts['scale']) / 100)) del im del atts['scale'] if not atts.has_key('alt'): atts['alt'] = atts['src'] if isinstance(node.parent, nodes.TextElement): self.context.append('') else: if atts.has_key('align'): self.body.append('<p align="%s">' % (self.attval(atts['align'],))) else: self.body.append('<p>') self.context.append('</p>\n') self.body.append(self.emptytag(node, 'img', '', **atts)) | 3e44153b18ec1bf918f7ea370acca10b4f3678ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/3e44153b18ec1bf918f7ea370acca10b4f3678ad/html4css1.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
15687,
273,
756,
18,
4350,
18,
3530,
1435,
309,
15687,
18,
5332,
67,
856,
2668,
1106,
11,
4672,
1464,
15687,
3292,
1106,
3546,
6647,
468,
5309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
15687,
273,
756,
18,
4350,
18,
3530,
1435,
309,
15687,
18,
5332,
67,
856,
2668,
1106,
11,
4672,
1464,
15687,
3292,
1106,
3546,
6647,
468,
5309,
... |
self.mocoeff[base:base+len(part)/10,i] = temp | self.mocoeffs[base:base+len(part)/10,i] = temp | def parse(self): """Extract information from the logfile.""" inputfile = open(self.filename,"r") for line in inputfile: if line[1:8]=="NAtoms=": | 47c8821cc88c71efe3af04aace14c00a4fd2b2e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/47c8821cc88c71efe3af04aace14c00a4fd2b2e5/g03parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
10837,
86,
7923,
364,
980,
316,
810,
768,
30,
225,
309,
980,
63,
21,
30,
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,
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,
1109,
12,
2890,
4672,
3536,
4976,
1779,
628,
326,
15204,
12123,
810,
768,
273,
1696,
12,
2890,
18,
3459,
10837,
86,
7923,
364,
980,
316,
810,
768,
30,
225,
309,
980,
63,
21,
30,
28,
... |
bos=self.BOSClass(self.username,self.cookie) if self.deferred: self.deferred.callback(bos) reactor.clientTCP(server,int(port),bos) | c = protocol.ClientCreator(reactor, self.BOSClass, self.username, self.cookie) d = c.connectTCP(server, int(port)) d.addErrback(lambda x: log.msg("Connection Failed! Reason: %s" % x)) d.chainDeferred(self.deferred) | def oscar_Cookie(self,data): snac=readSNAC(data[1]) if self.icq: i=snac[5].find("\000") snac[5]=snac[5][i:] tlvs=readTLVs(snac[5]) if tlvs.has_key(6): self.cookie=tlvs[6] server,port=string.split(tlvs[5],":") bos=self.BOSClass(self.username,self.cookie) if self.deferred: self.deferred.callback(bos) reactor.clientTCP(server,int(port),bos) self.disconnect() elif tlvs.has_key(8): errorcode=tlvs[8] errorurl=tlvs[4] if errorcode=='\000\030': error="You are attempting to sign on again too soon. Please try again later." elif errorcode=='\000\005': error="Invalid Username or Password." else: error=repr(errorcode) self.error(error,errorurl) else: log.msg('hmm, weird tlvs for %s cookie packet' % str(self)) log.msg(tlvs) log.msg('snac') log.msg(str(snac)) return "None" | ed7c01f43cb9a00f0bdc302e2d0f6338a210a8f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/ed7c01f43cb9a00f0bdc302e2d0f6338a210a8f7/oscar.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31476,
297,
67,
6151,
12,
2890,
16,
892,
4672,
4556,
1077,
33,
896,
13653,
2226,
12,
892,
63,
21,
5717,
309,
365,
18,
335,
85,
30,
277,
33,
8134,
1077,
63,
25,
8009,
4720,
31458,
378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31476,
297,
67,
6151,
12,
2890,
16,
892,
4672,
4556,
1077,
33,
896,
13653,
2226,
12,
892,
63,
21,
5717,
309,
365,
18,
335,
85,
30,
277,
33,
8134,
1077,
63,
25,
8009,
4720,
31458,
378... |
<menuitem action="add2menu"/> <menuitem action="replace2menu"/> | <menu action="playaftermenu"> <menuitem action="add2menu"/> <menuitem action="replace2menu"/> </menu> | def __init__(self, window=None, sugar=False): gtk.gdk.threads_init() | b33877e05a3757e7c9cef00e0e41779cddbb5424 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/b33877e05a3757e7c9cef00e0e41779cddbb5424/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2742,
33,
7036,
16,
26178,
33,
8381,
4672,
225,
22718,
18,
75,
2883,
18,
12495,
67,
2738,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2742,
33,
7036,
16,
26178,
33,
8381,
4672,
225,
22718,
18,
75,
2883,
18,
12495,
67,
2738,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if not _CheckDiskConsistency(self.cfg, dev, oth_node, | if not _CheckDiskConsistency(self, dev, oth_node, | def _ExecD8DiskOnly(self, feedback_fn): """Replace a disk on the primary or secondary for dbrd8. | b9bddb6bdf7ac5841c732845ce0122c64bb026b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/b9bddb6bdf7ac5841c732845ce0122c64bb026b1/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1905,
40,
28,
6247,
3386,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
5729,
279,
4234,
603,
326,
3354,
578,
9946,
364,
1319,
13623,
28,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1905,
40,
28,
6247,
3386,
12,
2890,
16,
10762,
67,
4293,
4672,
3536,
5729,
279,
4234,
603,
326,
3354,
578,
9946,
364,
1319,
13623,
28,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print "M5 revision %s:%s" % (defines.hgRev, defines.hgId) print "M5 commit date %s" % defines.hgDate | print "M5 revision %s" % defines.hgRev | def check_tracing(): if defines.TRACING_ON: return | be5d350afc829acf87aad5e8701f3f67476edc8b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6787/be5d350afc829acf87aad5e8701f3f67476edc8b/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
20187,
13332,
309,
11164,
18,
4349,
2226,
1360,
67,
673,
30,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
866,
67,
20187,
13332,
309,
11164,
18,
4349,
2226,
1360,
67,
673,
30,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" | """ | def __init__(self, recipe, *args, **keywords): | bbf56a2c6ce326846b9cfaed245edce8bd904567 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/bbf56a2c6ce326846b9cfaed245edce8bd904567/source.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
16100,
16,
380,
1968,
16,
2826,
11771,
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,
... | [
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,
1001,
2738,
972,
12,
2890,
16,
16100,
16,
380,
1968,
16,
2826,
11771,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" Repository lockfile maintenance. """ usage = '%prog OP [options] [repository], where OP may be:\n' \ ' check -- check for lock\n' \ ' lock -- lock repository\n' \ ' unlock -- unlock repository\n' \ ' set -- set this as current repository' | """ Repository maintenance. """ usage = """\ %prog OP [options] [repository], where OP may be: check -- check for lock lock -- lock repository unlock -- unlock repository set -- set this as current repository fix -- fix permissions""" | def main(): """ Repository lockfile maintenance. """ usage = '%prog OP [options] [repository], where OP may be:\n' \ ' check -- check for lock\n' \ ' lock -- lock repository\n' \ ' unlock -- unlock repository\n' \ ' set -- set this as current repository' parser = optparse.OptionParser(usage) parser.add_option('-f', '--force', action='store_true', default=False, help='forced unlock') parser.add_option('-v', '--verbose', action='store_true', default=False, help='print info messages') try: operation = sys.argv.pop(1) except IndexError: parser.print_help() sys.exit(1) options, arguments = parser.parse_args() repository = '' if len(arguments) > 0: if len(arguments) == 1: repository = arguments[0] else: parser.print_help() sys.exit(1) this_user = pwd.getpwuid(os.getuid()).pw_name path = find_repository(repository, this_user) if options.verbose: print 'Repository root:', path if operation == 'check': do_check(path) elif operation == 'lock': do_lock(path) elif operation == 'unlock': do_unlock(path, options) elif operation == 'set': do_set(path, this_user, options) else: parser.print_help() sys.exit(1) | 5070bcba30f4213c12dbc66d6a5580dd2dddf97c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/5070bcba30f4213c12dbc66d6a5580dd2dddf97c/repo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6281,
18388,
18,
3536,
225,
4084,
273,
3536,
64,
738,
14654,
7247,
306,
2116,
65,
306,
9071,
6487,
1625,
7247,
2026,
506,
30,
866,
225,
1493,
866,
364,
2176,
2176,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
3536,
6281,
18388,
18,
3536,
225,
4084,
273,
3536,
64,
738,
14654,
7247,
306,
2116,
65,
306,
9071,
6487,
1625,
7247,
2026,
506,
30,
866,
225,
1493,
866,
364,
2176,
2176,
282... |
notebook.append_page(popup_box, gtk.Label(_("Popup Window"))) | notebook.append_page(popup_box, gtk.Label(_("Window List"))) | def __init__ (self): | 25580906cd313a0ce8d618137f7433f0450896b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/25580906cd313a0ce8d618137f7433f0450896b2/dbx_preference.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
261,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
t1f = _py_getFont(t1fn) | t1f = getFont(t1fn) | def test_unicode2T1(self): from reportlab.pdfbase.pdfmetrics import _py_unicode2T1, _py_getFont from _rl_accel import unicode2T1 t1fn = 'Times-Roman' t1f = _py_getFont(t1fn) enc = 'cp1252' senc = 'utf8' testCp1252 = ('copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9))).decode(enc) utext = 'This is the end of the \xce\x91\xce\xb2 world. This is the end of the \xce\x91\xce\xb2 world jap=\xe3\x83\x9b\xe3\x83\x86. This is the end of the \xce\x91\xce\xb2 world. This is the end of the \xce\x91\xce\xb2 world jap=\xe3\x83\x9b\xe3\x83\x86'.decode('utf8') def tfunc(f,ts): w1 = unicode2T1(ts,[f]+f.substitutionFonts) w2 = _py_unicode2T1(ts,[f]+f.substitutionFonts) assert w1==w2,"%r != %r" % (w1,w2) tfunc(t1f,testCp1252) tfunc(t1f,utext) | 12e8e9cc55671e5cc6f4a8cba83406f53d6c3513 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/12e8e9cc55671e5cc6f4a8cba83406f53d6c3513/test_rl_accel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9124,
22,
56,
21,
12,
2890,
4672,
628,
2605,
7411,
18,
7699,
1969,
18,
7699,
9597,
1930,
389,
2074,
67,
9124,
22,
56,
21,
16,
389,
2074,
67,
588,
5711,
628,
389,
1321,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9124,
22,
56,
21,
12,
2890,
4672,
628,
2605,
7411,
18,
7699,
1969,
18,
7699,
9597,
1930,
389,
2074,
67,
9124,
22,
56,
21,
16,
389,
2074,
67,
588,
5711,
628,
389,
1321,
67,
... |
""" | """ | def flimage_free_rgb(pImage): """ flimage_free_rgb(pImage) """ _flimage_free_rgb(pImage) | 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,
9156,
67,
10948,
12,
84,
2040,
4672,
3536,
1183,
2730,
67,
9156,
67,
10948,
12,
84,
2040,
13,
3536,
225,
389,
2242,
2730,
67,
9156,
67,
10948,
12,
84,
2040,
13,
282,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1183,
2730,
67,
9156,
67,
10948,
12,
84,
2040,
4672,
3536,
1183,
2730,
67,
9156,
67,
10948,
12,
84,
2040,
13,
3536,
225,
389,
2242,
2730,
67,
9156,
67,
10948,
12,
84,
2040,
13,
282,
... |
fh.write(pack('I', len(obj.getData().faces))) | fh.write(pack('I', num)) | def export_meshes(): fh = open(framework_name + ".adrt", "wb") ## Endian fh.write(pack('h', 1)) ## Version fh.write(pack('h', 2)) ## Calculate total number of triangles obj_list = Blender.Object.Get() num = 0 for obj in obj_list: if (obj.Layer & layer_mask) == obj.Layer: if(type(obj.getData()) == Types.NMeshType): for f in obj.getData().faces: if len(f.v) == 4: num = num + 2 if len(f.v) == 3: num = num + 1 fh.write(pack('i', num)) print "\nWriting %d triangles..." % num ## Pack each mesh for obj in obj_list: if (obj.Layer & layer_mask) == obj.Layer: if(type(obj.getData()) == Types.NMeshType): ## Mesh Name Length fh.write(pack('B', len(obj.getName()))) ## Mesh Name fh.write(obj.getName()) ## Vertice Total fh.write(pack('I', len(obj.getData().verts))) ## Write Vertices for v in obj.getData().verts: fh.write(pack('fff', v.co[0], v.co[1], v.co[2])) ## Write Faces if(len(obj.getData().faces) < 1<<16): fh.write(pack('B', 0)) fh.write(pack('H', len(obj.getData().faces))) for f in obj.getData().faces: if len(f.v) >= 3: fh.write(pack('HHH', f.v[0].index, f.v[1].index, f.v[2].index)) if len(f.v) == 4: fh.write(pack('HHH', f.v[0].index, f.v[2].index, f.v[3].index)) else: fh.write(pack('B', 1)) fh.write(pack('I', len(obj.getData().faces))) for f in obj.getData().faces: if len(f.v) >= 3: fh.write(pack('III', f.v[0].index, f.v[1].index, f.v[2].index)) if len(f.v) == 4: fh.write(pack('III', f.v[0].index, f.v[2].index, f.v[3].index)) ## close the file handle fh.close() | e03134ac587c7ed697010c0a25db65220e8e7f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1122/e03134ac587c7ed697010c0a25db65220e8e7f3d/adrt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
15557,
281,
13332,
7625,
273,
1696,
12,
12303,
67,
529,
397,
3552,
361,
3797,
3113,
315,
9464,
7923,
225,
7541,
4403,
2779,
7625,
18,
2626,
12,
2920,
2668,
76,
2187,
404,
3719,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
15557,
281,
13332,
7625,
273,
1696,
12,
12303,
67,
529,
397,
3552,
361,
3797,
3113,
315,
9464,
7923,
225,
7541,
4403,
2779,
7625,
18,
2626,
12,
2920,
2668,
76,
2187,
404,
3719,... |
runs.append((p, n)) | runsappend((p, n)) | def _optimize_charset(charset, fixup): # internal: optimize character set out = [] charmap = [False]*256 try: for op, av in charset: if op is NEGATE: out.append((op, av)) elif op is LITERAL: charmap[fixup(av)] = True elif op is RANGE: for i in range(fixup(av[0]), fixup(av[1])+1): charmap[i] = True elif op is CATEGORY: # XXX: could append to charmap tail return charset # cannot compress except IndexError: # character set contains unicode characters return _optimize_unicode(charset, fixup) # compress character map i = p = n = 0 runs = [] for c in charmap: if c: if n == 0: p = i n = n + 1 elif n: runs.append((p, n)) n = 0 i = i + 1 if n: runs.append((p, n)) if len(runs) <= 2: # use literal/range for p, n in runs: if n == 1: out.append((LITERAL, p)) else: out.append((RANGE, (p, p+n-1))) if len(out) < len(charset): return out else: # use bitmap data = _mk_bitmap(charmap) out.append((CHARSET, data)) return out return charset | 99965c47f74c2ff93d6757a9e0ee25d545898b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/99965c47f74c2ff93d6757a9e0ee25d545898b7b/sre_compile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
29155,
67,
9999,
12,
9999,
16,
2917,
416,
4672,
468,
2713,
30,
10979,
3351,
444,
596,
273,
5378,
1149,
1458,
273,
306,
8381,
5772,
5034,
775,
30,
364,
1061,
16,
1712,
316,
4856,
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,
389,
29155,
67,
9999,
12,
9999,
16,
2917,
416,
4672,
468,
2713,
30,
10979,
3351,
444,
596,
273,
5378,
1149,
1458,
273,
306,
8381,
5772,
5034,
775,
30,
364,
1061,
16,
1712,
316,
4856,
3... |
job -- a sage.dsage.database.Job object | jdict -- sage.dsage.database.Job.jdict | def store_job(self, jdict): """ Stores a job based on information from Job.jdict. The keys of the dictionary should correspond to the columns in the 'jobs' table. | f9614e59cef5a1d768d8616ba43f1e91676056aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/f9614e59cef5a1d768d8616ba43f1e91676056aa/jobdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1707,
67,
4688,
12,
2890,
16,
525,
1576,
4672,
3536,
20296,
455,
279,
1719,
2511,
603,
1779,
628,
3956,
18,
78,
1576,
18,
1021,
1311,
434,
326,
3880,
1410,
4325,
358,
326,
2168,
316,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1707,
67,
4688,
12,
2890,
16,
525,
1576,
4672,
3536,
20296,
455,
279,
1719,
2511,
603,
1779,
628,
3956,
18,
78,
1576,
18,
1021,
1311,
434,
326,
3880,
1410,
4325,
358,
326,
2168,
316,
3... |
col = QAUITestAppLib.UITestItem("Collection", self.logger) | def testDisabled(event, calendarBlock): # Test that the detail view does not display the timezone self.logger.startAction("Test that timezone hidden when not enabled") event.CheckDisplayedValues(EditTimeZone=(False, )) # Test that the calendar view does not displays the timezone widget if calendarBlock.widget.tzChoice.IsShown(): self.logger.endAction(False, "Timezone widget shown incorrectly when timezones not enabled") else: self.logger.endAction(True, "Timezone widget correctly hidden when timezones not enabled") | e9be78ce2f5acff9e4cf7035293e54dc01452d54 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/e9be78ce2f5acff9e4cf7035293e54dc01452d54/TestEnableTimezones.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
8853,
12,
2575,
16,
5686,
1768,
4672,
468,
7766,
716,
326,
7664,
1476,
1552,
486,
2562,
326,
6371,
365,
18,
4901,
18,
1937,
1803,
2932,
4709,
716,
6371,
5949,
1347,
486,
3696,
7923... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
8853,
12,
2575,
16,
5686,
1768,
4672,
468,
7766,
716,
326,
7664,
1476,
1552,
486,
2562,
326,
6371,
365,
18,
4901,
18,
1937,
1803,
2932,
4709,
716,
6371,
5949,
1347,
486,
3696,
7923... | |
wd = rpm.mpw(a); wd = wd+wd | wd = mpw(a); wd = wd+wd | def test02_CarryBorrow(self): if verbose: print '\n', '-=' * 30 print "Running %s.test02_CarryBorrow..." % \ self.__class__.__name__ | 02c21bd38bc4c3cd104df46a866a86ecb963492c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1057/02c21bd38bc4c3cd104df46a866a86ecb963492c/test_methods.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3103,
67,
16321,
1176,
38,
15318,
12,
2890,
4672,
309,
3988,
30,
1172,
2337,
82,
2187,
2400,
2218,
380,
5196,
1172,
315,
7051,
738,
87,
18,
3813,
3103,
67,
16321,
1176,
38,
15318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
3103,
67,
16321,
1176,
38,
15318,
12,
2890,
4672,
309,
3988,
30,
1172,
2337,
82,
2187,
2400,
2218,
380,
5196,
1172,
315,
7051,
738,
87,
18,
3813,
3103,
67,
16321,
1176,
38,
15318,
... |
How time is returned is determined based on the given `format` string as follows. Note that all checks are case-insensitive. - If `format` contains the word 'epoch', the time is returned in seconds after the UNIX epoch. The return value is always an integer. - If `format` contains any of the words 'year', 'month', 'day', 'hour', 'min' or 'sec', only the selected parts are returned. The order of the returned parts is always the one in the previous sentence and the order of the words in `format` is not significant. The parts are returned as zero-padded strings (e.g. May -> '05'). - Otherwise, and by default, the time is returned as a timestamp string in the format '2006-02-24 15:08:31'. | How time is returned is determined based on the given `format` string as follows. Note that all checks are case-insensitive. 1) If `format` contains the word 'epoch', the time is returned in seconds after the UNIX epoch. The return value is always an integer. 2) If `format` contains any of the words 'year', 'month', 'day', 'hour', 'min' or 'sec', only the selected parts are returned. The order of the returned parts is always the one in the previous sentence and the order of the words in `format` is not significant. The parts are returned as zero-padded strings (e.g. May -> '05'). 3) Otherwise, and by default, the time is returned as a timestamp string in the format '2006-02-24 15:08:31'. | def get_modified_time(self, path, format='timestamp'): """Returns the last modification time of a file or directory. How time is returned is determined based on the given `format` string as follows. Note that all checks are case-insensitive. - If `format` contains the word 'epoch', the time is returned in seconds after the UNIX epoch. The return value is always an integer. | 6f8bd1e5c5b0db8d92d174d89dc27677542321fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/6f8bd1e5c5b0db8d92d174d89dc27677542321fb/OperatingSystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
7342,
67,
957,
12,
2890,
16,
589,
16,
740,
2218,
5508,
11,
4672,
3536,
1356,
326,
1142,
11544,
813,
434,
279,
585,
578,
1867,
18,
225,
9017,
813,
353,
2106,
353,
11383,
2511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7342,
67,
957,
12,
2890,
16,
589,
16,
740,
2218,
5508,
11,
4672,
3536,
1356,
326,
1142,
11544,
813,
434,
279,
585,
578,
1867,
18,
225,
9017,
813,
353,
2106,
353,
11383,
2511,
... |
for char in wholist[:10]: | wholist = wholist[:10] for char in wholist: | def showWhoGump(player, page): # Collect the current list of sockets first wholist = [] worldsocket = wolfpack.sockets.first() while worldsocket: char = worldsocket.player if char.invisible and char.rank > player.rank: continue if not char.account: continue wholist.append(char) worldsocket = wolfpack.sockets.next() count = len(wholist) # Skip page * 10 users newwholist = wholist[page * 10:] # Reduce the page id while page > 0 and len(newwholist) == 0 while len(newwholist) == 0 and page > 0: page -= 1 newwholist = wholist[page * 10:] wholist = newwholist gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackground( 0xE10, 380, 360 ) gump.addCheckerTrans( 15, 15, 350, 330 ); gump.addGump( 130, 18, 0xFA8 ) gump.addText( 165, 20, tr("Who Menu"), 0x530 ) gump.addButton( 30, 320, 0xFB1, 0xFB3, 0 ) # Close Button gump.addText( 70, 320, tr("Close"), 0x834 ) gump.addText( 145, 320, tr("Players: %u") % count, 0x834 ) # Player list increases by 22 pixels pages = (count + 9) / 10 # 10 per page player.socket.sysmessage(tr('Total sockets: %u') % count) gump.addText( 280, 320, tr( "Page %i of %i" % ( page + 1, pages ) ), 0x834 ) if page + 1 < pages: gump.addButton( 260, 320, 0x0FA, 0x0FA, 1 ) # Next Page if page > 0: gump.addButton( 240, 320, 0x0FC, 0x0FC, 2 ) # Previous Page offset = 22 for char in wholist[:10]: gump.addButton( 20, 40 + offset, 0xFA5, 0xFA7, 2 + char.serial ) gump.addText( 54, 40 + offset, tr("%s [%s]") % ( char.name, char.account.name ), 0x834 ) gump.addText( 257, 40 + offset, unicode(char.socket.address), 0x834 ) offset += 24 gump.setArgs( [ page ] ) gump.setCallback( "commands.who.callbackWho" ) gump.send( player.socket ) | eecc5e86e1e0109109b39ab301b223d12fadd404 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/eecc5e86e1e0109109b39ab301b223d12fadd404/who.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2405,
2888,
83,
43,
2801,
12,
14872,
16,
1363,
4672,
468,
9302,
326,
783,
666,
434,
16762,
1122,
600,
355,
376,
273,
5378,
225,
9117,
7814,
273,
341,
355,
74,
2920,
18,
7814,
87,
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,
2405,
2888,
83,
43,
2801,
12,
14872,
16,
1363,
4672,
468,
9302,
326,
783,
666,
434,
16762,
1122,
600,
355,
376,
273,
5378,
225,
9117,
7814,
273,
341,
355,
74,
2920,
18,
7814,
87,
18,
... |
proc = subprocess.Popen(args, stdin=dev_null) | output = None if self._order_output: output = tempfile.NamedTemporaryFile(prefix='parallel_vm_test_') Info('Piping output to %s.' % output.name) proc = subprocess.Popen(args, stdin=dev_null, stdout=output, stderr=output) | def _SpawnTests(self): """Spawns VMs and starts the test runs on them. | c0644eb90ae0137602284a65f2e88850220ed3a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/c0644eb90ae0137602284a65f2e88850220ed3a0/cros_run_parallel_vm_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3389,
9533,
14650,
12,
2890,
4672,
3536,
3389,
2219,
2387,
776,
6947,
471,
2542,
326,
1842,
7597,
603,
2182,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3389,
9533,
14650,
12,
2890,
4672,
3536,
3389,
2219,
2387,
776,
6947,
471,
2542,
326,
1842,
7597,
603,
2182,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if mode: mode.project_info = info | def registerProject(cls, mode, url=None): """Associate a L{ProjectInfo} object with a major mode. A file is associated with a project by being inside a project directory. If the URL of the file used in the buffer of the major mode is inside a project directory, the keyword 'project_info' will be added to the major mode's instance attributes. """ if url is None: url = cls.findProjectURL(mode.buffer.url) if url: if url not in cls.known_projects: info = ProjectInfo(url) cls.known_projects[url] = info else: info = cls.known_projects[url] if mode: mode.project_info = info cls.dprint("found project %s" % info) elif mode: cls.dprint("no project for %s" % str(mode.buffer.url)) mode.project_info = None if cls.debuglevel > 0: cls.dprint("Registered projects:") for url, info in cls.known_projects.iteritems(): cls.dprint("%s\t%s" % (info.getProjectName(), str(url))) return mode.project_info | 9ff3d78d7ba8d42471296c1c2daae458a5e0bfdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/9ff3d78d7ba8d42471296c1c2daae458a5e0bfdc/project.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
4109,
12,
6429,
16,
1965,
16,
880,
33,
7036,
4672,
3536,
23880,
279,
511,
95,
4109,
966,
97,
733,
598,
279,
7888,
1965,
18,
225,
432,
585,
353,
3627,
598,
279,
1984,
635,
3832,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4109,
12,
6429,
16,
1965,
16,
880,
33,
7036,
4672,
3536,
23880,
279,
511,
95,
4109,
966,
97,
733,
598,
279,
7888,
1965,
18,
225,
432,
585,
353,
3627,
598,
279,
1984,
635,
3832,
... | |
'title', 'type', 'usemap', 'valign', 'value', 'vspace', 'width']) | 'title', 'type', 'usemap', 'valign', 'value', 'vspace', 'width', 'data']) | def stream_to_str_as_html(stream, encoding='UTF-8'): content_type = 'text/html; charset=%s' % encoding stream = set_content_type(stream, content_type) return stream_to_html(stream, encoding) | 488b724fe0e17a3aa4378f8e5efee96f24036c96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/488b724fe0e17a3aa4378f8e5efee96f24036c96/xhtml.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
869,
67,
701,
67,
345,
67,
2620,
12,
3256,
16,
2688,
2218,
5159,
17,
28,
11,
4672,
913,
67,
723,
273,
296,
955,
19,
2620,
31,
4856,
5095,
87,
11,
738,
2688,
1407,
273,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1407,
67,
869,
67,
701,
67,
345,
67,
2620,
12,
3256,
16,
2688,
2218,
5159,
17,
28,
11,
4672,
913,
67,
723,
273,
296,
955,
19,
2620,
31,
4856,
5095,
87,
11,
738,
2688,
1407,
273,
44... |
self.localcontext = localcontext.copy | self.localcontext = localcontext.copy() | def __init__(self, node, localcontext, styles, self2): self.localcontext = localcontext.copy self.node = node self.styles = styles self.width = utils.unit_get(node.get('width')) self.height = utils.unit_get(node.get('height')) self.self2 = self2 | 48598ea002c85eb4b6c4ec9715a1ee47a962a9d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/48598ea002c85eb4b6c4ec9715a1ee47a962a9d8/trml2pdf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
756,
16,
1191,
2472,
16,
5687,
16,
365,
22,
4672,
365,
18,
3729,
2472,
273,
1191,
2472,
18,
3530,
1435,
365,
18,
2159,
273,
756,
365,
18,
10218,
273,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
756,
16,
1191,
2472,
16,
5687,
16,
365,
22,
4672,
365,
18,
3729,
2472,
273,
1191,
2472,
18,
3530,
1435,
365,
18,
2159,
273,
756,
365,
18,
10218,
273,
5... |
def SysFont(name, size, bold=0, italic=0): """pygame.font.SysFont(name, size, bold=0, italic=0) -> Font | def SysFont(name, size, bold=False, italic=False): """pygame.font.SysFont(name, size, bold=False, italic=False) -> Font | def SysFont(name, size, bold=0, italic=0): """pygame.font.SysFont(name, size, bold=0, italic=0) -> Font create a pygame Font from system font resources This will search the system fonts for the given font name. You can also enable bold or italic styles, and the appropriate system font will be selected if available. This will always return a valid Font object, and will fallback on the builtin pygame font if the given font is not found. Name can also be a comma separated list of names, in which case set of names will be searched in order. Pygame uses a small set of common font aliases, if the specific font you ask for is not available, a reasonable alternative may be used. """ import pygame.font if not Sysfonts: initsysfonts() fontname = None if name: allnames = name for name in allnames.split(','): origbold = bold origitalic = italic name = _simplename(name) styles = Sysfonts.get(name) if not styles: styles = Sysalias.get(name) if styles: while not fontname: fontname = styles.get((bold, italic)) if italic: italic = 0 elif bold: bold = 0 elif not fontname: fontname = styles.values()[0] if fontname: break font = pygame.font.Font(fontname, size) if name: if origbold and not bold: font.set_bold(1) if origitalic and not italic: font.set_italic(1) else: if bold: font.set_bold(1) elif italic: font.set_italic(1) return font | ca5d89783ff94ee98c45799f2426265c7e24f7ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1298/ca5d89783ff94ee98c45799f2426265c7e24f7ac/sysfont.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16995,
5711,
12,
529,
16,
963,
16,
13068,
33,
8381,
16,
31709,
33,
8381,
4672,
3536,
2074,
13957,
18,
5776,
18,
12712,
5711,
12,
529,
16,
963,
16,
13068,
33,
8381,
16,
31709,
33,
8381,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16995,
5711,
12,
529,
16,
963,
16,
13068,
33,
8381,
16,
31709,
33,
8381,
4672,
3536,
2074,
13957,
18,
5776,
18,
12712,
5711,
12,
529,
16,
963,
16,
13068,
33,
8381,
16,
31709,
33,
8381,... |
gLogger.info("PollingTime %d hours" %(int(self.pollingTime)/3600)) | gLogger.info("PollingTime %d hours" %(int(self.pollingTime)/3600.0)) | def initialize( self ): self.vo = self.am_getOption("/DIRAC/VirtualOrganization") if not self.vo: gLogger.fatal("No /DIRAC/VirtualOrganization option defined") return S_ERROR() | 42aa4ddd05805da2e761607504a993c4416c58b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/42aa4ddd05805da2e761607504a993c4416c58b0/CE2CSAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
365,
262,
30,
365,
18,
12307,
273,
365,
18,
301,
67,
588,
1895,
2932,
19,
4537,
2226,
19,
6466,
8113,
7923,
309,
486,
365,
18,
12307,
30,
314,
3328,
18,
30709,
2932,
2279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4046,
12,
365,
262,
30,
365,
18,
12307,
273,
365,
18,
301,
67,
588,
1895,
2932,
19,
4537,
2226,
19,
6466,
8113,
7923,
309,
486,
365,
18,
12307,
30,
314,
3328,
18,
30709,
2932,
2279,
... |
else: r.name = name_for+'%d'%r.id | if not r.name: r.name = name_for + '%d'%r.id | def _child_get(self, nodename=False): if self.type not in ('collection','database'): return [] res = self.directory_list_for_child(nodename) result= map(lambda x: node_class(self.cr, self.uid, self.path+'/'+x.name, x, x.type=='directory' and self.object2 or False, context=self.context, root=self.root), res) if self.type=='database': pool = pooler.get_pool(self.cr.dbname) fobj = pool.get('ir.attachment') vargs = [('parent_id','=',False),('res_id','=',False)] if nodename: vargs.append(('name','like',nodename)) file_ids=fobj.search(self.cr,self.uid,vargs) | 1ef4bfec1ded630a1d4663031259aa959d8ba296 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/1ef4bfec1ded630a1d4663031259aa959d8ba296/document.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3624,
67,
588,
12,
2890,
16,
14003,
1069,
33,
8381,
4672,
309,
365,
18,
723,
486,
316,
7707,
5548,
17023,
6231,
11,
4672,
327,
5378,
400,
273,
365,
18,
5149,
67,
1098,
67,
1884,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3624,
67,
588,
12,
2890,
16,
14003,
1069,
33,
8381,
4672,
309,
365,
18,
723,
486,
316,
7707,
5548,
17023,
6231,
11,
4672,
327,
5378,
400,
273,
365,
18,
5149,
67,
1098,
67,
1884,
... |
return copy_all(from_dir, to_dir, exts) != True | if not copy_all(from_dir, to_dir, exts): return 1 return 0 | def main(argv): progname = argv[0] exts = [] #list of extensions for which we're checking targext = "LyXconv" #extension for target directory opts, args = getopt.getopt(sys.argv[1:], "e:t:") for o, v in opts: if o == "-e": exts = v.split(',') if o == "-t": targext = v # input directory if len(args) != 2: error(usage(progname)) abs_from_file = args[0] if not os.path.isabs(abs_from_file): error("%s is not an absolute file name.\n%s" % abs_from_file, usage(progname)) from_dir = os.path.dirname(abs_from_file) # output directory to_dir = args[1] if targext != '.': to_dir += "." + targext if not os.path.isabs(to_dir): error("%s is not an absolute file name.\n%s" % to_dir, usage(progname)) return copy_all(from_dir, to_dir, exts) != True | 923dc53431f769d87ea0b7c81a3c56970a420cdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/923dc53431f769d87ea0b7c81a3c56970a420cdb/ext_copy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
19485,
4672,
11243,
529,
273,
5261,
63,
20,
65,
225,
20793,
273,
5378,
468,
1098,
434,
4418,
364,
1492,
732,
4565,
6728,
24202,
408,
273,
315,
48,
93,
60,
4896,
6,
468,
6447,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19485,
4672,
11243,
529,
273,
5261,
63,
20,
65,
225,
20793,
273,
5378,
468,
1098,
434,
4418,
364,
1492,
732,
4565,
6728,
24202,
408,
273,
315,
48,
93,
60,
4896,
6,
468,
6447,... |
else: all_groups = grp.getgrall() for g in all_groups: group_dict[g[0]] = g[2] group_dict[g[2]] = g[0] | def make_where_clause(self,user=None,group=None,minsize=None,extensions=None,regex=None,only_files=True,order=''): regexopt,useropt,groupopt,typeopt,sizeopt = '','','','','' #if only_files: # typeopt = '-type f' stmt = [] clause_list = [] | 3ab48b61d036ec2aa3774eb64ebac11d03c30528 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2487/3ab48b61d036ec2aa3774eb64ebac11d03c30528/filemanager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
6051,
67,
18128,
12,
2890,
16,
1355,
33,
7036,
16,
1655,
33,
7036,
16,
1154,
1467,
33,
7036,
16,
9489,
33,
7036,
16,
7584,
33,
7036,
16,
3700,
67,
2354,
33,
5510,
16,
1019,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
6051,
67,
18128,
12,
2890,
16,
1355,
33,
7036,
16,
1655,
33,
7036,
16,
1154,
1467,
33,
7036,
16,
9489,
33,
7036,
16,
7584,
33,
7036,
16,
3700,
67,
2354,
33,
5510,
16,
1019,... | |
results = None | def decoded(widget, symbol, data): if not results: return buf = results.props.buffer end = buf.get_end_iter() buf.insert(end, str(symbol) + ":" + data + "\n") results.scroll_to_iter(end, 0) | db54bec9885d7d292eb9d51f96a801cba7d3a564 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7717/db54bec9885d7d292eb9d51f96a801cba7d3a564/test_pygtk.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6383,
12,
6587,
16,
3273,
16,
501,
4672,
309,
486,
1686,
30,
327,
1681,
273,
1686,
18,
9693,
18,
4106,
679,
273,
1681,
18,
588,
67,
409,
67,
2165,
1435,
1681,
18,
6387,
12,
409,
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,
6383,
12,
6587,
16,
3273,
16,
501,
4672,
309,
486,
1686,
30,
327,
1681,
273,
1686,
18,
9693,
18,
4106,
679,
273,
1681,
18,
588,
67,
409,
67,
2165,
1435,
1681,
18,
6387,
12,
409,
16,
... | |
out = commands.getoutput('pushd . && cd %s && tar -rh %s -f %s && popd' % (tmpDir, filename, archiveFullName)) | out = commands.getoutput('pushd . && cd %s && tar -f %s -rh %s && popd' % (tmpDir, archiveFullName, filename)) | def prepare(self, **options): """Extract Athena job configuration and prepare job for submission""" | 392cb7448520a365d69f840539181c9b8194b996 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/392cb7448520a365d69f840539181c9b8194b996/Athena.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
2826,
2116,
4672,
3536,
4976,
432,
15991,
69,
1719,
1664,
471,
2911,
1719,
364,
8515,
8395,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2911,
12,
2890,
16,
2826,
2116,
4672,
3536,
4976,
432,
15991,
69,
1719,
1664,
471,
2911,
1719,
364,
8515,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
warning("Source mac not calculated if more than 1 dest IP (%s)"%repr(dstip)) return None x = "00:00:00:00:00:00" | dstip = dstip.__iter__().next() | def i2h(self, pkt, x): if x is None: dstip = pkt.pdst if isinstance(dstip, Gen): warning("Source mac not calculated if more than 1 dest IP (%s)"%repr(dstip)) return None x = "00:00:00:00:00:00" if dstip is not None: iff,a,gw = conf.route.route(dstip) m = get_if_hwaddr(iff) if m: x = m return MACField.i2h(self, pkt, x) | 61b59a62362ed5bc287e98150a37bbfc9e0583d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/61b59a62362ed5bc287e98150a37bbfc9e0583d7/scapy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
22,
76,
12,
2890,
16,
11536,
16,
619,
4672,
309,
619,
353,
599,
30,
3046,
625,
273,
11536,
18,
84,
11057,
309,
1549,
12,
11057,
625,
16,
10938,
4672,
3046,
625,
273,
3046,
625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
22,
76,
12,
2890,
16,
11536,
16,
619,
4672,
309,
619,
353,
599,
30,
3046,
625,
273,
11536,
18,
84,
11057,
309,
1549,
12,
11057,
625,
16,
10938,
4672,
3046,
625,
273,
3046,
625,
... |
test_d = tests.setdefault( test, dict(report=path, | test_tuple = tests.setdefault( test, Test(report=path, | def process_axis(options, found, labels, labels_vs, label): tests = labels.setdefault(label, {}) for test in sorted(found[label]): test_tuple = found[label][test] path = test_tuple.times[max(test_tuple.times)] abs_path = os.path.join(options.output_dir, path) if not os.path.isfile(os.path.join(abs_path, 'funkload.xml')): abs_path = report.build_html_report(options, abs_path) path = os.path.basename(abs_path) test_d = tests.setdefault( test, dict(report=path, name=test.rsplit('.', 1)[-1], diffs={})) diffs = test_d['diffs'] for label_vs in sorted(labels_vs): tests_vs = labels_vs[label_vs] if label == label_vs or test not in tests_vs: continue test_vs_d = tests_vs[test] path_vs = test_vs_d['report'] diffs_vs = test_vs_d['diffs'] diff_path = test_tuple.diffs.get(path_vs) if not diff_path: diff_path = report.build_diff_report( options, abs_path, os.path.join(options.output_dir, path_vs)) diff_path = os.path.basename(diff_path) diffs_vs[label] = diff_path diffs[label_vs] = diff_path | 1b6aa29da69713a5ea9f8e073adde5473976506f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9007/1b6aa29da69713a5ea9f8e073adde5473976506f/label.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
4890,
12,
2116,
16,
1392,
16,
3249,
16,
3249,
67,
6904,
16,
1433,
4672,
7434,
273,
3249,
18,
542,
1886,
12,
1925,
16,
2618,
13,
364,
1842,
316,
3115,
12,
7015,
63,
1925,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
4890,
12,
2116,
16,
1392,
16,
3249,
16,
3249,
67,
6904,
16,
1433,
4672,
7434,
273,
3249,
18,
542,
1886,
12,
1925,
16,
2618,
13,
364,
1842,
316,
3115,
12,
7015,
63,
1925,
65... |
self.p = xml.parsers.expat.ParserCreate() | self.p = xml.parsers.expat.ParserCreate(namespace_separator=XMLSEP) self.p.buffer_text = True | def __init__(self): self.errors = [] self.files = [] self.generator = GENERATOR self.origin = "" | d1d53e2b0f6813cefefc948988e032d65455ae34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6425/d1d53e2b0f6813cefefc948988e032d65455ae34/metalink.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
4324,
273,
5378,
365,
18,
2354,
273,
5378,
365,
18,
8812,
273,
13679,
3575,
365,
18,
10012,
273,
1408,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
4324,
273,
5378,
365,
18,
2354,
273,
5378,
365,
18,
8812,
273,
13679,
3575,
365,
18,
10012,
273,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
self.selectAllSQLBlacklist = "SELECT %s FROM `%s`%s" % (columnSQLBlacklist, tableBlacklist, groupBySQLBlacklist) | self.selectAllSQLBlacklist = "SELECT %s FROM `%s`%s" % (columnSQLBlacklist, self.tableBlacklist, groupBySQLBlacklist) | def start(self): if self.factory == None: raise ParamError("this module need reference to fatory and database connection pool") | 2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5428/2d6b03ec5735bdc3185b3b5ecbcfa402ac08edae/ListBW.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
309,
365,
18,
6848,
422,
599,
30,
1002,
3014,
668,
2932,
2211,
1605,
1608,
2114,
358,
284,
8452,
471,
2063,
1459,
2845,
7923,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
else: | if self.packages: | def run (self): | e557f3556f1f87825e00a018eabf837c4c55f7d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e557f3556f1f87825e00a018eabf837c4c55f7d5/build_py.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
261,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1086,
261,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.