rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
if child.private: continue
def _create_enum(self, symbol): prefix = self._enum_common_prefix(symbol) if prefix: prefixlen = len(prefix) else: prefixlen = 0 members = [] for child in symbol.base_type.child_list: if prefixlen > 0: name = child.ident[prefixlen:] else: if child.private: continue # Ok, the enum members don't have a consistent prefix # among them, so let's just remove the global namespace # prefix. try: name = self._strip_symbol(child) except TransformerException, e: message.warn_symbol(symbol, e) return None members.append(ast.Member(name.lower(), child.const_int, child.ident, None))
ea72e772186c16d232d7340712bb7f52ebe8badb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2770/ea72e772186c16d232d7340712bb7f52ebe8badb/transformer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 7924, 12, 2890, 16, 3273, 4672, 1633, 273, 365, 6315, 7924, 67, 6054, 67, 3239, 12, 7175, 13, 309, 1633, 30, 1633, 1897, 273, 562, 12, 3239, 13, 469, 30, 1633, 1897, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 7924, 12, 2890, 16, 3273, 4672, 1633, 273, 365, 6315, 7924, 67, 6054, 67, 3239, 12, 7175, 13, 309, 1633, 30, 1633, 1897, 273, 562, 12, 3239, 13, 469, 30, 1633, 1897, 2...
if sys.platform in ('win32', 'os2emx', 'mac'):
if (sys.platform in ('win32', 'os2emx', 'mac') or test_support.is_jython and os._name == 'nt'):
def test_mode(self): # mkdtemp creates directories with the proper mode if not has_stat: return # ugh, can't use TestSkipped. if sys.platform.startswith('java') and not os._native_posix: # Java doesn't support stating files for permissions return
ca2abb091b29014337531acfdc98406c73103186 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6753/ca2abb091b29014337531acfdc98406c73103186/test_tempfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3188, 12, 2890, 4672, 468, 31381, 5814, 3414, 6402, 598, 326, 5338, 1965, 309, 486, 711, 67, 5642, 30, 327, 5411, 468, 582, 17680, 16, 848, 1404, 999, 7766, 16425, 18, 309, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3188, 12, 2890, 4672, 468, 31381, 5814, 3414, 6402, 598, 326, 5338, 1965, 309, 486, 711, 67, 5642, 30, 327, 5411, 468, 582, 17680, 16, 848, 1404, 999, 7766, 16425, 18, 309, 2...
self.failUnlessEqual("123", func("123"))
self.failUnlessEqual("123", func(b"123"))
def test_c_void_p_arg(self): func = testdll._testfunc_p_p func.restype = c_char_p func.argtypes = c_void_p,
e161964187ba110c08f075326ab3761733cefec8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/e161964187ba110c08f075326ab3761733cefec8/test_prototypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 67, 6459, 67, 84, 67, 3175, 12, 2890, 4672, 1326, 273, 1842, 27670, 6315, 3813, 644, 67, 84, 67, 84, 1326, 18, 8792, 388, 273, 276, 67, 3001, 67, 84, 1326, 18, 3175, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 71, 67, 6459, 67, 84, 67, 3175, 12, 2890, 4672, 1326, 273, 1842, 27670, 6315, 3813, 644, 67, 84, 67, 84, 1326, 18, 8792, 388, 273, 276, 67, 3001, 67, 84, 1326, 18, 3175, ...
return unittest.makeSuite(AttachmentTestCase, 'test')
suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(AttachmentTestCase, 'test')) suite.addTest(unittest.makeSuite(AttachmentModuleTestCase, 'test')) return suite
def suite(): return unittest.makeSuite(AttachmentTestCase, 'test')
5212b3d75f41c5849287b8b689aab1f5fa9d36fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5212b3d75f41c5849287b8b689aab1f5fa9d36fe/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 11371, 273, 2836, 3813, 18, 4709, 13587, 1435, 11371, 18, 1289, 4709, 12, 4873, 3813, 18, 6540, 13587, 12, 6803, 4709, 2449, 16, 296, 3813, 26112, 11371, 18, 1289, 4709, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 11371, 273, 2836, 3813, 18, 4709, 13587, 1435, 11371, 18, 1289, 4709, 12, 4873, 3813, 18, 6540, 13587, 12, 6803, 4709, 2449, 16, 296, 3813, 26112, 11371, 18, 1289, 4709, 12, ...
host=DefaultHost, debug=0):
host=DefaultHost, debug=0, https_connection_factory=None):
def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, is_secure=False, port=None, proxy=None, proxy_port=None, host=DefaultHost, debug=0): AWSAuthConnection.__init__(self, host, aws_access_key_id, aws_secret_access_key, is_secure, port, proxy, proxy_port, debug)
f50fd1f8a801bb1d9b2b389bc0ba0ef716f89186 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1098/f50fd1f8a801bb1d9b2b389bc0ba0ef716f89186/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 353, 67, 8869, 33, 8381, 16, 1756, 33, 7036, 16, 288...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 353, 67, 8869, 33, 8381, 16, 1756, 33, 7036, 16, 288...
int(value) return value
return int(value)
def validate_threshold(setting, value, option_parser, config_parser=None, config_section=None): try: int(value) return value except ValueError: try: return option_parser.thresholds[value.lower()] except (KeyError, AttributeError): raise (LookupError('unknown threshold: %r.' % value), None, sys.exc_info[2])
7cb03efdab7f22515ecb389a29101814a9898f3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/7cb03efdab7f22515ecb389a29101814a9898f3d/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 8699, 12, 8920, 16, 460, 16, 1456, 67, 4288, 16, 642, 67, 4288, 33, 7036, 16, 642, 67, 3464, 33, 7036, 4672, 775, 30, 327, 509, 12, 1132, 13, 1335, 2068, 30, 775, 30, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 8699, 12, 8920, 16, 460, 16, 1456, 67, 4288, 16, 642, 67, 4288, 33, 7036, 16, 642, 67, 3464, 33, 7036, 4672, 775, 30, 327, 509, 12, 1132, 13, 1335, 2068, 30, 775, 30, 327...
self.newQuestion)
self.new_question)
def quiz(self,oldbox): #Defining kana selection parameters. self.kanaEngine.kanaSelectParams( (self.param.val('basic_hiragana'), self.param.val('modified_hiragana'), self.param.val('contracted_hiragana'), self.param.val('basic_katakana'), self.param.val('modified_katakana'), self.param.val('contracted_katakana'), self.param.val('additional_katakana')), (self.param.val('basic_hiragana_portions'), self.param.val('modified_hiragana_portions'), self.param.val('contracted_hiragana_portions'), self.param.val('basic_katakana_portions'), self.param.val('modified_katakana_portions'), self.param.val('contracted_katakana_portions'), self.param.val('additional_katakana_portions')), self.param.val('kana_no_repeat'), self.param.val('rand_answer_sel_range')) #Randomly getting a kana (respecting bellow conditions). self.kana = self.kanaEngine.randomKana()
64cfb9e0b60a3a976c72fa9d5d722987641133b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/64cfb9e0b60a3a976c72fa9d5d722987641133b9/gtk_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16479, 12, 2890, 16, 1673, 2147, 4672, 468, 6443, 310, 417, 13848, 4421, 1472, 18, 365, 18, 79, 13848, 4410, 18, 79, 13848, 3391, 1370, 12, 261, 2890, 18, 891, 18, 1125, 2668, 13240, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16479, 12, 2890, 16, 1673, 2147, 4672, 468, 6443, 310, 417, 13848, 4421, 1472, 18, 365, 18, 79, 13848, 4410, 18, 79, 13848, 3391, 1370, 12, 261, 2890, 18, 891, 18, 1125, 2668, 13240, 6...
tal = re.sub(old_meta_slot, meta_slot, tal)
tal = re.sub(old_meta_slot, meta_slot, tal, count=1) tal = re.sub(old_meta_slot, '', tal)
def _update(self, portal): t = '%(info)s folder: <a href="%(url)s/manage_main">%(text)s</a>' pt_start = '<metal:block metal:define-macro="page" metal:extend-macro="here/standard_template_macro">' old_meta_slot = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" ?/>' meta_slot_start = '<metal:block fill-slot="meta">' meta_slot = '''
0c16c375e4deaa5fc5d65ab91c26df6c4adc623f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/0c16c375e4deaa5fc5d65ab91c26df6c4adc623f/update_add_meta_tags_to_custom_indexes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 12, 2890, 16, 11899, 4672, 268, 273, 21063, 1376, 13, 87, 3009, 30, 411, 69, 3897, 11613, 12, 718, 13, 87, 19, 12633, 67, 5254, 6441, 17105, 955, 13, 87, 1757, 69, 1870, 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, 389, 2725, 12, 2890, 16, 11899, 4672, 268, 273, 21063, 1376, 13, 87, 3009, 30, 411, 69, 3897, 11613, 12, 718, 13, 87, 19, 12633, 67, 5254, 6441, 17105, 955, 13, 87, 1757, 69, 1870, 5...
tomboy.DisplayNote(note)
if str(note) == "": dialog = gtk.MessageDialog(parent = \ self.plugin_api.get_window(), flags = gtk.DIALOG_DESTROY_WITH_PARENT, type = gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_YES_NO, message_format=(_("This Tomboy note does not exist anymore. \ Do you want to create it?"))) response = dialog.run() dialog.destroy() if response == gtk.RESPONSE_YES: tomboy.CreateNamedNote(widget.tomboy_note_title) tomboy.DisplayNote(note) else: tomboy.DisplayNote(note)
def tomboyDisplayNote(self, widget, data = None): tomboy = self.getTomboyObject() note = tomboy.FindNote(widget.tomboy_note_title) tomboy.DisplayNote(note)
267c899130946738cebb720a226aec991d62b8c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/267c899130946738cebb720a226aec991d62b8c8/tomboy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29998, 1075, 93, 4236, 8067, 12, 2890, 16, 3604, 16, 501, 273, 599, 4672, 29998, 1075, 93, 273, 365, 18, 588, 56, 362, 1075, 93, 921, 1435, 4721, 273, 29998, 1075, 93, 18, 3125, 8067, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29998, 1075, 93, 4236, 8067, 12, 2890, 16, 3604, 16, 501, 273, 599, 4672, 29998, 1075, 93, 273, 365, 18, 588, 56, 362, 1075, 93, 921, 1435, 4721, 273, 29998, 1075, 93, 18, 3125, 8067, ...
b : c_void_p
b_ptr : c_void_p
def dot_device(a, a_shape, b, b_shape, a_dtype): """ Matrix product of two arrays. Computes the matrix product of two arrays of shapes `(m, k)` and `(k, n)`; the result has shape `(m, n)`. Parameters ---------- a : c_void_p Pointer to device memory containing matrix of shape `(m, k)`. a_shape : tuple Shape of matrix `a` data `(m, k)`. b : c_void_p Pointer to device memory containing matrix of shape `(k, n)`. b_shape : tuple Shape of matrix `b` data `(k, n)`. a_dtype : {float32, complex64} Type of matrix. Returns ------- c_ptr : c_void_p Pointer to device memory containing matrix product of shape `(m, n)`. Example ------- >>> import numpy as np >>> import cula >>> cula.cublasInit() 0 >>> a = np.array([[1, 2], [3, 4], [5, 6], [7, 8]], np.float32) >>> b = np.array([[2, 3], [4, 5]], np.float32) >>> c = np.empty((2, 4), np.float32) >>> a_ptr = cula.cudaMalloc(a.nbytes) >>> b_ptr = cula.cudaMalloc(b.nbytes) >>> c_ptr = cula.dot_device(a_ptr, a.shape, b_ptr, b.shape, a.dtype) >>> cula.cuda_memcpy_dtoh(c.ctypes.data, c_ptr, c.nbytes) >>> np.allclose(np.dot(a, b), c.T) True """ if (a_dtype == np.complex64): cublas_func = _cublasCgemm a_dtype_nbytes = np.nbytes[a_dtype] alpha = np.complex64(1.0) beta = np.complex64(0.0) elif a_dtype == np.float32: cublas_func = _cublasSgemm a_dtype_nbytes = np.nbytes[a_dtype] alpha = np.float32(1.0) beta = np.float32(0.0) else: raise ValueError('unsupported type') transa = 'N' transb = 'N' m = a_shape[0] n = b_shape[1] k = a_shape[1] lda = m ldb = k ldc = max(1, m) c = cudaMalloc(ldc*n*a_dtype_nbytes) cublas_func(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc) status = cublasGetError() cublasCheckStatus(status) return c
ff79a5fd6add2888f896e16898c78c1b880d231a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14753/ff79a5fd6add2888f896e16898c78c1b880d231a/cula.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3928, 67, 5964, 12, 69, 16, 279, 67, 4867, 16, 324, 16, 324, 67, 4867, 16, 279, 67, 8972, 4672, 3536, 7298, 3017, 434, 2795, 5352, 18, 225, 14169, 281, 326, 3148, 3017, 434, 2795, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3928, 67, 5964, 12, 69, 16, 279, 67, 4867, 16, 324, 16, 324, 67, 4867, 16, 279, 67, 8972, 4672, 3536, 7298, 3017, 434, 2795, 5352, 18, 225, 14169, 281, 326, 3148, 3017, 434, 2795, 53...
compilation_info = ExternalCompilationInfo(libraries=['gc']) malloc_fn_ptr = rffi.llexternal("GC_local_malloc",
from pypy.rpython.tool import rffi_platform compilation_info = rffi_platform.check_boehm() class CConfig: _compilation_info_ = compilation_info HAS_LOCAL_MALLOC = rffi_platform.Has("GC_local_malloc") config = rffi_platform.configure(CConfig) if config['HAS_LOCAL_MALLOC']: GC_MALLOC = "GC_local_malloc" else: GC_MALLOC = "GC_malloc" malloc_fn_ptr = rffi.llexternal(GC_MALLOC,
def __init__(self, gcdescr, translator): GcLLDescription.__init__(self, gcdescr, translator) # grab a pointer to the Boehm 'malloc' function compilation_info = ExternalCompilationInfo(libraries=['gc']) malloc_fn_ptr = rffi.llexternal("GC_local_malloc", [lltype.Signed], # size_t, but good enough llmemory.GCREF, compilation_info=compilation_info, sandboxsafe=True, _nowrapper=True) self.funcptr_for_new = malloc_fn_ptr
f3fdb93cb26867bfb6d04234b1dab5e757e2609f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/f3fdb93cb26867bfb6d04234b1dab5e757e2609f/gc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14876, 742, 86, 16, 8333, 4672, 611, 71, 4503, 3291, 16186, 2738, 972, 12, 2890, 16, 14876, 742, 86, 16, 8333, 13, 468, 11086, 279, 4407, 358, 326, 605, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14876, 742, 86, 16, 8333, 4672, 611, 71, 4503, 3291, 16186, 2738, 972, 12, 2890, 16, 14876, 742, 86, 16, 8333, 13, 468, 11086, 279, 4407, 358, 326, 605, ...
def __init__(self, plainEntity):
def __init__(self, plainEntity, escape):
def __init__(self, plainEntity): self._plainEntity = plainEntity
7113513f178bcd574bd86ef5fe518238142a3598 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/7113513f178bcd574bd86ef5fe518238142a3598/dictionary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7351, 1943, 16, 4114, 4672, 365, 6315, 7446, 1943, 273, 7351, 1943, 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, 1001, 2738, 972, 12, 2890, 16, 7351, 1943, 16, 4114, 4672, 365, 6315, 7446, 1943, 273, 7351, 1943, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def _to_default_uom_factor(self, cr, uid, val, uom_id, context):
def _to_default_uom_factor(self, cr, uid, val, uom_id, context=None):
def _to_default_uom_factor(self, cr, uid, val, uom_id, context): uom_obj = self.pool.get('product.uom') uom = uom_obj.browse(cr, uid, uom_id, context=context) coef = uom.factor if uom.category_id.id != val.product_id.uom_id.category_id.id: coef = coef / val.product_id.uos_coeff return val.product_id.uom_id.factor / coef
6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 67, 1886, 67, 89, 362, 67, 6812, 12, 2890, 16, 4422, 16, 4555, 16, 1244, 16, 582, 362, 67, 350, 16, 819, 33, 7036, 4672, 582, 362, 67, 2603, 273, 365, 18, 6011, 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, 389, 869, 67, 1886, 67, 89, 362, 67, 6812, 12, 2890, 16, 4422, 16, 4555, 16, 1244, 16, 582, 362, 67, 350, 16, 819, 33, 7036, 4672, 582, 362, 67, 2603, 273, 365, 18, 6011, 18, 588, ...
def Description(self, **kwargs): """we have to override Description here to handle arbitrary arguments since PortalFolder defines it. """ self.getField('description').get(self, **kwargs)
def Description(self, **kwargs): """we have to override Description here to handle arbitrary arguments since PortalFolder defines it. """ self.getField('description').get(self, **kwargs)
c0e02a5bf7b89263005d6b1390f2c6d763b5b7e3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/c0e02a5bf7b89263005d6b1390f2c6d763b5b7e3/BaseFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6507, 12, 2890, 16, 2826, 4333, 4672, 3536, 1814, 1240, 358, 3849, 6507, 2674, 358, 1640, 11078, 1775, 3241, 25478, 3899, 11164, 518, 18, 3536, 365, 18, 588, 974, 2668, 3384, 16063, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6507, 12, 2890, 16, 2826, 4333, 4672, 3536, 1814, 1240, 358, 3849, 6507, 2674, 358, 1640, 11078, 1775, 3241, 25478, 3899, 11164, 518, 18, 3536, 365, 18, 588, 974, 2668, 3384, 16063, 588, ...
print 'AjaxTerm serving at http://localhost:%s/'%o.port
def main(): parser = optparse.OptionParser() parser.add_option("-p", "--port", dest="port", default="8022", help="Set the TCP port (default: 8022)") parser.add_option("-c", "--command", dest="cmd", default=None,help="set the command (default: /bin/login or ssh localhost)") parser.add_option("-l", "--log", action="store_true", dest="log",default=0,help="log requests to stderr (default: quiet mode)") parser.add_option("-d", "--daemon", action="store_true", dest="daemon", default=0, help="run as daemon in the background") parser.add_option("-i", "--index", dest="index_file", default="ajaxterm.html",help="default index file (default: ajaxterm.html)") (o, a) = parser.parse_args() print 'AjaxTerm serving at http://localhost:%s/'%o.port if o.daemon: pid=os.fork() if pid == 0: #os.setsid() ? os.setpgrp() sys.stdin = open('/dev/null', 'r') sys.stdout = open('/dev/null', 'w') sys.stderr = open('/dev/null', 'w') else: pid_file = '/var/run/ajaxterm.pid' try: open(pid_file,'w+').write(str(pid)+'\n') except: print 'Cannot store pid in %s' % pid_file print 'AjaxTerm running with pid: %d' % pid sys.exit(0) at=AjaxTerm(o.cmd,o.index_file)
d1babae662f71a1951464c1659c2cb5de814f952 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13009/d1babae662f71a1951464c1659c2cb5de814f952/ajaxterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 2153, 2670, 18, 1895, 2678, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 84, 3113, 5238, 655, 3113, 1570, 1546, 655, 3113, 805, 1546, 31644, 22, 3113, 2809, 1546, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2082, 273, 2153, 2670, 18, 1895, 2678, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 84, 3113, 5238, 655, 3113, 1570, 1546, 655, 3113, 805, 1546, 31644, 22, 3113, 2809, 1546, 69...
except NameError, ne:
except Exception, e:
def run(self): self._leakDetector._index2containerName2len[self._index] = {} self._leakDetector.notify.debug(repr(self._leakDetector._id2pathStr)) ids = self._leakDetector._id2pathStr.keys() # record the current len of each container for id in ids: yield None name = self._leakDetector._id2pathStr[id] try: container = eval(name) except NameError, ne: # this container no longer exists self.notify.debug('container %s no longer exists', name) del self._leakDetector._id2pathStr[id] continue cLen = len(container) 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
ef7f098d5ca1a86968f0863d3542784fd0c0f326 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/ef7f098d5ca1a86968f0863d3542784fd0c0f326/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, ...
max_iter=None, T=None, LO_RANSAC=None):
max_iter=None, T=None, LO_RANSAC=None, min_iter=100):
def __call__(self, data=None, inliers_required=None, confidence=None, max_iter=None, T=None, LO_RANSAC=None): """Execute RANSAC.
4415ecbc15b6e91c136df75cd0cecd72822fc561 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12843/4415ecbc15b6e91c136df75cd0cecd72822fc561/ransac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 501, 33, 7036, 16, 316, 20756, 67, 4718, 33, 7036, 16, 15588, 33, 7036, 16, 943, 67, 2165, 33, 7036, 16, 399, 33, 7036, 16, 1806, 67, 54, 11607, 2226, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 501, 33, 7036, 16, 316, 20756, 67, 4718, 33, 7036, 16, 15588, 33, 7036, 16, 943, 67, 2165, 33, 7036, 16, 399, 33, 7036, 16, 1806, 67, 54, 11607, 2226, ...
return self._coerce_from_other_number_field(x)
return NumberField_absolute.__call__(self, x)
def __call__(self, x): """ Create an element of this cyclotomic field from $x$. EXAMPLES: The following example illustrates coercion from the cyclotomic field Q(zeta_42) to the cyclotomic field Q(zeta_6), in a case where such coercion is defined: sage: k42 = CyclotomicField(42) sage: k6 = CyclotomicField(6) sage: a = k42.gen(0) sage: b = a^7 sage: b zeta42^7 sage: k6(b) zeta6 sage: b^2 zeta42^7 - 1 sage: k6(b^2) zeta6 - 1
02b443a109a59cd82d35989fefd9a2a2ed2225d1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/02b443a109a59cd82d35989fefd9a2a2ed2225d1/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 619, 4672, 3536, 1788, 392, 930, 434, 333, 6143, 830, 352, 24721, 652, 628, 271, 92, 8, 18, 225, 5675, 8900, 11386, 30, 1021, 3751, 3454, 277, 2906, 2700...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 2890, 16, 619, 4672, 3536, 1788, 392, 930, 434, 333, 6143, 830, 352, 24721, 652, 628, 271, 92, 8, 18, 225, 5675, 8900, 11386, 30, 1021, 3751, 3454, 277, 2906, 2700...
fullLink = '%s%s' % (self.prefix,linkName)
fullLink = '%s%s' % (self.prefix,link)
def isLink(self, path): if type(link) == types.StringType: links = [link] elif type(link) == types.ListType: links = link else: return S_ERROR('LFCClient.isLink: Must supply a link list of link') failed = {} successful = {} # If we have less than three lfns to query a session doesn't make sense if len(links) > 2: self.__openSession() for link in links: fullLink = '%s%s' % (self.prefix,linkName) fstat = lfc.lfc_filestat() value = lfc.lfc_lstat(linkName,fstat) if value == 0: if S_ISLNK(fstat.filemode): successful[link] = True else: successful[link] = False else: errno = lfc.cvar.serrno failed[link] = lfc.sstrerror(errno) if self.session: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
24878006a97fc6c0a40ff01095f00d930f79b1e6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/24878006a97fc6c0a40ff01095f00d930f79b1e6/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2098, 12, 2890, 16, 589, 4672, 309, 618, 12, 1232, 13, 422, 1953, 18, 780, 559, 30, 4716, 273, 306, 1232, 65, 1327, 618, 12, 1232, 13, 422, 1953, 18, 19366, 30, 4716, 273, 1692,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 2098, 12, 2890, 16, 589, 4672, 309, 618, 12, 1232, 13, 422, 1953, 18, 780, 559, 30, 4716, 273, 306, 1232, 65, 1327, 618, 12, 1232, 13, 422, 1953, 18, 19366, 30, 4716, 273, 1692,...
token, self.defaultProxyLength )
self.defaultProxyLength, token )
def __setupProxy( self, job, ownerDN, ownerGroup, workingDir ): """Retrieves user proxy with correct role for job and sets up environment to run job locally. """ self.log.info( "Requesting proxy for %s@%s" % ( ownerDN, ownerGroup ) ) token = gConfig.getValue( "/Security/ProxyToken", "" ) if not token: self.log.info( "No token defined. Trying to download proxy without token" ) token = False retVal = gProxyManager.getPayloadProxyFromDIRACGroup( ownerDN, ownerGroup, token, self.defaultProxyLength ) if not retVal[ 'OK' ]: self.log.error( 'Could not retrieve proxy' ) self.log.verbose( retVal ) self.__setJobParam( job, 'ProxyError', retVal[ 'Message' ] ) os.system( 'dirac-proxy-info' ) sys.stdout.flush() self.__report( job, 'Failed', 'Proxy Retrieval' ) return S_ERROR( 'Error retrieving proxy' )
f163536c3beb0940c65f6ac4ac86769259a1d763 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/f163536c3beb0940c65f6ac4ac86769259a1d763/JobAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 8401, 3886, 12, 365, 16, 1719, 16, 3410, 8609, 16, 3410, 1114, 16, 5960, 1621, 262, 30, 3536, 6960, 729, 2889, 598, 3434, 2478, 364, 1719, 471, 1678, 731, 3330, 358, 1086, 1719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8401, 3886, 12, 365, 16, 1719, 16, 3410, 8609, 16, 3410, 1114, 16, 5960, 1621, 262, 30, 3536, 6960, 729, 2889, 598, 3434, 2478, 364, 1719, 471, 1678, 731, 3330, 358, 1086, 1719, ...
test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 196434, 52416)
test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 203994, 54432)
def test_scan1(self): '''Flagdata: scan='3' manualflag=true''' flagdata2(vis=self.vis, selectdata=True, scan='3', manualflag=True) test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 196434, 52416) # feed not implemented flagdata2(vis=vis, feed='27') # flagdata2(vis=vis, unflag=True)
05385c9baca107ae37130d13ada12822cc89d8d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/05385c9baca107ae37130d13ada12822cc89d8d5/test_flagdata2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9871, 21, 12, 2890, 4672, 9163, 4678, 892, 30, 4135, 2218, 23, 11, 11297, 6420, 33, 3767, 26418, 2982, 892, 22, 12, 3516, 33, 2890, 18, 3516, 16, 2027, 892, 33, 5510, 16, 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, 1842, 67, 9871, 21, 12, 2890, 4672, 9163, 4678, 892, 30, 4135, 2218, 23, 11, 11297, 6420, 33, 3767, 26418, 2982, 892, 22, 12, 3516, 33, 2890, 18, 3516, 16, 2027, 892, 33, 5510, 16, 4...
if string.lower(urltype) == 'https':
url = rest user_passwd = None if string.lower(urltype) != 'https': realhost = None else:
def open_https(self, url, data=None): """Use HTTPS protocol.""" import httplib if type(url) is type(""): host, selector = splithost(url) user_passwd, host = splituser(host) else: host, selector = url urltype, rest = splittype(selector) if string.lower(urltype) == 'https': realhost, rest = splithost(rest) user_passwd, realhost = splituser(realhost) if user_passwd: selector = "%s://%s%s" % (urltype, realhost, rest) #print "proxy via https:", host, selector if not host: raise IOError, ('https error', 'no host given') if user_passwd: import base64 auth = string.strip(base64.encodestring(user_passwd)) else: auth = None h = httplib.HTTPS(host, 0, key_file=self.key_file, cert_file=self.cert_file) if data is not None: h.putrequest('POST', selector) h.putheader('Content-type', 'application/x-www-form-urlencoded') h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('GET', selector) if auth: h.putheader('Authorization: Basic %s' % auth) for args in self.addheaders: apply(h.putheader, args) h.endheaders() if data is not None: h.send(data + '\r\n') errcode, errmsg, headers = h.getreply() fp = h.getfile() if errcode == 200: return addinfourl(fp, headers, url) else: return self.http_error(url, fp, errcode, errmsg, headers)
312931759ee50f89c550019fac39032b3f4b4775 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/312931759ee50f89c550019fac39032b3f4b4775/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 4528, 12, 2890, 16, 880, 16, 501, 33, 7036, 4672, 3536, 3727, 18904, 1771, 12123, 1930, 15851, 6673, 309, 618, 12, 718, 13, 353, 618, 2932, 6, 4672, 1479, 16, 3451, 273, 6121...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 4528, 12, 2890, 16, 880, 16, 501, 33, 7036, 4672, 3536, 3727, 18904, 1771, 12123, 1930, 15851, 6673, 309, 618, 12, 718, 13, 353, 618, 2932, 6, 4672, 1479, 16, 3451, 273, 6121...
return cl.parsePropsFromForm()
return cl.parsePropsFromForm(create=1)
def parseForm(self, form, classname='test', nodeid=None): cl = client.Client(self.instance, None, {'PATH_INFO':'/'}, makeForm(form)) cl.classname = classname cl.nodeid = nodeid cl.db = self.db return cl.parsePropsFromForm()
4b9ef7d3f2341f7e970c4b959a76279036dc56dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4b9ef7d3f2341f7e970c4b959a76279036dc56dd/test_cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1204, 12, 2890, 16, 646, 16, 7479, 2218, 3813, 2187, 756, 350, 33, 7036, 4672, 927, 273, 1004, 18, 1227, 12, 2890, 18, 1336, 16, 599, 16, 13666, 4211, 67, 5923, 11, 2497, 2473, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1204, 12, 2890, 16, 646, 16, 7479, 2218, 3813, 2187, 756, 350, 33, 7036, 4672, 927, 273, 1004, 18, 1227, 12, 2890, 18, 1336, 16, 599, 16, 13666, 4211, 67, 5923, 11, 2497, 2473, ...
if reply != "cancel":
if str(reply) != "cancel":
def close(self): reply = self.maybesave() if reply != "cancel": self._close() return reply
368c75a268fcadbe39c7420bf0d899b0f47a6a00 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/368c75a268fcadbe39c7420bf0d899b0f47a6a00/EditorWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4332, 273, 365, 18, 24877, 70, 281, 836, 1435, 309, 609, 12, 10629, 13, 480, 315, 10996, 6877, 365, 6315, 4412, 1435, 327, 4332, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4332, 273, 365, 18, 24877, 70, 281, 836, 1435, 309, 609, 12, 10629, 13, 480, 315, 10996, 6877, 365, 6315, 4412, 1435, 327, 4332, 2, -100, -100, -100, -100, -100, ...
file.Write(" file.Write("\n")
def WriteFormat(self, filename): """Writes the command buffer format""" file = CWriter(filename) self.WriteHeader(file) file.Write("#pragma pack(push, 1)\n") file.Write("\n")
69d80aea409f6d8a3a505edb1cfd19b1a594ea8d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/69d80aea409f6d8a3a505edb1cfd19b1a594ea8d/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1630, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 1296, 1613, 740, 8395, 585, 273, 385, 2289, 12, 3459, 13, 365, 18, 3067, 1864, 12, 768, 13, 585, 18, 3067, 2932, 7, 683, 9454, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2598, 1630, 12, 2890, 16, 1544, 4672, 3536, 8368, 326, 1296, 1613, 740, 8395, 585, 273, 385, 2289, 12, 3459, 13, 365, 18, 3067, 1864, 12, 768, 13, 585, 18, 3067, 2932, 7, 683, 9454, ...
if self.debug > 0: print 'EXCEPTION HAPPENED in delete_NCATTR'
if self.debug > 0: print 'TypeError EXCEPTION HAPPENED in delete_NCATTR, you can ignore this message.' print 'variable name: %s' % v
def delete_ncattdimvar(self,ncf,ncattrs=[],ncdims=[],ncvars=[]): ''' helper function to delete attributes, dimensions and variables in a netcdffile
28c3f2a245341cd8f82e1ffe9c9883dad13198ad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/28c3f2a245341cd8f82e1ffe9c9883dad13198ad/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 82, 2574, 88, 3509, 1401, 12, 2890, 16, 82, 8522, 16, 14202, 7039, 22850, 6487, 14202, 8550, 22850, 6487, 14202, 4699, 33, 8526, 4672, 9163, 4222, 445, 358, 1430, 1677, 16, 576...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1430, 67, 82, 2574, 88, 3509, 1401, 12, 2890, 16, 82, 8522, 16, 14202, 7039, 22850, 6487, 14202, 8550, 22850, 6487, 14202, 4699, 33, 8526, 4672, 9163, 4222, 445, 358, 1430, 1677, 16, 576...
assert False
def processComment(self, data): assert False # XXX Can this even occur? self.parser.document.appendChild(CommentNode(data))
d1df07bf2f3f36292764a45ce86d7caccb5f78fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/d1df07bf2f3f36292764a45ce86d7caccb5f78fe/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 4469, 12, 2890, 16, 501, 4672, 1815, 1083, 468, 11329, 4480, 333, 5456, 3334, 35, 365, 18, 4288, 18, 5457, 18, 6923, 1763, 12, 4469, 907, 12, 892, 3719, 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, 4469, 12, 2890, 16, 501, 4672, 1815, 1083, 468, 11329, 4480, 333, 5456, 3334, 35, 365, 18, 4288, 18, 5457, 18, 6923, 1763, 12, 4469, 907, 12, 892, 3719, 2, -100, -100, -100, -100...
self.log.info( "%s: Traffic used up. Waiting %d minutes." % (self.__name__, wait_time) ) self.setWait(wait_time * 60 + 61)
self.log.info( "%s: Traffic used up. Waiting %d seconds." % (self.__name__, wait_time) ) self.setWait(wait_time) if wait_time > 300: self.wantReconnect = True
def handleFree(self): tmp_url = self.pyfile.url match = re.search(r"depositfiles.com/(?:(?P<lang>[\w]{1,3})/)?files/(?P<id>[\w]+)", tmp_url) if match: if match.group("id"): tmp_url = "http://depositfiles.com/en/files/" + match.group("id")
f7943b624cf6d7f1b6c4d62576b8de05b9f8b4f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/f7943b624cf6d7f1b6c4d62576b8de05b9f8b4f3/DepositfilesCom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 9194, 12, 2890, 4672, 1853, 67, 718, 273, 365, 18, 2074, 768, 18, 718, 845, 273, 283, 18, 3072, 12, 86, 6, 323, 1724, 2354, 18, 832, 19, 6503, 3680, 52, 32, 4936, 34, 7438, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 9194, 12, 2890, 4672, 1853, 67, 718, 273, 365, 18, 2074, 768, 18, 718, 845, 273, 283, 18, 3072, 12, 86, 6, 323, 1724, 2354, 18, 832, 19, 6503, 3680, 52, 32, 4936, 34, 7438, 9...
server = yield wrapAsync( self._serverWrapper, self, name, labrad_name, ID) self.servers[name, labrad_name, ID] = server setattr(self, name, server)
try: server = yield wrapAsync( self._serverWrapper, self, name, labrad_name, ID) except: pass else: self.servers[name, labrad_name, ID] = server setattr(self, name, server) @inlineCallbacks
def _addServer(self, name, labrad_name, ID): server = yield wrapAsync( self._serverWrapper, self, name, labrad_name, ID) self.servers[name, labrad_name, ID] = server setattr(self, name, server)
375a836d99fda7e94fd3e2bc4d60708c52cfeab9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9965/375a836d99fda7e94fd3e2bc4d60708c52cfeab9/wrappers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 2081, 12, 2890, 16, 508, 16, 11814, 6012, 67, 529, 16, 1599, 4672, 1438, 273, 2824, 2193, 2771, 12, 365, 6315, 3567, 3611, 16, 365, 16, 508, 16, 11814, 6012, 67, 529, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 2081, 12, 2890, 16, 508, 16, 11814, 6012, 67, 529, 16, 1599, 4672, 1438, 273, 2824, 2193, 2771, 12, 365, 6315, 3567, 3611, 16, 365, 16, 508, 16, 11814, 6012, 67, 529, 16, ...
if value is None:
if value is None:
def __getattr__(self, name): if self.__dict__.has_key(name): return self.__dict__[name]
a8660621679c629fc81320a8ddf5bf2c7ee1f177 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8659/a8660621679c629fc81320a8ddf5bf2c7ee1f177/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 309, 365, 16186, 1576, 25648, 5332, 67, 856, 12, 529, 4672, 327, 365, 16186, 1576, 972, 63, 529, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 309, 365, 16186, 1576, 25648, 5332, 67, 856, 12, 529, 4672, 327, 365, 16186, 1576, 972, 63, 529, 65, 2, -100, -100, -100, -100, -100, -10...
ct_after = len(get_conntrack_conn(0, HOST, VALID_PORT))
ct_after = len(get_conntrack_conn(0, self.dst_host, VALID_PORT))
def testConnShutdown(self): user = USERDB[0] client = user.createClient() self.assert_(connectClient(client))
b12e2a8afbbedb9ad271f0450dab80af023cebdd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10929/b12e2a8afbbedb9ad271f0450dab80af023cebdd/test_conntrack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3543, 10961, 12, 2890, 4672, 729, 273, 7443, 2290, 63, 20, 65, 1004, 273, 729, 18, 2640, 1227, 1435, 365, 18, 11231, 67, 12, 3612, 1227, 12, 2625, 3719, 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, 1842, 3543, 10961, 12, 2890, 4672, 729, 273, 7443, 2290, 63, 20, 65, 1004, 273, 729, 18, 2640, 1227, 1435, 365, 18, 11231, 67, 12, 3612, 1227, 12, 2625, 3719, 2, -100, -100, -100, -100...
self.out.write("</%s>" % self.buffer_tag2mod_tag[tag.name])
self.out.write("</%s>" % self.buffer_tag2mod_tag[tag.get_property("name"])
def write_tag_end(self, tag): if tag in self.buffer.mod_tags: self.out.write("</%s>" % self.buffer_tag2mod_tag[tag.name]) elif tag in self.buffer.justify_tags: self.out.write("</div>") else: self.out.write("</span>")
e5f5c91f60d464b5ab7cbf0ca9c1869c93c7c756 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4738/e5f5c91f60d464b5ab7cbf0ca9c1869c93c7c756/richtext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2692, 67, 409, 12, 2890, 16, 1047, 4672, 309, 1047, 316, 365, 18, 4106, 18, 1711, 67, 4156, 30, 365, 18, 659, 18, 2626, 2932, 1757, 9, 87, 2984, 738, 365, 18, 4106, 67, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 2692, 67, 409, 12, 2890, 16, 1047, 4672, 309, 1047, 316, 365, 18, 4106, 18, 1711, 67, 4156, 30, 365, 18, 659, 18, 2626, 2932, 1757, 9, 87, 2984, 738, 365, 18, 4106, 67, 2...
except (KeyError, OverflowError), e: uname = None
except (KeyError, OverflowError, NameError), e: uname = None
def uid2uname(uid): """Given uid, return uname from passwd file, or None if cannot find""" try: return uid2uname_dict[uid] except KeyError: try: uname = pwd.getpwuid(uid)[0] except (KeyError, OverflowError), e: uname = None uid2uname_dict[uid] = uname return uname
9d58a56bd1f97e7db6ad0826fdb50ab15f6b24ca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8033/9d58a56bd1f97e7db6ad0826fdb50ab15f6b24ca/user_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4555, 22, 318, 339, 12, 1911, 4672, 3536, 6083, 4555, 16, 327, 31444, 628, 19093, 585, 16, 578, 599, 309, 2780, 1104, 8395, 775, 30, 327, 4555, 22, 318, 339, 67, 1576, 63, 1911, 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, 4555, 22, 318, 339, 12, 1911, 4672, 3536, 6083, 4555, 16, 327, 31444, 628, 19093, 585, 16, 578, 599, 309, 2780, 1104, 8395, 775, 30, 327, 4555, 22, 318, 339, 67, 1576, 63, 1911, 65, ...
TixSubWidget.__init__(self, master, name, destroy_physically)
TixSubWidget.__init__(self, master, name, destroy_physically)
def __init__(self, master, name, destroy_physically=1):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
inFields = ['JobID','FileName','FileBody','Partition'] inValues = [jobID,filename,'',pTable] result = self._insert(sandbox,inFields,inValues)
req = "INSERT INTO %s (JobID,FileName,FileLink,UploadDate) VALUES (%d,'%s','%s',UTC_TIMESTAMP())" % \ (sandbox,jobID,filename,'part:/%s/%d/%s' % (pTable,jobID,filename)) result = self._update(req)
def storeFile(self,jobID,filename,fileString,sandbox): """ Store input sandbox ASCII file for jobID with the name filename which is given with its string body """
21ab1ebbd0d993e01e1c80373e4dcf1bc3448220 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/21ab1ebbd0d993e01e1c80373e4dcf1bc3448220/SandboxDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 812, 12, 2890, 16, 4688, 734, 16, 3459, 16, 768, 780, 16, 27004, 4672, 3536, 4994, 810, 15202, 11768, 585, 364, 28913, 598, 326, 508, 1544, 1492, 353, 864, 598, 2097, 533, 1417, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1707, 812, 12, 2890, 16, 4688, 734, 16, 3459, 16, 768, 780, 16, 27004, 4672, 3536, 4994, 810, 15202, 11768, 585, 364, 28913, 598, 326, 508, 1544, 1492, 353, 864, 598, 2097, 533, 1417, ...
buttons.addWidget(copy)
rightbuttons.addWidget(copy, 0, 0)
def __init__(self, parent = None): QtGui.QDialog.__init__(self, parent) core.debug.DebugPrint.getInstance().set_stream(debugStream(self.write)) self.setWindowTitle('VisTrails messages') layout = QtGui.QVBoxLayout() self.setLayout(layout) self.list = QtGui.QListWidget() self.connect(self.list, QtCore.SIGNAL('itemDoubleClicked(QListWidgetItem *)'), self.showMessage) self.msg_box = None
037568dc5960fe0f55f627faf210c87f5ee28788 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/037568dc5960fe0f55f627faf210c87f5ee28788/debug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 273, 599, 4672, 23425, 18, 53, 6353, 16186, 2738, 972, 12, 2890, 16, 982, 13, 2922, 18, 4148, 18, 2829, 5108, 18, 588, 1442, 7675, 542, 67, 3256, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 273, 599, 4672, 23425, 18, 53, 6353, 16186, 2738, 972, 12, 2890, 16, 982, 13, 2922, 18, 4148, 18, 2829, 5108, 18, 588, 1442, 7675, 542, 67, 3256, ...
return src, (C1,C2,C3,C4,C5,C6,C7), (J_A,J_B,J_C, J_D), (alpha, beta)
return src, (C1,C2,C3,C4,C5,C6,C7), (J_A,J_B,J_C, J_D), (alpha, beta), (dp1, dp1dot)
def full_source_from_model(self, m, nix): """Calculate full source term from model m at timestep nix.""" try: #Get background values bgvars = m.yresult[nix, 0:3, 0] a = m.ainit*np.exp(m.tresult[nix]) except AttributeError: raise if np.any(np.isnan(bgvars)): raise AttributeError("Background values not available for this timestep.") phi, phidot, H = bgvars #Set alpha and beta alpha = 1/(a*np.sqrt(2)) beta = a*bgvars[2] dp1 = self.get_dp1(self.k, alpha) dp1dot = self.get_dp1dot(self.k, alpha, beta) #Set ones array with same shape as self.k onekshape = np.ones(self.k.shape) #Get potentials V, Vp, Vpp, Vppp = m.potentials(np.array([phi])) #Get preterms preterms = self.preconvolution_calced(alpha, beta) #Set C_i values C1 = 1/H**2 * (Vppp + phidot/a**2 * (3 * a**2 * Vpp + 2 * self.k**2 )) C2 = 3.5 * phidot /((a*H)**2) * onekshape C3 = -4.5 / (a*H**2) * self.k C4 = -phidot/(a*H**2) / self.k C5 = -1.5 * phidot * onekshape C6 = 2 * phidot * self.k C7 = - phidot / self.k #Get component integrals J_A = self.J_A(preterms[0], dp1, C1, C2) J_B = self.J_B(preterms[1], dp1, C3, C4) J_C = self.J_C(preterms[2], dp1dot, C5) J_D = self.J_D(preterms[3], dp1dot, C6, C7) src = 1/((2*np.pi)**2 ) * (J_A + J_B + J_C + J_D) return src, (C1,C2,C3,C4,C5,C6,C7), (J_A,J_B,J_C, J_D), (alpha, beta)
b802dec92d451f02c4198b5630217f8bbd6256b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/b802dec92d451f02c4198b5630217f8bbd6256b1/calcedsolution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 3168, 67, 2080, 67, 2284, 12, 2890, 16, 312, 16, 290, 697, 4672, 3536, 8695, 1983, 1084, 2481, 628, 938, 312, 622, 27072, 290, 697, 12123, 775, 30, 468, 967, 5412, 924, 7611,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 3168, 67, 2080, 67, 2284, 12, 2890, 16, 312, 16, 290, 697, 4672, 3536, 8695, 1983, 1084, 2481, 628, 938, 312, 622, 27072, 290, 697, 12123, 775, 30, 468, 967, 5412, 924, 7611,...
def _duval_algorithm(self): r""" TESTS:: sage: Word('010010010001000')._duval_algorithm() (01.001.001.0001) sage: Word('122113112212')._duval_algorithm() (122.113.112212) REFERENCES: - [1] J.-P. Duval, Factorizing words over an ordered alphabet, J. Algorithms 4 (1983), no. 4, 363--381. """ t = Factorization() cm = self c = iter(cm.to_integer_word()) cc = iter(cm.to_integer_word()) cc.next() i = 0 d = 1 j = k = 1 l = len(cm) while k < l: c, c_s = tee(c) c_s = c_s.next() cc, cc_s = tee(cc) cc_s = cc_s.next() if c_s < cc_s: cc.next() k += 1 j = k d = k - i c = iter(cm.to_integer_word()) elif c_s == cc_s: cc.next() k += 1 if (k - j) == d: j = k c = iter(cm.to_integer_word()) else: c.next() else: i += d while i <= j: i += d t.append(cm[:d]) cm = cm[d:] c = iter(cm.to_integer_word()) cc = iter(cm.to_integer_word()) cc.next() i = j j += 1 k = j d = 1 i += d while i <= j: i += d t.append(cm[:d]) cm = cm[d:] return t
def _duval_algorithm(self): r""" TESTS::
5d95314847705862dc3fe746c7aff44f4caaa2bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/5d95314847705862dc3fe746c7aff44f4caaa2bf/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2544, 1125, 67, 12743, 12, 2890, 4672, 436, 8395, 22130, 55, 2866, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2544, 1125, 67, 12743, 12, 2890, 4672, 436, 8395, 22130, 55, 2866, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
return (float(cur)/gst.SECOND, float(total)/gst.SECOND)
return (float(current)/gst.SECOND, float(total)/gst.SECOND)
def GetExportProgress(self): """ Returns tuple with number of seconds done, and number of total seconds. """ if self.IsExporting: try: #total = self.mainpipeline.query_duration(gst.FORMAT_TIME)[0] total = self.GetProjectLength() * gst.SECOND cur = self.mainpipeline.query_position(gst.FORMAT_TIME)[0] except gst.QueryError: return (-1, -1) else: if cur > total: total = cur self.TerminateExport() return (float(cur)/gst.SECOND, float(total)/gst.SECOND) else: return (100, 100)
e2b4f4a534dc5054c26a7ac44730cd6e0c158de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/e2b4f4a534dc5054c26a7ac44730cd6e0c158de4/Project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 6144, 5491, 12, 2890, 4672, 3536, 2860, 3193, 598, 1300, 434, 3974, 2731, 16, 471, 1300, 434, 2078, 3974, 18, 3536, 309, 365, 18, 2520, 6144, 310, 30, 775, 30, 468, 4963, 273, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 6144, 5491, 12, 2890, 4672, 3536, 2860, 3193, 598, 1300, 434, 3974, 2731, 16, 471, 1300, 434, 2078, 3974, 18, 3536, 309, 365, 18, 2520, 6144, 310, 30, 775, 30, 468, 4963, 273, 365...
secDB = db.DB(self.env) secDB.set_flags(db.DB_DUP) secDB.set_get_returns_none(2) secDB.open(self.filename, "secondary", db.DB_BTREE,
self.secDB = db.DB(self.env) self.secDB.set_flags(db.DB_DUP) self.secDB.set_get_returns_none(2) self.secDB.open(self.filename, "secondary", db.DB_BTREE,
def test01_associateWithDB(self): if verbose: print '\n', '-=' * 30 print "Running %s.test01_associateWithDB..." % \ self.__class__.__name__
86b26e6b7822e78d0e923fad44b0ab457da0cd51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86b26e6b7822e78d0e923fad44b0ab457da0cd51/test_associate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1611, 67, 11577, 1190, 2290, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 1611, 67, 11577, 1190, 2290, 7070, 738,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1611, 67, 11577, 1190, 2290, 12, 2890, 4672, 309, 3988, 30, 1172, 2337, 82, 2187, 2400, 2218, 380, 5196, 1172, 315, 7051, 738, 87, 18, 3813, 1611, 67, 11577, 1190, 2290, 7070, 738,...
request.emit_http_headers(["Status: 200 OK"])
def _do_remove(request, key): """ delete headers/data cache for key """ remove(request, key) request.emit_http_headers(["Status: 200 OK"])
1c4179cc4265cbee537ebce29205ddefffb9198d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/1c4179cc4265cbee537ebce29205ddefffb9198d/cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 4479, 12, 2293, 16, 498, 4672, 3536, 1430, 1607, 19, 892, 1247, 364, 498, 3536, 1206, 12, 2293, 16, 498, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 4479, 12, 2293, 16, 498, 4672, 3536, 1430, 1607, 19, 892, 1247, 364, 498, 3536, 1206, 12, 2293, 16, 498, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
while jr != None or kr != None:
while jr is not None or kr is not None:
def __processbody_URLquote(self, lines): # XXX a lot to do here: # 1. use lines directly, rather than source and dest # 2. make it clearer # 3. make it faster source = lines[:] dest = lines last_line_was_quoted=0 for i in xrange(0, len(source)): Lorig=L=source[i] ; prefix=suffix="" if L==None: continue # Italicise quoted text if self.IQUOTES: quoted=quotedpat.match(L) if quoted==None: last_line_was_quoted=0 else: quoted = quoted.end(0) prefix=CGIescape(L[:quoted]) + '<i>' suffix='</I>' if self.SHOWHTML: suffix=suffix+'<BR>' if not last_line_was_quoted: prefix='<BR>'+prefix L= L[quoted:] last_line_was_quoted=1 # Check for an e-mail address L2="" jr = emailpat.search(L) kr = urlpat.search(L) while jr != None or kr != None: if jr == None: j = -1 else: j = jr.start(0) if kr == None: k = -1 else: k = kr.start(0) if j != -1 and (j < k or k == -1): text = jr.group(1) URL = 'mailto:' + text pos = j elif k!=-1 and (j>k or j==-1): text = URL = kr.group(1) pos=k else: # j==k raise ValueError, "j==k: This can't happen!" length=len(text) #self.message("URL: %s %s %s \n" # % (CGIescape(L[:pos]), URL, CGIescape(text))) L2 = L2 + ('%s<A HREF="%s">%s</A>' % (CGIescape(L[:pos]), URL, CGIescape(text))) L=L[pos+length:] jr=emailpat.search(L) ; kr=urlpat.search(L) if jr==None and kr==None: L=CGIescape(L) L=prefix+L2+L+suffix if L!=Lorig: source[i], dest[i]=None, L
469b12e8cfc912874019fdd0ddc95060d27b98f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/469b12e8cfc912874019fdd0ddc95060d27b98f4/HyperArch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2567, 3432, 67, 1785, 6889, 12, 2890, 16, 2362, 4672, 468, 11329, 279, 17417, 358, 741, 2674, 30, 468, 404, 18, 999, 2362, 5122, 16, 9178, 2353, 1084, 471, 1570, 468, 576, 18, 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, 1001, 2567, 3432, 67, 1785, 6889, 12, 2890, 16, 2362, 4672, 468, 11329, 279, 17417, 358, 741, 2674, 30, 468, 404, 18, 999, 2362, 5122, 16, 9178, 2353, 1084, 471, 1570, 468, 576, 18, 12...
self.course.removeEcouser(student.id)
course.removeEcouser(student.id)
def delete(self,confirm=""): #import pdb; pdb.set_trace() if cherrypy.session.get(UNI_PARAM,None) in ADMIN_USERS:
bd620ed6e7bc94139cb8bd730d5c5775ee916a14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5854/bd620ed6e7bc94139cb8bd730d5c5775ee916a14/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 10927, 1546, 6, 4672, 468, 5666, 10892, 31, 10892, 18, 542, 67, 5129, 1435, 309, 462, 370, 28398, 18, 3184, 18, 588, 12, 10377, 67, 8388, 16, 7036, 13, 316, 25969, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 10927, 1546, 6, 4672, 468, 5666, 10892, 31, 10892, 18, 542, 67, 5129, 1435, 309, 462, 370, 28398, 18, 3184, 18, 588, 12, 10377, 67, 8388, 16, 7036, 13, 316, 25969, ...
waitdlg.format_secondary_text(_('Please wait while I am downloading episode information for %s') % result)
waitdlg.format_secondary_text(_('Downloading episode information for %s') % result)
def add_new_channel(self, result=None, ask_download_new=True, quiet=False, block=False, authentication_tokens=None): result = util.normalize_feed_url(result) (scheme, rest) = result.split('://', 1)
415679a8e3b31063831c6212be437d888c0629b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12778/415679a8e3b31063831c6212be437d888c0629b1/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2704, 67, 4327, 12, 2890, 16, 563, 33, 7036, 16, 6827, 67, 7813, 67, 2704, 33, 5510, 16, 10902, 33, 8381, 16, 1203, 33, 8381, 16, 5107, 67, 7860, 33, 7036, 4672, 563, 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, 527, 67, 2704, 67, 4327, 12, 2890, 16, 563, 33, 7036, 16, 6827, 67, 7813, 67, 2704, 33, 5510, 16, 10902, 33, 8381, 16, 1203, 33, 8381, 16, 5107, 67, 7860, 33, 7036, 4672, 563, 273, ...
"callback": self.condition_diff_previous_revision
"callback": self.condition_diff_previous
def show_revisions_table_popup_menu(self, treeview, data): structure = [ ("ViewDiffWC", None), ("ViewDiffPrevRev", None), ("ViewDiffRevs", None), ("ShowChangesRevs", None), ("Separator0", None), ("UpdateTo", None), ("Checkout", None), ("BranchTag", None), ("Export", None), ("Separator1", None), ("EditAuthor", None), ("EditLogMessage", None), ("EditRevProps", None) ] items = { "ViewDiffWC": { "label": _("View diff against working copy"), "signals": { "activate": { "callback": self.on_context_diff_wc, "args": None } }, "condition": { "callback": self.condition_diff_working_copy } }, "ViewDiffPrevRev": { "label": _("View diff against previous revision"), "signals": { "activate": { "callback": self.on_context_diff_previous_revision, "args": None } }, "condition": { "callback": self.condition_diff_previous_revision } }, "ViewDiffRevs": { "label": _("View diff between revisions"), "signals": { "activate": { "callback": self.on_context_diff_revisions, "args": None } }, "condition": { "callback": self.condition_diff_revisions } }, "ShowChangesRevs": { "label": _("Show changes between revisions"), "signals": { "activate": { "callback": self.on_context_show_changes_revisions, "args": None } }, "condition": { "callback": self.condition_show_changes_revisions } }, "Separator0": { "label": rabbitvcs.ui.widget.SEPARATOR, "signals": None, "condition": { "callback": (lambda: True) } }, "UpdateTo": { "label": _("Update to revision..."), "icon": "rabbitvcs-update", "signals": { "activate": { "callback": self.on_context_update_to, "args": None } }, "condition": { "callback": self.condition_update_to } }, "Checkout": { "label": _("Checkout..."), "icon": "rabbitvcs-checkout", "signals": { "activate": { "callback": self.on_context_checkout_activated, "args": None } }, "condition": { "callback": self.condition_checkout } }, "BranchTag": { "label": _("Branch/tag..."), "icon": "rabbitvcs-branch", "signals": { "activate": { "callback": self.on_context_branch_activated, "args": None } }, "condition": { "callback": self.condition_branch } }, "Export": { "label": _("Export..."), "icon": "rabbitvcs-export", "signals": { "activate": { "callback": self.on_context_export_activated, "args": None } }, "condition": { "callback": self.condition_export } }, "Separator1": { "label": rabbitvcs.ui.widget.SEPARATOR, "signals": None, "condition": { "callback": (lambda: True) } }, "EditAuthor": { "label": _("Edit author..."), "signals": { "activate": { "callback": self.on_context_edit_author, "args": None } }, "condition": { "callback": (lambda: True) } }, "EditLogMessage": { "label": _("Edit log message..."), "signals": { "activate": { "callback": self.on_context_edit_log_message, "args": None } }, "condition": { "callback": (lambda: True) } }, "EditRevProps": { "label": _("Edit revision properties.."), "icon": gtk.STOCK_EDIT, "signals": { "activate": { "callback": self.on_context_edit_revprops, "args": None } }, "condition": { "callback": self.condition_edit_revprops } } } menu = GtkContextMenu(structure, items) menu.show(data)
9b529c8a6008b97eba283a8367e73818cf913e67 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/9b529c8a6008b97eba283a8367e73818cf913e67/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 29892, 67, 2121, 67, 16086, 67, 5414, 12, 2890, 16, 2151, 1945, 16, 501, 4672, 3695, 273, 306, 7566, 1767, 5938, 59, 39, 3113, 599, 3631, 7566, 1767, 5938, 9958, 10070, 3113, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 29892, 67, 2121, 67, 16086, 67, 5414, 12, 2890, 16, 2151, 1945, 16, 501, 4672, 3695, 273, 306, 7566, 1767, 5938, 59, 39, 3113, 599, 3631, 7566, 1767, 5938, 9958, 10070, 3113, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 53) else quickfix.DoubleField.__init__(self, 53, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 15935, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, 972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 15935, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738, 972, ...
data = codec.read_str8 ()
data = str (codec.read_str8 ())
def decodeValue (self, codec, typecode): """ Decode, from the codec, a value based on its typecode. """ if typecode == 1: data = codec.read_uint8 () elif typecode == 2: data = codec.read_uint16 () elif typecode == 3: data = codec.read_uint32 () elif typecode == 4: data = codec.read_uint64 () elif typecode == 5: data = codec.read_uint8 () elif typecode == 6: data = codec.read_str8 () elif typecode == 7: data = codec.read_vbin32 () elif typecode == 8: # ABSTIME data = codec.read_uint64 () elif typecode == 9: # DELTATIME data = codec.read_uint64 () elif typecode == 10: # REF data = codec.read_uint64 () elif typecode == 11: # BOOL data = codec.read_uint8 () elif typecode == 12: # FLOAT data = codec.read_float () elif typecode == 13: # DOUBLE data = codec.read_double () elif typecode == 14: # UUID data = codec.read_uuid () elif typecode == 15: # FTABLE data = codec.read_map () else: raise ValueError ("Invalid type code: %d" % typecode) return data
00ad6c2f3a752d5e4d4798e1400a9afdc6e43f71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/00ad6c2f3a752d5e4d4798e1400a9afdc6e43f71/management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 620, 261, 2890, 16, 9196, 16, 618, 710, 4672, 3536, 6209, 16, 628, 326, 9196, 16, 279, 460, 2511, 603, 2097, 618, 710, 18, 3536, 309, 282, 618, 710, 422, 404, 30, 501, 273, 919...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 620, 261, 2890, 16, 9196, 16, 618, 710, 4672, 3536, 6209, 16, 628, 326, 9196, 16, 279, 460, 2511, 603, 2097, 618, 710, 18, 3536, 309, 282, 618, 710, 422, 404, 30, 501, 273, 919...
item._references[name]._mergeChanges(oldVersion, toVersion) merged.append(dirties.hash(name))
value = item._references.get(name, None) if value is not None and value._isRefList(): value._mergeChanges(oldVersion, toVersion) merged.append(dirties.hash(name))
def _mergeRDIRTY(self, item, dirties, oldVersion, toVersion):
6a87d6c74462412e4a2fad3e0e27c2184b824266 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/6a87d6c74462412e4a2fad3e0e27c2184b824266/DBRepositoryView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2702, 54, 4537, 5538, 12, 2890, 16, 761, 16, 1577, 88, 606, 16, 1592, 1444, 16, 358, 1444, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2702, 54, 4537, 5538, 12, 2890, 16, 761, 16, 1577, 88, 606, 16, 1592, 1444, 16, 358, 1444, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
fieldwin.move(6, 0)
fieldwin.move(7, 0)
def display(self, fractionDone = None, timeEst = None, downRate = None, upRate = None, activity = None): if activity is not None and not self.done: self.activity = activity elif timeEst is not None: self.activity = 'finishing in %s' % fmttime(timeEst) if fractionDone is not None: self.status = '%s (%.1f%%)' % (self.activity, fractionDone * 100) self.progress = int(fieldw * fractionDone) * '#' else: self.status = self.activity if downRate is not None: self.downRate = '%.1f KB/s' % (float(downRate) / (1 << 10)) if upRate is not None: self.upRate = '%.1f KB/s' % (float(upRate) / (1 << 10))
475bc2502a2632d7599dddb0ed5ed686f6cf773d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4538/475bc2502a2632d7599dddb0ed5ed686f6cf773d/btdownloadcurses.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 16, 8330, 7387, 273, 599, 16, 813, 9122, 273, 599, 16, 2588, 4727, 273, 599, 16, 731, 4727, 273, 599, 16, 5728, 273, 599, 4672, 309, 5728, 353, 486, 599, 471, 486, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 12, 2890, 16, 8330, 7387, 273, 599, 16, 813, 9122, 273, 599, 16, 2588, 4727, 273, 599, 16, 731, 4727, 273, 599, 16, 5728, 273, 599, 4672, 309, 5728, 353, 486, 599, 471, 486, 36...
qn("notLinkBlock", key="n", nextDoc=_("skips forward past a block of links"), nextError=_("no more text forward after a block of links"), prevDoc=_("skips backward past a block of links"), prevError=_("no more text behind a block of links"), readUnit=textInfos.UNIT_LINE)
qn("notLinkBlock", key="n", nextDoc=_("skips forward past a block of links"), nextError=_("no more text after a block of links"), prevDoc=_("skips backward past a block of links"), prevError=_("no more text before a block of links"), readUnit=textInfos.UNIT_LINE)
def _iterNotLinkBlock(self, direction="next", offset=-1): links = self._iterNodesByType("link", direction=direction, offset=offset) # We want to compare each link against the next link. link1node, link1start, link1end = next(links) while True: link2node, link2start, link2end = next(links) # If the distance between the links is small, this is probably just a piece of non-link text within a block of links; e.g. an inactive link of a nav bar. if direction == "next" and link2start - link1end > self.NOT_LINK_BLOCK_MIN_LEN: yield 0, link1end, link2start # If we're moving backwards, the order of the links in the document will be reversed. elif direction == "previous" and link1start - link2end > self.NOT_LINK_BLOCK_MIN_LEN: yield 0, link2end, link1start link1node, link1start, link1end = link2node, link2start, link2end
52888372db0fb3d97195381d9c934fe4698291fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/52888372db0fb3d97195381d9c934fe4698291fb/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2165, 1248, 2098, 1768, 12, 2890, 16, 4068, 1546, 4285, 3113, 1384, 29711, 21, 4672, 4716, 273, 365, 6315, 2165, 3205, 14145, 2932, 1232, 3113, 4068, 33, 9855, 16, 1384, 33, 3348, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2165, 1248, 2098, 1768, 12, 2890, 16, 4068, 1546, 4285, 3113, 1384, 29711, 21, 4672, 4716, 273, 365, 6315, 2165, 3205, 14145, 2932, 1232, 3113, 4068, 33, 9855, 16, 1384, 33, 3348, 1...
filename = takenote.get_unique_filename_list(filenames, filename, ext)
filename = takenote.get_unique_filename_list(filenames, filename2, ext)
def insert_image(self, image, filename="image.png"): """Inserts an image into the textbuffer""" self.begin_user_action() it = self.get_iter_at_mark(self.get_insert()) self.add_child(it, image) image.get_widget().show() image.set_buffer(self) self.end_user_action() if image.get_filename() is None: filename, ext = os.path.splitext(filename) filenames = self.get_image_filenames() filename = takenote.get_unique_filename_list(filenames, filename, ext) image.set_filename(filename)
ec89021620544a1e73fc36d23e0fbab3029d7a82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4738/ec89021620544a1e73fc36d23e0fbab3029d7a82/richtext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 2730, 12, 2890, 16, 1316, 16, 1544, 1546, 2730, 18, 6446, 6, 4672, 3536, 14214, 392, 1316, 1368, 326, 977, 4106, 8395, 225, 365, 18, 10086, 67, 1355, 67, 1128, 1435, 225, 518...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2243, 67, 2730, 12, 2890, 16, 1316, 16, 1544, 1546, 2730, 18, 6446, 6, 4672, 3536, 14214, 392, 1316, 1368, 326, 977, 4106, 8395, 225, 365, 18, 10086, 67, 1355, 67, 1128, 1435, 225, 518...
key = "%s-%s-" % (template_name, file['index'])
key = "%s-%s-%s-" % (template_name, file['index'], file['filediff'].revision)
def build_diff_fragment(request, file, chunkindex, highlighting, collapseall, context, template_name='diffviewer/diff_file_fragment.html'): key = "%s-%s-" % (template_name, file['index']) if file['force_interdiff']: if file['interfilediff']: key += 'interdiff-%s-%s' % (file['filediff'].id, file['interfilediff'].id) else: key += 'interdiff-%s-none' % file['filediff'].id else: key += str(file['filediff'].id) if chunkindex: chunkindex = int(chunkindex) if chunkindex < 0 or chunkindex >= len(file['chunks']): raise UserVisibleError(_(u"Invalid chunk index %s specified.") % \ chunkindex) file['chunks'] = [file['chunks'][chunkindex]] key += '-chunk-%s' % chunkindex if collapseall: key += '-collapsed' context['collapseall'] = True if highlighting: key += '-highlighting' key += '-%s' % settings.AJAX_SERIAL context['file'] = file return cache_memoize(key, lambda: render_to_string(template_name, RequestContext(request, context)))
c1aa8cb80c7dfc68eb3edc5014580070b8e18f69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/c1aa8cb80c7dfc68eb3edc5014580070b8e18f69/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5413, 67, 11956, 12, 2293, 16, 585, 16, 2441, 1615, 16, 8839, 310, 16, 13627, 454, 16, 819, 16, 1542, 67, 529, 2218, 5413, 25256, 19, 5413, 67, 768, 67, 11956, 18, 2620, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 5413, 67, 11956, 12, 2293, 16, 585, 16, 2441, 1615, 16, 8839, 310, 16, 13627, 454, 16, 819, 16, 1542, 67, 529, 2218, 5413, 25256, 19, 5413, 67, 768, 67, 11956, 18, 2620, 11...
pickle.dump(grid, pickle_file)
pickle.dump({'gridno':grid.gridno,'level':grid.level, 'dimensions':grid.dimensions}, pickle_file)
def write_petscio(solution,frame,path='./',file_prefix='claw',write_aux=False,options={}): r""" Write out pickle and PETSc data files representing the solution. Common data is written from process 0 in pickle files. Shared data is written from all processes into PETSc data files. :Input: - *solution* - (:class:`~petclaw.solution.Solution`) petclaw object to be output - *frame* - (int) Frame number - *path* - (string) Root path - *file_prefix* - (string) Prefix for the file name. ``default = 'claw'`` - *write_aux* - (bool) Boolean controlling whether the associated auxiliary array should be written out. ``default = False`` - *options* - (dict) Optional argument dictionary, see `PETScIO Option Table`_ .. _`PETScIO Option Table`: format : one of 'ascii' or 'binary' clobber : if True (Default), files will be overwritten """ # Option parsing option_defaults = {'format':'ascii','clobber':True} for (k,v) in option_defaults.iteritems(): if options.has_key(k): pass else: options[k] = option_defaults[k] clobber = options['clobber'] if frame < 0: # Don't construct file names with negative frameno values. raise IOError("Frame " + str(frame) + " does not exist ***") pickle_filename = os.path.join(path, '%s.pkl' % file_prefix) + str(frame).zfill(4) viewer_filename = os.path.join(path, '%s.ptc' % file_prefix) + str(frame).zfill(4) if solution.maux > 0 and write_aux: write_aux = True aux_filename = os.path.join(path, '%s_aux.ptc' % file_prefix) + str(frame).zfill(4) else: write_aux = False if not clobber: if os.path.exists(pickle_filename): raise IOError('Cowardly refusing to clobber %s!' % pickle_filename) if os.path.exists(viewer_filename): raise IOError('Cowardly refusing to clobber %s!' % viewer_filename) if write_aux and os.path.exists(aux_filename): raise IOError('Cowardly refusing to clobber %s!' % aux_filename) rank = MPI.COMM_WORLD.rank if rank==0: pickle_file = open(pickle_filename,'w') # explicitly dumping a dictionary here to help out anybody trying to read the pickle file pickle.dump({'t':solution.t,'meqn':solution.meqn,'ngrids':len(solution.grids), 'maux':solution.maux,'ndim':solution.ndim, 'write_aux':write_aux}, pickle_file) # now set up the PETSc viewers if options['format'] == 'ascii': viewer = PETSc.Viewer().createASCII(viewer_filename, PETSc.Viewer.Mode.WRITE) if write_aux: aux_viewer = PETSc.Viewer().createASCII(aux_filename, PETSc.Viewer.Mode.WRITE) elif options['format'] == 'binary': viewer = PETSc.Viewer().createBinary(viewer_filename, PETSc.Viewer.Mode.WRITE) if write_aux: aux_viewer = PETSc.Viewer().createBinary(aux_filename, PETSc.Viewer.Mode.WRITE) else: raise IOError('format type %s not supported' % options['format']) for grid in solution.grids: if rank==0: pickle.dump(grid, pickle_file) grid.gqVec.view(viewer) if write_aux: grid.gauxVec.view(aux_viewer) viewer.flush() viewer.destroy() if rank==0: pickle_file.close()
82aecd9affb08493ea9183e84fe58cb0be96cbc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12812/82aecd9affb08493ea9183e84fe58cb0be96cbc4/petsc_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 6951, 1017, 1594, 12, 13385, 16, 3789, 16, 803, 2218, 18, 19, 2187, 768, 67, 3239, 2218, 830, 2219, 2187, 2626, 67, 18196, 33, 8381, 16, 2116, 12938, 4672, 436, 8395, 2598, 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, 1045, 67, 6951, 1017, 1594, 12, 13385, 16, 3789, 16, 803, 2218, 18, 19, 2187, 768, 67, 3239, 2218, 830, 2219, 2187, 2626, 67, 18196, 33, 8381, 16, 2116, 12938, 4672, 436, 8395, 2598, 5...
task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False)
task.set_default("USER_interactive", len(args) == 0 and not options.source_path) task.set_default("USER_running", False)
def clush_main(args): """Main clush script function""" # Default values nodeset_base, nodeset_exclude = NodeSet(), NodeSet() # # Argument management # usage = "%prog [options] command" parser = optparse.OptionParser(usage, version="%%prog %s" % __version__) parser.disable_interspersed_args() # Node selections optgrp = optparse.OptionGroup(parser, "Selecting target nodes") optgrp.add_option("-w", action="append", dest="nodes", help="nodes where to run the command") optgrp.add_option("-x", action="append", dest="exclude", help="exclude nodes from the node list") optgrp.add_option("-a", "--all", action="store_true", dest="nodes_all", help="run command on all nodes") optgrp.add_option("-g", "--group", action="append", dest="group", help="run command on a group of nodes") optgrp.add_option("-X", action="append", dest="exgroup", help="exclude nodes from this group") parser.add_option_group(optgrp) # Output behaviour optgrp = optparse.OptionGroup(parser, "Output behaviour") optgrp.add_option("-q", "--quiet", action="store_true", dest="quiet", help="be quiet, print essential output only") optgrp.add_option("-v", "--verbose", action="store_true", dest="verbose", help="be verbose, print informative messages") optgrp.add_option("-d", "--debug", action="store_true", dest="debug", help="output more messages for debugging purpose") optgrp.add_option("-N", action="store_false", dest="label", default=True, help="disable labeling of command line") optgrp.add_option("-S", action="store_true", dest="maxrc", help="return the largest of command return codes") optgrp.add_option("-b", "--dshbak", action="store_true", dest="gather", help="display results in a dshbak-like way") parser.add_option_group(optgrp) # Copy optgrp = optparse.OptionGroup(parser, "File copying") optgrp.add_option("-c", "--copy", action="store", dest="source_path", help="copy local file or directory to the nodes") optgrp.add_option("--dest", action="store", dest="dest_path", help="destination file or directory on the nodes") optgrp.add_option("-p", action="store_true", dest="preserve_flag", help="preserve modification times and modes") parser.add_option_group(optgrp) # Ssh options optgrp = optparse.OptionGroup(parser, "Ssh options") optgrp.add_option("-f", "--fanout", action="store", dest="fanout", help="use a specified fanout", type="int") optgrp.add_option("-l", "--user", action="store", dest="user", help="execute remote command as user") optgrp.add_option("-o", "--options", action="store", dest="options", help="can be used to give ssh options") optgrp.add_option("-t", "--connect_timeout", action="store", dest="connect_timeout", help="limit time to connect to a node" ,type="float") optgrp.add_option("-u", "--command_timeout", action="store", dest="command_timeout", help="limit time for command to run on the node", type="float") parser.add_option_group(optgrp) (options, args) = parser.parse_args() # # Load config file # config = ClushConfig(options) # Apply command line overrides if options.quiet: config.set_main("verbosity", VERB_QUIET) if options.verbose: config.set_main("verbosity", VERB_VERB) if options.debug: config.set_main("verbosity", VERB_DEBUG) if options.fanout: config.set_main("fanout", options.fanout) if options.user: config.set_main("ssh_user", options.user) if options.options: config.set_main("ssh_options", options.options) if options.connect_timeout: config.set_main("connect_timeout", options.connect_timeout) if options.command_timeout: config.set_main("command_timeout", options.command_timeout) # # Compute the nodeset # if options.nodes: nodeset_base = NodeSet.fromlist(options.nodes) if options.exclude: nodeset_exclude = NodeSet.fromlist(options.exclude) # Do we have nodes group? task = task_self() task.set_info("debug", config.get_verbosity() > 1) if options.nodes_all: command = config.get_nodes_all_command() task.shell(command, key="all") if options.group: for grp in options.group: command = config.get_nodes_group_command(grp) task.shell(command, key="group") if options.exgroup: for grp in options.exgroup: command = config.get_nodes_group_command(grp) task.shell(command, key="exgroup") # Run needed external commands task.resume() for buf, keys in task.iter_buffers(['all', 'group']): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Adding nodes from option %s: %s" % (','.join(keys), buf)) nodeset_base.add(line) for buf, keys in task.iter_buffers(['exgroup']): for line in buf.splitlines(): config.verbose_print(VERB_DEBUG, "Excluding nodes from option %s: %s" % (','.join(keys), buf)) nodeset_exclude.add(line) # Do we have an exclude list? (-x ...) nodeset_base.difference_update(nodeset_exclude) if len(nodeset_base) < 1: parser.error('No node to run on.') config.verbose_print(VERB_DEBUG, "Final NodeSet is %s" % nodeset_base) # # Task management # user_interaction = sys.stdin.isatty() and sys.stdout.isatty() if user_interaction: # Standard input is a terminal and we want to perform some user # interactions in the main thread (using blocking calls), so # we run cluster commands in a new ClusterShell Task (a new # thread is created). task = Task() signal.signal(signal.SIGHUP, signal_handler) task.set_info("USER_handle_SIGHUP", True) else: # Perform everything in main thread. task.set_info("USER_handle_SIGHUP", False) task.set_info("debug", config.get_verbosity() >= VERB_DEBUG) task.set_info("fanout", config.get_fanout()) ssh_user = config.get_ssh_user() if ssh_user: task.set_info("ssh_user", ssh_user) ssh_path = config.get_ssh_path() if ssh_path: task.set_info("ssh_path", ssh_path) ssh_options = config.get_ssh_options() if ssh_options: task.set_info("ssh_options", ssh_options) # Set detailed timeout values connect_timeout = config.get_connect_timeout() task.set_info("connect_timeout", connect_timeout) command_timeout = config.get_command_timeout() task.set_info("command_timeout", command_timeout) # Enable stdout/stderr separation task.set_default("stderr", True) # Set timeout at worker level when command_timeout is defined. if command_timeout > 0: timeout = command_timeout else: timeout = -1 # Configure custom task related status task.set_info("USER_interactive", len(args) == 0 and not options.source_path) task.set_info("USER_running", False) if options.source_path and not options.dest_path: options.dest_path = options.source_path if options.source_path: if not options.dest_path: options.dest_path = options.source_path op = "copy source=%s dest=%s" % (options.source_path, options.dest_path) else: op = "command=\"%s\"" % ' '.join(args) config.verbose_print(VERB_VERB, "clush: nodeset=%s fanout=%d [timeout conn=%.1f " \ "cmd=%.1f] %s" % (nodeset_base, task.info("fanout"), task.info("connect_timeout"), task.info("command_timeout"), op)) if not task.info("USER_interactive"): if options.source_path: if not options.dest_path: options.dest_path = options.source_path run_copy(task, options.source_path, options.dest_path, nodeset_base, 0, options.preserve_flag) else: run_command(task, ' '.join(args), nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) if user_interaction: ttyloop(task, nodeset_base, options.gather, timeout, options.label, config.get_verbosity()) elif task.info("USER_interactive"): print >>sys.stderr, "ERROR: interactive mode requires a tty" clush_exit(1) rc = 0 if options.maxrc: # Instead of clush return code, return commands retcode rc = task.max_retcode() if task.num_timeout() > 0: rc = 255 clush_exit(rc)
b1a858775a0c2d9702d6d8c6329507066a5d4dd6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11479/b1a858775a0c2d9702d6d8c6329507066a5d4dd6/clush.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 927, 1218, 67, 5254, 12, 1968, 4672, 3536, 6376, 927, 1218, 2728, 445, 8395, 225, 468, 2989, 924, 2199, 278, 67, 1969, 16, 2199, 278, 67, 10157, 273, 2029, 694, 9334, 2029, 694, 1435, ...
package_dir = { '': 'lib' }, scripts = glob( "scripts/*.py" ),
package_dir = { '': 'lib' }, package_data = { '': ['*.ps'] }, scripts = glob( "scripts/*.py" ),
def main(): setup( name = "bx-python", version = "0.5.0", py_modules = [ 'psyco_full' ], packages = find_packages( 'lib' ), package_dir = { '': 'lib' }, scripts = glob( "scripts/*.py" ), ext_modules = get_extension_modules(), test_suite = 'nose.collector', setup_requires = 'nose', author = "James Taylor, Bob Harris, David King, and others in Webb Miller's Lab", author_email = "james@bx.psu.edu", description = "Tools for manipulating biological data, particularly multiple sequence alignments", url = "http://www.bx.psu.edu/miller_lab/", zip_safe = False, dependency_links = [], cmdclass=command_classes )
c2b24285bd1cc9a9ea2e486bd923f60ad77a39f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2104/c2b24285bd1cc9a9ea2e486bd923f60ad77a39f9/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3875, 12, 225, 508, 273, 315, 70, 92, 17, 8103, 3113, 1177, 273, 315, 20, 18, 25, 18, 20, 3113, 2395, 67, 6400, 273, 306, 296, 1121, 93, 2894, 67, 2854, 11, 308, 16, 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, 2774, 13332, 3875, 12, 225, 508, 273, 315, 70, 92, 17, 8103, 3113, 1177, 273, 315, 20, 18, 25, 18, 20, 3113, 2395, 67, 6400, 273, 306, 296, 1121, 93, 2894, 67, 2854, 11, 308, 16, 5...
icon = icon_theme.load_icon(gtk.STOCK_DIALOG_QUESTION, icon_size, 0)
try: log('Missing icon in theme: %s', icon_name, sender=self) icon = icon_theme.load_icon(gtk.STOCK_DIALOG_QUESTION, \ icon_size, 0) except: log('Please install the GNOME icon theme.', sender=self) icon = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, \ True, 8, icon_size, icon_size)
def _get_tree_icon(self, icon_name, add_bullet=False, \ add_padlock=False, add_missing=False, icon_size=32, \ build_icon_from_file = False): """ Loads an icon from the current icon theme at the specified size, suitable for display in a gtk.TreeView. Additional emblems can be added on top of the icon.
7d388c3f7d730f4a4a487e5bdbf3a9a3736f1643 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/7d388c3f7d730f4a4a487e5bdbf3a9a3736f1643/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3413, 67, 3950, 12, 2890, 16, 4126, 67, 529, 16, 527, 67, 70, 19994, 33, 8381, 16, 521, 527, 67, 6982, 739, 33, 8381, 16, 527, 67, 7337, 33, 8381, 16, 4126, 67, 1467,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 3413, 67, 3950, 12, 2890, 16, 4126, 67, 529, 16, 527, 67, 70, 19994, 33, 8381, 16, 521, 527, 67, 6982, 739, 33, 8381, 16, 527, 67, 7337, 33, 8381, 16, 4126, 67, 1467,...
return self.same_as(src_type)
return self.same_as(src_type) or src_type is error_type
def assignable_from_resolved_type(self, src_type): return self.same_as(src_type)
c19c3f780897db03f52915360af802646c696f79 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2099/c19c3f780897db03f52915360af802646c696f79/PyrexTypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29486, 67, 2080, 67, 11792, 67, 723, 12, 2890, 16, 1705, 67, 723, 4672, 327, 365, 18, 14307, 67, 345, 12, 4816, 67, 723, 13, 578, 1705, 67, 723, 353, 555, 67, 723, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29486, 67, 2080, 67, 11792, 67, 723, 12, 2890, 16, 1705, 67, 723, 4672, 327, 365, 18, 14307, 67, 345, 12, 4816, 67, 723, 13, 578, 1705, 67, 723, 353, 555, 67, 723, 225, 2, -100, -1...
self.removeGroup(id)
self.removeGroup(id, keep_workspaces)
def removeGroups(self, ids, keep_workspaces=0): """Remove the group in the provided list (if possible).
7ee3cd4079b5402548070a92147dabfcaa73d905 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12230/7ee3cd4079b5402548070a92147dabfcaa73d905/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 3621, 12, 2890, 16, 3258, 16, 3455, 67, 1252, 9554, 33, 20, 4672, 3536, 3288, 326, 1041, 316, 326, 2112, 666, 261, 430, 3323, 2934, 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, 1206, 3621, 12, 2890, 16, 3258, 16, 3455, 67, 1252, 9554, 33, 20, 4672, 3536, 3288, 326, 1041, 316, 326, 2112, 666, 261, 430, 3323, 2934, 2, -100, -100, -100, -100, -100, -100, -100, -...
logger.log(5, 'XML-RPC method %s() returned successfully' % method)
logger.debug('XML-RPC method %s() returned successfully' % method)
def continue_request (self, data, request): logger = self.supervisord.options.logger try:
e44eae6f27119a7adfb49086dcad6bb6f1f1cf5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13620/e44eae6f27119a7adfb49086dcad6bb6f1f1cf5f/xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1324, 67, 2293, 261, 2890, 16, 501, 16, 590, 4672, 1194, 273, 365, 18, 9565, 3516, 517, 18, 2116, 18, 4901, 225, 775, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1324, 67, 2293, 261, 2890, 16, 501, 16, 590, 4672, 1194, 273, 365, 18, 9565, 3516, 517, 18, 2116, 18, 4901, 225, 775, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def make_plot(filename, grid_name, x_name='x', y_name='y', t_name='time', n_cols=6):
def make_plot(filename, grid_name, x_name='x', y_name='y', t_name='time', n_cols=6, outpath='', filename_prefix='LMA'):
def centers_to_edges(x): xedge=np.zeros(x.shape[0]+1) xedge[1:-1] = (x[:-1] + x[1:])/2.0 dx = np.mean(np.abs(xedge[2:-1] - xedge[1:-2])) xedge[0] = xedge[1] - dx xedge[-1] = xedge[-2] + dx return xedge
50dfdd797f6b57de0cc3776c3f82a53a894fe2e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7619/50dfdd797f6b57de0cc3776c3f82a53a894fe2e6/multiples_nc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17723, 67, 869, 67, 8746, 12, 92, 4672, 619, 7126, 33, 6782, 18, 22008, 12, 92, 18, 4867, 63, 20, 3737, 21, 13, 619, 7126, 63, 21, 30, 17, 21, 65, 273, 261, 92, 10531, 17, 21, 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, 17723, 67, 869, 67, 8746, 12, 92, 4672, 619, 7126, 33, 6782, 18, 22008, 12, 92, 18, 4867, 63, 20, 3737, 21, 13, 619, 7126, 63, 21, 30, 17, 21, 65, 273, 261, 92, 10531, 17, 21, 65...
select filePathId, pathId, path from FilePaths""")
select filePathId, pathId, path from FilePaths""")
def _createDirnames(self): logMe(2, "splitting paths in dirnames and basenames") cu = self.db.cursor() cu.execute("""create table tmpDirnames ( filePathId %(PRIMARYKEY)s, dirname %(PATHTYPE)s, basename %(PATHTYPE)s ) """ % self.db.keywords) # save a copy of FilePaths before updating the table definition cu.execute("""create table tmpFilePaths as select filePathId, pathId, path from FilePaths""") self.db.createIndex("tmpFilePaths", "tmpFilePathsIdx", "filePathId", check=False, unique=True) self.db.analyze("tmpFilePaths")
4dc0c36363fb622f801eca8aeea8e5f9f877ccbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8747/4dc0c36363fb622f801eca8aeea8e5f9f877ccbe/migrate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 1621, 1973, 12, 2890, 4672, 613, 4667, 12, 22, 16, 315, 4939, 1787, 2953, 316, 1577, 1973, 471, 2580, 6809, 7923, 15985, 273, 365, 18, 1966, 18, 9216, 1435, 15985, 18, 8837, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 1621, 1973, 12, 2890, 4672, 613, 4667, 12, 22, 16, 315, 4939, 1787, 2953, 316, 1577, 1973, 471, 2580, 6809, 7923, 15985, 273, 365, 18, 1966, 18, 9216, 1435, 15985, 18, 8837, ...
res = qname.match(tagname)
if self.__use_namespaces: res = qname.match(tagname) else: res = None
def parse_starttag(self, i): rawdata = self.rawdata # i points to start of tag end = endbracketfind.match(rawdata, i+1) if end is None: return -1 tag = starttagmatch.match(rawdata, i) if tag is None or tag.end(0) != end.end(0): self.syntax_error('garbage in starttag') return end.end(0) nstag = tagname = tag.group('tagname') if not self.__seen_starttag and self.__seen_doctype and \ tagname != self.__seen_doctype: self.syntax_error('starttag does not match DOCTYPE') if self.__seen_starttag and not self.stack: self.syntax_error('multiple elements on top level') k, j = tag.span('attrs') attrdict, nsdict, k = self.parse_attributes(tagname, k, j) self.stack.append((tagname, nsdict, nstag)) res = qname.match(tagname) if res is not None: prefix, nstag = res.group('prefix', 'local') if prefix is None: prefix = '' ns = None for t, d, nst in self.stack: if d.has_key(prefix): ns = d[prefix] if ns is None and prefix != '': ns = self.__namespaces.get(prefix) if ns is not None: nstag = ns + ' ' + nstag elif prefix != '': nstag = prefix + ':' + nstag # undo split self.stack[-1] = tagname, nsdict, nstag # translate namespace of attributes nattrdict = {} for key, val in attrdict.items(): res = qname.match(key) if res is not None: aprefix, key = res.group('prefix', 'local') if aprefix is None: aprefix = '' ans = None for t, d, nst in self.stack: if d.has_key(aprefix): ans = d[aprefix] if ans is None and aprefix != '': ans = self.__namespaces.get(aprefix) if ans is not None: key = ans + ' ' + key elif aprefix != '': key = aprefix + ':' + key elif ns is not None: key = ns + ' ' + key nattrdict[key] = val attrdict = nattrdict attributes = self.attributes.get(nstag) if attributes is not None: for key in attrdict.keys(): if not attributes.has_key(key): self.syntax_error("unknown attribute `%s' in tag `%s'" % (key, tagname)) for key, val in attributes.items(): if val is not None and not attrdict.has_key(key): attrdict[key] = val method = self.elements.get(nstag, (None, None))[0] self.finish_starttag(nstag, attrdict, method) if tag.group('slash') == '/': self.finish_endtag(tagname) return tag.end(0)
91c8f5901b806331105be9193411b28278d6517d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/91c8f5901b806331105be9193411b28278d6517d/xmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1937, 2692, 12, 2890, 16, 277, 4672, 1831, 892, 273, 365, 18, 1899, 892, 468, 277, 3143, 358, 787, 434, 1047, 679, 273, 679, 21025, 4720, 18, 1916, 12, 1899, 892, 16, 277, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 1937, 2692, 12, 2890, 16, 277, 4672, 1831, 892, 273, 365, 18, 1899, 892, 468, 277, 3143, 358, 787, 434, 1047, 679, 273, 679, 21025, 4720, 18, 1916, 12, 1899, 892, 16, 277, ...
self.__passcode = crypt.crypt(passcode, self.__salt)
self.__passcode = crypt.crypt(passcode, self.salt())
def __init__(self, name, notebook, id, system=None, passcode = ''): name = ' '.join(name.split()) self.__id = id self.__system = system self.__next_id = (_notebook.MAX_WORKSHEETS) * id self.__name = name self.__notebook = notebook self.__passcode = crypt.crypt(passcode, self.__salt) self.__passcrypt= True dir = list(name) for i in range(len(dir)): if not dir[i].isalnum() and dir[i] != '_': dir[i]='_' dir = ''.join(dir) self.__filename = dir self.__dir = '%s/%s'%(notebook.worksheet_directory(), dir) while os.path.exists(self.__dir): self.__dir += "_" self.__filename += '_' self.__comp_is_running = False if not os.path.exists(self.__dir): os.makedirs(self.__dir) self.__queue = [] self.__cells = [ ] for i in range(INITIAL_NUM_CELLS): self.append_new_cell()
96907a43deda83108eac7ae675cb94ed0bd22ac8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/96907a43deda83108eac7ae675cb94ed0bd22ac8/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 14718, 16, 612, 16, 2619, 33, 7036, 16, 1342, 710, 273, 875, 4672, 508, 273, 296, 2418, 5701, 12, 529, 18, 4939, 10756, 365, 16186, 350, 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, 1001, 2738, 972, 12, 2890, 16, 508, 16, 14718, 16, 612, 16, 2619, 33, 7036, 16, 1342, 710, 273, 875, 4672, 508, 273, 296, 2418, 5701, 12, 529, 18, 4939, 10756, 365, 16186, 350, 273, ...
writeResultXPCInterfacesArray(f, conf, frozenset(resulttypes))
def writeIncludesForInterface(iface): assert iface.kind == 'interface' resulttypes = [] for member in iface.stubMembers: resulttype = writeIncludesForMember(member) if resulttype is not None and not isVariantType(resulttype): resulttypes.append(resulttype.name) includeType(iface)
ba95b8f415d6cb96d8c6a3e563448bf0af49507c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11102/ba95b8f415d6cb96d8c6a3e563448bf0af49507c/qsgen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 563, 2352, 273, 5378, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 563, 723, 273, 1045, 16815, 1290, 441...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 16815, 1290, 1358, 12, 31479, 4672, 1815, 9751, 18, 9224, 422, 296, 5831, 11, 563, 2352, 273, 5378, 364, 3140, 316, 9751, 18, 12847, 6918, 30, 563, 723, 273, 1045, 16815, 1290, 441...
@interactive def find_file(self): file = self._base_find_file()
@rawprefixed def find_file(self, prefix): file = self._base_find_file(prefix)
def _calculate_prefix(self, names): if not names: return '' prefix = names[0] for name in names: common = 0 for c1, c2 in zip(prefix, name): if c1 != c2 or ' ' in (c1, c2): break common += 1 prefix = prefix[:common] return prefix
9cf664963c810017265be6070f855c2ebf9d1e00 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8283/9cf664963c810017265be6070f855c2ebf9d1e00/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11162, 67, 3239, 12, 2890, 16, 1257, 4672, 309, 486, 1257, 30, 327, 875, 1633, 273, 1257, 63, 20, 65, 364, 508, 316, 1257, 30, 2975, 273, 374, 364, 276, 21, 16, 276, 22, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11162, 67, 3239, 12, 2890, 16, 1257, 4672, 309, 486, 1257, 30, 327, 875, 1633, 273, 1257, 63, 20, 65, 364, 508, 316, 1257, 30, 2975, 273, 374, 364, 276, 21, 16, 276, 22, 316, ...
self.silc.send_channel_message(chan, msg.args[1])
self.silc.send_channel_message(chan, msg.args[1].decode('utf8', 'replace'))
def do_PRIVMSG(self, msg): if msg.args[0][0] == '#': chan = self.silc.channels[strip_leading_hash(msg.args[0])] self.silc.send_channel_message(chan, msg.args[1]) else: user = self.silc.users[msg.args[0]] self.silc.send_private_message(user, msg.args[1])
e53ca925d3622ef0a6d939d22b6cbc491bf6addb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2179/e53ca925d3622ef0a6d939d22b6cbc491bf6addb/Silc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7698, 58, 11210, 12, 2890, 16, 1234, 4672, 309, 1234, 18, 1968, 63, 20, 6362, 20, 65, 422, 2946, 4278, 3861, 273, 365, 18, 25119, 71, 18, 9114, 63, 6406, 67, 27200, 67, 2816...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7698, 58, 11210, 12, 2890, 16, 1234, 4672, 309, 1234, 18, 1968, 63, 20, 6362, 20, 65, 422, 2946, 4278, 3861, 273, 365, 18, 25119, 71, 18, 9114, 63, 6406, 67, 27200, 67, 2816...
if [x for idx, y in enumerate(mask) if idx > 0 and
if [y for idx, y in enumerate(mask) if idx > 0 and
def _is_valid_netmask(self, netmask): """Verify that the netmask is valid.
8d51c9ec48d76aafb487add6d61bc088fa724e6e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4528/8d51c9ec48d76aafb487add6d61bc088fa724e6e/ipaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 877, 67, 2758, 4455, 12, 2890, 16, 24172, 4672, 3536, 8097, 716, 326, 24172, 353, 923, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 877, 67, 2758, 4455, 12, 2890, 16, 24172, 4672, 3536, 8097, 716, 326, 24172, 353, 923, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.invite_job.link_value(lambda result: proc.spawn(self._on_invite, result))
self.invite_job.link_value(lambda _x, _y, result: proc.spawn(self._on_invite, result))
def __init__(self, sip, msrpsession=None, invite_job=None): self.sip = sip self.msrpsession = msrpsession self.invite_job = invite_job self.messages_to_send = deque() if self.invite_job is not None: self.invite_job.link_value(lambda result: proc.spawn(self._on_invite, result)) else: self.start_rendering_messages()
11003b09259d1ebe63973a928c8df3b649fa30f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/11003b09259d1ebe63973a928c8df3b649fa30f6/sip_im_session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10341, 16, 4086, 86, 1121, 893, 33, 7036, 16, 19035, 67, 4688, 33, 7036, 4672, 365, 18, 28477, 273, 10341, 365, 18, 959, 86, 1121, 893, 273, 4086, 86, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10341, 16, 4086, 86, 1121, 893, 33, 7036, 16, 19035, 67, 4688, 33, 7036, 4672, 365, 18, 28477, 273, 10341, 365, 18, 959, 86, 1121, 893, 273, 4086, 86, ...
EXAMPLES:
EXAMPLES::
def all_graph_colorings(G,n,count_only=False): """ Computes all n-colorings of the graph G by casting the graph coloring problem into an exact cover problem, and passing this into an implementation of the Dancing Links algorithm described by Knuth (who attributes the idea to Hitotumatu and Noshita). The construction works as follows: (columns) * The first |V| columns correspond to a vertex -- a 1 in this column indicates that that vertex has a color. * After those |V| columns, we add n*|E| columns -- a 1 in these columns indicate that a particular edge is incident to a vertex with a certain color. (rows) * For each vertex, add n rows; one for each color c. Place a 1 in the column corresponding to the vertex, and a 1 in the appropriate column for each edge incident to the vertex, indicating that that edge is incident to the color c. * If n > 2, the above construction cannot be exactly covered since each edge will be incident to only two vertices (and hence two colors) - so we add n*|E| rows, each one containing a 1 for each of the n*|E| columns. These get added to the cover solutions "for free" during the backtracking. Note that this construction results in n*|V| + 2*n*|E| + n*|E| entries in the matrix. The Dancing Links algorithm uses a sparse representation, so if the graph is simple, |E| <= |V|^2 and n <= |V|, this construction runs in O(|V|^3) time. Back-conversion to a coloring solution is a simple scan of the solutions, which will contain |V| + (n-2)*|E| entries, so runs in O(|V|^3) time also. For most graphs, the conversion will be much faster -- for example, a planar graph will be transformed for 4-coloring in linear time since |E| = O(|V|). REFERENCES: http://www-cs-staff.stanford.edu/~uno/papers/dancing-color.ps.gz EXAMPLES: sage: from sage.graphs.graph_coloring import all_graph_colorings sage: G = Graph({0:[1,2,3],1:[2]}) sage: n = 0 sage: for C in all_graph_colorings(G,3): ... parts = [C[k] for k in C] ... for P in parts: ... l = len(P) ... for i in range(l): ... for j in range(i+1,l): ... if G.has_edge(P[i],P[j]): ... raise RuntimeError, "Coloring Failed." ... n+=1 sage: print "G has %s 3-colorings."%n G has 12 3-colorings. TESTS: sage: G = Graph({0:[1,2,3],1:[2]}) sage: for C in all_graph_colorings(G,0): print C sage: for C in all_graph_colorings(G,-1): print C Traceback (most recent call last): ... ValueError: n must be non-negative. """ if n == 0: return if n < 0: raise ValueError, "n must be non-negative." V = G.vertices() E = G.edges() nV=len(V) nE=len(E) ones = [] N = xrange(n) Vd= {} colormap = {} k = 0 for i in range(nV): v = V[i] Vd[v] = i for c in N: ones.append([k, [i]]) colormap[k] = (v,c) k+=1 kk = nV for e in E: for c in N: v0 = n*Vd[e[0]]+c v1 = n*Vd[e[1]]+c ones[v0][1].append(kk+c) ones[v1][1].append(kk+c) kk+=n if n > 2: for i in range(n*nE): ones.append([k+i, [nV+i]]) colors = rainbow(n) for i in range(len(ones)): ones[i] = ones[i][1] try: for a in DLXCPP(ones): if count_only: yield 1 continue coloring = {} for x in a: if colormap.has_key(x): v,c = colormap[x] if coloring.has_key(colors[c]): coloring[colors[c]].append(v) else: coloring[colors[c]] = [v] yield coloring except RuntimeError: raise RuntimeError, "Too much recursion! Graph coloring failed."
7056b61dfa30c6705aab69c7fdf3017463c8aae2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/7056b61dfa30c6705aab69c7fdf3017463c8aae2/graph_coloring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 3536, 14169, 281, 777, 290, 17, 3266, 899, 434, 326, 2667, 611, 635, 27660, 326, 2667, 2036, 310, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 67, 4660, 67, 3266, 899, 12, 43, 16, 82, 16, 1883, 67, 3700, 33, 8381, 4672, 3536, 14169, 281, 777, 290, 17, 3266, 899, 434, 326, 2667, 611, 635, 27660, 326, 2667, 2036, 310, 61...
self.assertEquals(b.getvalue(), b"abcdef\n")
self.assertEquals(b.getvalue(), b"abcdef" + os.linesep.encode())
def testEncodingErrorsWriting(self): # (1) default b = io.BytesIO() t = io.TextIOWrapper(b, encoding="ascii") self.assertRaises(UnicodeError, t.write, "\xff") # (2) explicit strict b = io.BytesIO() t = io.TextIOWrapper(b, encoding="ascii", errors="strict") self.assertRaises(UnicodeError, t.write, "\xff") # (3) ignore b = io.BytesIO() t = io.TextIOWrapper(b, encoding="ascii", errors="ignore") t.write("abc\xffdef\n") t.flush() self.assertEquals(b.getvalue(), b"abcdef\n") # (4) replace b = io.BytesIO() t = io.TextIOWrapper(b, encoding="ascii", errors="replace") t.write("abc\xffdef\n") t.flush() self.assertEquals(b.getvalue(), b"abc?def\n")
e4f966eda98d92ac1a751649a86b4cff0a28f995 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/e4f966eda98d92ac1a751649a86b4cff0a28f995/test_io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4705, 4229, 18835, 12, 2890, 4672, 468, 261, 21, 13, 805, 324, 273, 2527, 18, 2160, 4294, 1435, 268, 273, 2527, 18, 1528, 4294, 3611, 12, 70, 16, 2688, 1546, 9184, 7923, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4705, 4229, 18835, 12, 2890, 4672, 468, 261, 21, 13, 805, 324, 273, 2527, 18, 2160, 4294, 1435, 268, 273, 2527, 18, 1528, 4294, 3611, 12, 70, 16, 2688, 1546, 9184, 7923, 365, 18,...
print
def doTests(): '''Perform various tests.''' print 'doing tests ...' #t1 = Node('root', [Node('child1',[]),Node('child2',[])]) #print t1
8d423a3a49fcffb9fd2045c1638eeede3472d2e1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2720/8d423a3a49fcffb9fd2045c1638eeede3472d2e1/simlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 14650, 13332, 9163, 4990, 11191, 7434, 1093, 6309, 225, 296, 2896, 310, 7434, 25956, 468, 88, 21, 273, 2029, 2668, 3085, 2187, 306, 907, 2668, 3624, 21, 2187, 8526, 3631, 907, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 14650, 13332, 9163, 4990, 11191, 7434, 1093, 6309, 225, 296, 2896, 310, 7434, 25956, 468, 88, 21, 273, 2029, 2668, 3085, 2187, 306, 907, 2668, 3624, 21, 2187, 8526, 3631, 907, 2668, ...
global VERBOSE
def CompileC(obj=0,src=0,ipath=[],opts=[]): if ((obj==0)|(src==0)): sys.exit("syntax error in CompileC directive"); ipath = ["built/tmp"] + ipath + ["built/include"] fullsrc = CxxFindSource(src, ipath) if (fullsrc == 0): sys.exit("Cannot find source file "+src) dep = CxxCalcDependencies(fullsrc, ipath, []) if (COMPILER=="MSVC7"): wobj = "built/tmp/"+obj if (older(wobj, dep)): global VERBOSE if VERBOSE >= 0: checkIfNewDir(ipath[1]) cmd = 'cl.exe /Fo"' + wobj + '" /nologo /c'; cmd = cmd + " /I\"built/python/include\"" if (opts.count("DXSDK")): cmd = cmd + ' /I"' + DirectXSDK + '/include"' if (opts.count("MAYA5")): cmd = cmd + ' /I"' + Maya5SDK + 'include"' if (opts.count("MAYA6")): cmd = cmd + ' /I"' + Maya6SDK + 'include"' for max in ["MAX5","MAX6","MAX7"]: if (PkgSelected(opts,max)): cmd = cmd + ' /I"' + MAXSDK[max] + 'include" /I"' + MAXSDKCS[max] + '" /D' + max for pkg in PACKAGES: if (pkg != "MAYA5") and (pkg != "MAYA6") and PkgSelected(opts,pkg): cmd = cmd + ' /I"' + THIRDPARTY + pkg.lower() + "/include" + '"' for x in ipath: cmd = cmd + " /I \"" + x + "\""; if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305' if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " /D_DEBUG /Zc:forScope /MDd /Zi /RTCs /GS " if (OPTIMIZE==2): cmd = cmd + " /D_DEBUG /Zc:forScope /MDd /Zi /RTCs /GS " if (OPTIMIZE==3): cmd = cmd + " /Zc:forScope /MD /O2 /Ob2 /G6 /Zi /DFORCE_INLINING " if (OPTIMIZE==4): cmd = cmd + " /Zc:forScope /MD /O2 /Ob2 /G6 /GL /Zi /DFORCE_INLINING /DNDEBUG " cmd = cmd + " /Fd\"" + wobj[:-4] + ".pdb\""; building = buildingwhat(opts) if (building): cmd = cmd + " /DBUILDING_"+building cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 \"" + fullsrc + "\"" oscmd(cmd) updatefiledate(wobj) if (COMPILER=="LINUXA"): wobj = "built/tmp/" + obj[:-4] + ".o" if (older(wobj, dep)): global VERBOSE if VERBOSE >= 0: checkIfNewDir(ipath[1]) if (src[-2:]==".c"): cmd = "gcc -c -o "+wobj else: cmd = "g++ -ftemplate-depth-30 -c -o "+wobj cmd = cmd + ' -I"' + PythonSDK + '"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I"' + THIRDPARTY + 'vrpn/include"' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I"' + THIRDPARTY + 'fftw/include"' if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I"' + THIRDPARTY + 'fmod/include"' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I"' + THIRDPARTY + 'nvidiacg/include"' if (PkgSelected(opts,"NSPR")): cmd = cmd + ' -I"' + THIRDPARTY + 'nspr/include"' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2' for x in ipath: cmd = cmd + ' -I"' + x + '"' if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA' if (OPTIMIZE==1): cmd = cmd + " -g" if (OPTIMIZE==2): cmd = cmd + " -O1" if (OPTIMIZE==3): cmd = cmd + " -O2" if (OPTIMIZE==4): cmd = cmd + " -O2" building = buildingwhat(opts) if (building): cmd = cmd + " -DBUILDING_" + building cmd = cmd + " " + fullsrc oscmd(cmd) updatefiledate(wobj)
4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 12, 2603, 33, 20, 16, 4816, 33, 20, 16, 625, 421, 22850, 6487, 4952, 33, 8526, 4672, 309, 14015, 2603, 631, 20, 14047, 12, 4816, 631, 20, 3719, 30, 2589, 18, 8593, 2932, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 12, 2603, 33, 20, 16, 4816, 33, 20, 16, 625, 421, 22850, 6487, 4952, 33, 8526, 4672, 309, 14015, 2603, 631, 20, 14047, 12, 4816, 631, 20, 3719, 30, 2589, 18, 8593, 2932, 1...
dom = _rec_get(ids2, field_obj, working_table._parent_name, left=left, prefix=field._obj) else: dom = _rec_get(ids2, working_table, left)
dom = _rec_get(ids2, field_obj, left=left, prefix=field._obj) else: dom = _rec_get(ids2, working_table, parent=left)
def _rec_convert(ids): if field_obj == table: return ids return self.__execute_recursive_in(cr, field._id1, field._rel, field._id2, ids)
343f552b9ce6074fd255a350098ce64f7e754679 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/343f552b9ce6074fd255a350098ce64f7e754679/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 6283, 12, 2232, 4672, 309, 652, 67, 2603, 422, 1014, 30, 327, 3258, 327, 365, 16186, 8837, 67, 10543, 67, 267, 12, 3353, 16, 652, 6315, 350, 21, 16, 652, 6315, 2878, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 6283, 12, 2232, 4672, 309, 652, 67, 2603, 422, 1014, 30, 327, 3258, 327, 365, 16186, 8837, 67, 10543, 67, 267, 12, 3353, 16, 652, 6315, 350, 21, 16, 652, 6315, 2878, 1...
title = title.replace("_", " ")
jsontmplf = open(os.path.join('tool','tmpl.json'),"rU") json_tmpl = jsontmplf.read()
def main(dist, scan): res = "" structurize = False firstCategory = True for category in os.listdir(scan): if category in [".svn", ".DS_Store"]: continue ext = os.path.splitext(category)[1] if ext == ".html" or ext == ".js": continue if not firstCategory: res += "}," res += "{" res += "\"classname\":\""+category+"\",\"tests\":[\n" firstItem = True lastbasename = None for item in os.listdir(os.path.join(scan, category)): if item == ".svn": continue if os.path.splitext(item)[1] != ".html": continue title = item[:item.find(".")] if "_" in title: nr = title[title.find("_")+1:] basename = title[:title.find("_")] else: nr = 0 basename = title title = title.replace("_", " ") if structurize: if lastbasename != basename: firstItem = True if lastbasename != None: res += "\n]},\n" res += "{" res += "\"classname\":\""+basename+"\",\"desc\":\"Folder %s\",\"tests\":[\n" % basename if not firstItem: res += ",\n" res += '{\"nr\":"%s",\"title\":"%s",\"name\":"%s"}' % (nr, title, item) lastbasename = basename firstItem = False if structurize: if lastbasename != None: res += "\n]}\n" res += "\n]\n" firstCategory = False res += "}" distdir = os.path.dirname(dist) if not os.path.exists(distdir): os.makedirs(distdir) content = basic % res outputFile = codecs.open(dist, encoding="utf-8", mode="w", errors="replace") outputFile.write(content) outputFile.flush() outputFile.close()
a444ba5dd52fe79e230a6b635c98d2eb5f790204 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/a444ba5dd52fe79e230a6b635c98d2eb5f790204/genjson.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 4413, 16, 4135, 4672, 400, 273, 1408, 1958, 295, 554, 273, 1083, 225, 1122, 4457, 273, 1053, 364, 3150, 316, 1140, 18, 1098, 1214, 12, 9871, 4672, 309, 3150, 316, 8247, 18, 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, 12, 4413, 16, 4135, 4672, 400, 273, 1408, 1958, 295, 554, 273, 1083, 225, 1122, 4457, 273, 1053, 364, 3150, 316, 1140, 18, 1098, 1214, 12, 9871, 4672, 309, 3150, 316, 8247, 18, 3...
'priority': fields.selection([('0','Not urgent'),('1','Urgent')], 'Priority'),
'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'),
def _check_product_lot(self, cr, uid, ids): for move in self.browse(cr, uid, ids): if move.prodlot_id and (move.prodlot_id.product_id.id != move.product_id.id): return False return True
369221b47101072e094ad2d02fe2edd2b47690aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/369221b47101072e094ad2d02fe2edd2b47690aa/stock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 67, 5896, 67, 23372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 364, 3635, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 309, 3635, 18, 685, 5761, 352, 67, 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, 1893, 67, 5896, 67, 23372, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 364, 3635, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 4672, 309, 3635, 18, 685, 5761, 352, 67, 3...
if not t in possible_display_types: possible_display_types.append(t)
if not t in possible: possible.append(t)
def eventhandler(self, event, menuw=None): if event == DIRECTORY_CHANGE_DISPLAY_TYPE and self.item_menu.visible: possible_display_types = [ ]
e29d880d94d54392035abf993d3ebc58250e2320 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e29d880d94d54392035abf993d3ebc58250e2320/directory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 16, 3824, 91, 33, 7036, 4672, 309, 871, 422, 5707, 67, 14473, 67, 17463, 67, 2399, 471, 365, 18, 1726, 67, 5414, 18, 8613, 30, 3323, 67, 5417, 67, 2352,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 16, 3824, 91, 33, 7036, 4672, 309, 871, 422, 5707, 67, 14473, 67, 17463, 67, 2399, 471, 365, 18, 1726, 67, 5414, 18, 8613, 30, 3323, 67, 5417, 67, 2352,...
pdbStreamFile.write('''SRCSRV: ini ------------------------------------------------\r\nVERSION=1\r\nSRCSRV: variables ------------------------------------------\r\nCVS_EXTRACT_CMD=%fnchdir%(%CVS_WORKINGDIR%)cvs.exe -d %fnvar%(%var2%) checkout -r %var4% %var3%\r\nCVS_EXTRACT_TARGET=%targ%\%var2%\%fnbksl%(%var3%)\%fnfile%(%var1%)\r\nCVS_WORKING_DIR=%targ%\%var2%\%fnbksl%(%var3%)\r\nMYSERVER=%CVSROOT%\r\nSRCSRVTRG=%CVS_WORKING_DIR%\r\nSRCSRVCMD=%CVS_EXTRACT_CMD%\r\nSRCSRV: source files ---------------------------------------\r\n''')
pdbStreamFile.write('''SRCSRV: ini ------------------------------------------------\r\nVERSION=1\r\nSRCSRV: variables ------------------------------------------\r\nCVS_EXTRACT_CMD=%fnchdir%(%CVS_WORKINGDIR%)cvs.exe -d %fnvar%(%var2%) checkout -r %var4% %var3%\r\nCVS_EXTRACT_TARGET=%targ%\%var2%\%fnbksl%(%var3%)\%fnfile%(%var1%)\r\nCVS_WORKING_DIR=%targ%\r\nMYSERVER=''') pdbStreamFile.write(cvs_root) pdbStreamFile.write('''\r\nSRCSRVTRG=%targ%\%fnbksl%(%var3%)\r\nSRCSRVCMD=%CVS_EXTRACT_CMD%\r\nSRCSRV: source files ---------------------------------------\r\n''')
def SourceIndex(fileStream, outputPath): """Takes a list of files, writes info to a data block in a .stream file""" # Creates a .pdb.stream file in the mozilla\objdir to be used for source indexing # Create the srcsrv data block that indexes the pdb file result = True pdbStreamFile = open(outputPath, "w") pdbStreamFile.write('''SRCSRV: ini ------------------------------------------------\r\nVERSION=1\r\nSRCSRV: variables ------------------------------------------\r\nCVS_EXTRACT_CMD=%fnchdir%(%CVS_WORKINGDIR%)cvs.exe -d %fnvar%(%var2%) checkout -r %var4% %var3%\r\nCVS_EXTRACT_TARGET=%targ%\%var2%\%fnbksl%(%var3%)\%fnfile%(%var1%)\r\nCVS_WORKING_DIR=%targ%\%var2%\%fnbksl%(%var3%)\r\nMYSERVER=%CVSROOT%\r\nSRCSRVTRG=%CVS_WORKING_DIR%\r\nSRCSRVCMD=%CVS_EXTRACT_CMD%\r\nSRCSRV: source files ---------------------------------------\r\n''') pdbStreamFile.write(fileStream) # can't do string interpolation because the source server also uses this and so there are % in the above pdbStreamFile.write("SRCSRV: end ------------------------------------------------\r\n\n") pdbStreamFile.close() return result
758a6b78450ffab940532ff75cb7103acc041684 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/758a6b78450ffab940532ff75cb7103acc041684/symbolstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4998, 1016, 12, 768, 1228, 16, 19566, 4672, 3536, 11524, 279, 666, 434, 1390, 16, 7262, 1123, 358, 279, 501, 1203, 316, 279, 263, 3256, 585, 8395, 468, 10210, 279, 263, 17414, 18, 3256, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4998, 1016, 12, 768, 1228, 16, 19566, 4672, 3536, 11524, 279, 666, 434, 1390, 16, 7262, 1123, 358, 279, 501, 1203, 316, 279, 263, 3256, 585, 8395, 468, 10210, 279, 263, 17414, 18, 3256, ...
sage: FreeAlgebra(GF(5),3, ['xx, zba, Y'])
sage: FreeAlgebra(GF(5),3, 'xx, zba, Y')
def FreeAlgebra(R, n, names): """ Return the free algebra over the ring $R$ on $n$ generators with given names. INPUT: R -- ring n -- integer names -- string or list/tuple of n strings OUTPUT: a free algebra EXAMPLES: sage: FreeAlgebra(GF(5),3,'x') Free Algebra on 3 generators (x0, x1, x2) over Finite Field of size 5 sage: F.<x,y,z> = FreeAlgebra(GF(5),3) sage: (x+y+z)^2 x^2 + x*y + x*z + y*x + y^2 + y*z + z*x + z*y + z^2 sage: FreeAlgebra(GF(5),3, ['xx, zba, Y']) Free Algebra on 3 generators (xx, zba, Y) over Finite Field of size 5 sage: FreeAlgebra(GF(5),3, 'abc') Free Algebra on 3 generators (a, b, c) over Finite Field of size 5 sage: FreeAlgebra(GF(5),1, 'z') Free Algebra on 1 generators (z,) over Finite Field of size 5 sage: FreeAlgebra(GF(5),1, ['alpha']) Free Algebra on 1 generators (alpha,) over Finite Field of size 5 sage: FreeAlgebra(FreeAlgebra(ZZ,1,'a'), 2, 'x') Free Algebra on 2 generators (x0, x1) over Free Algebra on 1 generators (a,) over Integer Ring Free algebras are globally unique: sage: F = FreeAlgebra(ZZ,3,'x,y,z') sage: G = FreeAlgebra(ZZ,3,'x,y,z') sage: F is G True Free algebras commute with their base ring. sage: K.<a,b> = FreeAlgebra(QQ,2) sage: K.is_commutative() False sage: L.<c> = FreeAlgebra(K,1) sage: L.is_commutative() False sage: s = a*b^2 * c^3; s a*b^2*c^3 sage: parent(s) Free Algebra on 1 generators (c,) over Free Algebra on 2 generators (a, b) over Rational Field sage: c^3 * a * b^2 a*b^2*c^3 """ names = sage.structure.parent_gens.normalize_names(n, names) return cache(R, n, names)
5a80ba4149eee9e1da950d762b960a7c9ce7b985 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5a80ba4149eee9e1da950d762b960a7c9ce7b985/free_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15217, 1067, 29087, 12, 54, 16, 290, 16, 1257, 4672, 3536, 2000, 326, 4843, 524, 29087, 1879, 326, 9221, 271, 54, 8, 603, 271, 82, 8, 13327, 598, 864, 1257, 18, 225, 12943, 30, 534, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15217, 1067, 29087, 12, 54, 16, 290, 16, 1257, 4672, 3536, 2000, 326, 4843, 524, 29087, 1879, 326, 9221, 271, 54, 8, 603, 271, 82, 8, 13327, 598, 864, 1257, 18, 225, 12943, 30, 534, ...
self.aug += line1 for line2 in f.readlines(): self.aug += line2 break
augs = [line1] while True: line2 = f.readline() if line2.split() == ngr: print "hey" chgdiff = np.empty(ng) self._read_chg(f, chgdiff, atoms.get_volume()) self.chgdiff.append(chgdiff) elif line2 == '': break else: augs.append(line2) if len(self.aug) == 0: self.aug = ''.join(augs) augs = [] else: self.augdiff = ''.join(augs)
def read(self, filename='CHG'): """Read CHG or CHGCAR file.
a1f6be0e6b22577754df30ad0bc7ef1a87c06eec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5735/a1f6be0e6b22577754df30ad0bc7ef1a87c06eec/vasp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 1544, 2218, 1792, 43, 11, 4672, 3536, 1994, 6469, 43, 578, 6469, 15396, 985, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 1544, 2218, 1792, 43, 11, 4672, 3536, 1994, 6469, 43, 578, 6469, 15396, 985, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def GetData(lang, params, verbose = False, useAPI = False, retryCount = 5, encodeTitle = True):
def GetData(params, site = None, verbose = False, useAPI = False, retryCount = 5, encodeTitle = True):
def GetData(lang, params, verbose = False, useAPI = False, retryCount = 5, encodeTitle = True): """Get data from the query api, and convert it into a data object """ site = wikipedia.getSite(lang) for k,v in params.iteritems(): if not IsString(v): params[k] = unicode(v) params['format'] = 'json' if not useAPI: params['noprofile'] = '' for k,v in params.iteritems(): if type(v) == type(u''): params[k] = ToUtf8(v) # Titles param might be long, case convert it to post request data = None titlecount = 0 if 'titles' in params: titlecount = params['titles'].count('|') if encodeTitle: data = urllib.urlencode({'titles' : params['titles']}) del params['titles'] if useAPI: path = site.api_address() + urllib.urlencode(params.items()) else: path = site.query_address() + urllib.urlencode(params.items()) if verbose: if titlecount > 0: wikipedia.output(u"Requesting %d titles from %s:%s" % (titlecount, lang, path)) else: wikipedia.output(u"Request %s:%s" % (lang, path)) lastError = None retry_idle_time = 5 while retryCount >= 0: try: jsontext = "Nothing received" jsontext = site.getUrl( path, retry=True, data=data ) # This will also work, but all unicode strings will need to be converted from \u notation # decodedObj = eval( jsontext ) return simplejson.loads( jsontext ) except ValueError, error: retryCount -= 1 wikipedia.output(u"Error downloading data: %s" % error) wikipedia.output(u"Request %s:%s" % (lang, path)) wikipedia.debugDump('ApiGetDataParse', site, str(error) + '\n%s' % path, jsontext) lastError = error if retryCount >= 0: wikipedia.output(u"Retrying in %i seconds..." % retry_idle_time) time.sleep(retry_idle_time) # Next time wait longer, but not longer than half an hour retry_idle_time *= 2 if retry_idle_time > 300: retry_idle_time = 300 raise lastError
08414f3f5b7cf51840074f2f49cc6f02c23051a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/08414f3f5b7cf51840074f2f49cc6f02c23051a6/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 2010, 16, 2834, 273, 599, 16, 3988, 273, 1083, 16, 999, 2557, 273, 1083, 16, 30084, 273, 1381, 16, 2017, 4247, 273, 1053, 4672, 3536, 967, 501, 628, 326, 843, 1536, 16, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 2010, 16, 2834, 273, 599, 16, 3988, 273, 1083, 16, 999, 2557, 273, 1083, 16, 30084, 273, 1381, 16, 2017, 4247, 273, 1053, 4672, 3536, 967, 501, 628, 326, 843, 1536, 16, 471,...
False
False
def has_element(self, item): """ Returns boolean value of "item in self" - however *ignores* parentage. EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: g = G([(1,2,3,4)]); g (1,2,3,4) sage: G.has_element(g) True sage: h = H([(1,2),(3,4)]); h (1,2)(3,4) sage: G.has_element(h) False """ item = PermutationGroupElement(item, self, check=False) return item in self.list()
3d7a2db17ef7b85af951b4c4b603c8139fb89c43 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3d7a2db17ef7b85af951b4c4b603c8139fb89c43/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 2956, 12, 2890, 16, 761, 4672, 3536, 2860, 1250, 460, 434, 315, 1726, 316, 365, 6, 300, 14025, 380, 724, 3485, 14, 982, 410, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 2956, 12, 2890, 16, 761, 4672, 3536, 2860, 1250, 460, 434, 315, 1726, 316, 365, 6, 300, 14025, 380, 724, 3485, 14, 982, 410, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, ...
def grad(self, inputs, gz):
def grad(self, inputs, (gz, )):
def grad(self, inputs, gz): return [None]
14ab328e337f90570bc8eb2b3584210de2626775 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12438/14ab328e337f90570bc8eb2b3584210de2626775/_test_gradient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6058, 12, 2890, 16, 4540, 16, 261, 9764, 16, 262, 4672, 327, 306, 7036, 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, 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, 6058, 12, 2890, 16, 4540, 16, 261, 9764, 16, 262, 4672, 327, 306, 7036, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.taskListBox.select_set(0)
def updateTaskListBox(self): # Get a list of task names taskNames = [] self.__taskDict = {} count = 0 for taskPriList in self.taskMgr.taskList: for task in taskPriList: if ((task is not None) and (not task.isRemoved())): taskNames.append(task.name) self.__taskDict[count] = task count += 1 if taskNames: self.taskListBox.setlist(taskNames) # And set current index (so keypresses will start with index 0) self.taskListBox.component('listbox').activate(0) # Select first item self.taskListBox.select_set(0) self.setCurrentTask()
fcff44fe47600267253db596afce62a7737cd10b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/fcff44fe47600267253db596afce62a7737cd10b/TaskManagerPanel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2174, 682, 3514, 12, 2890, 4672, 468, 968, 279, 666, 434, 1562, 1257, 1562, 1557, 273, 5378, 365, 16186, 4146, 5014, 273, 2618, 1056, 273, 374, 364, 1562, 52, 566, 682, 316, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2174, 682, 3514, 12, 2890, 4672, 468, 968, 279, 666, 434, 1562, 1257, 1562, 1557, 273, 5378, 365, 16186, 4146, 5014, 273, 2618, 1056, 273, 374, 364, 1562, 52, 566, 682, 316, 365, ...
hostport = urllib.quote("%s:%s" % (host, port), safe = ':')
hostport = urllib.quote("%s:%s" % (host, port), safe = ':[]') else: hostport = host
def urlUnsplit(urlTuple): """Recompose a split URL as returned by urlSplit into a single string """ scheme, user, passwd, host, port, path, query, fragment = urlTuple userpass = None if user: if passwd: userpass = "%s:${passwd}" % (urllib.quote(user)) else: userpass = urllib.quote(user) hostport = host if port is not None: hostport = urllib.quote("%s:%s" % (host, port), safe = ':') netloc = hostport if userpass: netloc = "%s@%s" % (userpass, hostport) urlTempl = urlparse.urlunsplit((scheme, netloc, path, query, fragment)) if passwd is None: return urlTempl return ProtectedTemplate(urlTempl, passwd = ProtectedString(urllib.quote(passwd)))
077fff090f0964e05bc71f41ea112f6bee09f042 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8747/077fff090f0964e05bc71f41ea112f6bee09f042/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 984, 4939, 12, 718, 9038, 4672, 3536, 426, 23658, 279, 1416, 1976, 487, 2106, 635, 880, 5521, 1368, 279, 2202, 533, 3536, 4355, 16, 729, 16, 19093, 16, 1479, 16, 1756, 16, 589, 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, 880, 984, 4939, 12, 718, 9038, 4672, 3536, 426, 23658, 279, 1416, 1976, 487, 2106, 635, 880, 5521, 1368, 279, 2202, 533, 3536, 4355, 16, 729, 16, 19093, 16, 1479, 16, 1756, 16, 589, 16...
new_lock = response.text[2]
new_lock = response.text[2]
def gump_response(char, args, response): if len(args) < 1 or response.button != 1: return key = wolfpack.finditem(args[0]) if not char.canreach(key, 5): char.socket.clilocmessage(501661) return # Rename new_name = response.text[1][:30] # 30 Chars max. key.name = new_name char.socket.sysmessage("You renamed the key to '%s'" % new_name) # Rekey if char.gm: new_lock = response.text[2] if len(new_lock) != 0: key.settag('lock', new_lock) char.socket.sysmessage('This key now unlocks: ' + new_lock) else: key.deltag('lock') char.socket.sysmessage('You erase the lock information from the key.') key.resendtooltip()
516c1fcdf800cd69abc81c17dada3a6bf321ca8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/516c1fcdf800cd69abc81c17dada3a6bf321ca8c/key.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 2801, 67, 2740, 12, 3001, 16, 833, 16, 766, 4672, 309, 562, 12, 1968, 13, 411, 404, 578, 766, 18, 5391, 480, 404, 30, 327, 225, 498, 273, 341, 355, 74, 2920, 18, 4720, 1726, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 2801, 67, 2740, 12, 3001, 16, 833, 16, 766, 4672, 309, 562, 12, 1968, 13, 411, 404, 578, 766, 18, 5391, 480, 404, 30, 327, 225, 498, 273, 341, 355, 74, 2920, 18, 4720, 1726, 1...
This is intended to be called recursively.
@note: This is intended to be called recursively. @type disk: L{objects.disk} @param disk: the disk object we should remove @rtype: boolean @return: the success of the operation
def RemoveBlockDevice(disk): """Remove a block device. This is intended to be called recursively. """ try: # since we are removing the device, allow a partial match # this allows removal of broken mirrors rdev = _RecursiveFindBD(disk, allow_partial=True) except errors.BlockDeviceError, err: # probably can't attach logging.info("Can't attach to device %s in remove", disk) rdev = None if rdev is not None: r_path = rdev.dev_path result = rdev.Remove() if result: DevCacheManager.RemoveCache(r_path) else: result = True if disk.children: for child in disk.children: result = result and RemoveBlockDevice(child) return result
10c2650b20cea3203db19baa02cca416127a3cea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/10c2650b20cea3203db19baa02cca416127a3cea/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3581, 1768, 3654, 12, 10863, 4672, 3536, 3288, 279, 1203, 2346, 18, 225, 632, 7652, 30, 1220, 353, 12613, 358, 506, 2566, 8536, 18, 225, 632, 723, 4234, 30, 511, 95, 6911, 18, 10863, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3581, 1768, 3654, 12, 10863, 4672, 3536, 3288, 279, 1203, 2346, 18, 225, 632, 7652, 30, 1220, 353, 12613, 358, 506, 2566, 8536, 18, 225, 632, 723, 4234, 30, 511, 95, 6911, 18, 10863, 9...
value = cur.value = cur.value.withmemory(substs) if value.simple(): substs[offset] = value
if cur.value.simple(): substs[offset] = cur.value
def optimize_propagate(self, node): if not isinstance(node, ComplexNode): return node
b03aadd5b3cad0ef70b4d2812c22eb9f2db4fcec /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2040/b03aadd5b3cad0ef70b4d2812c22eb9f2db4fcec/esotope-bfc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 5986, 346, 340, 12, 2890, 16, 756, 4672, 309, 486, 1549, 12, 2159, 16, 16060, 907, 4672, 327, 756, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 5986, 346, 340, 12, 2890, 16, 756, 4672, 309, 486, 1549, 12, 2159, 16, 16060, 907, 4672, 327, 756, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
type=%s AND
type=%s AND
def _find(node, node2): # Check if xpath query or normal inherit (with field matching) if node2.nodeType == node2.ELEMENT_NODE and node2.localName == 'xpath': res = xpath.Evaluate(node2.getAttribute('expr'), node) return res and res[0] else: if node.nodeType == node.ELEMENT_NODE and node.localName == node2.localName: res = True for attr in node2.attributes.keys(): if attr == 'position': continue if node.hasAttribute(attr): if node.getAttribute(attr)==node2.getAttribute(attr): continue res = False if res: return node for child in node.childNodes: res = _find(child, node2) if res: return res return None
ba8ece1dc9ab078a17f1be049131164614401ceb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/ba8ece1dc9ab078a17f1be049131164614401ceb/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 12, 2159, 16, 756, 22, 4672, 468, 2073, 309, 6748, 843, 578, 2212, 6811, 261, 1918, 652, 3607, 13, 309, 756, 22, 18, 2159, 559, 422, 756, 22, 18, 10976, 67, 8744, 471, 756...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 12, 2159, 16, 756, 22, 4672, 468, 2073, 309, 6748, 843, 578, 2212, 6811, 261, 1918, 652, 3607, 13, 309, 756, 22, 18, 2159, 559, 422, 756, 22, 18, 10976, 67, 8744, 471, 756...
for host, (at, autodir) in self._get_hosts(host).iteritems():
for host, at, autodir in self._get_hosts(host):
def start(self, test, host=None): self._install() encoded_args = encode_args(self.name, self.args, self.dargs) control_script = run_profiler_control % (encoded_args, self.name) for host, (at, autodir) in self._get_hosts(host).iteritems(): fifo_pattern = os.path.join(autodir, "profiler.*") host.run("rm -f %s" % fifo_pattern) host.run("mkfifo %s" % os.path.join(autodir, "profiler.ready")) try: at.run(control_script, background=True) self._wait_on_client(host, autodir, "ready") self._signal_client(host, autodir, "start")
ff19f5f24bcb393ece8b98216938f887984eba8a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/ff19f5f24bcb393ece8b98216938f887984eba8a/profiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 16, 1842, 16, 1479, 33, 7036, 4672, 365, 6315, 5425, 1435, 3749, 67, 1968, 273, 2017, 67, 1968, 12, 2890, 18, 529, 16, 365, 18, 1968, 16, 365, 18, 72, 1968, 13, 3325, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 16, 1842, 16, 1479, 33, 7036, 4672, 365, 6315, 5425, 1435, 3749, 67, 1968, 273, 2017, 67, 1968, 12, 2890, 18, 529, 16, 365, 18, 1968, 16, 365, 18, 72, 1968, 13, 3325, ...
_re_format = re.compile('^("?(?P<display_name>[^>]*[^"\s])"?\s*)?<(?P<uri>.*?)>$')
_re_format = re.compile('^("?(?P<display_name>[^<]*[^"\s])"?)?\s*<(?P<uri>.+)>$')
def __str__(self): result = [] if self.to: result.append('To: %s' % self.format_address(self.to)) if self.from_: result.append('From: %s' % self.format_address(self.from_)) if self.datetime: result.append('DateTime: %s' % self.datetime.isoformat()) result.append('') result.append('Content-Type: %s' % self.content_type) result.append('') result.append(self.msg) return '\r\n'.join(result)
424b0ac03abdd054339348d01530a11fbbc8e732 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/424b0ac03abdd054339348d01530a11fbbc8e732/cpim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 563, 273, 5378, 309, 365, 18, 869, 30, 563, 18, 6923, 2668, 774, 30, 738, 87, 11, 738, 365, 18, 2139, 67, 2867, 12, 2890, 18, 869, 3719, 309, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 563, 273, 5378, 309, 365, 18, 869, 30, 563, 18, 6923, 2668, 774, 30, 738, 87, 11, 738, 365, 18, 2139, 67, 2867, 12, 2890, 18, 869, 3719, 309, 365, 1...
result[proj['id']]['tasks'] = str(proj['count']) + ' opens, ' + str(proj['hours']) + ' remaining'
result[proj['id']]['tasks'] = str(proj['count']) + ' opens, ' + str(proj['hours']) + ' hours remaining'
def _get_details(self, cr, uid, ids_project, context={}, *arg): # Todo: 1. Reload button gives error for project # 2. Test/Check if not ids_project: return {} result = {} for id in ids_project: result[id] = { 'tasks': '', 'bugs': '', 'features': '', 'support_req': '', 'doc': '' } ids = ",".join(map(str, ids_project))
921a57f29072bb101f244fb4f035236a4cca7676 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/921a57f29072bb101f244fb4f035236a4cca7676/portal_project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 6395, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 67, 4406, 16, 819, 28793, 380, 3175, 4672, 468, 399, 7370, 30, 404, 18, 23086, 3568, 14758, 555, 364, 1984, 468, 4202, 576, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 6395, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 67, 4406, 16, 819, 28793, 380, 3175, 4672, 468, 399, 7370, 30, 404, 18, 23086, 3568, 14758, 555, 364, 1984, 468, 4202, 576, ...
buf.append(" Service class: %s" % service.service_class.values[0])
buf.append(" Service class: %s" % service.service_class.value)
def display_service(service, pidf, buf): # display class if service.rpid_class is not None: buf.append(" Class: %s" % person.rpid_class) # display timestamp if service.timestamp is not None: buf.append(" Timestamp: %s" % service.timestamp) # display notes for note in service.notes: buf.append(" %s" % format_note(note)) # display status if service.status is not None and service.status.basic is not None: buf.append(" Status: %s" % service.status.basic) # display contact if service.contact is not None: buf.append(" Contact%s: %s" % ((service.contact.priority is not None) and (' priority %s' % service.contact.priority) or '', service.contact)) # display device ID if service.device_id is not None: buf.append(" Service offered by device id: %s" % service.device_id) # display relationship if service.relationship is not None: buf.append(" Relationship: %s" % service.relationship.values[0]) # display service-class if service.service_class is not None: buf.append(" Service class: %s" % service.service_class.values[0]) # display status icon if service.status_icon is not None: buf.append(" Status icon: %s" % service.status_icon) # display user input if service.user_input is not None: buf.append(" Service is %s" % service.user_input) if service.user_input.last_input: buf.append(" Last input at: %s" % service.user_input.last_input) if service.user_input.idle_threshold: buf.append(" Idle threshold: %s seconds" % service.user_input.idle_threshold)
eafb9298a1338b654b8c427140da1f4c521b4510 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3449/eafb9298a1338b654b8c427140da1f4c521b4510/sip_subscribe_presence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 3278, 12, 3278, 16, 4231, 74, 16, 1681, 4672, 468, 2562, 667, 309, 1156, 18, 86, 6610, 67, 1106, 353, 486, 599, 30, 1681, 18, 6923, 2932, 565, 1659, 30, 738, 87, 6, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 3278, 12, 3278, 16, 4231, 74, 16, 1681, 4672, 468, 2562, 667, 309, 1156, 18, 86, 6610, 67, 1106, 353, 486, 599, 30, 1681, 18, 6923, 2932, 565, 1659, 30, 738, 87, 6, 738, ...
def onchange_journal(self, cr, uid, ids, journal_id):
def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context={}):
def onchange_journal(self, cr, uid, ids, journal_id): if not journal_id: return False journal_pool = self.pool.get('account.journal') journal = journal_pool.browse(cr, uid, journal_id) account_id = journal.default_credit_account_id or journal.default_debit_account_id tax_id = False if account_id and account_id.tax_ids: tax_id = account_id.tax_ids[0].id return {'value':{'tax_id':tax_id}}
da3be9e496193e22109f36eaeee23d4e35ec36c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da3be9e496193e22109f36eaeee23d4e35ec36c2/voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 22644, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 13001, 67, 350, 16, 980, 67, 2232, 16, 5320, 67, 350, 16, 19170, 67, 350, 16, 819, 12938, 4672, 309, 486, 13001, 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, 603, 3427, 67, 22644, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 13001, 67, 350, 16, 980, 67, 2232, 16, 5320, 67, 350, 16, 19170, 67, 350, 16, 819, 12938, 4672, 309, 486, 13001, 67,...
'network-type': self.network_pref,
def save(self): props = { 'connection': { 'name': 'connection', 'id': self.name, 'type': 'gsm', 'uuid': self.uuid, 'autoconnect': self.autoconnect}, 'gsm': { 'name': 'gsm', 'band': self.band, 'username': self.username, 'number': '*99#', 'network-type': self.network_pref, 'apn': self.apn}, 'ppp': { 'name': 'ppp', 'refuse-pap': True, 'refuse-chap': True, 'refuse-eap': True, 'refuse-mschap': True, 'refuse-mschapv2': True}, 'serial': { 'name': 'serial', 'baud': 115200}, 'ipv4': { 'name': 'ipv4', 'addresses': [], 'method': 'auto', 'ignore-auto-dns': self.static_dns, 'routes': []}, }
f30c29237a4f6123525997cdc941bc70c9fec4e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12037/f30c29237a4f6123525997cdc941bc70c9fec4e6/profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 3458, 273, 288, 296, 4071, 4278, 288, 296, 529, 4278, 296, 4071, 2187, 296, 350, 4278, 365, 18, 529, 16, 296, 723, 4278, 296, 564, 81, 2187, 296, 7080, 4278, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 3458, 273, 288, 296, 4071, 4278, 288, 296, 529, 4278, 296, 4071, 2187, 296, 350, 4278, 365, 18, 529, 16, 296, 723, 4278, 296, 564, 81, 2187, 296, 7080, 4278, 365,...
self.prefixlen = int(addr[1]) self.netmask = self._ip_int_from_prefix(self.prefixlen)
self._prefixlen = int(addr[1]) self.netmask = self._ip_int_from_prefix(self._prefixlen)
def __init__(self, ipaddr): """Instantiate a new IPv4 object.
ed0824247937850fadddb0e515cbb0d26c0086f4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5467/ed0824247937850fadddb0e515cbb0d26c0086f4/ipaddr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2359, 4793, 4672, 3536, 22438, 279, 394, 7853, 24, 733, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2359, 4793, 4672, 3536, 22438, 279, 394, 7853, 24, 733, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
elif platform.platform() == "Windows":
elif platform.system() == "Windows":
def __init__(self): # construct ctags executable path if platform.platform() == "Linux": # stupid assumption, fix that if needed: self.ctags_path = '/usr/bin/ctags' elif platform.platform() == "Windows": self.ctags_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ctags.exe') else: print "you need to fix the generator.py from line 97 on in order to find the ctags executabe!" sys.exit(2)
0dacb46e1dfe2d99ee36336ce6b52d3adc0ae96a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3433/0dacb46e1dfe2d99ee36336ce6b52d3adc0ae96a/generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 4872, 276, 4156, 9070, 589, 309, 4072, 18, 9898, 1435, 422, 315, 19475, 6877, 468, 384, 416, 350, 24743, 16, 2917, 716, 309, 3577, 30, 365, 18, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 468, 4872, 276, 4156, 9070, 589, 309, 4072, 18, 9898, 1435, 422, 315, 19475, 6877, 468, 384, 416, 350, 24743, 16, 2917, 716, 309, 3577, 30, 365, 18, 29...
"""
def run_wilcox_test(self, pd): """ 2008-08-20 use pd to summarize all parameters 2008-08-15 fix option max_pvalue_per_gene, to have the choice to take the most significant SNP associated with one gene or not 2008-08-14 add min_MAF just prepareDataForRankTest(). 2008-07-24 fix a bug. still using self.list_type_id, rather than just list_type_id in one line 2008-07-17 split out as a standalone function so that MpiGeneListRankTest.py could call it more easily. """ if self.debug: sys.stderr.write("Running wilcox test ... ") if pd.results_type==1: ResultsClass = ResultsMethod RankTestResultClass = CandidateGeneRankSumTestResultMethod rm = ResultsClass.get(pd.results_id) min_distance = pd.min_distance min_MAF = pd.min_MAF get_closest = pd.get_closest elif pd.results_type==2: ResultsClass = ResultsByGene RankTestResultClass = CandidateGeneRankSumTestResult rm = ResultsClass.get(pd.results_id) min_distance = rm.min_distance min_MAF = rm.min_MAF get_closest = rm.get_closest else: sys.stderr.write("Invalid results type : %s.\n"%pd.results_type) return None if not rm: sys.stderr.write("No results method available for results_id=%s.\n"%pd.results_id) return None """ db_results = RankTestResultClass.query.filter_by(results_id=pd.results_id).\ filter_by(list_type_id=pd.list_type_id) if db_results.count()>0: #done before db_result = db_results.first() sys.stderr.write("It's done already. id=%s, results_id=%s, list_type_id=%s, pvalue=%s, statistic=%s.\n"%\ (db_result.id, db_result.results_by_gene_id, db_result.list_type_id, db_result.pvalue, db_result.statistic)) return None """ try: candidate_gene_list = self.getGeneList(pd.list_type_id) param_data = PassingData(results_directory=pd.results_directory, candidate_gene_list=candidate_gene_list, min_MAF=pd.min_MAF) if pd.test_type==1: passingdata = self.prepareDataForRankTestFromResultsByGene(rm, param_data) import rpy candidate_sample_size = len(passingdata.candidate_gene_pvalue_list) non_candidate_sample_size = len(passingdata.non_candidate_gene_pvalue_list) if candidate_sample_size>=pd.min_sample_size and non_candidate_sample_size>=pd.min_sample_size: #2008-08-14 w_result = rpy.r.wilcox_test(passingdata.candidate_gene_pvalue_list, passingdata.non_candidate_gene_pvalue_list, conf_int=rpy.r.TRUE) else: sys.stderr.write("Ignore. sample size less than %s. %s vs %s.\n"%(pd.min_sample_size, candidate_sample_size, non_candidate_sample_size)) return None statistic=w_result['statistic']['W'] pvalue=w_result['p.value'] elif pd.test_type==2: permData = self.prepareDataForPermutationRankTest(rm, pd.snps_context_wrapper, param_data) candidate_sample_size = len(permData.candidate_gene_snp_index_ls) non_candidate_sample_size = permData.no_of_snps - candidate_sample_size statistic = permData.rank_sum_stat-(candidate_sample_size*(candidate_sample_size-1))/2. if candidate_sample_size>=pd.min_sample_size and non_candidate_sample_size>=pd.min_sample_size: pvalue = self.getPermutationRankSumPvalue(permData.chr2rank_ls, permData.candidate_gene_snp_index_ls, permData.rank_sum_stat, \ permData.no_of_snps, permData.chr2no_of_snps, permutation_type=pd.permutation_type, \ no_of_permutations=pd.no_of_permutations) else: sys.stderr.write("Ignore. sample size less than %s. %s vs %s.\n"%(pd.min_sample_size, candidate_sample_size, non_candidate_sample_size)) return None else: return None except: sys.stderr.write("Exception happened for results_id=%s, list_type_id=%s.\n"%(pd.results_id, pd.list_type_id)) traceback.print_exc() sys.stderr.write('%s.\n'%repr(sys.exc_info())) return None candidate_gene_rank_sum_test_result = RankTestResultClass(list_type_id=pd.list_type_id, statistic=statistic,\ pvalue=pvalue) candidate_gene_rank_sum_test_result.results_id = pd.results_id candidate_gene_rank_sum_test_result.min_distance = min_distance candidate_gene_rank_sum_test_result.min_MAF = min_MAF candidate_gene_rank_sum_test_result.get_closest = get_closest candidate_gene_rank_sum_test_result.candidate_sample_size = candidate_sample_size candidate_gene_rank_sum_test_result.non_candidate_sample_size = non_candidate_sample_size if self.debug: sys.stderr.write("Done.\n") return candidate_gene_rank_sum_test_result
d2a16d467a466b03daa63dd27037a863a5827a2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/d2a16d467a466b03daa63dd27037a863a5827a2a/GeneListRankTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 91, 330, 71, 2409, 67, 3813, 12, 2890, 16, 4863, 4672, 4044, 28, 17, 6840, 17, 3462, 999, 4863, 358, 28712, 777, 1472, 4044, 28, 17, 6840, 17, 3600, 2917, 1456, 943, 67, 84...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 91, 330, 71, 2409, 67, 3813, 12, 2890, 16, 4863, 4672, 4044, 28, 17, 6840, 17, 3462, 999, 4863, 358, 28712, 777, 1472, 4044, 28, 17, 6840, 17, 3600, 2917, 1456, 943, 67, 84...
from DnaLadder import _rail_end_atom_to_ladder
from dna_model.DnaLadder import _rail_end_atom_to_ladder
def __init__(self, assy, chain_or_something_else): # TODO: check if this arg signature ok re undo, copy, etc; # and if ok for rest of Node API if it matters for this kind of chunk # for now just assume chain_or_something_else is a DnaChain chain = chain_or_something_else # name should not be seen, but it is for now... name = gensym(self.__class__.__name__.split('.')[-1]) + ' (internal)' Chunk.__init__(self, assy, name) self.chain = chain # add atoms before setting self.ladder, so adding them doesn't invalidate it self._grab_atoms_from_chain(chain) #e we might change when this is done, if we implem copy for this class # following import is a KLUGE to avoid recursive import # (still has import cycle, ought to ### FIX -- should refile that func somehow) from DnaLadder import _rail_end_atom_to_ladder # todo: make not private... or get by without it here (another init arg??) self.ladder = _rail_end_atom_to_ladder( chain.baseatoms[0] ) return
18c75f799d2fe818cfa211e1c2da2e8f61a23847 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/18c75f799d2fe818cfa211e1c2da2e8f61a23847/DnaLadderRailChunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 2687, 67, 280, 67, 30289, 67, 12107, 4672, 468, 2660, 30, 866, 309, 333, 1501, 3372, 1529, 283, 15436, 16, 1610, 16, 5527, 31, 468, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1551, 93, 16, 2687, 67, 280, 67, 30289, 67, 12107, 4672, 468, 2660, 30, 866, 309, 333, 1501, 3372, 1529, 283, 15436, 16, 1610, 16, 5527, 31, 468, 471, ...
verify(str(d1).find('D instance at ') >= 0)
verify(str(d1).find('D object at ') >= 0)
def __getitem__(self, i): if 0 <= i < 10: return i raise IndexError
d67ad46cb4e630cd54d70e8daae7061da0849a0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d67ad46cb4e630cd54d70e8daae7061da0849a0a/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 277, 4672, 309, 374, 1648, 277, 411, 1728, 30, 327, 277, 1002, 10195, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 277, 4672, 309, 374, 1648, 277, 411, 1728, 30, 327, 277, 1002, 10195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def collect_incoming_data (self, data):
def collect_incoming_data(self, data):
def collect_incoming_data (self, data): """Put data read from socket to a buffer """ # Collect data in input buffer self.data = self.data + data
ce2710566fb00079a9c5574c6244943702ea0800 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/ce2710566fb00079a9c5574c6244943702ea0800/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3274, 67, 31033, 67, 892, 12, 2890, 16, 501, 4672, 3536, 6426, 501, 855, 628, 2987, 358, 279, 1613, 3536, 468, 9302, 501, 316, 810, 1613, 365, 18, 892, 273, 365, 18, 892, 397, 501, 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, 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, 3274, 67, 31033, 67, 892, 12, 2890, 16, 501, 4672, 3536, 6426, 501, 855, 628, 2987, 358, 279, 1613, 3536, 468, 9302, 501, 316, 810, 1613, 365, 18, 892, 273, 365, 18, 892, 397, 501, 2...