rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if (not t) or not getcompiled(pat).search(t):
if (not t) or not _getcompiled(pat).search(t):
def __call__(connection, sessionDict): for pat, target in zip((self.uri, self.host, self.unixPath, self.ip), (constants.LOCATION, constants.HOST, constants.UNIXPATH, constants.IP)): if pat is not None: t=sessionDict.get(target) if (not t) or not getcompiled(pat).search(t): return 0 for pat, target in zip((self.port, self.skunkPort), (constants.SERVER_PORT, constants.PORT)): if pat is not None: t=sessionDict.get(target) if not t: return 0 if callable(pat): if not pat(t): return 0 elif pat!=t: return 0
5531b0ee200ddd0c3cf4c5e4ac2d6496e6a978a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/5531b0ee200ddd0c3cf4c5e4ac2d6496e6a978a5/rewrite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 4071, 16, 1339, 5014, 4672, 364, 9670, 16, 1018, 316, 3144, 12443, 2890, 18, 1650, 16, 365, 18, 2564, 16, 365, 18, 21136, 743, 16, 365, 18, 625, 3631, 261, 13358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4071, 16, 1339, 5014, 4672, 364, 9670, 16, 1018, 316, 3144, 12443, 2890, 18, 1650, 16, 365, 18, 2564, 16, 365, 18, 21136, 743, 16, 365, 18, 625, 3631, 261, 13358, ...
res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] res = self.__deleteTransformationFiles(transID,connection=connection) if not res['OK']: return res res = self.__deleteTransformationTasks(transID,connection=connection) if not res['OK']: return res res = self.__deleteTransformationTaskInputs(transID,connection=connection) if not res['OK']: return res res = self.setTransformationParameter(transID,'Status','Cleaned',author=author,connection=connection)
res = self._getConnectionTransID( connection, transName ) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] res = self.__deleteTransformationFiles( transID, connection = connection ) if not res['OK']: return res res = self.__deleteTransformationTasks( transID, connection = connection ) if not res['OK']: return res res = self.__deleteTransformationTaskInputs( transID, connection = connection ) if not res['OK']: return res res = self.setTransformationParameter( transID, 'Status', 'Cleaned', author = author, connection = connection )
def cleanTransformation(self,transName,author='',connection=False): """ Clean the transformation specified by name or id """ res = self._getConnectionTransID(connection,transName) if not res['OK']: return res connection = res['Value']['Connection'] transID = res['Value']['TransformationID'] res = self.__deleteTransformationFiles(transID,connection=connection) if not res['OK']: return res res = self.__deleteTransformationTasks(transID,connection=connection) if not res['OK']: return res res = self.__deleteTransformationTaskInputs(transID,connection=connection) if not res['OK']: return res res = self.setTransformationParameter(transID,'Status','Cleaned',author=author,connection=connection) if not res['OK']: return res message = "Transformation Cleaned" self.__updateTransformationLogging(transID,message,author,connection=connection) return S_OK(transID)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 15292, 12, 2890, 16, 2338, 461, 16, 4161, 2218, 2187, 4071, 33, 8381, 4672, 3536, 9645, 326, 8620, 1269, 635, 508, 578, 612, 3536, 400, 273, 365, 6315, 588, 1952, 1429, 734, 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, 2721, 15292, 12, 2890, 16, 2338, 461, 16, 4161, 2218, 2187, 4071, 33, 8381, 4672, 3536, 9645, 326, 8620, 1269, 635, 508, 578, 612, 3536, 400, 273, 365, 6315, 588, 1952, 1429, 734, 12, ...
self.body_pre_docinfo = self.body[:start]
def depart_docinfo(self, node): self.body.append('</tbody>\n</table>\n') self.in_docinfo = None start = self.context.pop() self.body_pre_docinfo = self.body[:start] self.docinfo = self.body[start:] self.body = []
2365213fc4da8ea05f4fbc6eb6920c063c39570c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/2365213fc4da8ea05f4fbc6eb6920c063c39570c/html4css1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 2434, 1376, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1757, 20779, 5333, 82, 1757, 2121, 5333, 82, 6134, 365, 18, 267, 67, 2434, 1376, 273, 599, 787, 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, 26000, 67, 2434, 1376, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 1757, 20779, 5333, 82, 1757, 2121, 5333, 82, 6134, 365, 18, 267, 67, 2434, 1376, 273, 599, 787, 273, 365,...
body += " Username/Email: %s\n" % AccountEmail body += " Password: %s\n" % ("*" * len(password))
body += _(" Username/Email: %s\n") % account_email body += _(" Password: %s\n") % ("*" * len(password))
def sendAccountActivatedMessage(AccountEmail, sendTo, password, ln=CFG_SITE_LANG): """Send an email to the address given by sendTo about the new activated account.""" fromaddr = "From: %s" % CFG_SITE_SUPPORT_EMAIL toaddrs = "To: %s" % sendTo to = toaddrs + "\n" sub = "Subject: Your account on '%s' has been activated\n\n" % CFG_SITE_NAME body = "Your account earlier created on '%s' has been activated:\n\n" \ % CFG_SITE_NAME body += " Username/Email: %s\n" % AccountEmail body += " Password: %s\n" % ("*" * len(password)) body += "\n---------------------------------" body += "\n%s" % CFG_SITE_NAME body += "\nContact: %s" % CFG_SITE_SUPPORT_EMAIL msg = to + sub + body server = smtplib.SMTP('localhost') server.set_debuglevel(1) try: server.sendmail(fromaddr, toaddrs, msg) except smtplib.SMTPRecipientsRefused,e: return 0 server.quit() return 1
23f82669a784517b3dd8a1acd98ec74aa6e40517 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1931/23f82669a784517b3dd8a1acd98ec74aa6e40517/webaccessadmin_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 3032, 28724, 1079, 12, 3032, 4134, 16, 29091, 16, 2201, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, 3826, 392, 2699, 358, 326, 1758, 864, 635, 29091, 2973, 326, 394, 148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 3032, 28724, 1079, 12, 3032, 4134, 16, 29091, 16, 2201, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, 3826, 392, 2699, 358, 326, 1758, 864, 635, 29091, 2973, 326, 394, 148...
]) + \
]) +
def convert_data_files(files): base_dir = "Lib/site-packages" ret = [] for file in files: file = os.path.normpath(file) if file.find("*") >= 0: flist = FileList() flist.findall(os.path.dirname(file)) flist.include_pattern(os.path.basename(file)) # We never want CVS flist.exclude_pattern(re.compile(".*\\\\CVS\\\\"), is_regex=1) if not flist.files: raise RuntimeError, "No files match '%s'" % file files_use = flist.files else: if not os.path.isfile(file): raise RuntimeError, "No file '%s'" % file files_use = (file,) path_use = os.path.dirname(file) if path_use.startswith("com/") or path_use.startswith("com\\"): path_use = path_use[4:] path_use = os.path.join(base_dir, path_use) ret.append( (path_use, files_use)) return ret
382c6b5f358401e1c35e1f995f2ca0bed522c186 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/382c6b5f358401e1c35e1f995f2ca0bed522c186/setup_win32all.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 892, 67, 2354, 12, 2354, 4672, 1026, 67, 1214, 273, 315, 5664, 19, 4256, 17, 10308, 6, 325, 273, 5378, 364, 585, 316, 1390, 30, 585, 273, 1140, 18, 803, 18, 7959, 803, 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, 1765, 67, 892, 67, 2354, 12, 2354, 4672, 1026, 67, 1214, 273, 315, 5664, 19, 4256, 17, 10308, 6, 325, 273, 5378, 364, 585, 316, 1390, 30, 585, 273, 1140, 18, 803, 18, 7959, 803, 12, ...
self.debug_trace("singleValueArrayType")
def singleValueArrayType(self): self.debug_trace("singleValueArrayType") return self.Tag_ubyte_array() or self.Tag_uint16_array() or \ self.Tag_uint32_array() or self.Tag_sint16_array() or \ self.Tag_sint32_array() or self.Tag_real32_array()
ecf78c969222f7513a2f516b0355728295fb546a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/675/ecf78c969222f7513a2f516b0355728295fb546a/pxlasm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2202, 620, 27182, 12, 2890, 4672, 327, 365, 18, 1805, 67, 10340, 736, 67, 1126, 1435, 578, 365, 18, 1805, 67, 11890, 2313, 67, 1126, 1435, 578, 521, 365, 18, 1805, 67, 11890, 1578, 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, 2202, 620, 27182, 12, 2890, 4672, 327, 365, 18, 1805, 67, 10340, 736, 67, 1126, 1435, 578, 365, 18, 1805, 67, 11890, 2313, 67, 1126, 1435, 578, 521, 365, 18, 1805, 67, 11890, 1578, 67,...
write_porrectusflexus(i,j,k, "base2", 0, 'porrectusflexus_nobar')
write_porrectusflexus(i,j,k, "base7", 0, 'porrectusflexus_nobar')
def porrectusflexus(): for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "base2", 0, 'porrectusflexus_nobar') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "auctusd1", 0, 'porrectusflexus_nobar', 'auctusdescendens') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "auctusa1", 0, 'porrectusflexus_nobar', 'auctusascendens') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "deminutus", 0, 'porrectusflexus_nobar', 'deminutus') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "base2", 1, 'porrectusflexus') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "auctusd1", 1, 'porrectusflexus_nobar', 'auctusdescendens') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "auctusa1", 1, 'porrectusflexus', 'auctusascendens') for i in range(1,6): for j in range(1,6): for k in range(1,6): write_porrectusflexus(i,j,k, "deminutus", 1, 'porrectusflexus', 'deminutus')
f2e1d74d6cb2d87b526dd8dd5153eab3b055ed39 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7096/f2e1d74d6cb2d87b526dd8dd5153eab3b055ed39/sqarize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22471, 2607, 407, 27592, 407, 13332, 364, 277, 316, 1048, 12, 21, 16, 26, 4672, 364, 525, 316, 1048, 12, 21, 16, 26, 4672, 364, 417, 316, 1048, 12, 21, 16, 26, 4672, 1045, 67, 3831, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22471, 2607, 407, 27592, 407, 13332, 364, 277, 316, 1048, 12, 21, 16, 26, 4672, 364, 525, 316, 1048, 12, 21, 16, 26, 4672, 364, 417, 316, 1048, 12, 21, 16, 26, 4672, 1045, 67, 3831, ...
mock = PyPycLoaderMock({name: 'path/to/mod'}, {name: {'path': 'path/to/mod.bytecode',
mock = PyPycLoaderMock({name: os.path.join('path', 'to', 'mod')}, {name: {'path': os.path.join('path', 'to', 'mod.bytecode'),
def test_different_magic(self): # A different magic number should lead to new bytecode. name = 'mod' bad_magic = b'\x00\x00\x00\x00' assert bad_magic != imp.get_magic() mock = PyPycLoaderMock({name: 'path/to/mod'}, {name: {'path': 'path/to/mod.bytecode', 'magic': bad_magic}}) with util.uncache(name): mock.load_module(name) self.assert_(name in mock.module_bytecode) magic = mock.module_bytecode[name][:4] self.assertEqual(magic, imp.get_magic())
3714e816446d00f205edc184db1f131faf6bf12b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/3714e816446d00f205edc184db1f131faf6bf12b/test_abc_loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 30738, 67, 11179, 12, 2890, 4672, 468, 432, 3775, 8146, 1300, 1410, 5871, 358, 394, 22801, 18, 508, 273, 296, 1711, 11, 5570, 67, 11179, 273, 324, 8314, 92, 713, 64, 92, 713,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 30738, 67, 11179, 12, 2890, 4672, 468, 432, 3775, 8146, 1300, 1410, 5871, 358, 394, 22801, 18, 508, 273, 296, 1711, 11, 5570, 67, 11179, 273, 324, 8314, 92, 713, 64, 92, 713,...
el = self.etree.findall('docinit')
el = self.etree.findall('.//docinit')
def render(self, out): el = self.etree.findall('docinit') if el: self.docinit(el)
3deeeb112a71bd7004e7b4f9442577d106bf1b49 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/3deeeb112a71bd7004e7b4f9442577d106bf1b49/trml2pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 596, 4672, 415, 273, 365, 18, 31303, 18, 4720, 454, 2668, 18, 759, 2434, 2738, 6134, 309, 415, 30, 365, 18, 2434, 2738, 12, 292, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 596, 4672, 415, 273, 365, 18, 31303, 18, 4720, 454, 2668, 18, 759, 2434, 2738, 6134, 309, 415, 30, 365, 18, 2434, 2738, 12, 292, 13, 2, -100, -100, -100, -100, -1...
'<a href="http://localhost:8888/echo">back to referring page</a></div>'
'<a href="/echo">back to referring page</a></div>'
def EchoAllHandler(self): """This handler yields a (more) human-readable page listing information about the request header & contents."""
b1364e081e9a5c511778fec70e77a599995bfb01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b1364e081e9a5c511778fec70e77a599995bfb01/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28995, 1595, 1503, 12, 2890, 4672, 3536, 2503, 1838, 16932, 279, 261, 10161, 13, 8672, 17, 11018, 1363, 11591, 1779, 2973, 326, 590, 1446, 473, 2939, 12123, 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, 0, 0, 0, 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, 28995, 1595, 1503, 12, 2890, 4672, 3536, 2503, 1838, 16932, 279, 261, 10161, 13, 8672, 17, 11018, 1363, 11591, 1779, 2973, 326, 590, 1446, 473, 2939, 12123, 2, -100, -100, -100, -100, -100...
if not re.search(r"{{-.*-}}", l):
if not re.search(r"{{-.*-.*}}", l):
def parseText(self): inDefinition = False inAnagram = False inSynonym = False inAntonym = False inPron = False wordType = "" wordSubType = ""
2e7db129055f80b1ee24b678ddba316192b6734b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11306/2e7db129055f80b1ee24b678ddba316192b6734b/wiktio2xml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1528, 12, 2890, 4672, 316, 1852, 273, 1083, 316, 979, 17049, 273, 1083, 316, 10503, 6435, 273, 1083, 316, 14925, 6435, 273, 1083, 316, 52, 1949, 273, 1083, 2076, 559, 273, 1408, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1528, 12, 2890, 4672, 316, 1852, 273, 1083, 316, 979, 17049, 273, 1083, 316, 10503, 6435, 273, 1083, 316, 14925, 6435, 273, 1083, 316, 52, 1949, 273, 1083, 2076, 559, 273, 1408, 20...
wikipedia.output("[%s]: %s" % (k,v) )
wikipedia.output(u"[%s]: %s" % (k,v) )
def GetData(params, site = None, useAPI = True, retryCount = 5, encodeTitle = True, sysop = False, back_response = False): """Get data from the query api, and convert it into a data object """ if not site: site = wikipedia.getSite() if wikipedia.verbose: wikipedia.output("====API PARAMS====") for k,v in params.iteritems(): if type(v) == list: params[k] = unicode(ListToParam(v)) elif not IsString(v): params[k] = unicode(v) if wikipedia.verbose: if type(v) == list: wikipedia.output("[%s]: " % k, newline = False) if len(v) > 10: wikipedia.output("%s (total %d items)" % (v[0:30], len(v)) ) else: wikipedia.output("%s" % v ) elif type(v) not in (int, long): wikipedia.output("[%s]: " % k, newline = False) if v.count('|') == 0 and len(v) > 40: wikipedia.output("%s (total %d char)" % (v[0:30], len(v) ) ) elif v.count('|') > 8: wikipedia.output("%s (and more %d values)" % (v[0:v.index('|')], len(v.split('|')) ) ) else: wikipedia.output("%s" % v ) elif k == u'format': continue else: wikipedia.output("[%s]: %s" % (k,v) ) if wikipedia.verbose: wikipedia.output("==================") if 'format' not in params or params['format'] != 'json': 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 for pLongKey in ['titles', 'pageids', 'ucusers', 'ususers']: # if pLongKey in params: titlecount = params[pLongKey].count('|') + 1 if encodeTitle: data = {pLongKey : params[pLongKey]} del params[pLongKey] postAC = [ 'edit', 'login', 'purge', 'rollback', 'delete', 'undelete', 'protect', 'block', 'unblock', 'move', 'emailuser','import', 'userrights', 'upload', ] if useAPI: if params['action'] in postAC: path = site.api_address() cont = '' else: path = site.api_address() + urllib.urlencode(params.items()) else: path = site.query_address() + urllib.urlencode(params.items()) if wikipedia.verbose: if titlecount > 1: wikipedia.output(u"Requesting %d %s from %s" % (titlecount, data.keys()[0], site)) else: wikipedia.output(u"Requesting API query from %s" % site) lastError = None retry_idle_time = 1 while retryCount >= 0: try: jsontext = "Nothing received" if params['action'] == 'upload' and ('file' in params or cont): import upload if not cont: cont = params['file'] del params['file'] res, jsontext = upload.post_multipart(site, path, params.items(), (('file', params['filename'].encode(site.encoding()), cont),), site.cookies(sysop=sysop) ) elif site.hostname() in wikipedia.config.authenticate.keys(): params["Content-type"] = "application/x-www-form-urlencoded" params["User-agent"] = useragent res = urllib2.urlopen(urllib2.Request(site.protocol() + '://' + site.hostname() + address, site.urlEncode(params))) jsontext = res.read() elif params['action'] in postAC: res, jsontext = site.postForm(path, params, sysop, site.cookies(sysop = sysop) ) else: if back_response: res, jsontext = site.getUrl( path, retry=True, data=data, sysop=sysop, back_response=True) else: jsontext = site.getUrl( path, retry=True, sysop=sysop, data=data) # This will also work, but all unicode strings will need to be converted from \u notation # decodedObj = eval( jsontext ) jsontext = json.loads( jsontext ) if back_response: return res, jsontext else: return jsontext except ValueError, error: if "<title>Wiki does not exist</title>" in jsontext: raise wikipedia.NoSuchSite(u'Wiki %s does not exist yet' % site) if 'Wikimedia Error' in jsontext: #wikimedia server error raise wikipedia.ServerError retryCount -= 1 wikipedia.output(u"Error downloading data: %s" % error) wikipedia.output(u"Request %s:%s" % (site.lang, path)) lastError = error if retryCount >= 0: wikipedia.output(u"Retrying in %i minutes..." % retry_idle_time) time.sleep(retry_idle_time*60) # Next time wait longer, but not longer than half an hour retry_idle_time *= 2 if retry_idle_time > 30: retry_idle_time = 30 else: wikipedia.debugDump('ApiGetDataParse', site, str(error) + '\n%s\n%s' % (site.hostname(), path), jsontext) raise lastError
078efe898c7df71312adbb2394f15acdf7e641be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/078efe898c7df71312adbb2394f15acdf7e641be/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 2010, 16, 2834, 273, 599, 16, 999, 2557, 273, 1053, 16, 30084, 273, 1381, 16, 2017, 4247, 273, 1053, 16, 2589, 556, 273, 1083, 16, 1473, 67, 2740, 273, 1083, 4672, 3536, 967...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 999, 2557, 273, 1053, 16, 30084, 273, 1381, 16, 2017, 4247, 273, 1053, 16, 2589, 556, 273, 1083, 16, 1473, 67, 2740, 273, 1083, 4672, 3536, 967...
test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 203994, 40698)
test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 196434, 39186)
def test_field(self): '''Flagdata2: field=0 manualflag=true''' flagdata2(vis=self.vis, selectdata=True, field='0', manualflag=True) test_eq(flagdata2(vis=self.vis, summary=True, selectdata=True, antenna='2'), 203994, 40698)
37a0b9e0228c19830a3281be1e3962f850977936 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/37a0b9e0228c19830a3281be1e3962f850977936/test_flagdata2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1518, 12, 2890, 4672, 9163, 4678, 892, 22, 30, 652, 33, 20, 11297, 6420, 33, 3767, 26418, 2982, 892, 22, 12, 3516, 33, 2890, 18, 3516, 16, 2027, 892, 33, 5510, 16, 652, 221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1518, 12, 2890, 4672, 9163, 4678, 892, 22, 30, 652, 33, 20, 11297, 6420, 33, 3767, 26418, 2982, 892, 22, 12, 3516, 33, 2890, 18, 3516, 16, 2027, 892, 33, 5510, 16, 652, 221...
directory = self.theme_list[index]['dir']
directory = self.theme_list[index]['full-dir']
def apply_theme(self, widget, data=None): if self.currItr is not None: self.model.foreach(self.update_radio) index = self.model.get_path(self.currItr)[0] name = self.theme_list[index]['name'] version = self.theme_list[index]['version'] directory = self.theme_list[index]['dir']
fbbad571f1ee3b50f3b4afce97428d348e7cce32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8416/fbbad571f1ee3b50f3b4afce97428d348e7cce32/awnTheme.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 7997, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 309, 365, 18, 17016, 28984, 353, 486, 599, 30, 225, 365, 18, 2284, 18, 25055, 12, 2890, 18, 2725, 67, 17006, 13, 225, 770...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 7997, 12, 2890, 16, 3604, 16, 501, 33, 7036, 4672, 309, 365, 18, 17016, 28984, 353, 486, 599, 30, 225, 365, 18, 2284, 18, 25055, 12, 2890, 18, 2725, 67, 17006, 13, 225, 770...
submitted = []
submitted = {} executing = []
def test_single_task_life_cycle(self): submitted = [] failures = {} s = self.socket for l in [0, 1, 4, 16, 63, 64, 65, 2047, 2048, 2049, 2050, 16*1024-8, 64*1024, 1024*1024-4]: if l > self.params['max_input_size']: continue data = " " * l s.send('SUBMIT "%s"\n' % data) parts = self.read_reply() if parts[0] == "ERR": print "At data length %d" % l, print "Error: %s" % ": ".join(parts[1:]) failures.setdefault("SUBMIT", []).append(data) continue submitted.append(parts[1]) for cmd in ['SUBMIT']: if not cmd in failures: self.successes[cmd] = 1 if failures: return 1 return 0
6f4afcda014a36e955c7cd4a9ca97db6ca0edbd6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/310/6f4afcda014a36e955c7cd4a9ca97db6ca0edbd6/test_netschedule_smoke.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7526, 67, 4146, 67, 10256, 73, 67, 13946, 12, 2890, 4672, 9638, 273, 2618, 11274, 273, 5378, 11720, 273, 2618, 272, 273, 365, 18, 7814, 364, 328, 316, 306, 20, 16, 404, 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, 1842, 67, 7526, 67, 4146, 67, 10256, 73, 67, 13946, 12, 2890, 4672, 9638, 273, 2618, 11274, 273, 5378, 11720, 273, 2618, 272, 273, 365, 18, 7814, 364, 328, 316, 306, 20, 16, 404, 16, ...
_dirname_field = 'name'
_dirname_field = 'name'
def _child_get(self, nodename=False): if self.type not in ('collection','database'): return [] res = self.directory_list_for_child(nodename) result= map(lambda x: node_class(self.cr, self.uid, self.path+'/'+x.name, x, x.type=='directory' and self.object2 or False, context=self.context, root=self.root), res) if self.type=='database': pool = pooler.get_pool(self.cr.dbname) fobj = pool.get('ir.attachment') vargs = [('parent_id','=',False),('res_id','=',False)] if nodename: vargs.append(('name','like',nodename)) file_ids=fobj.search(self.cr,self.uid,vargs)
bcfe4215d0c9a4fbd4d8ef6e75280618ec4f000d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/bcfe4215d0c9a4fbd4d8ef6e75280618ec4f000d/document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2890, 16, 14003, 1069, 33, 8381, 4672, 309, 365, 18, 723, 486, 316, 7707, 5548, 17023, 6231, 11, 4672, 327, 5378, 400, 273, 365, 18, 5149, 67, 1098, 67, 1884, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2890, 16, 14003, 1069, 33, 8381, 4672, 309, 365, 18, 723, 486, 316, 7707, 5548, 17023, 6231, 11, 4672, 327, 5378, 400, 273, 365, 18, 5149, 67, 1098, 67, 1884, ...
elif where=='package': pkg = uid.package() if pkg is not None: str += I+'<th '+WIDTH+' class="navbar">&nbsp;&nbsp;' str += '&nbsp;<a class="navbar" href="'+`pkg`+'.html">' str += 'Parent</a>&nbsp;&nbsp;&nbsp;</th>\n' else: str += I+'<th '+WIDTH+' class="navbar">&nbsp;&nbsp;' str += '&nbsp;Parent&nbsp;&nbsp;&nbsp;</th>\n'
def _navbar(self, where, uid=None): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: The type of page for which a navigation bar should be generated. Possible values are C{'class'}, C{'module'}, C{'package'}, C{'tree'}, C{'index'}, and C{'help'}. @type where: C{string} """ str = self._start_of('Navbar') str += '<table class="navbar" border="0" width="100%"' str += ' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n' str += ' <tr>\n' str += ' <td width="100%">\n' str += ' <table border="0" cellpadding="0" cellspacing="0">\n' str += ' <tr valign="top">\n'
dd7fc26b7d69af6d4765be2a892edca4603899ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/dd7fc26b7d69af6d4765be2a892edca4603899ee/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, 434, 1363, 18, 225, 1021, 10394, 4653, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, 434, 1363, 18, 225, 1021, 10394, 4653, ...
f_orig = self._get_iterable_expectations()
f_orig = self._get_iterable_expectations(self._expectations)
def remove_platform_from_expectations(self, tests, platform): """Returns a copy of the expectations with the tests matching the platform remove.
dec43762ff3c53dfb1d2d6ad283524a24523fd67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/dec43762ff3c53dfb1d2d6ad283524a24523fd67/test_expectations.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 9898, 67, 2080, 67, 12339, 1012, 12, 2890, 16, 7434, 16, 4072, 4672, 3536, 1356, 279, 1610, 434, 326, 26305, 598, 326, 7434, 3607, 326, 4072, 1206, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 9898, 67, 2080, 67, 12339, 1012, 12, 2890, 16, 7434, 16, 4072, 4672, 3536, 1356, 279, 1610, 434, 326, 26305, 598, 326, 7434, 3607, 326, 4072, 1206, 18, 2, -100, -100, -100, -...
Utils.writeConfig(conf)
try: Utils.writeConfig(conf) except IOError, err: startupErrors.append('Error writing config file: %s\nPlease ' 'ensure that the Explorer.*.cfg file is not read only.'% str(err))
def OnInit(self): wxInitAllImageHandlers()
91d138deb0fb367c3a3ae899aeac92c65168500a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/91d138deb0fb367c3a3ae899aeac92c65168500a/Boa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 12, 2890, 4672, 7075, 2570, 1595, 2040, 6919, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 12, 2890, 4672, 7075, 2570, 1595, 2040, 6919, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
4*x^6*y + 40*x^4*y + 240*x^3*y - 80*x^2*y - 96*x*y - 320*y
4*y*x^6 + 40*y*x^4 + 240*y*x^3 - 80*y*x^2 - 96*y*x - 320*y
def full_division_polynomial(self, m): """ Return the m-th bivariate division polynomial in x and y.
cd361fa04cd86c961c6b2fefac4eb1e44825491d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd361fa04cd86c961c6b2fefac4eb1e44825491d/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2892, 1951, 67, 3915, 13602, 12, 2890, 16, 312, 4672, 3536, 2000, 326, 312, 17, 451, 324, 27693, 16536, 16991, 316, 619, 471, 677, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 2892, 1951, 67, 3915, 13602, 12, 2890, 16, 312, 4672, 3536, 2000, 326, 312, 17, 451, 324, 27693, 16536, 16991, 316, 619, 471, 677, 18, 2, -100, -100, -100, -100, -100, -100, ...
self.graph.discPalette = dlg.getDiscretePalette()
self.graph.discPalette = dlg.getDiscretePalette("discPalette")
def activateLoadedSettings(self): dlg = self.createColorDialog() self.graph.contPalette = dlg.getContinuousPalette("contPalette") self.graph.discPalette = dlg.getDiscretePalette() self.graph.setCanvasBackground(dlg.getColor("Canvas"))
cbacee0aa84afb9bb2ddf1fa32442f23cd390f3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/cbacee0aa84afb9bb2ddf1fa32442f23cd390f3b/OWLinProj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 8835, 2628, 12, 2890, 4672, 25840, 273, 365, 18, 2640, 2957, 6353, 1435, 365, 18, 4660, 18, 1213, 25863, 273, 25840, 18, 588, 26509, 25863, 2932, 1213, 25863, 7923, 365, 18, 4660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10235, 8835, 2628, 12, 2890, 4672, 25840, 273, 365, 18, 2640, 2957, 6353, 1435, 365, 18, 4660, 18, 1213, 25863, 273, 25840, 18, 588, 26509, 25863, 2932, 1213, 25863, 7923, 365, 18, 4660, ...
asyncore.dispatcher.close(self)
def close(self): if self.idler is not None and not self.idler.cancelled: self.idler.cancel() asyncore.dispatcher.close(self)
d85284029e7e153ccda240d2f2ac2ff81c2db85c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7236/d85284029e7e153ccda240d2f2ac2ff81c2db85c/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 22515, 353, 486, 599, 471, 486, 365, 18, 22515, 18, 10996, 1259, 30, 365, 18, 22515, 18, 10996, 1435, 4326, 479, 18, 18495, 18, 4412, 12, 2890, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 18, 22515, 353, 486, 599, 471, 486, 365, 18, 22515, 18, 10996, 1259, 30, 365, 18, 22515, 18, 10996, 1435, 4326, 479, 18, 18495, 18, 4412, 12, 2890, 13, ...
codepoint = int(ent[1:])
try: codepoint = int(ent[1:]) except ValueError: return ent
def ent_sub(m): ent = m.groups()[0] if ent in htmlentitydefs.name2codepoint: return unichr(htmlentitydefs.name2codepoint[ent]) if ent.startswith('#'): if ent.lower().startswith('#x'): codepoint = int('0x' + ent[2:], 16) else: codepoint = int(ent[1:]) if codepoint > 0 and codepoint < sys.maxunicode: return unichr(codepoint) # fallback - leave as-is return '&%s;' % ent
1fc2291b62d22c488f9b2e171eb92d05d609b42d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10695/1fc2291b62d22c488f9b2e171eb92d05d609b42d/normalize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3281, 67, 1717, 12, 81, 4672, 3281, 273, 312, 18, 4650, 1435, 63, 20, 65, 309, 3281, 316, 1729, 1096, 12537, 18, 529, 22, 710, 1153, 30, 327, 640, 1354, 86, 12, 2620, 1096, 12537, 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, 3281, 67, 1717, 12, 81, 4672, 3281, 273, 312, 18, 4650, 1435, 63, 20, 65, 309, 3281, 316, 1729, 1096, 12537, 18, 529, 22, 710, 1153, 30, 327, 640, 1354, 86, 12, 2620, 1096, 12537, 18...
dest = src[MASTER_LEN:]
dest = os.path.join(dir, filename)[MASTER_LEN:]
def overlay_callback(dir, filename, ext): '''compare files and run post-script if needed''' src = os.path.join(dir, '%s._%s' % (filename, ext))
70a04708ae2716b99ffec39ff8c0b03df31f58c1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13401/70a04708ae2716b99ffec39ff8c0b03df31f58c1/synctool_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9218, 67, 3394, 12, 1214, 16, 1544, 16, 1110, 4672, 9163, 9877, 1390, 471, 1086, 1603, 17, 4263, 309, 3577, 26418, 225, 1705, 273, 1140, 18, 803, 18, 5701, 12, 1214, 16, 1995, 87, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9218, 67, 3394, 12, 1214, 16, 1544, 16, 1110, 4672, 9163, 9877, 1390, 471, 1086, 1603, 17, 4263, 309, 3577, 26418, 225, 1705, 273, 1140, 18, 803, 18, 5701, 12, 1214, 16, 1995, 87, 6315...
self.assertEqual(addr_to, data['email'])
self.assertEqual(addr_to, [data['email']])
def test_invite_page(self): data = { 'name': 'The Invitee', 'email': 'invitee@thinkle.edu', 'organization': 'Thinkle University', 'notes': 'Knows his shit', 'message': 'Hi Invitee, please enlighten us.', } self.assertEqual(len(self.consultation.invitations._invites), 0) self.browser_do_login('admin', '')
8b0e9ae7170051641ffc2cffdbac130ebb9f8e4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/8b0e9ae7170051641ffc2cffdbac130ebb9f8e4c/testInvites.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 27154, 67, 2433, 12, 2890, 4672, 501, 273, 288, 296, 529, 4278, 296, 1986, 30981, 73, 2187, 296, 3652, 4278, 296, 27154, 73, 36, 451, 754, 298, 18, 28049, 2187, 296, 15336, 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, 27154, 67, 2433, 12, 2890, 4672, 501, 273, 288, 296, 529, 4278, 296, 1986, 30981, 73, 2187, 296, 3652, 4278, 296, 27154, 73, 36, 451, 754, 298, 18, 28049, 2187, 296, 15336, 4...
x += z0*self._theta_x y += z0*self._theta_y
x += z0*self.theta_x y += z0*self.theta_y
def _makeBar(self,g,x,y,width,height,rowNo,style): z0 = self._calc_z0(rowNo) z1 = z0 + self.barWidth*self._normFactor if height<0: y += height height = -height x += z0*self._theta_x y += z0*self._theta_y g.add((0,z0,z1,x,y,width,height,rowNo,style))
9f3e70981d8925730683b80b2d99345029424468 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/9f3e70981d8925730683b80b2d99345029424468/barcharts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 5190, 12, 2890, 16, 75, 16, 92, 16, 93, 16, 2819, 16, 4210, 16, 492, 2279, 16, 4060, 4672, 998, 20, 273, 365, 6315, 12448, 67, 94, 20, 12, 492, 2279, 13, 998, 21, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 5190, 12, 2890, 16, 75, 16, 92, 16, 93, 16, 2819, 16, 4210, 16, 492, 2279, 16, 4060, 4672, 998, 20, 273, 365, 6315, 12448, 67, 94, 20, 12, 492, 2279, 13, 998, 21, 273, ...
self.issuperproxy = issuperproxy
self.issuperproxy = 0
def __init__(self, name, supername, bases, methods, module=None, issuperproxy = 1): self.bases = bases self.name = name self.supername = supername self.methods = methods self.issuperproxy = issuperproxy
514a236ed9f140e9bf958542fa09c6b5fe9a2a93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/514a236ed9f140e9bf958542fa09c6b5fe9a2a93/proxies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2240, 529, 16, 8337, 16, 2590, 16, 1605, 33, 7036, 16, 353, 9565, 5656, 273, 404, 4672, 365, 18, 18602, 273, 8337, 365, 18, 529, 273, 508, 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, 1001, 2738, 972, 12, 2890, 16, 508, 16, 2240, 529, 16, 8337, 16, 2590, 16, 1605, 33, 7036, 16, 353, 9565, 5656, 273, 404, 4672, 365, 18, 18602, 273, 8337, 365, 18, 529, 273, 508, 365...
self._read = self.sslobj.read self._write = self.sslobj.write
def _read(self, n): """ It seems that SSL Objects read() method may not supply as much as you're asking for, at least with extremely large messages. somewhere > 16K - found this in the test_channel.py test_large unittest. """ result = self.sslobj.read(n) while len(result) < n: result += self.sslobj.read(n - len(result)) return result
def _setup_transport(self): """ Wrap the socket in an sslobj, and use that directly for _read() and _write().
0ca0d8e7434fd0b5f7836947a2e1591ee9ec4e56 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10764/0ca0d8e7434fd0b5f7836947a2e1591ee9ec4e56/transport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 67, 13049, 12, 2890, 4672, 3536, 4266, 326, 2987, 316, 392, 5202, 383, 441, 16, 471, 999, 716, 5122, 364, 389, 896, 1435, 471, 389, 2626, 7675, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 8401, 67, 13049, 12, 2890, 4672, 3536, 4266, 326, 2987, 316, 392, 5202, 383, 441, 16, 471, 999, 716, 5122, 364, 389, 896, 1435, 471, 389, 2626, 7675, 2, -100, -100, -100, -100, -1...
log.log( "<directive>FS.tokenparser(): ID '%s' fs '%s' rule '%s' action '%s'" % (self.state.ID, self.args.fs, self.args.rule, self.args.actionList), 8 )
log.log( "<directive>FS.tokenparser(): ID '%s' fs '%s' rule '%s'" % (self.state.ID, self.args.fs, self.args.rule), 8 )
def tokenparser(self, toklist, toktypes, indent):
bc8dd24780027d732ae1f00fe01174be6240ac13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/bc8dd24780027d732ae1f00fe01174be6240ac13/common.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1147, 4288, 12, 2890, 16, 946, 1098, 16, 946, 2352, 16, 3504, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1147, 4288, 12, 2890, 16, 946, 1098, 16, 946, 2352, 16, 3504, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
sage: print elementary_abelian_2group(3)
sage: elementary_abelian_2group(3)
def elementary_abelian_2group(s): """ Returns the latin square based on the Cayley table for the elementary abelian 2-group of order 2\^s. INPUT: s -- int; order of the latin square will be 2\^s. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: print elementary_abelian_2group(3) [0 1 2 3 4 5 6 7] [1 0 3 2 5 4 7 6] [2 3 0 1 6 7 4 5] [3 2 1 0 7 6 5 4] [4 5 6 7 0 1 2 3] [5 4 7 6 1 0 3 2] [6 7 4 5 2 3 0 1] [7 6 5 4 3 2 1 0] """ assert s > 0 if s == 1: L = LatinSquare(2, 2) L[0, 0] = 0 L[0, 1] = 1 L[1, 0] = 1 L[1, 1] = 0 return L else: L_prev = elementary_abelian_2group(s-1) L = LatinSquare(2**s, 2**s) offset = L.nrows()/2 for r in range(L_prev.nrows()): for c in range(L_prev.ncols()): L[r, c] = L_prev[r, c] L[r+offset, c] = L_prev[r, c] + offset L[r, c+offset] = L_prev[r, c] + offset L[r+offset, c+offset] = L_prev[r, c] return L
79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 930, 814, 67, 873, 2779, 67, 22, 1655, 12, 87, 4672, 3536, 2860, 326, 30486, 8576, 2511, 603, 326, 385, 528, 30678, 1014, 364, 326, 930, 814, 1223, 292, 2779, 576, 17, 1655, 434, 1353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 930, 814, 67, 873, 2779, 67, 22, 1655, 12, 87, 4672, 3536, 2860, 326, 30486, 8576, 2511, 603, 326, 385, 528, 30678, 1014, 364, 326, 930, 814, 1223, 292, 2779, 576, 17, 1655, 434, 1353,...
lines.append('\t$(BAKEFILE) -f%s -o$@ %s' % (format, bake))
lines.append('\t$(BAKEFILE) -f%s -o$@ %s %s' % (format, a, bake))
def add(bake, makedirs, make, dep, format, args={}): a = '' if 'all' in args: a += ' %s' % args['all'] if format in args: a += ' %s' % args[format] if format != 'autoconf' and 'not_autoconf' in args: a += ' %s' % args['not_autoconf'] if format in makedirs: makedir = makedirs[format] else: makedir = makedirs['all'] tfile = '%s/%s' % (makedir, make) lines.append('%s: %s' % (tfile, dep)) lines.append('\t$(BAKEFILE) -f%s -o$@ %s' % (format, bake)) lines.append('\ttouch $@') if format not in all: all[format] = [] all[format].append(tfile)
5646c3f82d3f1b1ed8c2635f1ee86f81f715f896 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/5646c3f82d3f1b1ed8c2635f1ee86f81f715f896/regenMakefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 70, 911, 16, 12151, 16, 1221, 16, 5993, 16, 740, 16, 833, 12938, 4672, 279, 273, 875, 309, 296, 454, 11, 316, 833, 30, 279, 1011, 296, 738, 87, 11, 738, 833, 3292, 454, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 70, 911, 16, 12151, 16, 1221, 16, 5993, 16, 740, 16, 833, 12938, 4672, 279, 273, 875, 309, 296, 454, 11, 316, 833, 30, 279, 1011, 296, 738, 87, 11, 738, 833, 3292, 454, 35...
return expr
return expr
def convert(expr, target): """ Converts units between expr and target. If target is None then converts to SI base units. INPUT: - `expr` -- the symbolic expression converting from - `target` -- (default None) the symbolic expression converting to OUTPUT: - `symbolic expression` EXAMPLES:: sage: sage.symbolic.units.convert(units.length.foot, None) 381/1250*meter sage: sage.symbolic.units.convert(units.mass.kilogram, units.mass.pound) 100000000/45359237*pound Raises ValueError if expr and target are not convertible:: sage: sage.symbolic.units.convert(units.mass.kilogram, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units sage: sage.symbolic.units.convert(units.length.meter^2, units.length.foot) Traceback (most recent call last): ... ValueError: Incompatible units Recognizes derived unit relationships to base units and other derived units:: sage: sage.symbolic.units.convert(units.length.foot/units.time.second^2, units.acceleration.galileo) 762/25*galileo sage: sage.symbolic.units.convert(units.mass.kilogram*units.length.meter/units.time.second^2, units.force.newton) newton sage: sage.symbolic.units.convert(units.length.foot^3, units.area.acre*units.length.inch) 1/3630*acre*inch sage: sage.symbolic.units.convert(units.charge.coulomb, units.current.ampere*units.time.second) ampere*second sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch) 1290320000000/8896443230521*pounds_per_square_inch For decimal answers multiply 1.0:: sage: sage.symbolic.units.convert(units.pressure.pascal*units.si_prefixes.kilo, units.pressure.pounds_per_square_inch)*1.0 0.145037737730209*pounds_per_square_inch """ base_target = target z = {} tz = {} for x in expr.variables(): if is_unit(x): if unit_to_type[str(x)] == 'temperature': return convert_temperature(expr, target) else: z[x] = base_units(x) expr = expr.subs(z) if target is None: return expr else: for y in base_target.variables(): if is_unit(y): tz[y] = base_units(y) base_target = base_target.subs(tz) coeff = (expr/base_target).expand() if len(coeff.variables()) != 0: raise ValueError, "Incompatible units" return coeff*target
36d2f28c044694ad73a4a70a9d869366d0e39ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/36d2f28c044694ad73a4a70a9d869366d0e39ec4/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 12, 8638, 16, 1018, 4672, 3536, 20377, 4971, 3086, 3065, 471, 1018, 18, 971, 1018, 353, 599, 1508, 7759, 358, 5705, 1026, 4971, 18, 225, 12943, 30, 225, 300, 1375, 8638, 68, 1493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 12, 8638, 16, 1018, 4672, 3536, 20377, 4971, 3086, 3065, 471, 1018, 18, 971, 1018, 353, 599, 1508, 7759, 358, 5705, 1026, 4971, 18, 225, 12943, 30, 225, 300, 1375, 8638, 68, 1493, ...
assert res == (1,"hello",3) assert sys.getrefcount(res) == 2
assert_equal(res,(1,"hello",3)) assert_equal(sys.getrefcount(res),2)
def check_args_kw(self,level=5): a = foo() code = """ py::tuple args(2); args[0] = 1; args[1] = "hello"; py::dict kw; kw["val3"] = 3; return_val = a.mcall("bar3",args,kw); """ res = inline_tools.inline(code,['a']) assert res == (1,"hello",3) assert sys.getrefcount(res) == 2
267b08d9c3e7613c126729a179f4503c91625e9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7416/267b08d9c3e7613c126729a179f4503c91625e9c/test_scxx_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1968, 67, 9987, 12, 2890, 16, 2815, 33, 25, 4672, 279, 273, 8431, 1435, 981, 273, 3536, 2395, 2866, 8052, 833, 12, 22, 1769, 833, 63, 20, 65, 273, 404, 31, 833, 63, 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, 866, 67, 1968, 67, 9987, 12, 2890, 16, 2815, 33, 25, 4672, 279, 273, 8431, 1435, 981, 273, 3536, 2395, 2866, 8052, 833, 12, 22, 1769, 833, 63, 20, 65, 273, 404, 31, 833, 63, 21, 65...
Filename = TeFile
File = TeFile
def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None) : """Prepare the parameter of GenSection""" if FfsInf != None : InfFileName = FfsInf.InfFileName SectionType = FfsInf.__ExtendMarco__(self.SectionType) Filename = FfsInf.__ExtendMarco__(self.FileName) """print 'Buile Num: %s' %self.BuildNum""" BuildNum = FfsInf.__ExtendMarco__(self.BuildNum) """print 'After extend Build Num: %s' %self.BuildNum""" """print 'version Num: %s' %self.VersionNum""" VersionNum = FfsInf.__ExtendMarco__(self.VersionNum) """print 'After extend Version Num: %s' %self.VersionNum""" StringData = FfsInf.__ExtendMarco__(self.StringData) else: SectionType = self.SectionType Filename = self.Filename BuildNum = self.BuildNum VerstionNum = self.VersionNum InfFileName = '' if self.Optional == True : if Filename == None or Filename =='': GenFdsGlobalVariable.VerboseLogger( "Optional Section don't exist!") return '', None FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension) if IsSect : return FileList, self.Alignment
184406f960c02da0b957160a62999cf6950f3780 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/184406f960c02da0b957160a62999cf6950f3780/EfiSection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 5285, 12, 2890, 16, 3633, 743, 16, 5924, 461, 16, 3232, 2578, 16, 1929, 780, 682, 16, 478, 2556, 13149, 273, 599, 13, 294, 3536, 7543, 326, 1569, 434, 10938, 5285, 8395, 309, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 5285, 12, 2890, 16, 3633, 743, 16, 5924, 461, 16, 3232, 2578, 16, 1929, 780, 682, 16, 478, 2556, 13149, 273, 599, 13, 294, 3536, 7543, 326, 1569, 434, 10938, 5285, 8395, 309, 47...
def send_to (self, data, addr, flags=0):
def send_to(self, data, addr, flags=0):
def send_to (self, data, addr, flags=0): self._checkClosed() if self._sslobj: raise ValueError("send_to not allowed on instances of %s" % self.__class__) else: return socket.send_to(self, data, addr, flags)
5b8b1555de033c0f1646bce5fd130567297da019 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/5b8b1555de033c0f1646bce5fd130567297da019/ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 12, 2890, 16, 501, 16, 3091, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 1002, 2068, 2932, 4661, 67, 869, 486, 2935, 603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 12, 2890, 16, 501, 16, 3091, 16, 2943, 33, 20, 4672, 365, 6315, 1893, 7395, 1435, 309, 365, 6315, 1049, 383, 441, 30, 1002, 2068, 2932, 4661, 67, 869, 486, 2935, 603, ...
("br", self.endTagBr)
(("html", "body", "br"), self.endTagBodyHtmlBr)
def __init__(self, parser, tree): Phase.__init__(self, parser, tree)
97e3f4d0e81abcf694a7453aca8af004223e8114 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4487/97e3f4d0e81abcf694a7453aca8af004223e8114/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 4672, 19459, 16186, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 4672, 19459, 16186, 2738, 972, 12, 2890, 16, 2082, 16, 2151, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
"""A Branching rule describes the restriction of representations
""" A Branching rule describes the restriction of representations
def branch_weyl_character(chi, R, S, rule="default"): """A Branching rule describes the restriction of representations from a Lie group or algebra G to a smaller one. See for example, R. C. King, Branching rules for classical Lie groups using tensor and spinor methods. J. Phys. A 8 (1975), 429--449 or Howe, Tan and Willenbring, Stable branching rules for classical symmetric pairs, Trans. Amer. Math. Soc. 357 (2005), no. 4, 1601--1626. INPUT: chi - a character of G R - the Weyl Character Ring of G S - the Weyl Character Ring of H rule - a set of r dominant weights in H where r is the rank of G. You may use a predefined rule by specifying rule = one of"levi", "automorphic", "symmetric", "extended", "triality" or "miscellaneous". The use of these rules will be explained next. After the examples we will explain how to write your own branching rules for cases that we have omitted. (Rules for the exceptional groups have not yet been coded.) To explain the predefined rules we survey the most important branching rules. These may be classified into several cases, and once this is understood, the detailed classification can be read off from the Dynkin diagrams. Dynkin classified the maximal subgroups of Lie groups in Mat. Sbornik N.S. 30(72):349-462 (1952). We will list these for the cases where the Dynkin diagram of S is connected. This excludes branching rules such as A3 -> A1 x A1, which are not yet implemented. LEVI TYPE. These can be read off from the Dynkin diagram. If removing a node from the Dynkin diagram produces another Dynkin diagram, there is a branching rule. Currently we require that the smaller diagram be connected. For these rules use the option rule="levi". ['A',r] -> ['A',r-1] ['B',r] -> ['A',r-1] ['B',r] -> ['B',r-1] ['C',r] -> ['A',r-1] ['C',r] -> ['C',r-1] ['D',r] -> ['A',r-1] ['D',r] -> ['D',r-1] ['E',r] -> ['A',r-1] r = 6,7,8 (not implemented yet) ['E',r] -> ['D',r-1] r = 6,7,8 (not implemented yet) ['E',r] -> ['E',r-1] r = 6,7 (not implemented yet) ['F',4] -> ['B',3] (not implemented yet) ['F',4] -> ['C',3] (not implemented yet) ['G',2] -> ['A',1] (short root) (not implemented yet) The other Levi branching rule from G2 -> A1 corresponding to the long root is available by first branching G2 -> A2 then branching to A1. AUTOMORPHIC TYPE. If the Dynkin diagram has a symmetry, then there is an automorphism that is a special case of a branching rule. There is also an exotic"triality" automorphism of D4 having order 3. Use rule="automorphic" or rule="triality" ['A',r] -> ['A',r] ['D',r] -> ['D',r] ['E',6] -> ['E',6] (not implemented yet) SYMMETRIC TYPE. Related to the automorphic type, when the Dynkin diagram has a symmetry there is a branching rule to the subalgebra (or subgroup) of invariants under the automorphism. Use rule="symmetric". ['A',2r+1] -> ['B',r] ['A',2r] -> ['C',r] ['D',r] -> ['B',r-1] ['E',6] -> ['F',4] (not implemented yet) ['D',4] -> ['G',2] (not implemented yet) EXTENDED TYPE. If removing a node from the extended Dynkin diagram results in a Dynkin diagram, then there is a branching rule. Use rule="extended" for these. ['G',2] -> ['A',2] (not implemented yet) ['B',r] -> ['D',r] ['F',4] -> ['B',4] (not implemented yet) ['E',7] -> ['A',7] (not implemented yet) ['E',8] -> ['A',8] (not implemented yet) MISCELLANEOUS: Use rule="miscellaneous" for the following rule, which does not fit into the above framework. ['B',3] -> ['G',2] (Not implemented yet.) ISOMORPHIC TYPE: Although not usually referred to as a branching rule, the effects of the accidental isomorphisms may be handled using rule="isomorphic" ['B',2] -> ['C',2] ['C',2] -> ['B',2] ['A',3] -> ['D',3] ['D',3] -> ['A',3] EXAMPLES: (Levi type) sage: A2 = WeylCharacterRing(['A',2]) sage: B2 = WeylCharacterRing(['B',2]) sage: C2 = WeylCharacterRing(['C',2]) sage: A3 = WeylCharacterRing(['A',3]) sage: B3 = WeylCharacterRing(['B',3]) sage: C3 = WeylCharacterRing(['C',3]) sage: D3 = WeylCharacterRing(['D',3]) sage: A4 = WeylCharacterRing(['A',4]) sage: D4 = WeylCharacterRing(['D',4]) sage: A5 = WeylCharacterRing(['A',5]) sage: D5 = WeylCharacterRing(['D',5]) sage: [B3(w).branch(A2,rule="levi") for w in B3.lattice().fundamental_weights()] [A2(0,0,-1) + A2(0,0,0) + A2(1,0,0), A2(0,-1,-1) + A2(0,0,-1) + A2(0,0,0) + A2(1,0,-1) + A2(1,0,0) + A2(1,1,0), A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)] The last example must be understood as follows. The representation of B3 being branched is spin, which is not a representation of SO(7) but of its double cover spin(7). The group A2 is really GL(3) and the double cover of SO(7) induces a cover of GL(3) that is trivial over SL(3) but not over the center of GL(3). The weight lattice for this GL(3) consists of triples (a,b,c) of half integers such that a-b and b-c are in ZZ, and this is reflected in the last decomposition. sage: [C3(w).branch(A2,rule="levi") for w in C3.lattice().fundamental_weights()] [A2(0,0,-1) + A2(1,0,0), A2(0,-1,-1) + A2(1,0,-1) + A2(1,1,0), A2(-1,-1,-1) + A2(1,-1,-1) + A2(1,1,-1) + A2(1,1,1)] sage: [D4(w).branch(A3,rule="levi") for w in D4.lattice().fundamental_weights()] [A3(0,0,0,-1) + A3(1,0,0,0), A3(0,0,-1,-1) + A3(0,0,0,0) + A3(1,0,0,-1) + A3(1,1,0,0), A3(1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,-1/2), A3(-1/2,-1/2,-1/2,-1/2) + A3(1/2,1/2,-1/2,-1/2) + A3(1/2,1/2,1/2,1/2)] sage: [B3(w).branch(B2,rule="levi") for w in B3.lattice().fundamental_weights()] [2*B2(0,0) + B2(1,0), B2(0,0) + 2*B2(1,0) + B2(1,1), 2*B2(1/2,1/2)] sage: C3 = WeylCharacterRing(['C',3]) sage: [C3(w).branch(C2,rule="levi") for w in C3.lattice().fundamental_weights()] [2*C2(0,0) + C2(1,0), C2(0,0) + 2*C2(1,0) + C2(1,1), C2(1,0) + 2*C2(1,1)] sage: [D5(w).branch(D4,rule="levi") for w in D5.lattice().fundamental_weights()] [2*D4(0,0,0,0) + D4(1,0,0,0), D4(0,0,0,0) + 2*D4(1,0,0,0) + D4(1,1,0,0), D4(1,0,0,0) + 2*D4(1,1,0,0) + D4(1,1,1,0), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2) + D4(1/2,1/2,1/2,1/2)] EXAMPLES: (Automorphic type, including D4 triality) sage: [A3(chi).branch(A3,rule="automorphic") for chi in A3.lattice().fundamental_weights()] [A3(0,0,0,-1), A3(0,0,-1,-1), A3(0,-1,-1,-1)] sage: [D4(chi).branch(D4,rule="automorphic") for chi in D4.lattice().fundamental_weights()] [D4(1,0,0,0), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1/2,1/2,1/2,-1/2)] sage: [D4(chi).branch(D4,rule="triality") for chi in D4.lattice().fundamental_weights()] [D4(1/2,1/2,1/2,-1/2), D4(1,1,0,0), D4(1/2,1/2,1/2,1/2), D4(1,0,0,0)] EXAMPLES: (Symmetric type) sage: [w.branch(B2,rule="symmetric") for w in [A4(1,0,0,0,0),A4(1,1,0,0,0),A4(1,1,1,0,0),A4(2,0,0,0,0)]] [B2(1,0), B2(1,1), B2(1,1), B2(0,0) + B2(2,0)] sage: [A5(w).branch(C3,rule="symmetric") for w in A5.lattice().fundamental_weights()] [C3(1,0,0), C3(0,0,0) + C3(1,1,0), C3(1,0,0) + C3(1,1,1), C3(0,0,0) + C3(1,1,0), C3(1,0,0)] sage: [A5(w).branch(D3,rule="symmetric") for w in A5.lattice().fundamental_weights()] [D3(1,0,0), D3(1,1,0), D3(1,1,-1) + D3(1,1,1), D3(1,1,0), D3(1,0,0)] sage: [D4(x).branch(B3,rule="symmetric") for x in D4.lattice().fundamental_weights()] [B3(0,0,0) + B3(1,0,0), B3(1,0,0) + B3(1,1,0), B3(1/2,1/2,1/2), B3(1/2,1/2,1/2)] EXAMPLES: (Extended type) sage: [B3(x).branch(D3,rule="extended") for x in B3.lattice().fundamental_weights()] [D3(0,0,0) + D3(1,0,0), D3(1,0,0) + D3(1,1,0), D3(1/2,1/2,-1/2) + D3(1/2,1/2,1/2)] EXAMPLES: (Isomorphic type) sage: [B2(x).branch(C2, rule="isomorphic") for x in B2.lattice().fundamental_weights()] [C2(1,1), C2(1,0)] sage: [C2(x).branch(B2, rule="isomorphic") for x in C2.lattice().fundamental_weights()] [B2(1/2,1/2), B2(1,0)] sage: [A3(x).branch(D3,rule="isomorphic") for x in A3.lattice().fundamental_weights()] [D3(1/2,1/2,1/2), D3(1,0,0), D3(1/2,1/2,-1/2)] sage: [D3(x).branch(A3,rule="isomorphic") for x in D3.lattice().fundamental_weights()] [A3(1/2,1/2,-1/2,-1/2), A3(1/4,1/4,1/4,-3/4), A3(3/4,-1/4,-1/4,-1/4)] Here A3(x,y,z,w) can be understood as a representation of SL(4). The weights x,y,z,w and x+t,y+t,z+t,w+t represent the same representation of SL(4) - though not of GL(4) -- since A3(x+t,y+t,z+t,w+t) is the same as A3(x,y,z,w) tensored with det^t. So as a representation of SL(4), A3(1/4,1/4,1/4,-3/4) is the same as A3(1,1,1,0). The exterior square representation SL(4) --> GL(6) admits an invariant symmetric bilinear form, so is a representation SL(4) --> SO(6) that lifts to an isomorphism SL(4) --> Spin(6). Conversely, there are two isomorphisms SO(6) --> SL(4), of which we've selected one. You may also write your own rules. We may arrange a Cartan subalgebra U of H to be contained in a Cartan subalgebra T of G. This embedding must be chosen in a particular way - the restriction of the positive Weyl chamber in G.lattice() must be contained in the positive Weyl chamber in H.lattice(). The RULE is the adjoint of this embedding U --> T, which is a mapping from the dual space of T, which is the weight space of G, to the weight space of H. EXAMPLE: sage: A3 = WeylCharacterRing(['A',3]) sage: C2 = WeylCharacterRing(['C',2]) sage: rule = lambda x : [x[0]-x[3],x[1]-x[2]] sage: branch_weyl_character(A3([1,1,0,0]),A3,C2,rule) C2(0,0) + C2(1,1) sage: A3(1,1,0,0).branch(C2, rule) == C2(0,0) + C2(1,1) True """ r = R.cartan_type[1] s = S.cartan_type[1] if rule == "levi": if not s == r-1: raise ValueError, "Rank is wrong" if R.cartan_type[0] == 'A': if S.cartan_type[0] == 'A': rule = lambda x : list(x)[:r] else: raise ValueError, "Rule not found" elif R.cartan_type[0] in ['B', 'C', 'D']: if S.cartan_type[0] == 'A': rule = lambda x : x elif S.cartan_type[0] == R.cartan_type[0]: rule = lambda x : list(x)[1:] else: raise ValueError, "Rule not found" elif S.cartan_type[0] == 'E' and R.cartan_type[0] in ['A','D','E']: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif S.cartan_type[0] == 'F' and R.cartan_type[0] in ['B','C']: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif S.cartan_type[0] == 'G' and R.cartan_type[0] == 'A': raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "Rule not found" elif rule == "automorphic": if not R.cartan_type == S.cartan_type: raise ValueError, "Cartan types must agree for automorphic branching rule" elif R.cartan_type[0] == 'E' and R.cartan_type[1] == 6: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif R.cartan_type[0] == 'A': def rule(x) : y = [-i for i in x]; y.reverse(); return y elif R.cartan_type[0] == 'D': def rule(x) : y = R.VS(x); y[len(y)-1] = -y[len(y)-1]; return y elif R.cartan_type[0] == 'E' and R.cartan_type[1] == 6: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "No automorphism found" elif rule == "triality": if not R.cartan_type == S.cartan_type: raise ValueError, "Triality is an automorphic type (for D4 only)" elif not R.cartan_type[0] == 'D' and r == 4: raise ValueError, "Triality is for D4 only" else: def rule(x): [x1,x2,x3,x4] = x return [(x1+x2+x3+x4)/2,(x1+x2-x3-x4)/2,(x1-x2+x3-x4)/2,(-x1+x2+x3-x4)/2] elif rule == "symmetric": if R.cartan_type[0] == 'A': if (S.cartan_type[0] == 'C' or S.cartan_type[0] == 'D' and r == 2*s-1) or (S.cartan_type[0] == 'B' and r == 2*s): def rule(x): return [x[i]-x[r-i] for i in range(s)] else: print S.cartan_type, r, s raise ValueError, "Rule not found" elif R.cartan_type[0] == 'D' and S.cartan_type[0] == 'B' and s == r-1: rule = lambda x : x[:s] elif R.cartan_type[0] == 'E' and S.cartan_type[0] == '6': raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "Rule not found" elif rule == "extended": if R.cartan_type[0] == 'B' and S.cartan_type[0] == 'D' and s == r: rule = lambda x : x elif R.cartan_type[0] == 'G' and S.cartan_type[0] == 'A' and s == r: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif R.cartan_type[0] == 'F' and S.cartan_type[0] == 'B' and s == r: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" elif R.cartan_type[0] == 'E' and S.cartan_type[0] == 'E' and s == r and r >= 7: raise NotImplementedError, "Exceptional branching rules are yet to be implemented" else: raise ValueError, "Rule not found" elif rule == "isomorphic": if R.cartan_type[0] == 'B' and S.cartan_type[0] == 'C' and s == 2 and r == 2: def rule(x): [x1, x2] = x return [x1+x2, x1-x2] elif R.cartan_type[0] == 'C' and S.cartan_type[0] == 'B' and s == 2 and r == 2: def rule(x): [x1, x2] = x return [(x1+x2)/2, (x1-x2)/2] elif R.cartan_type[0] == 'A' and S.cartan_type[0] == 'D' and s == 3 and r == 3: def rule(x): [x1, x2, x3, x4] = x return [(x1+x2-x3-x4)/2, (x1-x2+x3-x4)/2, (x1-x2-x3+x4)/2] elif R.cartan_type[0] == 'D' and S.cartan_type[0] == 'A' and s == 3 and r == 3: def rule(x): [t1, t2, t3] = x return [(t1+t2+t3)/2, (t1-t2-t3)/2, (-t1+t2-t3)/2, (-t1-t2+t3)/2] else: raise ValueError, "Rule not found" mdict = {} for k in chi._mdict: h = tuple(S.VS(rule(k))) if h in mdict: mdict[h] += chi._mdict[k] else: mdict[h] = chi._mdict[k] hdict = S.char_from_weights(mdict) return WeylCharacter(S, hdict, mdict)
da4d6149538661041003f964c0d06f212d52f0f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/da4d6149538661041003f964c0d06f212d52f0f5/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 3536, 432, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041, 578,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3803, 67, 91, 402, 80, 67, 11560, 12, 24010, 16, 534, 16, 348, 16, 1720, 1546, 1886, 6, 4672, 3536, 432, 15449, 310, 1720, 19605, 326, 9318, 434, 27851, 628, 279, 511, 1385, 1041, 578,...
gotfile = 1 if not os.path.isfile(config.XMLTV_FILE):
if os.path.isfile(config.XMLTV_FILE): gotfile = 1 guide.timestamp = os.path.getmtime(config.XMLTV_FILE) else:
def load_guide(): # Create a new guide guide = epg_types.TvGuide() guide.timestamp = os.path.getmtime(config.XMLTV_FILE) # Is there a file to read from? gotfile = 1 if not os.path.isfile(config.XMLTV_FILE): if DEBUG: print 'XMLTV file (%s) missing!' % config.XMLTV_FILE gotfile = 0 # Add the channels that are in the config list, or all if the # list is empty if config.TV_CHANNELS: for (id, disp, tunerid) in config.TV_CHANNELS: c = epg_types.TvChannel() c.id = id c.displayname = disp c.tunerid = tunerid guide.AddChannel(c) else: # Add all channels in the XMLTV file xmltv_channels = None if gotfile: # Don't read the channel info unless we have to, takes a long time! xmltv_channels = xmltv.read_channels(open(config.XMLTV_FILE)) # Was the guide read successfully? if not xmltv_channels: return None # No for chan in xmltv_channels: id = chan['id'].encode('Latin-1') c = epg_types.TvChannel() c.id = id c.displayname = id.split()[1] # XXX Educated guess c.tunerid = id.split()[0] # XXX Educated guess guide.AddChannel(c) xmltv_programs = None if gotfile: xmltv_programs = xmltv.read_programmes(open(config.XMLTV_FILE)) # Was the guide read successfully? if not xmltv_programs: return guide # Return the guide, it has the channels at least... for p in xmltv_programs: prog = epg_types.TvProgram() prog.channel_id = p['channel'].encode('Latin-1') prog.title = p['title'][0][0].encode('Latin-1') if p.has_key('desc'): prog.desc = p['desc'][0][0].encode('Latin-1') prog.start = time.mktime(strptime.strptime(p['start'], xmltv.date_format)) prog.stop = time.mktime(strptime.strptime(p['stop'], xmltv.date_format)) guide.AddProgram(prog) guide.Sort() # Sort the programs in time order return guide
46dc27204e8a0074e47949d632bc086d9512f0aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/46dc27204e8a0074e47949d632bc086d9512f0aa/epg_xmltv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 12118, 13332, 468, 1788, 279, 394, 7343, 7343, 273, 31682, 67, 2352, 18, 56, 90, 17424, 1435, 7343, 18, 5508, 273, 1140, 18, 803, 18, 588, 10838, 12, 1425, 18, 4201, 15579, 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, 1262, 67, 12118, 13332, 468, 1788, 279, 394, 7343, 7343, 273, 31682, 67, 2352, 18, 56, 90, 17424, 1435, 7343, 18, 5508, 273, 1140, 18, 803, 18, 588, 10838, 12, 1425, 18, 4201, 15579, 6...
if fields and f not in fields: continue
if fields and f not in fields: continue
def fields_get(self, cr, user, fields=None, context=None, read_access=True): if context is None: context = {} res = {} translation_obj = self.pool.get('ir.translation') model_access_obj = self.pool.get('ir.model.access') for parent in self._inherits: res.update(self.pool.get(parent).fields_get(cr, user, fields, context)) for f in self._columns.keys(): if fields and f not in fields: continue res[f] = {'type': self._columns[f]._type} for arg in ('string', 'readonly', 'states', 'size', 'required', 'change_default', 'translate', 'help', 'select'): if getattr(self._columns[f], arg): res[f][arg] = getattr(self._columns[f], arg) if not read_access: res[f]['readonly'] = True res[f]['states'] = {} for arg in ('digits', 'invisible','filters'): if hasattr(self._columns[f], arg) \ and getattr(self._columns[f], arg): res[f][arg] = getattr(self._columns[f], arg)
54ab22281e7b389e25729363ae67c0f00820efa0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/54ab22281e7b389e25729363ae67c0f00820efa0/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 588, 12, 2890, 16, 4422, 16, 729, 16, 1466, 33, 7036, 16, 819, 33, 7036, 16, 855, 67, 3860, 33, 5510, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 400, 273, 2618, 4794, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1466, 67, 588, 12, 2890, 16, 4422, 16, 729, 16, 1466, 33, 7036, 16, 819, 33, 7036, 16, 855, 67, 3860, 33, 5510, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 400, 273, 2618, 4794, ...
__builtin__.open = __builtin__.file = self._open
__builtin__.file = self._file __builtin__.open = self._open
def run(self, func): """Run 'func' under os sandboxing""" try: self._copy(self) __builtin__.open = __builtin__.file = self._open self._active = True return func() finally: self._active = False __builtin__.open = __builtin__.file = _open self._copy(_os)
457f95783acaed3c59668b6c6bf93414c4f1967b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/495/457f95783acaed3c59668b6c6bf93414c4f1967b/sandbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 1326, 4672, 3536, 1997, 296, 644, 11, 3613, 1140, 15202, 310, 8395, 775, 30, 365, 6315, 3530, 12, 2890, 13, 1001, 24553, 25648, 768, 273, 365, 6315, 768, 1001, 24553,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16, 1326, 4672, 3536, 1997, 296, 644, 11, 3613, 1140, 15202, 310, 8395, 775, 30, 365, 6315, 3530, 12, 2890, 13, 1001, 24553, 25648, 768, 273, 365, 6315, 768, 1001, 24553,...
dataArray : the data; 2D numpy.ndarray, each variable is a collumn nameList : the variable names; list or tuple of strings.
dataArray : the data; 2D numpy.ndarray, each attribute is a collumn nameList : the attribute names; list or tuple of strings.
def __init__(self, varArray=None, nameList=None, valDict=None, fileName=None): ''' Initialize the object. Arguments: dataArray : the data; 2D numpy.ndarray, each variable is a collumn nameList : the variable names; list or tuple of strings. Also accepted is a dict with names:indices, which is accepted untested. paramDict : Dictionary of parameter value pairs fileName : name of a file from which the object's contents is loaded. The file name is ignored if any of the other arguments are specified. (Specify fileName as: fileName='foo.csv') ''' #TODO: name #Create empty object self.dataDict = {} '''Storage for the time series and the parameters''' self._numObs = None '''Number of observations (items) in time series (number of array elements)''' #initialize from data if varArray != None or nameList != None or valDict != None: self.createFromData(varArray, nameList, valDict) #initialize from from file elif fileName != None: self.load(fileName)
45268ff49ddb4f963530947d7202a5e0642e2fda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2720/45268ff49ddb4f963530947d7202a5e0642e2fda/storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 569, 1076, 33, 7036, 16, 508, 682, 33, 7036, 16, 1244, 5014, 33, 7036, 16, 3968, 33, 7036, 4672, 9163, 9190, 326, 733, 18, 225, 13599, 30, 30541, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 569, 1076, 33, 7036, 16, 508, 682, 33, 7036, 16, 1244, 5014, 33, 7036, 16, 3968, 33, 7036, 4672, 9163, 9190, 326, 733, 18, 225, 13599, 30, 30541, 294, ...
if isinstance(cls, str):
if isinstance(cls, (str, str8)):
def run_unittest(*classes): """Run tests from unittest.TestCase-derived classes.""" valid_types = (unittest.TestSuite, unittest.TestCase) suite = unittest.TestSuite() for cls in classes: if isinstance(cls, str): if cls in sys.modules: suite.addTest(unittest.findTestCases(sys.modules[cls])) else: raise ValueError("str arguments must be keys in sys.modules") elif isinstance(cls, valid_types): suite.addTest(cls) else: suite.addTest(unittest.makeSuite(cls)) _run_suite(suite)
76b25e9d77c4691cda4f7ea6b667a04bc1c59920 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/76b25e9d77c4691cda4f7ea6b667a04bc1c59920/test_support.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 4873, 3813, 30857, 4701, 4672, 3536, 1997, 7434, 628, 2836, 3813, 18, 4709, 2449, 17, 765, 2950, 3318, 12123, 923, 67, 2352, 273, 261, 4873, 3813, 18, 4709, 13587, 16, 2836, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 4873, 3813, 30857, 4701, 4672, 3536, 1997, 7434, 628, 2836, 3813, 18, 4709, 2449, 17, 765, 2950, 3318, 12123, 923, 67, 2352, 273, 261, 4873, 3813, 18, 4709, 13587, 16, 2836, 38...
pardir_fsr = Carbon.File.FSRef(fss)
pardir_fsr = Carbon.File.FSRef(pardir_fss)
def AskFileForSave(**args): default_flags = 0x07 args, tpwanted = _process_Nav_args(args, _ALLOWED_KEYS, default_flags) try: rr = Nav.NavPutFile(args) good = 1 except Nav.error, arg: if arg[0] != -128: # userCancelledErr raise Nav.error, arg return None if not rr.validRecord or not rr.selection: return None if issubclass(tpwanted, Carbon.File.FSRef): raise TypeError, "Cannot pass wanted=FSRef to AskFileForSave" if issubclass(tpwanted, Carbon.File.FSSpec): return tpwanted(rr.selection[0]) if issubclass(tpwanted, (str, unicode)): # This is gross, and probably incorrect too vrefnum, dirid, name = rr.selection[0].as_tuple() pardir_fss = Carbon.File.FSSpec((vrefnum, dirid, '')) pardir_fsr = Carbon.File.FSRef(fss) pardir_path = pardir_fsr.FSRefMakePath() # This is utf-8 name_utf8 = unicode(name, 'macroman').encode('utf8') fullpath = os.path.join(pardir_path, name_utf8) if issubclass(tpwanted, unicode): return unicode(fullpath, 'utf8') return tpwanted(fullpath) raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted)
e58962af4de4ff3a331be66c4413d1609de40633 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e58962af4de4ff3a331be66c4413d1609de40633/EasyDialogs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25747, 812, 1290, 4755, 12, 636, 1968, 4672, 805, 67, 7133, 273, 374, 92, 8642, 833, 16, 8071, 25861, 273, 389, 2567, 67, 12599, 67, 1968, 12, 1968, 16, 389, 16852, 67, 16333, 16, 805,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25747, 812, 1290, 4755, 12, 636, 1968, 4672, 805, 67, 7133, 273, 374, 92, 8642, 833, 16, 8071, 25861, 273, 389, 2567, 67, 12599, 67, 1968, 12, 1968, 16, 389, 16852, 67, 16333, 16, 805,...
self.metadata = metadata
self.template.metadata = metadata
def BuildFile(self, entry, metadata): '''Build literal file information''' self.metadata = metadata try: entry.text = str(self.template) except: logger.error("Failed to template %s" % entry.get('name'), exc_info=1) raise PluginExecutionError perms = {'owner':'root', 'group':'root', 'perms':'0644'} [entry.attrib.__setitem__(key, value) for (key, value) in perms.iteritems()]
667b91bc1ba17c24f279e6b63c0b061d79a16d08 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11867/667b91bc1ba17c24f279e6b63c0b061d79a16d08/TCheetah.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 812, 12, 2890, 16, 1241, 16, 1982, 4672, 9163, 3116, 7158, 585, 1779, 26418, 365, 18, 3202, 18, 4165, 273, 1982, 775, 30, 1241, 18, 955, 273, 609, 12, 2890, 18, 3202, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 812, 12, 2890, 16, 1241, 16, 1982, 4672, 9163, 3116, 7158, 585, 1779, 26418, 365, 18, 3202, 18, 4165, 273, 1982, 775, 30, 1241, 18, 955, 273, 609, 12, 2890, 18, 3202, 13, 1335, ...
dend_time = (trigger2.end_time_ns - trigger1.end_time_ns)*10**(-9)
dend_time = 0
def simpleEThinca(trigger1, trigger2): ''' Return the e-thinca corresponding to the distance in parameter space between two inspiral triggers. The average distance defined below is only an approximation to the true distance and is valid whenever two triggers are nearby. The simplified version of the e-thinca parameter is calculated based on that definition of the distance. d_average=(1/2)[(Gamma(x1)_{ij}(x2-x1)^i(x2-x1)^j)^(1/2) + (Gamma(x2)_{ij}(x2-x1)^i(x2-x1)^j)^(1/2)] then simple_ethinca= d_average^2/4 @param trigger1, trigger2 are single inspiral triggers. ''' #dend_time = (trigger2.end_time - trigger1.end_time) +\ #(trigger2.end_time_ns - trigger1.end_time_ns)*10**(-9) #FIX ME end_time for time slides is poorly defined, we should sort it out dend_time = (trigger2.end_time_ns - trigger1.end_time_ns)*10**(-9) dtau0 = trigger2.tau0-trigger1.tau0 dtau3 = trigger2.tau3-trigger1.tau3 delta_x = numpy.array([dend_time, dtau0, dtau3]) Gamma1 = numpy.array( [[trigger1.Gamma0, trigger1.Gamma1, trigger1.Gamma2],\ [trigger1.Gamma1, trigger1.Gamma3, trigger1.Gamma4],\ [trigger1.Gamma2, trigger1.Gamma4, trigger1.Gamma5]]) Gamma2 = numpy.array( [[trigger2.Gamma0, trigger2.Gamma1, trigger2.Gamma2],\ [trigger2.Gamma1, trigger2.Gamma3, trigger2.Gamma4],\ [trigger2.Gamma2, trigger2.Gamma4, trigger2.Gamma5]]) average_distance = 0.5*numpy.sqrt(numpy.dot(delta_x, numpy.dot(Gamma1, delta_x))) + \ 0.5*numpy.sqrt(numpy.dot(delta_x, numpy.dot(Gamma2, delta_x))) simple_ethinca = (average_distance**2)/4.0 return simple_ethinca
4c0f6ee81779244420a4b94ffd4b1996e80b7700 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3592/4c0f6ee81779244420a4b94ffd4b1996e80b7700/CoincInspiralUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 41, 1315, 267, 5353, 12, 10668, 21, 16, 3080, 22, 4672, 9163, 2000, 326, 425, 17, 451, 267, 5353, 4656, 358, 326, 3888, 316, 225, 1569, 3476, 3086, 2795, 316, 1752, 481, 287, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 41, 1315, 267, 5353, 12, 10668, 21, 16, 3080, 22, 4672, 9163, 2000, 326, 425, 17, 451, 267, 5353, 4656, 358, 326, 3888, 316, 225, 1569, 3476, 3086, 2795, 316, 1752, 481, 287, 117...
parser.add_option("--user", dest="user", default='admin',
parser.add_option("--user", dest="user", default='obspyck',
def main(): usage = "USAGE: %prog -t <datetime> -d <duration> -i <channelids>" parser = OptionParser(usage) parser.add_option("-t", "--time", dest="time", help="Starttime of seismogram to retrieve. It takes a " "string which UTCDateTime can convert. " "E.g. '2010-01-10T05:00:00'", default='2009-07-21T04:33:00') parser.add_option("-d", "--duration", type="float", dest="duration", help="Duration of seismogram in seconds", default=120) parser.add_option("-i", "--ids", dest="ids", help="Ids to retrieve, star for channel and " "wildcards for stations are allowed, e.g. " "'BW.RJOB..EH*,BW.RM?*..EH*'", default='BW.RJOB..EH*,BW.RMOA..EH*') parser.add_option("-s", "--servername", dest="servername", help="Servername of the seishub server", default='teide') parser.add_option("-p", "--port", type="int", dest="port", help="Port of the seishub server", default=8080) parser.add_option("--user", dest="user", default='admin', help="Username for seishub server") parser.add_option("--password", dest="password", default='admin', help="Password for seishub server") parser.add_option("--timeout", dest="timeout", type="int", default=10, help="Timeout for seishub server") parser.add_option("-l", "--local", action="store_true", dest="local", default=False, help="use local files for design purposes " + \ "(overwrites event xml with fixed id)") parser.add_option("-k", "--keys", action="store_true", dest="keybindings", default=False, help="Show keybindings and quit") parser.add_option("--lowpass", type="float", dest="lowpass", help="Frequency for Lowpass-Slider", default=20.) parser.add_option("--highpass", type="float", dest="highpass", help="Frequency for Highpass-Slider", default=1.) parser.add_option("--nozeromean", action="store_true", dest="nozeromean", help="Deactivate offset removal of traces", default=False) parser.add_option("--pluginpath", dest="pluginpath", default="/baysoft/obspyck/", help="Path to local directory containing the folders" + \ " with the files for the external programs") parser.add_option("--starttime-offset", type="float", dest="starttime_offset", default=0.0, help="Offset to add to specified starttime in " + \ "seconds. Thus a time from an automatic picker " + \ "can be used with a specified offset for the " + \ "starttime. E.g. to request a waveform starting 30 " + \ "seconds earlier than the specified time use -30.") (options, args) = parser.parse_args() for req in ['-d','-t','-i']: if not getattr(parser.values,parser.get_option(req).dest): parser.print_help() return # If keybindings option is set, don't prepare streams. # We then only print the keybindings and exit. if options.keybindings: streams = None client = None # If local option is set we read the locally stored traces. # Just for testing purposes, sent event xmls always overwrite the same xml. elif options.local: streams=[] streams.append(read('20091227_105240_Z.RJOB')) streams[0].append(read('20091227_105240_N.RJOB')[0]) streams[0].append(read('20091227_105240_E.RJOB')[0]) streams.append(read('20091227_105240_Z.RMOA')) streams[1].append(read('20091227_105240_N.RMOA')[0]) streams[1].append(read('20091227_105240_E.RMOA')[0]) streams.append(read('20091227_105240_Z.RNON')) streams[2].append(read('20091227_105240_N.RNON')[0]) streams[2].append(read('20091227_105240_E.RNON')[0]) streams.append(read('20091227_105240_Z.RTBE')) streams[3].append(read('20091227_105240_N.RTBE')[0]) streams[3].append(read('20091227_105240_E.RTBE')[0]) streams.append(read('20091227_105240_Z.RWMO')) streams[4].append(read('20091227_105240_N.RWMO')[0]) streams[4].append(read('20091227_105240_E.RWMO')[0]) streams.append(read('20091227_105240_Z.RWMO')) streams[5].append(read('20091227_105240_N.RWMO')[0]) streams[5].append(read('20091227_105240_E.RWMO')[0]) baseurl = "http://" + options.servername + ":%i" % options.port client = Client(base_url=baseurl, user=options.user, password=options.password, timeout=options.timeout) else: try: t = UTCDateTime(options.time) t = t + options.starttime_offset baseurl = "http://" + options.servername + ":%i" % options.port client = Client(base_url=baseurl, user=options.user, password=options.password, timeout=options.timeout) except: print "Error while connecting to server!" raise streams = [] sta_fetched = set() for id in options.ids.split(","): net, sta_wildcard, loc, cha = id.split(".") for sta in client.waveform.getStationIds(network_id=net): if not fnmatch.fnmatch(sta, sta_wildcard): continue # make sure we dont fetch a single station of # one network twice (could happen with wildcards) net_sta = "%s:%s" % (net, sta) if net_sta in sta_fetched: print net_sta, "was already retrieved. Skipping!" continue try: st = client.waveform.getWaveform(net, sta, loc, cha, t, t + options.duration, apply_filter=True) print net_sta, "fetched successfully." sta_fetched.add(net_sta) except: print net_sta, "could not be retrieved. Skipping!" continue st.sort() st.reverse() streams.append(st) # sort streams by station name streams = sorted(streams, key=lambda st: st[0].stats['station']) PickingGUI(client, streams, options)
08072571b11b984a33e9ee53ba52401ff881eaff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/08072571b11b984a33e9ee53ba52401ff881eaff/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 4084, 273, 315, 29550, 30, 738, 14654, 300, 88, 411, 6585, 34, 300, 72, 411, 8760, 34, 300, 77, 411, 4327, 2232, 2984, 2082, 273, 18862, 12, 9167, 13, 2082, 18, 1289, 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, 2774, 13332, 4084, 273, 315, 29550, 30, 738, 14654, 300, 88, 411, 6585, 34, 300, 72, 411, 8760, 34, 300, 77, 411, 4327, 2232, 2984, 2082, 273, 18862, 12, 9167, 13, 2082, 18, 1289, 67, ...
command_list -- a list of commands (strings) to run at the shell using os.system
command_list -- a list of commands, each given as a pair of the form [command, argument].
def execute_list_of_commands_in_serial(command_list): """ INPUT: command_list -- a list of commands (strings) to run at the shell using os.system OUTPUT: the given list of commands are all executed in serial """ for cmd in command_list: print cmd r = os.system(cmd) if r != 0: print "Error running command, exited with status %s."%r sys.exit(1)
5379ece7a55e3f8468a19f6780c11e73a5a333a8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5379ece7a55e3f8468a19f6780c11e73a5a333a8/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 67, 1098, 67, 792, 67, 7847, 67, 267, 67, 8818, 12, 3076, 67, 1098, 4672, 3536, 12943, 30, 1296, 67, 1098, 1493, 279, 666, 434, 4364, 16, 1517, 864, 487, 279, 3082, 434, 326, 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, 1836, 67, 1098, 67, 792, 67, 7847, 67, 267, 67, 8818, 12, 3076, 67, 1098, 4672, 3536, 12943, 30, 1296, 67, 1098, 1493, 279, 666, 434, 4364, 16, 1517, 864, 487, 279, 3082, 434, 326, 6...
query = UserData.all() query.filter('user =', user) user_data = query.get() if user_data is None: user_data = UserData( user=user, last_login=datetime.datetime.now(), proficient_exercises=[], suggested_exercises=[], assigned_exercises=[], need_to_reassess=True, points=0, ) user_data.put()
user_data = UserData.get_or_insert_for(user)
def get(self): user = users.get_current_user() if user: query = UserData.all() query.filter('user =', user) user_data = query.get()
b7f57926752c18d5bb2bb3ca4fbcb8250e7a6276 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/b7f57926752c18d5bb2bb3ca4fbcb8250e7a6276/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 309, 729, 30, 843, 273, 31109, 18, 454, 1435, 843, 18, 2188, 2668, 1355, 273, 2187, 729, 13, 729, 67, 892, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 3677, 18, 588, 67, 2972, 67, 1355, 1435, 309, 729, 30, 843, 273, 31109, 18, 454, 1435, 843, 18, 2188, 2668, 1355, 273, 2187, 729, 13, 729, 67, 892, 273...
archiver.addfile(os.path.join(prefix, self._relpath, info.name),
archiver.addfile(os.path.join(prefix, self._path, info.name),
def archive(self, ui, archiver, prefix): source, revision = self._state self._fetch(source, revision)
51b86ca31bbe6bb9d97c098b43cb9fa45776b689 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/51b86ca31bbe6bb9d97c098b43cb9fa45776b689/subrepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5052, 12, 2890, 16, 5915, 16, 6637, 1667, 16, 1633, 4672, 1084, 16, 6350, 273, 365, 6315, 2019, 365, 6315, 5754, 12, 3168, 16, 6350, 13, 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, 5052, 12, 2890, 16, 5915, 16, 6637, 1667, 16, 1633, 4672, 1084, 16, 6350, 273, 365, 6315, 2019, 365, 6315, 5754, 12, 3168, 16, 6350, 13, 2, -100, -100, -100, -100, -100, -100, -100, -1...
def prefs_profile_chosen(self, profile_combo, nameentry, hostentry, portentry, passwordentry, direntry): prefs_profile_num = profile_combo.get_active()
def _profile_chosen(self, profile_combo, nameentry, hostentry, portentry, passwordentry, direntry): profile_num = profile_combo.get_active()
def prefs_profile_chosen(self, profile_combo, nameentry, hostentry, portentry, passwordentry, direntry): prefs_profile_num = profile_combo.get_active() self.updating_nameentry = True nameentry.set_text(str(self.config.profile_names[prefs_profile_num])) self.updating_nameentry = False hostentry.set_text(str(self.config.host[prefs_profile_num])) portentry.set_value(self.config.port[prefs_profile_num]) passwordentry.set_text(str(self.config.password[prefs_profile_num])) direntry.set_filename(str(self.config.musicdir[prefs_profile_num]))
7d41f2105c0d58643150b6472b6b9676150f38e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/7d41f2105c0d58643150b6472b6b9676150f38e3/preferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5040, 67, 343, 8918, 12, 2890, 16, 3042, 67, 25053, 16, 508, 4099, 16, 1479, 4099, 16, 1756, 4099, 16, 2201, 4099, 16, 302, 577, 82, 698, 4672, 3042, 67, 2107, 273, 3042, 67, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5040, 67, 343, 8918, 12, 2890, 16, 3042, 67, 25053, 16, 508, 4099, 16, 1479, 4099, 16, 1756, 4099, 16, 2201, 4099, 16, 302, 577, 82, 698, 4672, 3042, 67, 2107, 273, 3042, 67, 25...
str += I+'<th '+WIDTH+' class="navbar">&nbsp;&nbsp;' str += '&nbsp;<a class="navbar" href="'+`pkg`+'.html">' str += 'Package</a>&nbsp;&nbsp;&nbsp;</th>\n'
str += I+'<th '+WIDTH+' class="navbar">&nbsp;&nbsp;&nbsp;' str += self._uid_to_href(pkg, 'Package', 'navbar') str += '&nbsp;&nbsp;&nbsp;</th>\n'
def _navbar(self, where=None, top=0): """ @return: The HTML code for a navigation bar on the given type of page. The navigation bar typically looks like:: [ Package Module Class Tree Index Help ] @rtype: C{string} @param where: An identifier indicating what page we're creating a navigation bar for. This is either a UID (for an object documentation page); or one of the strings C{'tree'}, C{'index'}, and C{'help'}. @type where: C{UID} or C{string} @param top: Whether this is the navigation bar at the top of the page. @type top: C{boolean} """ str = self._start_of('Navbar') str += '<table class="navbar" border="0" width="100%"' str += ' cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">\n' str += ' <tr valign="center">\n' #str += ' <td width="100%">\n' #str += ' <table border="0" cellpadding="0" cellspacing="0">\n' #str += ' <tr valign="center">\n'
36aef14a0edb4bd18076686105d0e4e6c7c10c23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36aef14a0edb4bd18076686105d0e4e6c7c10c23/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 33, 7036, 16, 1760, 33, 20, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, 434, 1363, 18, 225, 1021, 10394...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11589, 3215, 12, 2890, 16, 1625, 33, 7036, 16, 1760, 33, 20, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 10394, 4653, 603, 326, 864, 618, 434, 1363, 18, 225, 1021, 10394...
elif ext == ".pdb": try: writepdb(self.assy.part, fn) except: print_compact_traceback( "MWsemantics.py: saveFile(): error writing file %r: " % fn ) env.history.message(redmsg( "Problem saving PDB file: [ " + fn + " ]" )) else: self.saved_main_file(fn, fil) env.history.message( "PDB file saved: [ " + os.path.normpath( self.assy.filename) +" ]" ) elif ext == ".mdl": try: writemdlfile(self.assy.part, self.glpane, fn) except: print_compact_traceback( "MWsemantics.py: saveFile(): error writing file %r: " % fn ) env.history.message(redmsg( "Problem saving MDL file: [ " + fn + " ]" )) else: self.saved_main_file(fn, fil) env.history.message( "MDL file saved: [ " + os.path.normpath(self.assy.filename) +" ]" )
def fileExport(self): # Code copied from fileInsert() slot method. Mark 060731. """Slot method for 'File > Export'. """ cmd = greenmsg("Export File: ") # This format list generated from the Open Babel wiki page: # http://openbabel.sourceforge.net/wiki/Babel#File_Formats
e5d8879f8783f59d8b609bfd390c8b99c26b00c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e5d8879f8783f59d8b609bfd390c8b99c26b00c1/ops_files.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 6144, 12, 2890, 4672, 468, 3356, 9268, 628, 585, 4600, 1435, 4694, 707, 18, 6622, 374, 4848, 27, 6938, 18, 3536, 8764, 707, 364, 296, 812, 405, 11054, 10332, 3536, 1797, 273, 10004,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 6144, 12, 2890, 4672, 468, 3356, 9268, 628, 585, 4600, 1435, 4694, 707, 18, 6622, 374, 4848, 27, 6938, 18, 3536, 8764, 707, 364, 296, 812, 405, 11054, 10332, 3536, 1797, 273, 10004,...
"export": (export, [], "hg export <changeset>"),
"export": (export, [('o', 'output', "", 'output to file')], "hg export [-o file] <changeset> ..."),
def verify(ui, repo): """verify the integrity of the repository""" return repo.verify()
563d8f24727bf6b79c71a3741112ff880f82c5c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/563d8f24727bf6b79c71a3741112ff880f82c5c8/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 4881, 16, 3538, 4672, 3536, 8705, 326, 24425, 434, 326, 3352, 8395, 327, 3538, 18, 8705, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 12, 4881, 16, 3538, 4672, 3536, 8705, 326, 24425, 434, 326, 3352, 8395, 327, 3538, 18, 8705, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def generate(self, **args): o = Object(self.objtype, **args) self._createAttributes(o, **args) self._createLinks(o, **args)
def generate(self, **kwargs): o = Object(self.objtype, **kwargs) self._createAttributes(o, **kwargs) self._createLinks(o, **kwargs)
def generate(self, **args): o = Object(self.objtype, **args) self._createAttributes(o, **args) self._createLinks(o, **args) self.container.add(o) return o
79203f7a7a15f35dd7c691982572e00e48a1f572 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10261/79203f7a7a15f35dd7c691982572e00e48a1f572/datagen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 2890, 16, 2826, 4333, 4672, 320, 273, 1033, 12, 2890, 18, 2603, 723, 16, 2826, 4333, 13, 365, 6315, 2640, 2498, 12, 83, 16, 2826, 4333, 13, 365, 6315, 2640, 7100, 12, 83, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2103, 12, 2890, 16, 2826, 4333, 4672, 320, 273, 1033, 12, 2890, 18, 2603, 723, 16, 2826, 4333, 13, 365, 6315, 2640, 2498, 12, 83, 16, 2826, 4333, 13, 365, 6315, 2640, 7100, 12, 83, 1...
self.cmd_channel.dtp_ready = True
def __init__(self, cmd_channel): asynchat.async_chat.__init__(self) self.cmd_channel = cmd_channel self.debug = self.cmd_channel.debug
7facddac0efdba70e4066097f47661a10642808f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/7facddac0efdba70e4066097f47661a10642808f/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1797, 67, 4327, 4672, 487, 2515, 270, 18, 3810, 67, 10880, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 4172, 67, 4327, 273, 1797, 67, 4327, 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, 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, 1797, 67, 4327, 4672, 487, 2515, 270, 18, 3810, 67, 10880, 16186, 2738, 972, 12, 2890, 13, 225, 365, 18, 4172, 67, 4327, 273, 1797, 67, 4327, 365, 18, ...
except ValueError:pass
except Exception:pass
def _decode_string(clazz, str): """ >>> decoder._decode_string(None) >>> decoder._decode_string('True') True >>> decoder._decode_string('False') False >>> decoder._decode_string('11') 11 >>> decoder._decode_string('12L') 12L >>> decoder._decode_string('11.') 11.0 >>> decoder._decode_string('some') u'some' >>> decoder._decode_string('"some"') u'"some"' >>> decoder._decode_string('"some') u'"some' """ if str is None: return None elif str == TRUE_LABEL: return True elif str == FALSE_LABEL: return False try: return int(str) except ValueError:pass try: return long(str) except ValueError:pass try: return float(str) except ValueError:pass str = unicode(str) if str[0] == '"' and str[-1] == '"': original = (str.replace('\\"', '"'))[1:-1] if encoder._escape_string(original) == str: return original return unicode(str)
aa701f9cc79648fdd166a7c1748b9a9fdf829398 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10801/aa701f9cc79648fdd166a7c1748b9a9fdf829398/tools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3922, 67, 1080, 12, 830, 3638, 16, 609, 4672, 3536, 4080, 8320, 6315, 3922, 67, 1080, 12, 7036, 13, 4080, 8320, 6315, 3922, 67, 1080, 2668, 5510, 6134, 1053, 4080, 8320, 6315, 3922,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3922, 67, 1080, 12, 830, 3638, 16, 609, 4672, 3536, 4080, 8320, 6315, 3922, 67, 1080, 12, 7036, 13, 4080, 8320, 6315, 3922, 67, 1080, 2668, 5510, 6134, 1053, 4080, 8320, 6315, 3922,...
def parse_type_of(obj): """ Return a DOM document matching the epytext DTD, containing a description of C{obj}'s type. The description consists of a sinlge paragraph. If C{obj} is an instance, then its type description is a link to its class. Otherwise, its type description is the name of its type. @param obj: The object whose type should be returned as DOM document. @type obj: any @return: A DOM document containing a description of C{obj}'s type. @rtype: L{xml.dom.minidom.Document} """ doc = Document() epytext = doc.createElement('epytext') para = doc.createElement('para') doc.appendChild(epytext) epytext.appendChild(para) if type(obj) is types.InstanceType: link = doc.createElement('link') name = doc.createElement('name') target = doc.createElement('target') para.appendChild(link) link.appendChild(name) link.appendChild(target) name.appendChild(doc.createTextNode(str(obj.__class__.__name__))) target.appendChild(doc.createTextNode(str(obj.__class__))) else: code = doc.createElement('code') para.appendChild(code) code.appendChild(doc.createTextNode(type(obj).__name__)) return doc def summary(epytext_doc): """ Given a DOM document representing formatted documentation, return a new DOM document containing the documentation's first sentence. @param epytext_doc: A DOM document representing formatted documentation, as produced by L{parse}. @type epytext_doc: L{xml.dom.minidom.Document} or L{xml.dom.minidom.Element} @return: A DOM document containing the first sentence of the documentation. @rtype: L{xml.dom.minidom.Document} """ doc = Document() epytext = doc.createElement('epytext') doc.appendChild(epytext) if isinstance(epytext_doc, Document): tree = epytext_doc.childNodes[0] else: tree = epytext_doc if tree.tagName == 'html': try: import rst return rst.summary(epytext_doc) except: return doc children = tree.childNodes while (len(children) > 0) and (children[0].tagName != 'para'): if children[0].tagName in ('section', 'ulist', 'olist', 'li'): children = children[0].childNodes
def parse_docstring(docstring, errors): return ParsedEpytextDocstring(parse(docstring, errors)) class ParsedEpytextDocstring(ParsedDocstring): SYMBOL_TO_HTML = { '<-': 'larr', '->': 'rarr', '^': 'uarr', 'v': 'darr', 'alpha': 'alpha', 'beta': 'beta', 'gamma': 'gamma', 'delta': 'delta', 'epsilon': 'epsilon', 'zeta': 'zeta', 'eta': 'eta', 'theta': 'theta', 'iota': 'iota', 'kappa': 'kappa', 'lambda': 'lambda', 'mu': 'mu', 'nu': 'nu', 'xi': 'xi', 'omicron': 'omicron', 'pi': 'pi', 'rho': 'rho', 'sigma': 'sigma', 'tau': 'tau', 'upsilon': 'upsilon', 'phi': 'phi', 'chi': 'chi', 'psi': 'psi', 'omega': 'omega', 'Alpha': 'Alpha', 'Beta': 'Beta', 'Gamma': 'Gamma', 'Delta': 'Delta', 'Epsilon': 'Epsilon', 'Zeta': 'Zeta', 'Eta': 'Eta', 'Theta': 'Theta', 'Iota': 'Iota', 'Kappa': 'Kappa', 'Lambda': 'Lambda', 'Mu': 'Mu', 'Nu': 'Nu', 'Xi': 'Xi', 'Omicron': 'Omicron', 'Pi': 'Pi', 'Rho': 'Rho', 'Sigma': 'Sigma', 'Tau': 'Tau', 'Upsilon': 'Upsilon', 'Phi': 'Phi', 'Chi': 'Chi', 'Psi': 'Psi', 'Omega': 'Omega', 'larr': 'larr', 'rarr': 'rarr', 'uarr': 'uarr', 'darr': 'darr', 'harr': 'harr', 'crarr': 'crarr', 'lArr': 'lArr', 'rArr': 'rArr', 'uArr': 'uArr', 'dArr': 'dArr', 'hArr': 'hArr', 'copy': 'copy', 'times': 'times', 'forall': 'forall', 'exist': 'exist', 'part': 'part', 'empty': 'empty', 'isin': 'isin', 'notin': 'notin', 'ni': 'ni', 'prod': 'prod', 'sum': 'sum', 'prop': 'prop', 'infin': 'infin', 'ang': 'ang', 'and': 'and', 'or': 'or', 'cap': 'cap', 'cup': 'cup', 'int': 'int', 'there4': 'there4', 'sim': 'sim', 'cong': 'cong', 'asymp': 'asymp', 'ne': 'ne', 'equiv': 'equiv', 'le': 'le', 'ge': 'ge', 'sub': 'sub', 'sup': 'sup', 'nsub': 'nsub', 'sube': 'sube', 'supe': 'supe', 'oplus': 'oplus', 'otimes': 'otimes', 'perp': 'perp', 'infinity': 'infin', 'integral': 'int', 'product': 'prod', '<=': 'le', '>=': 'ge', } SYMBOL_TO_LATEX = { '<-': r'\(\leftarrow\)', '->': r'\(\rightarrow\)', '^': r'\(\uparrow\)', 'v': r'\(\downarrow\)', 'alpha': r'\(\alpha\)', 'beta': r'\(\beta\)', 'gamma': r'\(\gamma\)', 'delta': r'\(\delta\)', 'epsilon': r'\(\epsilon\)', 'zeta': r'\(\zeta\)', 'eta': r'\(\eta\)', 'theta': r'\(\theta\)', 'iota': r'\(\iota\)', 'kappa': r'\(\kappa\)', 'lambda': r'\(\lambda\)', 'mu': r'\(\mu\)', 'nu': r'\(\nu\)', 'xi': r'\(\xi\)', 'omicron': r'\(o\)', 'pi': r'\(\pi\)', 'rho': r'\(\rho\)', 'sigma': r'\(\sigma\)', 'tau': r'\(\tau\)', 'upsilon': r'\(\upsilon\)', 'phi': r'\(\phi\)', 'chi': r'\(\chi\)', 'psi': r'\(\psi\)', 'omega': r'\(\omega\)', 'Alpha': r'\(\alpha\)', 'Beta': r'\(\beta\)', 'Gamma': r'\(\Gamma\)', 'Delta': r'\(\Delta\)', 'Epsilon': r'\(\epsilon\)', 'Zeta': r'\(\zeta\)', 'Eta': r'\(\eta\)', 'Theta': r'\(\Theta\)', 'Iota': r'\(\iota\)', 'Kappa': r'\(\kappa\)', 'Lambda': r'\(\Lambda\)', 'Mu': r'\(\mu\)', 'Nu': r'\(\nu\)', 'Xi': r'\(\Xi\)', 'Omicron': r'\(o\)', 'Pi': r'\(\Pi\)', 'ho': r'\(\rho\)', 'Sigma': r'\(\Sigma\)', 'Tau': r'\(\tau\)', 'Upsilon': r'\(\Upsilon\)', 'Phi': r'\(\Phi\)', 'Chi': r'\(\chi\)', 'Psi': r'\(\Psi\)', 'Omega': r'\(\Omega\)', 'larr': r'\(\leftarrow\)', 'rarr': r'\(\rightarrow\)', 'uarr': r'\(\uparrow\)', 'darr': r'\(\downarrow\)', 'harr': r'\(\leftrightarrow\)', 'crarr': r'\(\hookleftarrow\)', 'lArr': r'\(\Leftarrow\)', 'rArr': r'\(\Rightarrow\)', 'uArr': r'\(\Uparrow\)', 'dArr': r'\(\Downarrow\)', 'hArr': r'\(\Leftrightarrow\)', 'copy': r'{\textcopyright}', 'times': r'\(\times\)', 'forall': r'\(\forall\)', 'exist': r'\(\exists\)', 'part': r'\(\partial\)', 'empty': r'\(\emptyset\)', 'isin': r'\(\in\)', 'notin': r'\(\notin\)', 'ni': r'\(\ni\)', 'prod': r'\(\prod\)', 'sum': r'\(\sum\)', 'prop': r'\(\propto\)', 'infin': r'\(\infty\)', 'ang': r'\(\angle\)', 'and': r'\(\wedge\)', 'or': r'\(\vee\)', 'cap': r'\(\cap\)', 'cup': r'\(\cup\)', 'int': r'\(\int\)', 'there4': r'\(\therefore\)', 'sim': r'\(\sim\)', 'cong': r'\(\cong\)', 'asymp': r'\(\approx\)', 'ne': r'\(\ne\)', 'equiv': r'\(\equiv\)', 'le': r'\(\le\)', 'ge': r'\(\ge\)', 'sub': r'\(\subset\)', 'sup': r'\(\supset\)', 'nsub': r'\(\supset\)', 'sube': r'\(\subseteq\)', 'supe': r'\(\supseteq\)', 'oplus': r'\(\oplus\)', 'otimes': r'\(\otimes\)', 'perp': r'\(\perp\)', 'infinity': r'\(\infty\)', 'integral': r'\(\int\)', 'product': r'\(\prod\)', '<=': r'\(\le\)', '>=': r'\(\ge\)', } def __init__(self, dom_tree): if isinstance(dom_tree, xml.dom.minidom.Document): dom_tree = dom_tree.childNodes[0] self._tree = dom_tree self._html = self._latex = self._plaintext = None self._terms = None def to_html(self, docstring_linker, **options): if self._html is not None: return self._html if self._tree is None: return '' indent = options.get('indent', 0) self._html = self._to_html(self._tree, docstring_linker, indent) return self._html def to_latex(self, docstring_linker, **options): if self._latex is not None: return self._latex if self._tree is None: return '' indent = options.get('indent', 0) self._hyperref = options.get('hyperref', 1) self._latex = self._to_latex(self._tree, docstring_linker, indent) return self._latex def to_plaintext(self, docstring_linker, **options): if self._plaintext is not None: return self._plaintext if self._tree is None: return '' self._plaintext = to_plaintext(self._tree) return self._plaintext def _index_term_key(self, tree): str = to_plaintext(tree) str = re.sub(r'\s\s+', '-', str) return "index-"+re.sub("[^a-zA-Z0-9]", "_", str) def _to_html(self, tree, linker, indent=0, seclevel=0): if isinstance(tree, xml.dom.minidom.Text): return plaintext_to_html(tree.data) if tree.tagName == 'epytext': indent -= 2 if tree.tagName == 'section': seclevel += 1 children = [self._to_html(c, linker, indent+2, seclevel) for c in tree.childNodes] for i in range(len(children)-1): if (not isinstance(tree.childNodes[i], xml.dom.minidom.Text) and tree.childNodes[i].tagName == 'para' and (isinstance(tree.childNodes[i+1], xml.dom.minidom.Text) or tree.childNodes[i+1].tagName != 'para')): children[i] = ' '*(indent+2)+children[i][5+indent:-5]+'\n' if (tree.hasChildNodes() and not isinstance(tree.childNodes[-1], xml.dom.minidom.Text) and tree.childNodes[-1].tagName == 'para'): children[-1] = ' '*(indent+2)+children[-1][5+indent:-5]+'\n' childstr = ''.join(children) if tree.tagName == 'para': return wordwrap('<p>%s</p>' % childstr, indent) elif tree.tagName == 'code': return '<code>%s</code>' % childstr elif tree.tagName == 'uri': return '<a href="%s">%s</a>' % (children[1], children[0]) elif tree.tagName == 'link': return linker.translate_identifier_xref(children[1], children[0]) elif tree.tagName == 'italic': return '<i>%s</i>' % childstr elif tree.tagName == 'math': return '<i class="math">%s</i>' % childstr elif tree.tagName == 'indexed': term = tree.cloneNode(1) term.tagName = 'epytext' return linker.translate_indexterm(ParsedEpytextDocstring(term)) elif tree.tagName == 'bold': return '<b>%s</b>' % childstr elif tree.tagName == 'ulist': return '%s<ul>\n%s%s</ul>\n' % (indent*' ', childstr, indent*' ') elif tree.tagName == 'olist': startAttr = tree.getAttributeNode('start') if startAttr: start = ' start="%s"' % startAttr.value else: start = '' return ('%s<ol%s>\n%s%s</ol>\n' % (indent*' ', start, childstr, indent*' ')) elif tree.tagName == 'li': return indent*' '+'<li>\n%s%s</li>\n' % (childstr, indent*' ') elif tree.tagName == 'heading': return ('%s<h%s class="heading">%s</h%s>\n' % ((indent-2)*' ', seclevel, childstr, seclevel)) elif tree.tagName == 'literalblock': return '<pre class="literalblock">\n%s\n</pre>\n' % childstr elif tree.tagName == 'doctestblock': dtb = colorize_doctestblock(childstr.strip()) return '<pre class="doctestblock">\n%s</pre>\n' % dtb elif tree.tagName == 'fieldlist': raise AssertionError("There should not be any field lists left") elif tree.tagName in ('epytext', 'section', 'tag', 'arg', 'name', 'target', 'html'): return childstr elif tree.tagName == 'symbol': symbol = tree.childNodes[0].data if self.SYMBOL_TO_HTML.has_key(symbol): return '&%s;' % self.SYMBOL_TO_HTML[symbol] else: return '[??]'
def parse_type_of(obj): """ Return a DOM document matching the epytext DTD, containing a description of C{obj}'s type. The description consists of a sinlge paragraph. If C{obj} is an instance, then its type description is a link to its class. Otherwise, its type description is the name of its type. @param obj: The object whose type should be returned as DOM document. @type obj: any @return: A DOM document containing a description of C{obj}'s type. @rtype: L{xml.dom.minidom.Document} """ doc = Document() epytext = doc.createElement('epytext') para = doc.createElement('para') doc.appendChild(epytext) epytext.appendChild(para) if type(obj) is types.InstanceType: link = doc.createElement('link') name = doc.createElement('name') target = doc.createElement('target') para.appendChild(link) link.appendChild(name) link.appendChild(target) name.appendChild(doc.createTextNode(str(obj.__class__.__name__))) target.appendChild(doc.createTextNode(str(obj.__class__))) else: code = doc.createElement('code') para.appendChild(code) code.appendChild(doc.createTextNode(type(obj).__name__)) return doc
36ace726c8fc4e9c1a450d16c75087d594ead7cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36ace726c8fc4e9c1a450d16c75087d594ead7cf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 723, 67, 792, 12, 2603, 4672, 3536, 2000, 279, 4703, 1668, 3607, 326, 425, 2074, 955, 10696, 40, 16, 4191, 279, 2477, 434, 385, 95, 2603, 1713, 87, 618, 18, 225, 1021, 2477, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 723, 67, 792, 12, 2603, 4672, 3536, 2000, 279, 4703, 1668, 3607, 326, 425, 2074, 955, 10696, 40, 16, 4191, 279, 2477, 434, 385, 95, 2603, 1713, 87, 618, 18, 225, 1021, 2477, ...
def options_slot(act): if act == actionIndirectRender: page = 'indirect rendering' elif act == actionLooseBinding: page = 'loose binding' if int(get_setting('compiz options', page)): set_setting('compiz options', page, 0) print '* disabling', page+'...' else: set_setting('compiz options', page, 1) print '* enabling', page+'...'
def ir_slot(on): set_setting('compiz options', 'indirect rendering', on) print '* indirect rendering is now %s' % bool(on) if active_wm == compiz: start_compiz() def lb_slot(on): set_setting('compiz options', 'loose binding', on) print '* loose binding is now %s' % bool(on)
def options_slot(act): if act == actionIndirectRender: page = 'indirect rendering' elif act == actionLooseBinding: page = 'loose binding' if int(get_setting('compiz options', page)): set_setting('compiz options', page, 0) print '* disabling', page+'...' else: set_setting('compiz options', page, 1) print '* enabling', page+'...' if active_wm == compiz: start_compiz()
ab81baed0421f5904d68ea4e5a79652b14c09cb7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/909/ab81baed0421f5904d68ea4e5a79652b14c09cb7/interface_qt3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9482, 67, 14194, 12, 265, 4672, 444, 67, 8920, 2668, 2919, 452, 702, 2187, 296, 728, 867, 9782, 2187, 603, 13, 1172, 14609, 16807, 9782, 353, 2037, 738, 87, 11, 738, 1426, 12, 265, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9482, 67, 14194, 12, 265, 4672, 444, 67, 8920, 2668, 2919, 452, 702, 2187, 296, 728, 867, 9782, 2187, 603, 13, 1172, 14609, 16807, 9782, 353, 2037, 738, 87, 11, 738, 1426, 12, 265, 13,...
print 'source', `base_tcl`
def readprofile(self, baseName, className): """Internal function. It reads BASENAME.tcl and CLASSNAME.tcl into the Tcl Interpreter and calls execfile on BASENAME.py and CLASSNAME.py if such a file exists in the home directory.""" import os if os.environ.has_key('HOME'): home = os.environ['HOME'] else: home = os.curdir class_tcl = os.path.join(home, '.%s.tcl' % className) class_py = os.path.join(home, '.%s.py' % className) base_tcl = os.path.join(home, '.%s.tcl' % baseName) base_py = os.path.join(home, '.%s.py' % baseName) dir = {'self': self} exec 'from Tkinter import *' in dir if os.path.isfile(class_tcl): print 'source', `class_tcl` self.tk.call('source', class_tcl) if os.path.isfile(class_py): print 'execfile', `class_py` execfile(class_py, dir) if os.path.isfile(base_tcl): print 'source', `base_tcl` self.tk.call('source', base_tcl) if os.path.isfile(base_py): print 'execfile', `base_py` execfile(base_py, dir)
eb178ac6ff096c80cfe754ab2535ae8ece847702 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/eb178ac6ff096c80cfe754ab2535ae8ece847702/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 5040, 12, 2890, 16, 16162, 16, 2658, 4672, 3536, 3061, 445, 18, 2597, 6838, 10250, 1985, 18, 88, 830, 471, 7383, 1985, 18, 88, 830, 1368, 326, 399, 830, 5294, 11599, 471, 4097, 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, 855, 5040, 12, 2890, 16, 16162, 16, 2658, 4672, 3536, 3061, 445, 18, 2597, 6838, 10250, 1985, 18, 88, 830, 471, 7383, 1985, 18, 88, 830, 1368, 326, 399, 830, 5294, 11599, 471, 4097, 11...
self.up = False
self._ports.clear()
def destroy(self): for p in self._ports: try: self.disconnect(p) except: pass self.up = False netns.iproute.del_bridge(self.index)
93f5a3982c4cfa485304ebf89dd516c99c45d0eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8495/93f5a3982c4cfa485304ebf89dd516c99c45d0eb/interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5546, 12, 2890, 4672, 364, 293, 316, 365, 6315, 4363, 30, 775, 30, 365, 18, 20177, 12, 84, 13, 1335, 30, 1342, 365, 6315, 4363, 18, 8507, 1435, 2901, 2387, 18, 625, 5547, 18, 3771, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5546, 12, 2890, 4672, 364, 293, 316, 365, 6315, 4363, 30, 775, 30, 365, 18, 20177, 12, 84, 13, 1335, 30, 1342, 365, 6315, 4363, 18, 8507, 1435, 2901, 2387, 18, 625, 5547, 18, 3771, 6...
"""Create a BackRef object with explicit arguments, which are the same arguments one can send to ``relation()``.
"""Create a BackRef object with explicit arguments, which are the same arguments one can send to ``relation()``.
def backref(name, **kwargs): """Create a BackRef object with explicit arguments, which are the same arguments one can send to ``relation()``. Used with the `backref` keyword argument to ``relation()`` in place of a string argument. """ return BackRef(name, **kwargs)
8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1074/8b169bdc1a9ad510d1fa7ac55cf02c0a00396ed8/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1473, 1734, 12, 529, 16, 2826, 4333, 4672, 3536, 1684, 279, 4297, 1957, 733, 598, 5515, 1775, 16, 1492, 854, 326, 1967, 1775, 1245, 848, 1366, 358, 12176, 5488, 20338, 8338, 225, 10286, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1473, 1734, 12, 529, 16, 2826, 4333, 4672, 3536, 1684, 279, 4297, 1957, 733, 598, 5515, 1775, 16, 1492, 854, 326, 1967, 1775, 1245, 848, 1366, 358, 12176, 5488, 20338, 8338, 225, 10286, ...
self.ghostify('a52dec', 'sink')
self.ghostify('capsselect', 'sink')
def __init__(self, options, name='audiodec'):
d2598b546f2c0d5f1eaec2d23ebf5139a53f127b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/d2598b546f2c0d5f1eaec2d23ebf5139a53f127b/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 2218, 24901, 77, 390, 71, 11, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 2218, 24901, 77, 390, 71, 11, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if chunks[i+1] == " " and pat.search(chunks[i]):
if chunks[i+1] == " " and patsearch(chunks[i]):
def _fix_sentence_endings(self, chunks): """_fix_sentence_endings(chunks : [string])
c0bb2c3802a88a3a2e0af47419905089af2b5f0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/c0bb2c3802a88a3a2e0af47419905089af2b5f0a/textwrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 67, 19335, 67, 409, 899, 12, 2890, 16, 6055, 4672, 3536, 67, 904, 67, 19335, 67, 409, 899, 12, 14691, 294, 306, 1080, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 67, 19335, 67, 409, 899, 12, 2890, 16, 6055, 4672, 3536, 67, 904, 67, 19335, 67, 409, 899, 12, 14691, 294, 306, 1080, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
def tidyprefix(dest, prefix, suffixes):
def tidyprefix(dest, kind, prefix):
def tidyprefix(dest, prefix, suffixes): '''choose prefix to use for names in archive. make sure prefix is safe for consumers.''' if prefix: prefix = util.normpath(prefix) else: if not isinstance(dest, str): raise ValueError('dest must be string if no prefix') prefix = os.path.basename(dest) lower = prefix.lower() for sfx in suffixes: if lower.endswith(sfx): prefix = prefix[:-len(sfx)] break lpfx = os.path.normpath(util.localpath(prefix)) prefix = util.pconvert(lpfx) if not prefix.endswith('/'): prefix += '/' if prefix.startswith('../') or os.path.isabs(lpfx) or '/../' in prefix: raise util.Abort(_('archive prefix contains illegal components')) return prefix
b710c0556b7ba8ac35408da307ceb6cc1b2a8e2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/b710c0556b7ba8ac35408da307ceb6cc1b2a8e2c/archival.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11594, 879, 266, 904, 12, 10488, 16, 3846, 16, 1633, 4672, 9163, 25777, 1633, 358, 999, 364, 1257, 316, 5052, 18, 225, 1221, 3071, 1633, 353, 4183, 364, 18350, 1093, 6309, 225, 309, 1633...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11594, 879, 266, 904, 12, 10488, 16, 3846, 16, 1633, 4672, 9163, 25777, 1633, 358, 999, 364, 1257, 316, 5052, 18, 225, 1221, 3071, 1633, 353, 4183, 364, 18350, 1093, 6309, 225, 309, 1633...
controllerFactory = getattr(dominput, controllerName, None)
controllerFactory = getattr(input, controllerName, None)
def getNodeController(self, request, node): controllerName = node.getAttribute('controller') # Look up an InputHandler controllerFactory = DefaultHandler if controllerName: namespaces = [self.controller] for namespace in namespaces: controllerFactory = getattr(self.controller, 'factory_' + controllerName, None) if controllerFactory is not None: break if controllerFactory is None: controllerFactory = getattr(dominput, controllerName, None) if controllerFactory is None: nodeText = node.toxml() raise NotImplementedError, "You specified controller name %s on a node, but no factory_%s method was found." % (controllerName, controllerName) return controllerFactory(self.model)
e7cb23c3b876eeb75898a8fcbe360610d209f2d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e7cb23c3b876eeb75898a8fcbe360610d209f2d1/view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5973, 2933, 12, 2890, 16, 590, 16, 756, 4672, 17193, 273, 756, 18, 588, 1499, 2668, 5723, 6134, 225, 468, 10176, 731, 392, 2741, 1503, 2596, 1733, 273, 2989, 1503, 309, 17193, 30, 7728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5973, 2933, 12, 2890, 16, 590, 16, 756, 4672, 17193, 273, 756, 18, 588, 1499, 2668, 5723, 6134, 225, 468, 10176, 731, 392, 2741, 1503, 2596, 1733, 273, 2989, 1503, 309, 17193, 30, 7728, ...
metric_test = N.dtype([('cost', 'f'),
metric_test = NP.dtype([('cost', 'f'),
def demo_MRI_coregistration(optimizer_method='powell', histo_method=1, smooth_histo=0, smooth_image=0, ftype=1): """ demo with (must have file ANAT1_V0001.img and fMRI directory fMRIData) measures, imageF_anat, fmri_series = reg.demo_MRI_coregistration() show results with In [59]: measures[25]['cost'] Out[59]: -0.48607185 In [60]: measures[25]['align_cost'] Out[60]: -0.99514639 In [61]: measures[25]['align_rotate'] Out[61]: array([ 1.94480181, 5.64703989, 5.35002136, -5.00544405, -2.2712214, -1.42249691], dtype=float32) In [62]: measures[25]['rotate'] Out[62]: array([ 1.36566341, 4.70644331, 4.68198586, -4.32256889, -2.47607017, -2.39173937], dtype=float32) """ # demo of alignment of fMRI series with anatomical MRI # in this demo, each fMRI volume is first perturbed (rotated, translated) # by a random value. The initial registration is measured, then the optimal # alignment is computed and the registration measure made following the volume remap. # The fMRI registration is done with the first fMRI volume using normalized cross-correlation. # Each fMRI volume is rotated to the fMRI-0 volume and the series is ensemble averaged. # The ensemble averaged is then registered with the anatomical MRI volume using normalized mutual information. # The fMRI series is then rotated with this parameter. The alignments are done with 3D cubic splines. # read the anatomical MRI volume anat_desc = load_anatMRI_desc() imageF_anat = load_volume(anat_desc, imagename='ANAT1_V0001.img') # the sampling structure imdata = build_structs() # the volume filter imageF_anat['fwhm'] = build_fwhm(imageF_anat['mat'], imdata['step']) # read in the file list of the fMRI data metric_test = N.dtype([('cost', 'f'), ('align_cost', 'f'), ('rotate', 'f', 6), ('align_rotate', 'f', 6)]) fMRIdata = read_fMRI_directory('fMRIData\*.img') fmri_desc = load_fMRI_desc() fmri_series = {} ave_fMRI_volume = N.zeros(fmri_desc['layers']*fmri_desc['rows']*fmri_desc['cols'], dtype=N.float64).reshape(fmri_desc['layers'], fmri_desc['rows'], fmri_desc['cols']) count = 0 number_volumes = len(fMRIdata) measures = N.zeros(number_volumes, dtype=metric_test) # load and perturb (rotation, translation) the fMRI volumes for i in fMRIdata: image = load_volume(fmri_desc, i) # random perturbation of angle, translation for each volume beyond the first if count == 0: image['fwhm'] = build_fwhm(image['mat'], imdata['step']) fmri_series[count] = image count = count + 1 else: x = N.random.random(6) - 0.5 x = 10.0 * x fmri_series[count] = demo_rotate_fMRI_volume(image, x) measures[count]['rotate'][0:6] = x[0:6] count = count + 1 # load and register the fMRI volumes with volume_0 using normalized cross correlation metric imageF = fmri_series[0] if smooth_image: image_F_xyz = filter_image_3D(imageF['data'], imageF['fwhm'], ftype) imageF['data'] = image_F_xyz for i in range(1, number_volumes): imageG = fmri_series[i] # the measure prior to alignment measures[i]['cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo) x = python_coreg(imageF, imageG, imdata, lite=histo_method, method='ncc', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) measures[i]['align_rotate'][0:6] = x[0:6] measures[i]['align_cost'] = check_alignment(imageF, imageG, imdata, method='ncc', lite=histo_method, smhist=smooth_histo, alpha=x[0], beta=x[1], gamma=x[2], Tx=x[3], Ty=x[4], Tz=x[5]) # align the volumes and average them for co-registration with the anatomical MRI ave_fMRI_volume = fmri_series[0]['data'].astype(N.float64) for i in range(1, number_volumes): image = fmri_series[i] x[0:6] = measures[i]['align_rotate'][0:6] # overwrite the fMRI volume with the aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') ave_fMRI_volume = ave_fMRI_volume + fmri_series[i]['data'].astype(N.float64) ave_fMRI_volume = (ave_fMRI_volume / float(number_volumes)).astype(N.uint8) ave_fMRI_volume = {'data' : ave_fMRI_volume, 'mat' : imageF['mat'], 'dim' : imageF['dim'], 'fwhm' : imageF['fwhm']} # register (using normalized mutual information) with the anatomical MRI if smooth_image: image_F_anat_xyz = filter_image_3D(imageF_anat['data'], imageF_anat['fwhm'], ftype) imageF_anat['data'] = image_F_anat_xyz x = python_coreg(imageF_anat, ave_fMRI_volume, imdata, lite=histo_method, method='nmi', opt_method=optimizer_method, smhist=smooth_histo, smimage=smooth_image) print 'functional-anatomical align parameters ' print x for i in range(number_volumes): image = fmri_series[i] # overwrite the fMRI volume with the anatomical-aligned volume fmri_series[i] = remap_image(image, x, resample='cubic') return measures, imageF_anat, fmri_series
de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 67, 49, 2259, 67, 3644, 75, 4218, 12, 29594, 67, 2039, 2218, 23509, 1165, 2187, 5356, 83, 67, 2039, 33, 21, 16, 11957, 67, 11488, 83, 33, 20, 16, 11957, 67, 2730, 33, 20, 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, 21477, 67, 49, 2259, 67, 3644, 75, 4218, 12, 29594, 67, 2039, 2218, 23509, 1165, 2187, 5356, 83, 67, 2039, 33, 21, 16, 11957, 67, 11488, 83, 33, 20, 16, 11957, 67, 2730, 33, 20, 16, ...
'--enable-osx',
def __init__ (self): Package.__init__ (self, 'banshee-1', '1.5.4')
eeea6203b95414d59136d9646266024aceaf9291 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10924/eeea6203b95414d59136d9646266024aceaf9291/banshee.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 7508, 16186, 2738, 972, 261, 2890, 16, 296, 70, 634, 580, 73, 17, 21, 2187, 296, 21, 18, 25, 18, 24, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 972, 261, 2890, 4672, 7508, 16186, 2738, 972, 261, 2890, 16, 296, 70, 634, 580, 73, 17, 21, 2187, 296, 21, 18, 25, 18, 24, 6134, 2, -100, -100, -100, -100, -100, -100, -1...
if not options.offline and not options.noUpload: base.uploadFile( projectConfigFilename, config.get(base.BUILD_SECTION, 'buildout-server')+'/'+projectName, config.get(base.BUILD_SECTION, 'buildout-server-username'), config.get(base.BUILD_SECTION, 'buildout-server-password'), options.offline) filesToUpload = []
filesToUpload = [projectConfigFilename]
def build(configFile, options): # Read the configuration file. logger.info('Loading configuration file: ' + configFile) config = ConfigParser.RawConfigParser() config.read(configFile) # Create the project config parser logger.info('Creating Project Configuration') projectParser = ConfigParser.RawConfigParser() if config.has_option(base.BUILD_SECTION, 'template'): template = config.get(base.BUILD_SECTION, 'template') logger.info('Loading Project Configuration Template: ' + template) projectParser.read([template]) if not projectParser.has_section('versions'): projectParser.add_section('versions') # Determine all versions of the important packages pkgversions = {} for pkg in config.get(base.BUILD_SECTION, 'packages').split(): customPath = None if ':' in pkg: pkg, customPath = pkg.split(':') builder = package.PackageBuilder(pkg, options) version = builder.runCLI(configFile, True) pkgversions[pkg] = version projectParser.set('versions', pkg, version) # Stop if no buildout-server given try: config.get(base.BUILD_SECTION, 'buildout-server') except ConfigParser.NoOptionError: logger.info('No buildout-server specified in the cfg, STOPPING') logger.info('Selected package versions:\n%s' % ( '\n'.join('%s = %s' % (pkg, version) for pkg, version in pkgversions.items())) ) return # Write the new configuration file to disk projectName = config.get(base.BUILD_SECTION, 'name') defaultVersion = configVersion = config.get(base.BUILD_SECTION, 'version') projectVersions = findProjectVersions(projectName, config, options) if projectVersions: defaultVersion = projectVersions[-1] if options.nextVersion or configVersion == '+': defaultVersion = base.guessNextVersion(defaultVersion) projectVersion = base.getInput( 'Project Version', defaultVersion, options.useDefaults) projectConfigFilename = '%s-%s.cfg' %(projectName, projectVersion) logger.info('Writing project configuration file: ' + projectConfigFilename) projectParser.write(open(projectConfigFilename, 'w')) # Upload the release file if not options.offline and not options.noUpload: base.uploadFile( projectConfigFilename, config.get(base.BUILD_SECTION, 'buildout-server')+'/'+projectName, config.get(base.BUILD_SECTION, 'buildout-server-username'), config.get(base.BUILD_SECTION, 'buildout-server-password'), options.offline) filesToUpload = [] # Create deployment configurations for section in config.sections(): if section == base.BUILD_SECTION: continue logger.info('Building deployment configuration: %s', section) template_path = config.get(section, 'template') logger.info('Loading deploy template file: %s', template_path) template = file(template_path, 'r').read() vars = dict([(name, value) for name, value in config.items(section) if name != 'template']) vars['project-name'] = projectName vars['project-version'] = projectVersion vars['instance-name'] = section try: deployConfigText = template % vars except KeyError, e: logger.error("The %s deployment configuration is missing the %r setting required by %s", section, e.message, template_path) sys.exit(0) deployConfigFilename = '%s-%s-%s.cfg' %( config.get(base.BUILD_SECTION, 'name'), section, projectVersion) deployConfig = ConfigParser.RawConfigParser() deployConfig.readfp(StringIO.StringIO(deployConfigText)) deployConfig.set('buildout', 'extends', projectConfigFilename) logger.info('Writing deployment file: ' + deployConfigFilename) deployConfig.write(open(deployConfigFilename, 'w')) filesToUpload.append(deployConfigFilename) # Upload the deployment files if not options.offline and not options.noUpload: for filename in filesToUpload: base.uploadFile( filename, config.get( base.BUILD_SECTION, 'buildout-server')+'/'+projectName, config.get(base.BUILD_SECTION, 'buildout-server-username'), config.get(base.BUILD_SECTION, 'buildout-server-password'), options.offline)
4e762f65af614a3233a3931a6804a0f180f71a68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9561/4e762f65af614a3233a3931a6804a0f180f71a68/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 1425, 812, 16, 702, 4672, 468, 2720, 326, 1664, 585, 18, 1194, 18, 1376, 2668, 10515, 1664, 585, 30, 296, 397, 12247, 13, 642, 273, 25076, 18, 4809, 809, 2678, 1435, 642, 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, 1361, 12, 1425, 812, 16, 702, 4672, 468, 2720, 326, 1664, 585, 18, 1194, 18, 1376, 2668, 10515, 1664, 585, 30, 296, 397, 12247, 13, 642, 273, 25076, 18, 4809, 809, 2678, 1435, 642, 18,...
'bbf60c542dec949f3968b59522ec0d7b')
'1486c19f1fcb626f893c243e3ce38c8d')
def testSettingExistingIp(self): tmpname = self.writeTestFile() try: SetEtcHostsEntry(tmpname, '192.168.1.1', 'myhost.domain.tld', ['myhost'])
9cd372adb3208ec16506c4948703113781c6c827 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/9cd372adb3208ec16506c4948703113781c6c827/ganeti.utils_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5568, 9895, 5273, 12, 2890, 4672, 1853, 529, 273, 365, 18, 2626, 4709, 812, 1435, 775, 30, 1000, 41, 5111, 12172, 1622, 12, 5645, 529, 16, 296, 15561, 18, 23329, 18, 21, 18, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 5568, 9895, 5273, 12, 2890, 4672, 1853, 529, 273, 365, 18, 2626, 4709, 812, 1435, 775, 30, 1000, 41, 5111, 12172, 1622, 12, 5645, 529, 16, 296, 15561, 18, 23329, 18, 21, 18, 21, ...
id.append('copy_1')
id.append('copy_1')
def paste(self): context = get_context()
c4cb35413d594f1000c06b08d26a8a9933774a43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/c4cb35413d594f1000c06b08d26a8a9933774a43/Folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19401, 12, 2890, 4672, 819, 273, 336, 67, 2472, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19401, 12, 2890, 4672, 819, 273, 336, 67, 2472, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print attr
def DllRegisterServer(): import _winreg key = _winreg.CreateKey(_winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\" \ "Explorer\\Desktop\\Namespace\\" + \ ShellFolder._reg_clsid_) _winreg.SetValueEx(key, None, 0, _winreg.REG_SZ, ShellFolder._reg_desc_) # And special shell keys under our CLSID key = _winreg.CreateKey(_winreg.HKEY_CLASSES_ROOT, "CLSID\\" + ShellFolder._reg_clsid_ + "\\ShellFolder") # 'Attributes' is an int stored as a binary! use struct attr = shellcon.SFGAO_FOLDER | shellcon.SFGAO_HASSUBFOLDER | \ shellcon.SFGAO_BROWSABLE print attr import struct s = struct.pack("I", attr) _winreg.SetValueEx(key, "Attributes", 0, _winreg.REG_BINARY, s) print ShellFolder._reg_desc_, "registration complete."
b7ff768f5531bb10222df7d81059c1f74e9b46bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/b7ff768f5531bb10222df7d81059c1f74e9b46bb/shell_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 2906, 3996, 2081, 13332, 1930, 389, 8082, 1574, 498, 273, 389, 8082, 1574, 18, 1684, 653, 24899, 8082, 1574, 18, 44, 3297, 67, 14922, 67, 5535, 1792, 3740, 16, 315, 3584, 4464, 2849...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 463, 2906, 3996, 2081, 13332, 1930, 389, 8082, 1574, 498, 273, 389, 8082, 1574, 18, 1684, 653, 24899, 8082, 1574, 18, 44, 3297, 67, 14922, 67, 5535, 1792, 3740, 16, 315, 3584, 4464, 2849...
event = Event(u'fakesource', event_type) event.message = u'bot: foo'
event = self.create_event(u'bot: foo', event_type)
def test_non_messages(self): for event_type in [u'timer', u'rpc']: event = Event(u'fakesource', event_type) event.message = u'bot: foo' self.processor.process(event) self.assertFalse(hasattr(event, u'addressed')) self.assertEqual(event.message, u'bot: foo')
57bdc8f4c914d9e4e6ca6457bb5e08c462e27a3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/57bdc8f4c914d9e4e6ca6457bb5e08c462e27a3d/test_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5836, 67, 6833, 12, 2890, 4672, 364, 871, 67, 723, 316, 306, 89, 1404, 4417, 2187, 582, 11, 7452, 3546, 30, 871, 273, 365, 18, 2640, 67, 2575, 12, 89, 11, 4819, 30, 8431, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5836, 67, 6833, 12, 2890, 4672, 364, 871, 67, 723, 316, 306, 89, 1404, 4417, 2187, 582, 11, 7452, 3546, 30, 871, 273, 365, 18, 2640, 67, 2575, 12, 89, 11, 4819, 30, 8431, ...
cookieglob = os.path.expanduser('~/.mozilla/firefox/default.*/cookies.txt')
cookieglob = os.path.expanduser('~/.mozilla/firefox/*default*/cookies.txt')
def find_firefox_cookiefile(): cookieglob = os.path.expanduser('~/.mozilla/firefox/default.*/cookies.txt') cookiefiles = glob.glob(cookieglob) if cookiefiles: # TODO return whichever is newest return cookiefiles[0]
a9031640bb23d32c0eeeada94aa4945def6bed90 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5050/a9031640bb23d32c0eeeada94aa4945def6bed90/selftest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12179, 13873, 67, 8417, 768, 13332, 15860, 77, 1332, 1295, 273, 1140, 18, 803, 18, 12320, 1355, 2668, 98, 15865, 8683, 15990, 19, 12179, 13873, 20308, 1886, 5549, 16240, 18, 5830...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 12179, 13873, 67, 8417, 768, 13332, 15860, 77, 1332, 1295, 273, 1140, 18, 803, 18, 12320, 1355, 2668, 98, 15865, 8683, 15990, 19, 12179, 13873, 20308, 1886, 5549, 16240, 18, 5830...
is_idle = bool(rd)
is_idle = not bool(rd)
def work(self, stop_if=None, hooks=None): self.working = True stop_if = stop_if or (lambda *a,**kw:False) last_job_time = time() while self.working: need_sleep = True
a59cfd0034512a3e3fc9395588eb2492e49b1f4d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14772/a59cfd0034512a3e3fc9395588eb2492e49b1f4d/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 12, 2890, 16, 2132, 67, 430, 33, 7036, 16, 9153, 33, 7036, 4672, 365, 18, 20478, 273, 1053, 2132, 67, 430, 273, 2132, 67, 430, 578, 261, 14661, 380, 69, 16, 636, 9987, 30, 8381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 12, 2890, 16, 2132, 67, 430, 33, 7036, 16, 9153, 33, 7036, 4672, 365, 18, 20478, 273, 1053, 2132, 67, 430, 273, 2132, 67, 430, 578, 261, 14661, 380, 69, 16, 636, 9987, 30, 8381...
if entry is not None:
if entry is not None and entry >= 0:
def setEndtime(self, entry): if entry is not None: self.selectedEntry = entry self.endtime=ConfigClock(default = self.recording[self.selectedEntry].end) dlg = self.session.openWithCallback(self.TimeDateInputClosed, TimeDateInput, self.endtime) dlg.setTitle(_("Please change recording endtime"))
6912901710bd794bf67d1b9ffab9b3a90e4bf1dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/6912901710bd794bf67d1b9ffab9b3a90e4bf1dc/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19743, 957, 12, 2890, 16, 1241, 4672, 309, 1241, 353, 486, 599, 471, 1241, 1545, 374, 30, 365, 18, 8109, 1622, 273, 1241, 365, 18, 409, 957, 33, 809, 14027, 12, 1886, 273, 365, 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, 19743, 957, 12, 2890, 16, 1241, 4672, 309, 1241, 353, 486, 599, 471, 1241, 1545, 374, 30, 365, 18, 8109, 1622, 273, 1241, 365, 18, 409, 957, 33, 809, 14027, 12, 1886, 273, 365, 18, 3...
senderr[each]=(code,resp)
senderrs[each]=(code,resp)
def sendmail(self,from_addr,to_addrs,msg): """ This command performs an entire mail transaction. The arguments are: - from_addr : The address sending this mail. - to_addrs : a list of addresses to send this mail to - msg : the message to send.
e73ba6c2cf417ec058a05564b3e178c42b6b9b58 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/e73ba6c2cf417ec058a05564b3e178c42b6b9b58/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 2080, 67, 4793, 16, 869, 67, 23305, 16, 3576, 4672, 3536, 1220, 1296, 11199, 392, 7278, 4791, 2492, 18, 1021, 1775, 854, 30, 300, 628, 67, 4793, 294, 1021, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 2080, 67, 4793, 16, 869, 67, 23305, 16, 3576, 4672, 3536, 1220, 1296, 11199, 392, 7278, 4791, 2492, 18, 1021, 1775, 854, 30, 300, 628, 67, 4793, 294, 1021, 17...
@param cif: CIF dictionnary @return: True if the key exists in the CIF dictionnary and is non empty
@param cif: CIF dictionary @return: True if the key exists in the CIF dictionary and is non empty
def exists(self, sKey): """ Check if the key exists in the CIF and is non empty. @param sKey: CIF key @type sKey: string @param cif: CIF dictionnary @return: True if the key exists in the CIF dictionnary and is non empty @rtype: boolean """ bExists = False if self.has_key(sKey): if len(self[sKey]) >= 1: if self[sKey][0] not in ["?", "."]: bExists = True return bExists
37c05e485b237aaf2d18ea06e1e0416c81459c5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9619/37c05e485b237aaf2d18ea06e1e0416c81459c5a/cbfimage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1704, 12, 2890, 16, 15447, 4672, 3536, 2073, 309, 326, 498, 1704, 316, 326, 385, 5501, 471, 353, 1661, 1008, 18, 632, 891, 15447, 30, 385, 5501, 498, 632, 723, 15447, 30, 533, 632, 891...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1704, 12, 2890, 16, 15447, 4672, 3536, 2073, 309, 326, 498, 1704, 316, 326, 385, 5501, 471, 353, 1661, 1008, 18, 632, 891, 15447, 30, 385, 5501, 498, 632, 723, 15447, 30, 533, 632, 891...
"""List of item IDs to display in the navigation bar `mainnav`.""")
"""Order of the items to display in the `mainnav` navigation bar, listed by IDs. See also TracNavigation.""")
def get_templates_dirs(): """Return a list of directories containing the provided template files. """
45026c53f3e8818c6b27babad57a6987e0286b95 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2831/45026c53f3e8818c6b27babad57a6987e0286b95/chrome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8502, 67, 8291, 13332, 3536, 990, 279, 666, 434, 6402, 4191, 326, 2112, 1542, 1390, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 8502, 67, 8291, 13332, 3536, 990, 279, 666, 434, 6402, 4191, 326, 2112, 1542, 1390, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if buff is None: buff=self.find_or_make(recipient,thread)
if conv is None: conv=self.find_or_make(recipient,thread) conv.add_sent(recipient,subject,body,thread)
def send_message(self,recipient,subject,body,thread=0,buff=None): if thread==0: self.last_thread+=1 thread="message-thread-%i" % (self.last_thread,) m=pyxmpp.Message(to_jid=recipient,stanza_type="normal",subject=subject,body=body,thread=thread) self.cjc.stream.send(m) if buff is None: buff=self.find_or_make(recipient,thread)
2ed38e70a33bd2df44c8386053a4e6083705130d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12768/2ed38e70a33bd2df44c8386053a4e6083705130d/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 20367, 16, 7857, 16, 3432, 16, 5930, 33, 20, 16, 20664, 33, 7036, 4672, 309, 2650, 631, 20, 30, 365, 18, 2722, 67, 5930, 15, 33, 21, 2650, 1546, 2150, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2150, 12, 2890, 16, 20367, 16, 7857, 16, 3432, 16, 5930, 33, 20, 16, 20664, 33, 7036, 4672, 309, 2650, 631, 20, 30, 365, 18, 2722, 67, 5930, 15, 33, 21, 2650, 1546, 2150, ...
standardMsg = '\n' + ''.join(difflib.ndiff(first.splitlines(True), second.splitlines(True)))
standardMsg = '\n' + ''.join(difflib.ndiff(first.splitlines(True), second.splitlines(True)))
def assertMultiLineEqual(self, first, second, msg=None): """Assert that two multi-line strings are equal.""" self.assert_(isinstance(first, basestring), ( 'First argument is not a string')) self.assert_(isinstance(second, basestring), ( 'Second argument is not a string'))
60c19399c1aa047e5f8d8048b445290bca0a69fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/60c19399c1aa047e5f8d8048b445290bca0a69fe/case.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 5002, 1670, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 8213, 716, 2795, 3309, 17, 1369, 2064, 854, 3959, 12123, 365, 18, 11231, 67, 12, 291, 1336, 12, 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, 1815, 5002, 1670, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 8213, 716, 2795, 3309, 17, 1369, 2064, 854, 3959, 12123, 365, 18, 11231, 67, 12, 291, 1336, 12, 36...
class arch_armv7al(generic_arm): "Builder class for armv7al target"
class arch_armv7m(generic_arm): "Builder class for armv7m target"
def __init__(self,myspec): generic_arm.__init__(self,myspec) self.settings["CHOST"]="armv7l-softfloat-linux-gnueabi" self.settings["CFLAGS"]="-Os -march=armv7 -pipe"
53fab4b752e759327ccdfc975b482828b7745033 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7327/53fab4b752e759327ccdfc975b482828b7745033/arm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 81, 1900, 705, 4672, 5210, 67, 4610, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 1792, 4005, 11929, 1546, 4610, 90, 27, 80, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 81, 1900, 705, 4672, 5210, 67, 4610, 16186, 2738, 972, 12, 2890, 16, 81, 1900, 705, 13, 365, 18, 4272, 9614, 1792, 4005, 11929, 1546, 4610, 90, 27, 80, ...
failures = self._find_failures(builder, revision)
(build, failures) = self._find_failures(builder, revision)
def _walk_backwards_from(self, builder, start_revision, limit): flaky_test_statistics = {} all_previous_failures = set([]) one_time_previous_failures = set([]) for i in range(limit): revision = start_revision - i print "Analyzing %s ... " % revision, failures = self._find_failures(builder, revision) if failures == None: # Notice that we don't loop on the empty set! continue print "has %s failures" % len(failures) flaky_tests = one_time_previous_failures - failures if flaky_tests: print "Flaky tests: %s" % sorted(flaky_tests) self._increment_statistics(flaky_tests, flaky_test_statistics) one_time_previous_failures = failures - all_previous_failures all_previous_failures = failures self._print_statistics(flaky_test_statistics)
5924ac877718dcde46a55709d3e0ac6133249b60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/5924ac877718dcde46a55709d3e0ac6133249b60/queries.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11348, 67, 823, 6397, 67, 2080, 12, 2890, 16, 2089, 16, 787, 67, 13057, 16, 1800, 4672, 1183, 29643, 67, 3813, 67, 14438, 273, 2618, 777, 67, 11515, 67, 26268, 273, 444, 3816, 571...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11348, 67, 823, 6397, 67, 2080, 12, 2890, 16, 2089, 16, 787, 67, 13057, 16, 1800, 4672, 1183, 29643, 67, 3813, 67, 14438, 273, 2618, 777, 67, 11515, 67, 26268, 273, 444, 3816, 571...
elif user.posts.count() >= settings.FORUM_STAR_2_HALF:
elif user.posts.count() >= forum_settings.FORUM_STAR_2_HALF:
def forum_stars(user): if user.posts.count() >= settings.FORUM_STAR_5: return mark_safe('<img src="%sforum/img/stars/Star_5.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_4_HALF: return mark_safe('<img src="%sforum/img/stars/Star_4_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_4: return mark_safe('<img src="%sforum/img/stars/Star_4.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_3_HALF: return mark_safe('<img src="%sforum/img/stars/Star_3_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_3: return mark_safe('<img src="%sforum/img/stars/Star_3.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_2_HALF: return mark_safe('<img src="%sforum/img/stars/Star_2_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_2: return mark_safe('<img src="%sforum/img/stars/Star_2.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_1_HALF: return mark_safe('<img src="%sforum/img/stars/Star_1_Half.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_1: return mark_safe('<img src="%sforum/img/stars/Star_1.gif" alt="" >' % (settings.MEDIA_URL)) elif user.posts.count() >= settings.FORUM_STAR_0_HALF: return mark_safe('<img src="%sforum/img/stars/Star_0_Half.gif" alt="" >' % (settings.MEDIA_URL)) else: return mark_safe('<img src="%sforum/img/stars/Star_0.gif" alt="" >' % (settings.MEDIA_URL))
b430105a803716ef07bbc496453cb34df28616a9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13701/b430105a803716ef07bbc496453cb34df28616a9/forum_extras.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11283, 67, 334, 5913, 12, 1355, 4672, 309, 729, 18, 11660, 18, 1883, 1435, 1545, 1947, 18, 7473, 2799, 67, 20943, 67, 25, 30, 327, 2267, 67, 4626, 2668, 32, 6081, 1705, 11613, 87, 1172...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11283, 67, 334, 5913, 12, 1355, 4672, 309, 729, 18, 11660, 18, 1883, 1435, 1545, 1947, 18, 7473, 2799, 67, 20943, 67, 25, 30, 327, 2267, 67, 4626, 2668, 32, 6081, 1705, 11613, 87, 1172...
else:
else:
def _rec_convert(ids): if field_obj == table: return ids return self.__execute_recursive_in(cr, field._id1, field._rel, field._id2, ids)
cd23d9095db2f744da80d0a837df936251e57437 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/cd23d9095db2f744da80d0a837df936251e57437/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, 1, 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...
def render(self,pause=False,interactive=False):
def render(self, pause=False, interactive=False):
def render(self,pause=False,interactive=False): """ Render (or re-render) the scene Render the scene, either to screen, or to a buffer waiting for a save
d93bfdcd3bd0a6bbc36a3723be3891c95ae2eff8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/d93bfdcd3bd0a6bbc36a3723be3891c95ae2eff8/scene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 11722, 33, 8381, 16, 12625, 33, 8381, 4672, 3536, 6987, 261, 280, 283, 17, 5902, 13, 326, 9065, 225, 6987, 326, 9065, 16, 3344, 358, 5518, 16, 578, 358, 279, 1613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 11722, 33, 8381, 16, 12625, 33, 8381, 4672, 3536, 6987, 261, 280, 283, 17, 5902, 13, 326, 9065, 225, 6987, 326, 9065, 16, 3344, 358, 5518, 16, 578, 358, 279, 1613, ...
elif isinstance(new_location, Node):
elif isinstance(new_location, Node) and isinstance(new_location, Node):
def my_kingdom_for_a_key(dict, item): #il faut absolument trouver la methode qui doit deja exister !:! for key in dict.keys(): if dict[key] == item: return key return None
2868875de75ba3626bca979e4a65cc74c2a144ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4798/2868875de75ba3626bca979e4a65cc74c2a144ad/car.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 79, 310, 9859, 67, 1884, 67, 69, 67, 856, 12, 1576, 16, 761, 4672, 468, 330, 284, 5854, 2417, 355, 650, 268, 14004, 502, 7125, 7917, 390, 719, 77, 741, 305, 443, 12333, 100...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 79, 310, 9859, 67, 1884, 67, 69, 67, 856, 12, 1576, 16, 761, 4672, 468, 330, 284, 5854, 2417, 355, 650, 268, 14004, 502, 7125, 7917, 390, 719, 77, 741, 305, 443, 12333, 100...
if ((filtersflipped_arr->strides[3] != (npy_intp)sizeof(%(type)s))
if ((filtersflipped_arr->strides[3] != (npy_intp)sizeof(%(type)s))
def c_code(self, node, name, (img2d, filtersflipped), (z, ), sub): if node.inputs[0].type.dtype != node.inputs[1].type.dtype: raise NotImplementedError() assert node.inputs[0].type.dtype == node.inputs[1].type.dtype d=locals() d.update(sub)
aaea1d322c657ba643c240526cb3f00d5d2d997d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/aaea1d322c657ba643c240526cb3f00d5d2d997d/conv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 6081, 22, 72, 16, 3415, 12357, 1845, 3631, 261, 94, 16, 262, 16, 720, 4672, 309, 756, 18, 10029, 63, 20, 8009, 723, 18, 8972, 480...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 67, 710, 12, 2890, 16, 756, 16, 508, 16, 261, 6081, 22, 72, 16, 3415, 12357, 1845, 3631, 261, 94, 16, 262, 16, 720, 4672, 309, 756, 18, 10029, 63, 20, 8009, 723, 18, 8972, 480...
YouTubeVideoQuery.__init__(self, feed, text_query=text_query,
YouTubeVideoQuery.__init__(self, feed=feed, text_query=text_query,
def __init__(self, playlist_id, text_query=None, params=None, categories=None): if playlist_id: feed = "http://%s/feeds/playlists/%s" % (YOUTUBE_SERVER, playlist_id) else: feed = "http://%s/feeds/playlists" % (YOUTUBE_SERVER)
5ab02fd7d21e24d2c80ca948c50c64e993212ce9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/5ab02fd7d21e24d2c80ca948c50c64e993212ce9/service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 16428, 67, 350, 16, 977, 67, 2271, 33, 7036, 16, 859, 33, 7036, 16, 6477, 33, 7036, 4672, 309, 16428, 67, 350, 30, 4746, 273, 315, 2505, 23155, 87, 19,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 16428, 67, 350, 16, 977, 67, 2271, 33, 7036, 16, 859, 33, 7036, 16, 6477, 33, 7036, 4672, 309, 16428, 67, 350, 30, 4746, 273, 315, 2505, 23155, 87, 19,...
base.localAvatar.setPos(0,0,0)
base.localAvatar.setPosHpr(0,0,0,0,0,0)
def placeLocalToon(self): # the entrancePoint entities register themselves with us if self.entranceId not in self.entranceId2entity: self.notify.warning('unknown entranceId %s' % self.entranceId) base.localAvatar.setPos(0,0,0) self.notify.warning('showing all zones') self.setColorZones(1) # put the toon in a random zone to start zoneEntIds = self.entType2ids['zone'] while 1: zoneEntId = random.choice(zoneEntIds) if zoneEntId is not LevelConstants.UberZoneEntId: initialZoneEnt = self.getEntity(zoneEntId) base.localAvatar.setPos( render, initialZoneEnt.getZoneNode().getPos(render)) break else: epEnt = self.entranceId2entity[self.entranceId] epEnt.placeToon(base.localAvatar, self.avIdList.index(base.localAvatar.doId), len(self.avIdList)) initialZoneEnt = self.getEntity(epEnt.getZoneEntId())
ddf8e04134b41ae6d4875135a8accd5717c57049 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/ddf8e04134b41ae6d4875135a8accd5717c57049/DistributedLevel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 2042, 774, 265, 12, 2890, 4672, 468, 326, 31976, 1359, 2148, 5140, 1744, 20968, 598, 584, 309, 365, 18, 8230, 1359, 548, 486, 316, 365, 18, 8230, 1359, 548, 22, 1096, 30, 365, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 2042, 774, 265, 12, 2890, 4672, 468, 326, 31976, 1359, 2148, 5140, 1744, 20968, 598, 584, 309, 365, 18, 8230, 1359, 548, 486, 316, 365, 18, 8230, 1359, 548, 22, 1096, 30, 365, 18...
dom = args[0]
dom = sxp.child_value(server.xend.domain(args[0]), 'name')
def main_dom(opts, args): if len(args) == 0: opts.err('No domain parameter given') if len(args) > 1: opts.err('No multiple domain parameters allowed') dom = args[0] if serverType == SERVER_XEN_API: dom = get_single_vm(dom) mode = shutdown_mode(opts) shutdown(opts, [ dom ], mode, opts.vals.wait)
6b2c4d57f14cd155ad411dbe154d063f0a9e1bbb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6195/6b2c4d57f14cd155ad411dbe154d063f0a9e1bbb/shutdown.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 67, 9859, 12, 4952, 16, 833, 4672, 309, 562, 12, 1968, 13, 422, 374, 30, 1500, 18, 370, 2668, 2279, 2461, 1569, 864, 6134, 309, 562, 12, 1968, 13, 405, 225, 404, 30, 1500, 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, 2774, 67, 9859, 12, 4952, 16, 833, 4672, 309, 562, 12, 1968, 13, 422, 374, 30, 1500, 18, 370, 2668, 2279, 2461, 1569, 864, 6134, 309, 562, 12, 1968, 13, 405, 225, 404, 30, 1500, 18, ...
'sl': u'Portal',
def __init__(self): family.Family.__init__(self) self.name = 'wikipedia'
abbd4ca1646bf80f482e7e9171830c8747b9ce9c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/abbd4ca1646bf80f482e7e9171830c8747b9ce9c/wikipedia_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 13744, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 11999, 13744, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'BarTest.Test1', 'BazTest.Test1',
'BarTest.TestOne', 'BazTest.TestOne',
def testThreePatterns(self): """Tests filters that consist of three patterns."""
df96e6c5c6a2ef7175a390512a37d7f67fadb255 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8527/df96e6c5c6a2ef7175a390512a37d7f67fadb255/gtest_filter_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 28019, 11268, 12, 2890, 4672, 3536, 14650, 3415, 716, 7111, 434, 8925, 6884, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 28019, 11268, 12, 2890, 4672, 3536, 14650, 3415, 716, 7111, 434, 8925, 6884, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.isOn = 0
self.setIsOn(0)
def enterState0(self): assert(self.debugPrint("enter0()")) self.stateIndex = 0 self.isOn = 0
bd8e66b791d2c9610902b2f7a25fcfa01023449b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/bd8e66b791d2c9610902b2f7a25fcfa01023449b/FourState.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 1119, 20, 12, 2890, 4672, 1815, 12, 2890, 18, 4148, 5108, 2932, 2328, 20, 10031, 3719, 365, 18, 2019, 1016, 273, 374, 365, 18, 542, 2520, 1398, 12, 20, 13, 225, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 1119, 20, 12, 2890, 4672, 1815, 12, 2890, 18, 4148, 5108, 2932, 2328, 20, 10031, 3719, 365, 18, 2019, 1016, 273, 374, 365, 18, 542, 2520, 1398, 12, 20, 13, 225, 2, -100, -100, ...
if 0 : buildPackage( "liblo",
if 1 : buildPackage( "liblo",
def buildPackage(name, uri, checkVersion, downloadUri, tarballName, buildCommand, srcdir=None, deps="", pinnedVersion = None, ) : print "Module:", name subst = dict( sandbox = sandbox, prefix = prefix, target = target, sfmirror = sfmirror, apachemirror = apachemirror, name = name, pinned = pinnedVersion if pinnedVersion else "None", ) availableVersion = output(checkVersion).strip() availableVersion or die("No online version found for the package\n Command used:\n%s" % checkVersion) print "Found version: '%s'" % availableVersion if (pinnedVersion and pinnedVersion != availableVersion) : warning("Package: Pinning to version %s, although version %s is available" % (pinnedVersion, availableVersion)) version = pinnedVersion if pinnedVersion else availableVersion subst.update ( version = version, majorversion = ".".join(version.split(".")[:1]), minorversion = ".".join(version.split(".")[:2]), ) subst.update( tarball = tarballName % subst, srcdir = ("%(sandbox)s/src/" + (srcdir or "%(name)s-%(version)s/")) % subst, ) print "srcdir:", subst['srcdir'] download(downloadUri % subst) extractSource(subst['tarball']) patches = glob.glob(scriptRelative("mingw-"+name+"*")) patches.sort() print patches for patch in patches : applyPatch(subst['srcdir'], patch, level=1) run(buildCommand % subst)
9516624bdaf457fb48cb287da6115af5d509bbca /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1456/9516624bdaf457fb48cb287da6115af5d509bbca/setup_mingw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 2261, 12, 529, 16, 2003, 16, 866, 1444, 16, 4224, 3006, 16, 29441, 461, 16, 1361, 2189, 16, 1705, 1214, 33, 7036, 16, 8740, 1546, 3113, 26193, 1444, 273, 599, 16, 262, 294, 1172,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2261, 12, 529, 16, 2003, 16, 866, 1444, 16, 4224, 3006, 16, 29441, 461, 16, 1361, 2189, 16, 1705, 1214, 33, 7036, 16, 8740, 1546, 3113, 26193, 1444, 273, 599, 16, 262, 294, 1172,...
self.dispTubesAction.setIconSet(QIconSet(self.image64))
self.dispTubesAction.setEnabled(1) self.dispTubesAction.setIconSet(QIconSet(self.image63))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
e48e859515237593d94b403a9c0a7295e08c31f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e48e859515237593d94b403a9c0a7295e08c31f2/MainWindowUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 2242, 273, 374, 4672, 2238, 6376, 3829, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 2242, 13, 365, 18, 23...
args[-1] += '\ndocExec %s lifetime=%r failed!' % (stmt,lifetime)
msg = '\ndocExec %s lifetime=%r failed!' % (stmt,lifetime) args.append(msg)
def docExec(self,stmt,lifetime): stmt=stmt.strip() NS=self._nameSpace K0=NS.keys() try: if lifetime not in self._allowedLifetimes: raise ValueError('bad lifetime %r not in %r'%(lifetime,self._allowedLifetimes)) exec stmt in {},NS except: exc = sys.exc_info()[1] args = list(exc.args) args[-1] += '\ndocExec %s lifetime=%r failed!' % (stmt,lifetime) exc.args = tuple(args) for k in NS.iterkeys(): if k not in K0: del NS[k] raise self._addVars([k for k in NS.iterkeys() if k not in K0],lifetime)
499436fee44c85d1b0840f305e547aac2404ade5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3878/499436fee44c85d1b0840f305e547aac2404ade5/doctemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 1905, 12, 2890, 16, 10589, 16, 17155, 4672, 3480, 33, 10589, 18, 6406, 1435, 11472, 33, 2890, 6315, 529, 3819, 1475, 20, 33, 3156, 18, 2452, 1435, 775, 30, 309, 12486, 486, 316, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 1905, 12, 2890, 16, 10589, 16, 17155, 4672, 3480, 33, 10589, 18, 6406, 1435, 11472, 33, 2890, 6315, 529, 3819, 1475, 20, 33, 3156, 18, 2452, 1435, 775, 30, 309, 12486, 486, 316, 3...
kwargs['inStatementList'] = True
kwargs['inStatementList'] = True
def readExpression (stream, **kwargs): if not 'inStatementList' in kwargs: kwargs['inStatementList'] = True return readStatement(stream, True, **kwargs)
4dad8c6405fe129c6ff617a0251c12c5d6f7e727 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/4dad8c6405fe129c6ff617a0251c12c5d6f7e727/treegenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2300, 261, 3256, 16, 2826, 4333, 4672, 309, 486, 296, 267, 3406, 682, 11, 316, 1205, 30, 1205, 3292, 267, 3406, 682, 3546, 273, 1053, 327, 855, 3406, 12, 3256, 16, 1053, 16, 2826,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 2300, 261, 3256, 16, 2826, 4333, 4672, 309, 486, 296, 267, 3406, 682, 11, 316, 1205, 30, 1205, 3292, 267, 3406, 682, 3546, 273, 1053, 327, 855, 3406, 12, 3256, 16, 1053, 16, 2826,...
TeleCaller(emission, number).start()
TeleCaller(self.main, number).start()
def call(self, emission, signal, source): number = TelNumber(signal) if ((number[0] in ['0', '1', '6'] or (number[0] == '+' and number[1] != '0')) and number[1:].isdigit()): logger.info(number.get_text()) TeleCaller(emission, number).start() elif signal[0] in ['*'] : pass else : pass
746189e8c38ab940ce94e51c2abeae51c2d605ea /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/746189e8c38ab940ce94e51c2abeae51c2d605ea/tele.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 801, 19710, 16, 4277, 16, 1084, 4672, 1300, 273, 399, 292, 1854, 12, 10420, 13, 309, 14015, 2696, 63, 20, 65, 316, 10228, 20, 2187, 296, 21, 2187, 296, 26, 3546, 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, 745, 12, 2890, 16, 801, 19710, 16, 4277, 16, 1084, 4672, 1300, 273, 399, 292, 1854, 12, 10420, 13, 309, 14015, 2696, 63, 20, 65, 316, 10228, 20, 2187, 296, 21, 2187, 296, 26, 3546, 5...
eg.actionThread.Call(self.handler.HandleException, self.text.disconnected)
eg.actionThread.Call(self.handler.HandleWarning, self.text.disconnected)
def handle_close(self): self.handler.reader = None self.close() eg.actionThread.Call(self.handler.HandleException, self.text.disconnected)
557c0eeadf70bf4d431bf0cc1545dd9eec9af875 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/557c0eeadf70bf4d431bf0cc1545dd9eec9af875/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 4412, 12, 2890, 4672, 365, 18, 4176, 18, 10530, 273, 599, 365, 18, 4412, 1435, 9130, 18, 1128, 3830, 18, 1477, 12, 2890, 18, 4176, 18, 3259, 503, 16, 365, 18, 955, 18, 2251...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 67, 4412, 12, 2890, 4672, 365, 18, 4176, 18, 10530, 273, 599, 365, 18, 4412, 1435, 9130, 18, 1128, 3830, 18, 1477, 12, 2890, 18, 4176, 18, 3259, 503, 16, 365, 18, 955, 18, 2251...
if not "types" in config: config["types"] = ["*"]
if not config: config = {}
def setDefaults(self, config): if not "types" in config: config["types"] = ["*"] if not "libraries" in config: config["libraries"] = { "*" : {} } for libName, lib in config["libraries"].iteritems(): if not "versions" in lib: lib["versions"] = ["*"] if not "qooxdoo-versions" in lib: lib["qooxdoo-versions"] = ["*"] return config
7955c436f4b75c153e4cc97ef9824e3fb4b3b16e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/7955c436f4b75c153e4cc97ef9824e3fb4b3b16e/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22399, 12, 2890, 16, 642, 4672, 309, 486, 642, 30, 642, 273, 2618, 225, 309, 486, 315, 31417, 6, 316, 642, 30, 642, 9614, 31417, 11929, 273, 288, 10971, 294, 2618, 289, 364, 2561, 461,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22399, 12, 2890, 16, 642, 4672, 309, 486, 642, 30, 642, 273, 2618, 225, 309, 486, 315, 31417, 6, 316, 642, 30, 642, 9614, 31417, 11929, 273, 288, 10971, 294, 2618, 289, 364, 2561, 461,...