rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
newhdu._file = fits[0]._file newhdu._ffile = fits[0]._ffile newhdu._datLoc = fits[0]._datLoc
newhdu._file = hdu._file newhdu._ffile = hdu._ffile newhdu._datLoc = hdu._datLoc
def fix_sdss_idr(fits): hdr = fits[0].header if hdr['SIMPLE'] is False: hdr.update('SIMPLE', True, 'FITS compliant (fix-sdss-idr.py)') if hdr.get('SDSS', None) == pyfits.UNDEFINED: hdr['SDSS'] = True print 'Set SDSS to True' print 'UNSIGNED in hdr?', ('UNSIGNED' in hdr) print hdr.get('UNSIGNED', None) print hdr.ascardlist()[6] print type(hdr.ascardlist()[6]) print hdr.ascardlist()[6].key print hdr.ascardlist()[6].value print hdr.ascardlist()[6].comment print hdr[6] if hdr.get('UNSIGNED', None) == pyfits.UNDEFINED: hdr['UNSIGNED'] = True print 'Set UNSIGNED to True' if (not 'BSCALE' in hdr) and (not 'BZERO' in hdr): print 'Adding BZERO = 32768 card' hdr.update('BZERO', 32768, 'Unsigned -> signed') # ?? What if it *doesn't* contain SDSS and UNSIGNED ?? print 'type:', type(fits[0]) print 'data type:', type(fits[0].data) print 'hdu type:', fits[0].header._hdutype print 'card 0:', fits[0].header.ascard[0] fits[0].header._updateHDUtype() print 'hdu type:', fits[0].header._hdutype data = fits[0].data print 'data type:', type(data) print 'data:', data hdr = fits[0].header newhdu = hdr._hdutype(data=data, header=hdr) print 'newhdu:', newhdu newhdu._file = fits[0]._file newhdu._ffile = fits[0]._ffile newhdu._datLoc = fits[0]._datLoc newhdu.__getattr__('data') print 'data:', type(newhdu.data) print 'data:', newhdu.data.dtype print 'data range:', newhdu.data.min(), 'to', newhdu.data.max() newhdu.writeto('out.fits', clobber=True)
b39e4e08bbf236c86881fcfd5557ca0d31fc1d09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7059/b39e4e08bbf236c86881fcfd5557ca0d31fc1d09/fix-sdss-idr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 6427, 1049, 67, 350, 86, 12, 18352, 4672, 7723, 273, 13351, 63, 20, 8009, 3374, 309, 7723, 3292, 31669, 900, 3546, 353, 1083, 30, 7723, 18, 2725, 2668, 31669, 900, 2187, 1053, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 6427, 1049, 67, 350, 86, 12, 18352, 4672, 7723, 273, 13351, 63, 20, 8009, 3374, 309, 7723, 3292, 31669, 900, 3546, 353, 1083, 30, 7723, 18, 2725, 2668, 31669, 900, 2187, 1053, ...
self.cmd = cmd
self.cmd = cmd
def __init__(self, broker, cmd): StoppableThread.__init__(self) self.broker=broker self.cmd = cmd self.lock = Lock() self.process = None self.stopped = False self.start()
471f6b95e932010ab57c2f72ffbc859215d82ad5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/198/471f6b95e932010ab57c2f72ffbc859215d82ad5/cluster_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8625, 16, 1797, 4672, 5131, 19586, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 21722, 33, 21722, 365, 18, 4172, 273, 1797, 365, 18, 739, 273, 3488, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 8625, 16, 1797, 4672, 5131, 19586, 3830, 16186, 2738, 972, 12, 2890, 13, 365, 18, 21722, 33, 21722, 365, 18, 4172, 273, 1797, 365, 18, 739, 273, 3488, 14...
c.repo_info = repo = repo_model.get_by_repo_name(repo_name) if repo.stats: last_rev = repo.stats.stat_on_revision
c.repo_info = repo_model.get_by_repo_name(repo_name) if c.repo_info.stats: last_rev = c.repo_info.stats.stat_on_revision
def edit(self, repo_name, format='html'): """GET /repos/repo_name/edit: Form to edit an existing item""" # url('edit_repo', repo_name=ID) repo_model = RepoModel() c.repo_info = repo = repo_model.get_by_repo_name(repo_name) if repo.stats: last_rev = repo.stats.stat_on_revision else: last_rev = 0 c.stats_revision = last_rev r = ScmModel().get(repo_name) c.repo_last_rev = r.revisions[-1] if r.revisions else 0
b79bc3afba4d4c3776afd6be940775a4b7eebec2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/b79bc3afba4d4c3776afd6be940775a4b7eebec2/repos.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 12, 2890, 16, 3538, 67, 529, 16, 740, 2218, 2620, 11, 4672, 3536, 3264, 342, 15564, 19, 7422, 67, 529, 19, 4619, 30, 2748, 358, 3874, 392, 2062, 761, 8395, 468, 880, 2668, 4619, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3874, 12, 2890, 16, 3538, 67, 529, 16, 740, 2218, 2620, 11, 4672, 3536, 3264, 342, 15564, 19, 7422, 67, 529, 19, 4619, 30, 2748, 358, 3874, 392, 2062, 761, 8395, 468, 880, 2668, 4619, ...
def WritePlayerFloatPairsAsTableRows(output_file, pairs): for s, f in pairs: output_file.write('<tr><td>%s</td><td>%.1f</td></tr>\n' % (s, f))
def WritePlayerFloatPairsAsTableRows(output_file, pairs): for s, f in pairs: output_file.write('<tr><td>%s</td><td>%.1f</td></tr>\n' % (s, f))
57a620ce7c222ab1bc56811e70ce40710d67be1d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10357/57a620ce7c222ab1bc56811e70ce40710d67be1d/compute_stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 12148, 4723, 10409, 1463, 1388, 4300, 12, 2844, 67, 768, 16, 5574, 4672, 364, 272, 16, 284, 316, 5574, 30, 876, 67, 768, 18, 2626, 2668, 32, 313, 4438, 4465, 9822, 87, 1757, 4465...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 12148, 4723, 10409, 1463, 1388, 4300, 12, 2844, 67, 768, 16, 5574, 4672, 364, 272, 16, 284, 316, 5574, 30, 876, 67, 768, 18, 2626, 2668, 32, 313, 4438, 4465, 9822, 87, 1757, 4465...
for extrastyle in list(layer.wmsextrastyles):
for extrastyle in [layer.wmsdefaultstyle] + list(layer.wmsextrastyles):
def __init__(self, conf, mapfactory, opsonlineresource): self.conf = conf self.mapfactory = mapfactory if self.conf.has_option('service', 'epsg'): self.crs = CRS('EPSG', self.conf.get('service', 'epsg')) else: ServerConfigurationError('EPSG code not properly configured.')
eea63439c3565666a427f169ae0fe6b82fd99e3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2302/eea63439c3565666a427f169ae0fe6b82fd99e3d/wms111.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2195, 16, 852, 6848, 16, 1061, 816, 7511, 11737, 552, 4672, 365, 18, 3923, 273, 2195, 365, 18, 1458, 6848, 273, 852, 6848, 309, 365, 18, 3923, 18, 5332, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2195, 16, 852, 6848, 16, 1061, 816, 7511, 11737, 552, 4672, 365, 18, 3923, 273, 2195, 365, 18, 1458, 6848, 273, 852, 6848, 309, 365, 18, 3923, 18, 5332, ...
self.assertEquals({'value': '123', 'path': '/'}, response.cookies['plone.app.drafts.targetKey']) self.assertEquals({'value': 'draft-1', 'path': '/'}, response.cookies['plone.app.drafts.draftName'])
self.assertEquals({'value': '123', 'quoted': True, 'path': '/'}, response.cookies['plone.app.drafts.targetKey']) self.assertEquals({'value': 'draft-1', 'quoted': True, 'path': '/'}, response.cookies['plone.app.drafts.draftName'])
def test_save(self): request = self.app.REQUEST response = request.response current = ICurrentDraftManagement(request) self.assertEquals(False, current.save()) self.failIf('plone.app.drafts.targetKey' in response.cookies) self.failIf('plone.app.drafts.draftName' in response.cookies) self.failIf('plone.app.drafts.path' in response.cookies) current.targetKey = u"123" self.assertEquals(True, current.save()) self.assertEquals({'value': '123', 'path': '/'}, response.cookies['plone.app.drafts.targetKey']) self.failIf('plone.app.drafts.draftName' in response.cookies) self.failIf('plone.app.drafts.path' in response.cookies) current.targetKey = u"123" current.draftName = u"draft-1" self.assertEquals(True, current.save()) self.assertEquals({'value': '123', 'path': '/'}, response.cookies['plone.app.drafts.targetKey']) self.assertEquals({'value': 'draft-1', 'path': '/'}, response.cookies['plone.app.drafts.draftName']) self.failIf('plone.app.drafts.path' in response.cookies) current.targetKey = u"123" current.draftName = u"draft-1" current.path = '/test' self.assertEquals(True, current.save()) self.assertEquals({'value': '123', 'path': '/test'}, response.cookies['plone.app.drafts.targetKey']) self.assertEquals({'value': 'draft-1', 'path': '/test'}, response.cookies['plone.app.drafts.draftName']) self.assertEquals({'value': '/test', 'path': '/test'}, response.cookies['plone.app.drafts.path'])
745a22706a3760147b027dbf11152cb1a49c10a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12272/745a22706a3760147b027dbf11152cb1a49c10a0/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5688, 12, 2890, 4672, 590, 273, 365, 18, 2910, 18, 5519, 766, 273, 590, 18, 2740, 225, 783, 273, 467, 3935, 12714, 10998, 12, 2293, 13, 365, 18, 11231, 8867, 12, 8381, 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, 5688, 12, 2890, 4672, 590, 273, 365, 18, 2910, 18, 5519, 766, 273, 590, 18, 2740, 225, 783, 273, 467, 3935, 12714, 10998, 12, 2293, 13, 365, 18, 11231, 8867, 12, 8381, 16, ...
self.val = self.val - 1
self.parent.value = self.parent.value - 1
def handleKey(self, key): if key == 1: self.val = self.val - 1 if key == 2: self.val = self.val + 1 if self.val < 0: self.val = 0
bc7774d93d62c8c63ffc37af68df9f3b7b0c4c54 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/bc7774d93d62c8c63ffc37af68df9f3b7b0c4c54/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 653, 12, 2890, 16, 498, 4672, 309, 498, 422, 404, 30, 365, 18, 2938, 18, 1132, 273, 365, 18, 2938, 18, 1132, 300, 404, 309, 498, 422, 576, 30, 365, 18, 1125, 273, 365, 18, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 653, 12, 2890, 16, 498, 4672, 309, 498, 422, 404, 30, 365, 18, 2938, 18, 1132, 273, 365, 18, 2938, 18, 1132, 300, 404, 309, 498, 422, 576, 30, 365, 18, 1125, 273, 365, 18, 11...
else
else:
def __init__(data = None) if data == None: quickfix.UtcTimeStampField.__init__(self, 42) else quickfix.UtcTimeStampField.__init__(self, 42, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 57, 5111, 21536, 974, 16186, 2738, 972, 12, 2890, 16, 14856, 13, 469, 30, 9549, 904, 18, 57, 5111, 2153...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 57, 5111, 21536, 974, 16186, 2738, 972, 12, 2890, 16, 14856, 13, 469, 30, 9549, 904, 18, 57, 5111, 2153...
with JSContext(Global()) as ctxt:
with JSContext(Global()) as ctxt:
def fs(self): return FileSystemWarpper()
d76ea3f452d147f051e65b20fdab9b87a8b84413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2065/d76ea3f452d147f051e65b20fdab9b87a8b84413/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2662, 12, 2890, 4672, 327, 10931, 59, 11441, 457, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2662, 12, 2890, 4672, 327, 10931, 59, 11441, 457, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fd, tmpPath = tempfile.mkstem( "vomses" )
fd, tmpPath = tempfile.mkstemp( "vomses" )
def getVOMSESLocation( self ): #755 requiredDirPerms = stat.S_IRWXU + stat.S_IRGRP + stat.S_IXGRP + stat.S_IROTH + stat.S_IXOTH #644 requiredFilePerms = stat.S_IRUSR + stat.S_IWUSR + stat.S_IRGRP + stat.S_IROTH vomsesPaths = [] if 'DIRAC_VOMSES' in os.environ: vomsesPaths.append( os.environ[ 'DIRAC_VOMSES' ] ) vomsesPaths.append( os.path.join( DIRAC.rootPath, "etc", "grid-security", "vomses" ) ) for vomsesPath in vomsesPaths: if not os.path.exists( vomsesPath ): continue if os.path.isfile( vomsesPath ): pathMode = os.stat( vomsesPath )[ stat.ST_MODE ] if pathMode & requiredFilePerms == requiredFilePerms: return vomsesPath fd, tmpPath = tempfile.mkstem( "vomses" ) os.close( fd ) shutil.copy( vomsesPath , tmpPath ) os.chmod( tmpPath, requiredFilePerms ) os.environ[ 'DIRAC_VOMSES' ] = tmpPath return tmpPath elif os.path.isdir( vomsesPath ): ok = True if os.stat( vomsesPath )[ stat.ST_MODE ] & requiredDirPerms != requiredDirPerms: ok = False if ok: for fP in os.listdir( vomsesPath ): if os.stat( os.path.join( vomsesPath, fP ) )[ stat.ST_MODE ] & requiredFilePerms != requiredFilePerms: ok = False break if ok: return vomsesPath tmpDir = tempfile.mkdtemp() tmpDir = os.path.join( tmpDir, tmpDir ) shutil.copytree( vomsesPath, tmpDir ) os.chmod( tmpDir, requiredDirPerms ) for fP in os.listdir( tmpDir ): os.chmod( os.path.join( tmpDir, fP ), requiredFilePerms ) os.environ[ 'DIRAC_VOMSES' ] = tmpDir return tmpDir
b458a179c43579aeed255894e0f86d961abb8caa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b458a179c43579aeed255894e0f86d961abb8caa/VOMS.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11031, 1872, 1090, 55, 2735, 12, 365, 262, 30, 468, 21761, 1931, 1621, 27256, 273, 610, 18, 55, 67, 7937, 59, 60, 57, 397, 610, 18, 55, 67, 7937, 6997, 52, 397, 610, 18, 55, 67, 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, 11031, 1872, 1090, 55, 2735, 12, 365, 262, 30, 468, 21761, 1931, 1621, 27256, 273, 610, 18, 55, 67, 7937, 59, 60, 57, 397, 610, 18, 55, 67, 7937, 6997, 52, 397, 610, 18, 55, 67, 12...
for packet, in execute(u"SELECT packet FROM sync_last WHERE community = ? AND global >= 3 ORDER BY global LIMIT 100", (message.community.database_id,)):
self._total_send += len(packet) if self._total_send > limit: break for packet, in execute(u"SELECT packet FROM sync_last WHERE community = ? AND global >= 3 ORDER BY global", (message.community.database_id,)):
def on_sync_message(self, address, message): """ We received a dispersy-sync message.
6043dceb5635276d4e590339d5cd9f9241e26717 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9668/6043dceb5635276d4e590339d5cd9f9241e26717/Dispersy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 8389, 67, 2150, 12, 2890, 16, 1758, 16, 883, 4672, 3536, 1660, 5079, 279, 1015, 10422, 93, 17, 8389, 883, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 603, 67, 8389, 67, 2150, 12, 2890, 16, 1758, 16, 883, 4672, 3536, 1660, 5079, 279, 1015, 10422, 93, 17, 8389, 883, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
"type" : "JClassDepJob"
"type" : "JCompileJob"
def listJobTriggers(self): return {
0407b21baef8f72316472f8f521314b6b5ee7f36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/0407b21baef8f72316472f8f521314b6b5ee7f36/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 2278, 15114, 12, 2890, 4672, 327, 288, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 2278, 15114, 12, 2890, 4672, 327, 288, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
cells.InsertNextCell(5)
cells.InsertNextCell(4)
def __init__(self):
a68fba5cea742f25272562d938bc597a37ac15d5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4494/a68fba5cea742f25272562d938bc597a37ac15d5/devide_canvas_object.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if host == "localhost" or host.startswith("localhost:"):
if re.match(r'(http://)?localhost([:/]|$)', host):
def GetRpcServer(server, email=None, host_override=None, save_cookies=True, account_type=AUTH_ACCOUNT_TYPE): """Returns an instance of an AbstractRpcServer. Args: server: String containing the review server URL. email: String containing user's email address. host_override: If not None, string containing an alternate hostname to use in the host header. save_cookies: Whether authentication cookies should be saved to disk. account_type: Account type for authentication, either 'GOOGLE' or 'HOSTED'. Defaults to AUTH_ACCOUNT_TYPE. Returns: A new AbstractRpcServer, on which RPC calls can be made. """ rpc_server_class = HttpRpcServer # If this is the dev_appserver, use fake authentication. host = (host_override or server).lower() if host == "localhost" or host.startswith("localhost:"): if email is None: email = "test@example.com" logging.info("Using debug user %s. Override with --email" % email) server = rpc_server_class( server, lambda: (email, "password"), host_override=host_override, extra_headers={"Cookie": 'dev_appserver_login="%s:False"' % email}, save_cookies=save_cookies, account_type=account_type) # Don't try to talk to ClientLogin. server.authenticated = True return server def GetUserCredentials(): """Prompts the user for a username and password.""" # Create a local alias to the email variable to avoid Python's crazy # scoping rules. local_email = email if local_email is None: local_email = GetEmail("Email (login for uploading to %s)" % server) password = None if keyring: password = keyring.get_password(host, local_email) if password is not None: print "Using password from system keyring." else: password = getpass.getpass("Password for %s: " % local_email) if keyring: answer = raw_input("Store password in system keyring?(y/N) ").strip() if answer == "y": keyring.set_password(host, local_email, password) return (local_email, password) return rpc_server_class(server, GetUserCredentials, host_override=host_override, save_cookies=save_cookies)
e603446115fe178ab0cff7824bc7df28d8ea49d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/476/e603446115fe178ab0cff7824bc7df28d8ea49d1/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11647, 2081, 12, 3567, 16, 2699, 33, 7036, 16, 1479, 67, 10601, 33, 7036, 16, 1923, 67, 16240, 33, 5510, 16, 2236, 67, 723, 33, 7131, 67, 21690, 67, 2399, 4672, 3536, 1356, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11647, 2081, 12, 3567, 16, 2699, 33, 7036, 16, 1479, 67, 10601, 33, 7036, 16, 1923, 67, 16240, 33, 5510, 16, 2236, 67, 723, 33, 7131, 67, 21690, 67, 2399, 4672, 3536, 1356, 392, ...
def index( self ):
def get_index( self ):
def index( self ): '''returns the key object's index''' return (m.eval('keyframe -t ":%d" -q -kc %s;'%(self.time,self.attr))-1)
8781a673d03469676f09284ae55510ab6d71bde7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1810/8781a673d03469676f09284ae55510ab6d71bde7/keyUtils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1615, 12, 365, 262, 30, 9163, 6154, 326, 498, 733, 1807, 770, 26418, 327, 261, 81, 18, 8622, 2668, 856, 3789, 300, 88, 315, 5319, 72, 6, 300, 85, 300, 79, 71, 738, 87, 435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 1615, 12, 365, 262, 30, 9163, 6154, 326, 498, 733, 1807, 770, 26418, 327, 261, 81, 18, 8622, 2668, 856, 3789, 300, 88, 315, 5319, 72, 6, 300, 85, 300, 79, 71, 738, 87, 435...
export PYTHONPATH=${PYTHONPATH}:$RSFROOT/%s
export PYTHONPATH=${PYTHONPATH}:$RSFROOT%s
def mk_sh_script(script_nm): 'Write the (ba)sh environment setup script' global dpath bsh = open(script_nm, 'w') bsh.write('''#!/bin/sh
6f411a9c2ac1ce299e662eba6482fb564978eb19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3143/6f411a9c2ac1ce299e662eba6482fb564978eb19/setenv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 67, 674, 67, 4263, 12, 4263, 67, 15094, 4672, 296, 3067, 326, 261, 12124, 13, 674, 3330, 3875, 2728, 11, 225, 2552, 302, 803, 225, 324, 674, 273, 1696, 12, 4263, 67, 15094, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 67, 674, 67, 4263, 12, 4263, 67, 15094, 4672, 296, 3067, 326, 261, 12124, 13, 674, 3330, 3875, 2728, 11, 225, 2552, 302, 803, 225, 324, 674, 273, 1696, 12, 4263, 67, 15094, 16, ...
try: from ctypes import CDLL, util, c_char_p c = CDLL(util.find_library('event')) c.event_get_version.restype = c_char_p baseversion += '/libevent=%s' % (c.event_get_version(), ) c.event_get_method.restype = c_char_p baseversion += '/method=%s' % (c.event_get_method(), ) except Exception, ex: print ex or type(ex).__name__
def _version_info(self): baseversion = event.__version__ try: from ctypes import CDLL, util, c_char_p c = CDLL(util.find_library('event')) c.event_get_version.restype = c_char_p baseversion += '/libevent=%s' % (c.event_get_version(), ) c.event_get_method.restype = c_char_p baseversion += '/method=%s' % (c.event_get_method(), ) except Exception, ex: print ex or type(ex).__name__ return baseversion
c8ab05d40a265062c79dce9934fefdccf2373d88 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10078/c8ab05d40a265062c79dce9934fefdccf2373d88/libevent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1589, 67, 1376, 12, 2890, 4672, 1026, 1589, 273, 871, 16186, 1589, 972, 327, 1026, 1589, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1589, 67, 1376, 12, 2890, 4672, 1026, 1589, 273, 871, 16186, 1589, 972, 327, 1026, 1589, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
reason = 'Unable to open %s' % self.device_name return kaa.notifier.SocketDispatcher(self.handle).register(self.joyfd)
log.error('Could not open joystick interface (%s)'%self.device_name) self.free_resources() return self.socket_dispatcher = kaa.notifier.SocketDispatcher(self.handle) self.socket_dispatcher.register(self.joyfd)
def __init__(self): InputPlugin.__init__(self)
3be85ebcf4d6ed0c585c2a59f5b25e5dd2e347cd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11399/3be85ebcf4d6ed0c585c2a59f5b25e5dd2e347cd/joystick.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2741, 3773, 16186, 2738, 972, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2741, 3773, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __float__(self): return 2.685452001065306445309714835481795693820
def __float__(self): """ EXAMPLES: sage: float(khinchin) 2.6854520010653062 """ return float(self.__value)
def __float__(self): return 2.685452001065306445309714835481795693820
19a060960af30f38e4cdacf2929902a69a7a25bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/19a060960af30f38e4cdacf2929902a69a7a25bc/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5659, 972, 12, 2890, 4672, 327, 576, 18, 9470, 6564, 25, 6976, 2163, 9222, 5082, 1105, 7950, 5082, 10580, 25005, 4763, 8875, 28814, 4313, 29, 7414, 3462, 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, 0, 0, 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, 5659, 972, 12, 2890, 4672, 327, 576, 18, 9470, 6564, 25, 6976, 2163, 9222, 5082, 1105, 7950, 5082, 10580, 25005, 4763, 8875, 28814, 4313, 29, 7414, 3462, 2, -100, -100, -100, -100, ...
char.socket.sysmessage('A message from %s: %s' % (player.name, response.text[1]), 0x846) player.socket.sysmessage('The message has been sent.', 0x846)
char.socket.sysmessage(tr('A message from %s: %s') % (player.name, response.text[1]), 0x846) player.socket.sysmessage(tr('The message has been sent.'), 0x846)
def details_response(self, player, response): if response.button == 0: return char = wolfpack.findchar(self.serial) if not char: return # Go to character if response.button == 1: player.removefromview() player.moveto(char.pos) player.update() player.socket.resendworld() # Bring character elif response.button == 2: char.removefromview() char.moveto(player.pos) char.update() if char.socket: char.socket.resendworld()
d8b7b7c1b9e926bd4732e104ef67fe1e1cc770bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/d8b7b7c1b9e926bd4732e104ef67fe1e1cc770bf/pages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3189, 67, 2740, 12, 2890, 16, 7291, 16, 766, 4672, 309, 766, 18, 5391, 422, 374, 30, 327, 225, 1149, 273, 341, 355, 74, 2920, 18, 4720, 3001, 12, 2890, 18, 8818, 13, 225, 309, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3189, 67, 2740, 12, 2890, 16, 7291, 16, 766, 4672, 309, 766, 18, 5391, 422, 374, 30, 327, 225, 1149, 273, 341, 355, 74, 2920, 18, 4720, 3001, 12, 2890, 18, 8818, 13, 225, 309, 486, ...
def test_reversed(self): input = list(map(ord, "Hello")) b = bytearray(input) output = list(reversed(b)) input.reverse() self.assertEqual(output, input)
def test_reversed(self): input = list(map(ord, "Hello")) b = bytearray(input) output = list(reversed(b)) input.reverse() self.assertEqual(output, input)
510711d598f1432afb021a01c2457b14334c6157 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/510711d598f1432afb021a01c2457b14334c6157/test_bytes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 266, 7548, 12, 2890, 4672, 810, 273, 666, 12, 1458, 12, 517, 16, 315, 18601, 6, 3719, 324, 273, 14552, 12, 2630, 13, 876, 273, 666, 12, 266, 7548, 12, 70, 3719, 810, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 266, 7548, 12, 2890, 4672, 810, 273, 666, 12, 1458, 12, 517, 16, 315, 18601, 6, 3719, 324, 273, 14552, 12, 2630, 13, 876, 273, 666, 12, 266, 7548, 12, 70, 3719, 810, 18, ...
"Return help"
"""Return help text to the client."""
def ftp_HELP(self, line): "Return help" if line: # FIX #10 if line.upper() in proto_cmds: self.respond("214 %s" %proto_cmds[line.upper()]) else: self.respond("500 Unrecognized command.") else: # FIX #31 # provide a compact list of recognized commands def formatted_help(): cmds = [] keys = proto_cmds.keys() keys.sort() while keys: elems = tuple((keys[0:8])) cmds.append(' %-6s' * len(elems) %elems + '\r\n') del keys[0:8] return ''.join(cmds)
367a95e4363ae8b7515230480fff6ef354b95226 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3782/367a95e4363ae8b7515230480fff6ef354b95226/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 27396, 12, 2890, 16, 980, 4672, 3536, 990, 2809, 977, 358, 326, 1004, 12123, 225, 309, 980, 30, 468, 8563, 468, 2163, 309, 980, 18, 5797, 1435, 316, 3760, 67, 24680, 30, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 27396, 12, 2890, 16, 980, 4672, 3536, 990, 2809, 977, 358, 326, 1004, 12123, 225, 309, 980, 30, 468, 8563, 468, 2163, 309, 980, 18, 5797, 1435, 316, 3760, 67, 24680, 30, 365...
logging.info('Warning: job %s in status %s' % \
logging.info('Skipped job %s in status %s' % \
def killTask(self, taskSpecId): """
3eed76489bba9847a72ab7ed11c81e6f0da3ca17 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/3eed76489bba9847a72ab7ed11c81e6f0da3ca17/BossLiteKiller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 2174, 12, 2890, 16, 1562, 1990, 548, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8673, 2174, 12, 2890, 16, 1562, 1990, 548, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
cursor.execute(sql, (id))
cursor.execute(sql, (id,))
def getTest(id, attribute, form): if(attribute == 'runs'): return getTestRuns(id) else: sql = """SELECT tests.id, tests.pretty_name AS test_name, machines.name as machine_name, branches.name AS branch_name, os_list.name AS os_name, test_runs.date_run FROM tests INNER JOIN test_runs ON (tests.id = test_runs.test_id) INNER JOIN machines ON (machines.id = test_runs.machine_id) INNER JOIN os_list ON (machines.os_id = os_list.id) INNER JOIN builds ON (test_runs.build_id = builds.id) INNER JOIN branches on (builds.branch_id = branches.id) WHERE tests.id = %s ORDER BY test_runs.date_run DESC LIMIT 1""" cursor = db.cursor(cursorclass=MySQLdb.cursors.DictCursor) cursor.execute(sql, (id)) if cursor.rowcount == 1: row = cursor.fetchone() #change column names to the names used here, then we don't need to re-label them test = {'id': row['id'], 'name': row['test_name'], 'branch': row['branch_name'], 'os': row['os_name'], 'machine': row['machine_name'], } result = {'stat': 'ok', 'test': test} else: result = {'stat': 'fail', 'code': '101', 'message': 'Test not found'} return result
31bff652b03dcfbbb6433e6dc9c335c12be506d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14013/31bff652b03dcfbbb6433e6dc9c335c12be506d5/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29384, 12, 350, 16, 1566, 16, 646, 4672, 309, 12, 4589, 422, 296, 20152, 11, 4672, 327, 29384, 9361, 12, 350, 13, 469, 30, 1847, 273, 3536, 4803, 7434, 18, 350, 16, 7434, 18, 19073, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29384, 12, 350, 16, 1566, 16, 646, 4672, 309, 12, 4589, 422, 296, 20152, 11, 4672, 327, 29384, 9361, 12, 350, 13, 469, 30, 1847, 273, 3536, 4803, 7434, 18, 350, 16, 7434, 18, 19073, ...
self.__cb = cb
def __init__(self, cb, save=True, play=True): gtk.VBox.__init__(self, spacing=0) self.__cb = cb self.__save = save self.__play = play
9c701556952d3e0476b1cdf1642f5c98851e8063 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/9c701556952d3e0476b1cdf1642f5c98851e8063/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2875, 16, 1923, 33, 5510, 16, 6599, 33, 5510, 4672, 22718, 18, 58, 3514, 16186, 2738, 972, 12, 2890, 16, 13259, 33, 20, 13, 365, 16186, 5688, 273, 1923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2875, 16, 1923, 33, 5510, 16, 6599, 33, 5510, 4672, 22718, 18, 58, 3514, 16186, 2738, 972, 12, 2890, 16, 13259, 33, 20, 13, 365, 16186, 5688, 273, 1923, ...
return self.loadTaskByName(taskInfo['name'])
return task
def declare( self, xml, proxyFile=None ) : """ register job related informations in the db """
c1e2f9b2c4bbf5c465a58889f19f996ecaf08549 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/c1e2f9b2c4bbf5c465a58889f19f996ecaf08549/BossLiteAPI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14196, 12, 365, 16, 2025, 16, 2889, 812, 33, 7036, 262, 294, 3536, 1744, 1719, 3746, 26978, 316, 326, 1319, 3536, 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, 14196, 12, 365, 16, 2025, 16, 2889, 812, 33, 7036, 262, 294, 3536, 1744, 1719, 3746, 26978, 316, 326, 1319, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def processDoctype(self, name, error): self.parser.parseError()
def processCharacter(self, data): self.insertionMode.processCharacter(data)
63b257c91a1a03874ee2932271f4c904c94d49df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9368/63b257c91a1a03874ee2932271f4c904c94d49df/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 7069, 12, 2890, 16, 501, 4672, 365, 18, 6387, 285, 2309, 18, 2567, 7069, 12, 892, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 7069, 12, 2890, 16, 501, 4672, 365, 18, 6387, 285, 2309, 18, 2567, 7069, 12, 892, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
mycatpkg2=string.split(mycatpkg,"/")
def isinstalled(mycatpkg): global installcache mycatpkg2=string.split(mycatpkg,"/") if not installcache: installcache=port_insttree() #initialize cache if isjustname(mycatpkg2[1]): if installcache.has_key(mycatpkg): return 1 else: return 0 else: mysplit=pkgsplit(mycatpkg2[1]) mykey=mycatpkg2[0]+"/"+mysplit[0] # name and version specified if not installcache.has_key(mykey): return 0 for x in installcache[mykey]: if x[0]==mycatpkg: return 1 return 0
c8969019d1e4d0f64bcee90102d29171debb6e5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9957/c8969019d1e4d0f64bcee90102d29171debb6e5f/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 13435, 12, 4811, 2574, 10657, 4672, 2552, 3799, 2493, 309, 486, 3799, 2493, 30, 3799, 2493, 33, 655, 67, 8591, 3413, 1435, 468, 11160, 1247, 225, 309, 353, 3732, 529, 12, 4811, 2574...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 13435, 12, 4811, 2574, 10657, 4672, 2552, 3799, 2493, 309, 486, 3799, 2493, 30, 3799, 2493, 33, 655, 67, 8591, 3413, 1435, 468, 11160, 1247, 225, 309, 353, 3732, 529, 12, 4811, 2574...
InterpretExitCode(result, makestatus, self.exit_code, 'RunStrcTest')
InterpretExitCode(result, makestatus, self.exit_code, 'RunStrcTest_makefile')
def Run(self, context, result): """Actually run the StreamIt compiler."""
a6cdb1aeff996c7dbd05d82ad6a41014223eb3d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8781/a6cdb1aeff996c7dbd05d82ad6a41014223eb3d9/streamit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 16, 819, 16, 563, 4672, 3536, 2459, 3452, 1086, 326, 3961, 7193, 5274, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 12, 2890, 16, 819, 16, 563, 4672, 3536, 2459, 3452, 1086, 326, 3961, 7193, 5274, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
mk_data["$main"] = os.path.basename(project_info.info("PROJECT_PATH")) + "/main.c"
def mkGenerator(project_info): """ Generates the mk file for the current project. """ makefile = open(os.path.join(const.DATA_DIR, "mktemplates/template.mk"), "r").read() destination = os.path.join(project_info.prjdir, os.path.basename(project_info.prjdir) + ".mk") mk_data = {} mk_data["$pname"] = project_info.info("PROJECT_NAME") mk_data["$ppath"] = os.path.basename(project_info.info("PROJECT_SRC_PATH")) mk_data["$cpuclockfreq"] = project_info.info("SELECTED_FREQ") cpu_mk_parameters = [] for key, value in project_info.info("CPU_INFOS").items(): if key.startswith(const.MK_PARAM_ID): cpu_mk_parameters.append("%s = %s" %(key.replace("MK", mk_data["$pname"]), value)) mk_data["$cpuparameters"] = "\n".join(cpu_mk_parameters) mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$cppasrc"], mk_data["$cxxsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info) mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[0]) mk_data["$suffix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[1]) mk_data["$main"] = os.path.basename(project_info.info("PROJECT_PATH")) + "/main.c" for key in mk_data: while makefile.find(key) != -1: makefile = makefile.replace(key, mk_data[key]) open(destination, "w").write(makefile)
ffed16ae86aabde84a9b7c7a6e0e85b8761078a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9114/ffed16ae86aabde84a9b7c7a6e0e85b8761078a7/bertos_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 3908, 12, 4406, 67, 1376, 4672, 3536, 31902, 326, 5028, 585, 364, 326, 783, 1984, 18, 3536, 1221, 768, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 10248, 18, 4883, 67, 4537, 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, 5028, 3908, 12, 4406, 67, 1376, 4672, 3536, 31902, 326, 5028, 585, 364, 326, 783, 1984, 18, 3536, 1221, 768, 273, 1696, 12, 538, 18, 803, 18, 5701, 12, 10248, 18, 4883, 67, 4537, 16, ...
for menu in ['add', 'replace', 'add2', 'replace2', 'rm']:
for menu in ['add', 'replace', 'playafter', 'rm']:
def update_menu_visibility(self, show_songinfo_only=False): if show_songinfo_only or not self.expanded: for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', 'pl', \ 'remove', 'clear', 'update', 'new', 'edit', 'sort', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() return elif self.current_tab == self.TAB_CURRENT: if len(self.currentdata) > 0: if self.current_selection.count_selected_rows() > 0: for menu in ['remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() if not self.filterbox_visible: for menu in ['clear', 'pl', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['clear', 'pl', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() else: for menu in ['clear', 'pl', 'sort', 'remove', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['add', 'replace', 'add2', 'replace2', 'rename', 'rm', \ 'update', 'new', 'edit']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_LIBRARY: self.UIManager.get_widget('/mainmenu/updatemenu/').show() if len(self.browserdata) > 0: if self.browser_selection.count_selected_rows() > 0: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() else: for menu in ['add', 'replace', 'add2', 'replace2', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['remove', 'clear', 'pl', 'rename', 'rm', 'new', 'edit', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_PLAYLISTS: if self.playlists_selection.count_selected_rows() > 0: for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() if self.playlists_selection.count_selected_rows() == 1 and self.mpd_major_version() >= 0.13: self.UIManager.get_widget('/mainmenu/renamemenu/').show() else: self.UIManager.get_widget('/mainmenu/renamemenu/').hide() else: for menu in ['add', 'replace', 'add2', 'replace2', 'rm', 'rename']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['remove', 'clear', 'pl', 'update', 'new', 'edit', 'sort']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() elif self.current_tab == self.TAB_STREAMS: self.UIManager.get_widget('/mainmenu/newmenu/').show() if self.streams_selection.count_selected_rows() > 0: if self.streams_selection.count_selected_rows() == 1: self.UIManager.get_widget('/mainmenu/editmenu/').show() else: self.UIManager.get_widget('/mainmenu/editmenu/').hide() for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').show() else: for menu in ['add', 'replace', 'add2', 'replace2', 'rm']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide() for menu in ['rename', 'remove', 'clear', 'pl', 'update', 'sort', 'tag']: self.UIManager.get_widget('/mainmenu/' + menu + 'menu/').hide()
b33877e05a3757e7c9cef00e0e41779cddbb5424 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/b33877e05a3757e7c9cef00e0e41779cddbb5424/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5414, 67, 14422, 12, 2890, 16, 2405, 67, 816, 75, 1376, 67, 3700, 33, 8381, 4672, 309, 2405, 67, 816, 75, 1376, 67, 3700, 578, 486, 365, 18, 17336, 30, 364, 3824, 316, 1022...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 5414, 67, 14422, 12, 2890, 16, 2405, 67, 816, 75, 1376, 67, 3700, 33, 8381, 4672, 309, 2405, 67, 816, 75, 1376, 67, 3700, 578, 486, 365, 18, 17336, 30, 364, 3824, 316, 1022...
In addition to the data object, the following options can be given as keyword arguments:
In addition to the data object, the following options can be given as keyword arguments:
def dumps(params, methodname=None, methodresponse=None, encoding=None): """data [,options] -> marshalled data Convert an argument tuple or a Fault instance to an XML-RPC request (or response, if the methodresponse option is used). In addition to the data object, the following options can be given as keyword arguments: methodname: the method name for a methodCall packet methodresponse: true to create a methodResponse packet. If this option is used with a tuple, the tuple must be a singleton (i.e. it can contain only one element). encoding: the packet encoding (default is UTF-8) All 8-bit strings in the data structure are assumed to use the packet encoding. Unicode strings are automatically converted, as necessary. """ assert isinstance(params, TupleType) or isinstance(params, Fault),\ "argument must be tuple or Fault instance" if isinstance(params, Fault): methodresponse = 1 elif methodresponse and isinstance(params, TupleType): assert len(params) == 1, "response tuple must be a singleton" if not encoding: encoding = "utf-8" m = Marshaller(encoding) data = m.dumps(params) if encoding != "utf-8": xmlheader = "<?xml version='1.0' encoding=%s?>\n" % repr(encoding) else: xmlheader = "<?xml version='1.0'?>\n" # utf-8 is default # standard XML-RPC wrappings if methodname: # a method call if not isinstance(methodname, StringType): methodname = methodname.encode(encoding) data = ( xmlheader, "<methodCall>\n" "<methodName>", methodname, "</methodName>\n", data, "</methodCall>\n" ) elif methodresponse: # a method response, or a fault structure data = ( xmlheader, "<methodResponse>\n", data, "</methodResponse>\n" ) else: return data # return as is return string.join(data, "")
ec00ab8f6244c6bfe9524cd649c63e5bcb7f4750 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ec00ab8f6244c6bfe9524cd649c63e5bcb7f4750/xmlrpclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6711, 12, 2010, 16, 707, 529, 33, 7036, 16, 707, 2740, 33, 7036, 16, 2688, 33, 7036, 4672, 3536, 892, 306, 16, 2116, 65, 317, 10893, 1259, 501, 225, 4037, 392, 1237, 3193, 578, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6711, 12, 2010, 16, 707, 529, 33, 7036, 16, 707, 2740, 33, 7036, 16, 2688, 33, 7036, 4672, 3536, 892, 306, 16, 2116, 65, 317, 10893, 1259, 501, 225, 4037, 392, 1237, 3193, 578, 279, ...
data = cPickle.dumps(value, self.binary)
data = _dumps(value, self.protocol)
def put(self, key, value, txn=None, flags=0): data = cPickle.dumps(value, self.binary) return self.db.put(key, data, txn, flags)
8e4d05ecedcfaf8dd3a4aa3df31cc807547cf74b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/8e4d05ecedcfaf8dd3a4aa3df31cc807547cf74b/dbshelve.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 2890, 16, 498, 16, 460, 16, 7827, 33, 7036, 16, 2943, 33, 20, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 327, 365, 18, 1966, 18, 458, 12, 856, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 2890, 16, 498, 16, 460, 16, 7827, 33, 7036, 16, 2943, 33, 20, 4672, 501, 273, 389, 13302, 1121, 12, 1132, 16, 365, 18, 8373, 13, 327, 365, 18, 1966, 18, 458, 12, 856, 16,...
return code
return (code,msg)
def helo(self, name=''): """SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host. """ name=string.strip(name) if len(name)==0: name=socket.gethostbyaddr(socket.gethostname())[0] self.putcmd("helo",name) (code,msg)=self.getreply() self.helo_resp=msg return code
7ce512fd70a64eb7cf9563bb31dd4291a44254dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/7ce512fd70a64eb7cf9563bb31dd4291a44254dd/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13150, 83, 12, 2890, 16, 508, 2218, 11, 4672, 3536, 55, 14636, 296, 76, 24214, 11, 1296, 18, 17423, 358, 1366, 364, 333, 1296, 3467, 358, 326, 23127, 8609, 434, 326, 1191, 1479, 18, 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, 13150, 83, 12, 2890, 16, 508, 2218, 11, 4672, 3536, 55, 14636, 296, 76, 24214, 11, 1296, 18, 17423, 358, 1366, 364, 333, 1296, 3467, 358, 326, 23127, 8609, 434, 326, 1191, 1479, 18, 35...
self.append("\nALTER TABLE %s "%table_name)
self.append('\nALTER TABLE "%s" ' % table_name)
def start_alter_table(self,param): table = self._to_table(param) table_name = self._to_table_name(table) self.append("\nALTER TABLE %s "%table_name) return table
d6d4b511a48850c6d06df194887e27bb147a050e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/149/d6d4b511a48850c6d06df194887e27bb147a050e/ansisql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 22628, 67, 2121, 12, 2890, 16, 891, 4672, 1014, 273, 365, 6315, 869, 67, 2121, 12, 891, 13, 1014, 67, 529, 273, 365, 6315, 869, 67, 2121, 67, 529, 12, 2121, 13, 365, 18, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 22628, 67, 2121, 12, 2890, 16, 891, 4672, 1014, 273, 365, 6315, 869, 67, 2121, 12, 891, 13, 1014, 67, 529, 273, 365, 6315, 869, 67, 2121, 67, 529, 12, 2121, 13, 365, 18, 6...
does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current
does *not* advance the parsing position within the input string, it only verifies that the specified parse expression matches at the current
def __str__( self ): try: return super(ParseElementEnhance,self).__str__() except: pass if self.strRepr is None and self.expr is not None: self.strRepr = "%s:(%s)" % ( self.__class__.__name__, _ustr(self.expr) ) return self.strRepr
f734f22ba11a967624c3b1351b79174f1d17c2ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3554/f734f22ba11a967624c3b1351b79174f1d17c2ac/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 365, 262, 30, 775, 30, 327, 2240, 12, 3201, 1046, 664, 12207, 16, 2890, 2934, 972, 701, 972, 1435, 1335, 30, 1342, 225, 309, 365, 18, 701, 426, 683, 353, 599, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 365, 262, 30, 775, 30, 327, 2240, 12, 3201, 1046, 664, 12207, 16, 2890, 2934, 972, 701, 972, 1435, 1335, 30, 1342, 225, 309, 365, 18, 701, 426, 683, 353, 599, 471...
self.sumpPrefixes(sink)
self.dumpPrefixes(sink)
def dumpChronological(self, context, sink): sink.startDoc() self.sumpPrefixes(sink)
a7d0c800568125609e0fc58e331b9a6f318031c6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/a7d0c800568125609e0fc58e331b9a6f318031c6/cwm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 20235, 18224, 12, 2890, 16, 819, 16, 9049, 4672, 9049, 18, 1937, 1759, 1435, 365, 18, 1364, 84, 11700, 12, 17074, 13, 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, 4657, 20235, 18224, 12, 2890, 16, 819, 16, 9049, 4672, 9049, 18, 1937, 1759, 1435, 365, 18, 1364, 84, 11700, 12, 17074, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
for align_rec in align_dict.values(): for j in align_rec.pos_align_dict.keys(): mult_align_dict[j] += align_rec.pos_align_dict[j].aa
for i in range(1,len(align_dict)+1): for j in align_dict.abs(i).pos_align_dict.keys(): mult_align_dict[j] += align_dict.abs(i).pos_align_dict[j].aa
def mult_align(sum_dict,align_dict): mult_align_dict = {} for j in align_dict.abs(1).pos_align_dict.keys(): mult_align_dict[j] = '' for align_rec in align_dict.values(): for j in align_rec.pos_align_dict.keys(): mult_align_dict[j] += align_rec.pos_align_dict[j].aa seq_order = mult_align_dict.keys() seq_order.sort() fssp_align = Generic.Alignment(Alphabet.Gapped(Alphabet.IUPAC.protein)) for i in seq_order: fssp_align.add_sequence(sum_dict[i].pdb2+sum_dict[i].chain2, mult_align_dict[i]) return fssp_align
ac553f7240b74627b7061c7696e6cdccaf409ba5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/ac553f7240b74627b7061c7696e6cdccaf409ba5/FSSPTools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1778, 67, 7989, 12, 1364, 67, 1576, 16, 7989, 67, 1576, 4672, 1778, 67, 7989, 67, 1576, 273, 2618, 364, 525, 316, 5689, 67, 1576, 18, 5113, 12, 21, 2934, 917, 67, 7989, 67, 1576, 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, 1778, 67, 7989, 12, 1364, 67, 1576, 16, 7989, 67, 1576, 4672, 1778, 67, 7989, 67, 1576, 273, 2618, 364, 525, 316, 5689, 67, 1576, 18, 5113, 12, 21, 2934, 917, 67, 7989, 67, 1576, 18,...
_exportmethods = ['get_dataset', 'get_dataset_filenames' ]
_exportmethods = ['get_dataset', 'get_dataset_filenames', 'get_dataset_from_list' ]
def get_filenames(app): """Retrieve the file names starting from an application object""" job=app._getRoot() if not job: logger.warning('Application object is not associated to a job.') return []
030ac5076f363b968bfcfd639df5a0b09330bc8d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1488/030ac5076f363b968bfcfd639df5a0b09330bc8d/ATLASDataset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 19875, 12, 2910, 4672, 3536, 5767, 326, 585, 1257, 5023, 628, 392, 2521, 733, 8395, 225, 1719, 33, 2910, 6315, 588, 2375, 1435, 309, 486, 1719, 30, 1194, 18, 8551, 2668, 3208, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 19875, 12, 2910, 4672, 3536, 5767, 326, 585, 1257, 5023, 628, 392, 2521, 733, 8395, 225, 1719, 33, 2910, 6315, 588, 2375, 1435, 309, 486, 1719, 30, 1194, 18, 8551, 2668, 3208, ...
print '***************** BOM 2 CREER ********************'
def _make_order(self, cr, uid, data, context): ''' When a configuration is selected, we can : - Create an order - Create a produit with this nomemclature ''' print '_make_order: %s' % str(data) simul_nb = data['id'] sline_nb = data['form']['simul'] print '_make_order:simul_nb: %s' % str(simul_nb) pool = pooler.get_pool(cr.dbname) simul_obj = pool.get('sale.simulator') simul_line_obj = pool.get('sale.simulator.line') simul_line_item_obj = pool.get('sale.simulator.line.item') order_obj = pool.get('sale.order') order_line_obj = pool.get('sale.order.line') partner_obj = pool.get('res.partner') product_obj = pool.get('product.product') simul = simul_obj.read(cr, uid, simul_nb) if not simul: print '_make_order: Erreur lors de la recup de la simulation' # Récupération des addresses contact, livraison, facturation addr = partner_obj.address_get(cr, uid, [simul['partner_id'][0]],['delivery','invoice','contact']) print '_make_order:simul: %s' % str(simul) print '_make_order:addr: %s' % str(addr) # Create an empty order order = { 'origin': simul['name'], 'date_order': time.strftime('%Y-%m-%d'), 'partner_id': simul['partner_id'][0], 'partner_invoice_id':addr['invoice'], 'partner_order_id': addr['contact'], 'partner_shipping_id': addr['delivery'], 'pricelist_id': simul['pricelist_id'][0], 'user_id': simul['user_id'][0], 'shop_id': simul['shop_id'][0], } print 'order: %s' % str(order) # Création du devis, order_id = order_obj.create(cr, uid, order, context) if not order_id: print '_make_order: Erreur dans la création de l''entete du devis' # Ajout de cet ID sur la page de configuration en lien args = {'order_id': order_id} res = simul_line_obj.write(cr, uid, sline_nb, args, context) if not res: print '_make_order: Erreur lors de la MAJ du numéro de commande' # Création des produits # Création du produit assemblé de toutes les pièces # Création du produit, composé du produit précédent. # - Les taxes sont prises sur le produit de référence # - la catégorie aussi # proref_id = make_product.generate(cr, uid, sline_nb, context) # Search product and module items on this configuration config = simul_line_obj.browse(cr, uid, sline_nb) if not config: print 'make_product.generate: Erreur recherche produit' print '_make_order: config: %s' % str(config.description) print '_make_order: taxes: %s'% str(config.item_id.sale_taxes_id) # Check if configuration have a multi level item_ids = simul_line_item_obj.search(cr, uid, [('line_id','=',sline_nb)]) if not item_ids: raise wizard.except_wizard('Error', 'Problème récupération des IDS') item_rs = simul_line_item_obj.browse(cr, uid, item_ids) if not item_rs: raise wizard.except_wizard('Error', 'Erreur parcours des IDS') step2 = False for item in item_rs: if item.item_id2.sequence == 2: step2 = True print 'generate:level: %s' % item.item_id2.sequence # # Ajout des taxes principales du produits de base # taxes_ids = [] for x in config.item_id.sale_taxes_id: taxes_ids.append(x.id) # # Choisit le nom du produit final en fonction du nombre de niveau # if step2: proname = config.item_id.name else: proname = config.description # # Création du produit (1) # proref1 = { 'name': proname, 'categ_id': config.item_id.categ_id.id, 'taxes_id': [(6,0,taxes_ids)], 'sale_ok': True, 'purchase_ok': False, 'list_price': config.sale_price, 'standard_price': config.factory_price, 'procure_method': 'make_to_order', 'supply_method': 'produce', 'uom_id': config.item_id.uom_id.id } print '_make_order:proref: %s' % str(proref1) proref_id1 = product_obj.create(cr, uid, proref1, context) if not proref_id1: print '_make_order: erreur creation produit' # # Création de la nomemclature du produit de niveau 1 # pil_obj = pool.get('product.item.line') niv1_lst = {} niv2_lst = {} # On recherche les produits qui compose le produit de référence nivref_args = [('item_id','=',config.item_id.id)] print 'nivref_args: %s' % str(nivref_args) nivref_ids = pil_obj.search(cr, uid, nivref_args) if nivref_ids: print 'AFF: nivref_ids: %s' % str(nivref_ids) for nivref_id in nivref_ids: nivref = pil_obj.read(cr, uid, nivref_id, ['product_id','quantity','uom_id'], context) print 'AFF: nivref: %s ' % str(nivref) niv1_lst[nivref['product_id'][0]] = (nivref['quantity'], nivref['uom_id'][0]) for niv1 in item_rs: pil_args = [ ('item_id','=', niv1.item_id2.id) ] pil_ids = pil_obj.search(cr, uid, pil_args) if pil_ids: for pil_id in pil_ids: pil = pil_obj.read(cr, uid, pil_id, ['product_id','quantity','uom_id'], context) print 'AFF: pil: %s' % str(pil) p_id = pil['product_id'][0] if niv1.item_id2.sequence == 1: if pil['product_id'][0] in niv1_lst: niv1_lst[p_id] = (niv1_lst[p_id][0] + pil['quantity'], pil['uom_id'][0]) else: niv1_lst[p_id] = (pil['quantity'], pil['uom_id'][0]) else: if pil['product_id'][0] in niv2_lst: niv2_lst[p_id] = (niv2_lst[p_id][0] + pil['quantity'], pil['uom_id'][0]) else: niv2_lst[p_id] = (pil['quantity'], pil['uom_id'][0]) print 'niv1_lst: %s' % str(niv1_lst) print 'niv2_lst: %s' % str(niv2_lst) # Constitution de la nomemclature du premier produit. bom_obj = pool.get('mrp.bom') # le produit lui même a sa BOM # on récupère son id pour ses composants proref_bom1 = { 'name': proname, 'product_id': proref_id1, 'product_qty': 1, 'product_uom': config.item_id.uom_id.id, } prb1_id = bom_obj.create(cr, uid, proref_bom1, context) if not prb1_id: print 'erreur lors de la création de la BOM principale' for bom1 in niv1_lst: if niv1_lst[bom1][0] > 0: # le nombre de produit est supérieur a 0 donc on peut les ajoutés. print 'produit: %s:%s' % (str(bom1),str(niv1_lst[bom1])) # Recherche du nom du produit a mettre dans la bom propro = product_obj.read(cr, uid, bom1, ['name'], context) mod_bom1 = { 'name': propro['name'], 'product_id': bom1, 'product_qty': niv1_lst[bom1][0], 'product_uom': niv1_lst[bom1][1], 'bom_id': prb1_id, } mod1_id = bom_obj.create(cr, uid, mod_bom1, context) if not mod1_id: print 'Erreur création produit %s ' % str(bom1) # si niveau 2 on créer le produit if step2: print'****************** NIVEAU 2 ***************************' #Création du produit numéro 2 proref2 = { 'name': config.description, 'categ_id': config.item_id.categ_id.id, 'taxes_id': [(6,0,taxes_ids)], 'sale_ok': True, 'purchase_ok': False, 'list_price': config.sale_price, 'standard_price': config.factory_price, 'procure_method': 'make_to_order', 'supply_method': 'produce', 'uom_id': config.item_id.uom_id.id } print '_make_order:proref: %s' % str(proref2) proref_id2 = product_obj.create(cr, uid, proref2, context) if not proref_id2: print '_make_order: erreur creation produit' # le produit a lui même sa nomenclature proref_bom2 = { 'name': config.description, 'product_id': proref_id2, 'product_qty': 1, 'product_uom': config.item_id.uom_id.id, } prb2_id = bom_obj.create(cr, uid, proref_bom2, context) if not prb2_id: print 'erreur lors de la création de la BOM principale' print '***************** BOM 2 CREER ********************' #Ratache le produit N°1 en nomenclature en premier propro = product_obj.read(cr, uid, proref_id1, ['name'], context) mod_bomX = { 'name': propro['name'], 'product_id': proref_id1, 'product_qty': niv1_lst[bom1][0], 'product_uom': niv1_lst[bom1][1], 'bom_id': prb2_id, } modx_id = bom_obj.create(cr, uid, mod_bomX, context) if not modx_id: print 'Erreur création produit %s ' % str(bom1) print 'ratache' #On ratache les autres produits for bom2 in niv2_lst: if niv2_lst[bom2][0] > 0: # le nombre de produit est supérieur a 0 donc on peut les ajoutés. print 'produit: %s:%s' % (str(bom2),str(niv2_lst[bom2])) # Recherche du nom du produit a mettre dans la bom propro = product_obj.read(cr, uid, bom2, ['name'], context) mod_bom1 = { 'name': propro['name'], 'product_id': bom2, 'product_qty': niv2_lst[bom2][0], 'product_uom': niv2_lst[bom2][1], 'bom_id': prb2_id, } mod2_id = bom_obj.create(cr, uid, mod_bom1, context) if not mod2_id: print 'Erreur création produit %s ' % str(bom1) # ********************************************************************* # A retirer après les tests # ********************************************************************* #raise wizard.except_wizard('Error', 'STOP !') # Ajout du produit sur le devis # TODO Unité à mettre sur l'item order_line = { 'order_id': order_id, 'name': config.description, 'price_unit': config.sale_price, 'tax_id': [(6,0,taxes_ids)], 'type': 'make_to_order', 'product_uom_qty': config.quantity, 'product_uom': config.item_id.uom_id.id, } if step2: order_line['product_id'] = proref_id2 else: order_line['product_id'] = proref_id1 order_line_id = order_line_obj.create(cr, uid, order_line, context) if not order_line_id: print '_make_order: Erreur creation ligne de devis' return {}
879848ddbebe99d32cbed0a9ef68b31c1aaffdad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8030/879848ddbebe99d32cbed0a9ef68b31c1aaffdad/sale_order.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 1019, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 9163, 5203, 279, 1664, 353, 3170, 16, 732, 848, 294, 300, 1788, 392, 1353, 300, 1788, 279, 4810, 305, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 1019, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 9163, 5203, 279, 1664, 353, 3170, 16, 732, 848, 294, 300, 1788, 392, 1353, 300, 1788, 279, 4810, 305, 598, ...
s.sendto(packet, (UPNP_MCAST_ADDR, PORT))
s.sendto(packet, (UPNP_MCAST_ADDR, SSDP_PORT))
def discover(timeout=2.0): # is the 3rd parameter even necessary? s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) if sys.platform == 'win32': s.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1) s.bind(('', 0)) # replies come to whatever port bound to for device in DEVICES: packet = M_SEARCH_MSG_FMT % (device,) #print repr(packet) # data must go immediately, we don't want to stall or we might miss replies s.settimeout(0.0) s.sendto(packet, (UPNP_MCAST_ADDR, PORT)) devlist = set() stop_receiving = time.time() + timeout while True: s.settimeout(stop_receiving - time.time()) try: reply = __parse_msearch_reply(s.recv(1536)) except socket.timeout: break else: devlist.add(tuple([reply.headers[x.upper()] for x in ('location', 'st')])) return devlist
769284fd9714471b1be49dbef6ff370d699de0f8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4811/769284fd9714471b1be49dbef6ff370d699de0f8/upnpigd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10372, 12, 4538, 33, 22, 18, 20, 4672, 468, 353, 326, 890, 13623, 1569, 5456, 4573, 35, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 40, 153...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10372, 12, 4538, 33, 22, 18, 20, 4672, 468, 353, 326, 890, 13623, 1569, 5456, 4573, 35, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 40, 153...
qBgNode = stfu_pipe.fuQscanNode(dag,qscanBgJob,cp,opts,time,ifo,p_nodes=[dNode],"seismic","bg")
qBgNode = stfu_pipe.fuQscanNode(dag,qscanBgJob,cp,opts,time,ifo,p_nodes=[dNode],type="seismic",variety="bg") dag.write_sub_files() dag.write_dag() dag.write_script()
def get_times(): # determine the start time : 00:00:00 UTC from the day before # and the end time, 00:00:00 UTC the current day gps = xlal.date.LIGOTimeGPS(gpstime.GpsSecondsFromPyUTC(time.time())) end_gps = int(date.utc_midnight(gps)) start_gps = end_gps - 86400 print "Start time : "+str(start_gps)+" End Time : "+str(end_gps) return str(start_gps)+","+str(end_gps)
18d35550cfa2994a670eec5d6aa1b970066bbd31 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/18d35550cfa2994a670eec5d6aa1b970066bbd31/wscan_background.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8293, 13332, 225, 468, 4199, 326, 787, 813, 294, 9631, 30, 713, 30, 713, 9951, 628, 326, 2548, 1865, 468, 471, 326, 679, 813, 16, 9631, 30, 713, 30, 713, 9951, 326, 783, 254...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8293, 13332, 225, 468, 4199, 326, 787, 813, 294, 9631, 30, 713, 30, 713, 9951, 628, 326, 2548, 1865, 468, 471, 326, 679, 813, 16, 9631, 30, 713, 30, 713, 9951, 326, 783, 254...
def export(uri, http_user, type = "", yes = None):
def export(uri, http_user, type = "", yes=None, configuration=None, machines=None, **kwargs):
def export(uri, http_user, type = "", yes = None): """ Export machine list.""" # submit button; forget it. del yes return (w.HTTP_TYPE_TEXT, "not implemented yet.") title = _("Export machines list") data = '''<div id="banner"> %s %s</div> %s <div id="main"> %s <div id="content"> <h1>%s</h1>''' % ( w.backto(), w.metanav(http_user), w.menu(uri), ctxtnav(), title) if type == "": description = _('''CSV file-format is used by spreadsheets and most ''' '''systems which offer import functionnalities. XML file-format is a ''' '''modern exchange format, used in soma applications which respect ''' '''interoperability constraints.<br /><br />When you submit this ''' '''form, your web browser will automatically offer you to download ''' '''and save the export-file (it won't be displayed). When you're ''' '''done, please click the “back” button of your browser.''') form_options = \ _("Which file format do you want the machines list to be exported to? %s") \ % w.select("type", [ "CSV", "XML"]) data += w.question(_("Please choose file format for export list"), description, yes_values = [ _("Export >>"), "/machines/export", "E" ], no_values = [ _("<< Cancel"), "/machines/list", "N" ], form_options = form_options) data += '</div><!-- end main -->' return (w.HTTP_TYPE_TEXT, w.page(title, data)) else: machines.Select(machines.FILTER_STANDARD) if type == "CSV": data = machines.ExportCSV() else: data = machines.ExportXML() return w.HTTP_TYPE_DOWNLOAD, (type, data)
5c6e0536d2363f635c0b43a50e8af7ca9d102236 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/5c6e0536d2363f635c0b43a50e8af7ca9d102236/machines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 12, 1650, 16, 1062, 67, 1355, 16, 618, 273, 23453, 12465, 33, 7036, 16, 1664, 33, 7036, 16, 15942, 33, 7036, 16, 2826, 4333, 4672, 3536, 11054, 5228, 666, 12123, 225, 468, 4879, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 12, 1650, 16, 1062, 67, 1355, 16, 618, 273, 23453, 12465, 33, 7036, 16, 1664, 33, 7036, 16, 15942, 33, 7036, 16, 2826, 4333, 4672, 3536, 11054, 5228, 666, 12123, 225, 468, 4879, ...
print >>sys.stderr, 'coin'
def sso(request): """Endpoint for AuthnRequests asynchronously sent, i.e. POST or Redirect""" # 1. Process the request, separate POST and GET treatment message = get_idff12_request_message(request) if not message: return HttpResponseForbidden('Invalid SAML 1.1 AuthnRequest: "%s"' % message) server = create_idff12_server(request) login = lasso.Login(server) while True: try: login.processAuthnRequestMsg(message) break except lasso.DsInvalidSignatureError: message = _('Invalid signature on SAML 1.1 AuthnRequest: %r') % message print >>sys.stderr, message logging.error(message) return HttpResponseForbidden() except lasso.ProfileInvalidMsgError: message = _('Invalid SAML 1.1 AuthnRequest: %r') % message logging.error(message) return HttpResponseForbidden() except lasso.ServerProviderNotFoundError: # This path is not exceptionnal it should be normal since we did # not load any provider in the Server object provider_id = login.remoteProviderId # 2. Lookup the ProviderID logging.info(_('ID-FFv1.2: AuthnRequest from %r') % provider_id) providers = LibertyProvider.objects.filter( entity_id = login.remoteProviderId) if not providers: # TODO: handle autoloading of metadatas consent_obtained = False message = _('ID-FFv1.2: provider %r unknown') % provider_id logging.warning(message) return HttpResponseForbidden(message) # XXX: does consent be always automatic for known providers ? Maybe # add a configuration key on the provider. consent_obtained = True server.addProviderFromBuffer(lasso.PROVIDER_ROLE_SP, providers[0].metadata.read()) # Flags possible: # - consent # - isPassive # - forceAuthn # # 3. TODO: Check for permission if login.mustAuthenticate(): # TODO: # check that it exists a login transaction for this request id # - if there is, then provoke one with a redirect to # login?next=<current_url> # - if there is then set user_authenticated to the result of the # login event # Work around lack of informations returned by mustAuthenticate() if login.request.forceAuthn or request.user.is_anonymous(): print >>sys.stderr, login.request.dump() return redirect_to_login(request.build_absolute_uri()) else: user_authenticated = True else: user_authenticated = not request.user.is_anonymous() # 3.1 Ask for consent if user_authenticated: # TODO: for autoloaded providers always ask for consent if login.mustAskForConsent() or not consent_obtained: # TODO: replace False by check against request id if False: consent_obtained = True # i.e. redirect to /idp/consent?id=requestId # then check that Consent(id=requestId) exists in the database else: return HttpResponseRedirect('consent?id=%s&next=%s' % ( login.request.requestId, urllib.quote(request.build_absolute_uri())) ) # 4. Validate the request, passing authentication and consent status try: print >>sys.stderr, 'coin' login.validateRequestMsg(user_authenticated, consent_obtained) print >>sys.stderr, 'coin' except: raise do_federation = False else: do_federation = True # 5. Lookup the federations if do_federation: load_federation(request, login) load_session(request, login) # 3. Build and assertion, fill attributes build_assertion(request, login) # 4. build response if login.protocolProfile == lasso.LOGIN_PROTOCOL_PROFILE_BRWS_ART: print >>sys.stderr, 'coincoin' login.buildArtifactMsg(lasso.HTTP_METHOD_REDIRECT) save_artifact(request, login) elif login.protocolProfile == lasso.LOGIN_PROTOCOL_PROFILE_BRWS_POST: login.buildAuthnResponseMsg() else: raise NotImplementedError() save_federation(request, login) save_session(request, login) return return_idff12_response(login, title = _('Authentication response'))
27b9b5b413eb834c493e6e48b4dd901785f657be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11208/27b9b5b413eb834c493e6e48b4dd901785f657be/idff12_endpoints.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27250, 12, 2293, 4672, 3536, 3293, 364, 3123, 82, 6421, 14952, 3271, 16, 277, 18, 73, 18, 5485, 578, 9942, 8395, 468, 404, 18, 4389, 326, 590, 16, 9004, 5485, 471, 4978, 24266, 883, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27250, 12, 2293, 4672, 3536, 3293, 364, 3123, 82, 6421, 14952, 3271, 16, 277, 18, 73, 18, 5485, 578, 9942, 8395, 468, 404, 18, 4389, 326, 590, 16, 9004, 5485, 471, 4978, 24266, 883, 27...
if hasattr(self, '_pipeline'): self._pipeline.close() self._pipeline = None
if hasattr(self, '_vtk_pipeline_cfs'): for key in self._vtk_pipeline_cfs: self._vtk_pipeline_cfs[key].close() self._vtk_pipeline_cfs.clear()
def close_pipeline_configure(self): """Explicitly close() the pipeline browser of this module.
059d61b95cc4be743f567bfa798935dba2dedc0a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/059d61b95cc4be743f567bfa798935dba2dedc0a/module_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 67, 14511, 67, 14895, 12, 2890, 4672, 3536, 17186, 715, 1746, 1435, 326, 5873, 4748, 434, 333, 1605, 18, 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, 1746, 67, 14511, 67, 14895, 12, 2890, 4672, 3536, 17186, 715, 1746, 1435, 326, 5873, 4748, 434, 333, 1605, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
@todo: Handle maximum loop count exceeded @todo: Handle walk into grouping loops
def walk(self, node, seg_data, errh, seg_count, cur_line, ls_id): """ Walk the node tree from the starting node to the node matching seg_data. Catch any counting or requirement errors along the way. Handle required segment/loop missed (not found in seg) Handle found segment = Not used @param node: Starting node @type node: L{node<map_if.x12_node>} @param seg_data: Segment object @type seg_data: L{segment<segment.segment>} @param seg_count: Count of current segment in the ST Loop @type seg_count: int @param cur_line: Current line number in the file @type cur_line: int @param ls_id: The current LS loop identifier @type ls_id: string @return: The matching x12_node @rtype: L{node<map_if.x12_node>}
3f21508e64b144f4057513ce722c8e9f5d299001 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/3f21508e64b144f4057513ce722c8e9f5d299001/map_walker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 12, 2890, 16, 756, 16, 2291, 67, 892, 16, 393, 76, 16, 2291, 67, 1883, 16, 662, 67, 1369, 16, 7180, 67, 350, 4672, 3536, 7564, 326, 756, 2151, 628, 326, 5023, 756, 358, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 12, 2890, 16, 756, 16, 2291, 67, 892, 16, 393, 76, 16, 2291, 67, 1883, 16, 662, 67, 1369, 16, 7180, 67, 350, 4672, 3536, 7564, 326, 756, 2151, 628, 326, 5023, 756, 358, 326, ...
return compile(SITE_PY % {"semi_standalone": self.semi_standalone},
if self.use_zipimport: return compile(SITE_PY % {"semi_standalone": self.semi_standalone},
def _getSiteCode(self): return compile(SITE_PY % {"semi_standalone": self.semi_standalone}, "<-bundlebuilder.py->", "exec")
e70e521fdbde28d61def7b676b664ba7bea66ab2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/e70e521fdbde28d61def7b676b664ba7bea66ab2/bundlebuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 4956, 1085, 12, 2890, 4672, 309, 365, 18, 1202, 67, 4450, 5666, 30, 327, 4074, 12, 20609, 67, 16235, 738, 12528, 307, 9197, 67, 10145, 12451, 6877, 365, 18, 307, 9197, 67, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 4956, 1085, 12, 2890, 4672, 309, 365, 18, 1202, 67, 4450, 5666, 30, 327, 4074, 12, 20609, 67, 16235, 738, 12528, 307, 9197, 67, 10145, 12451, 6877, 365, 18, 307, 9197, 67, 10...
self.config['overwrite'] = False
self.config['overwrite'] = False
def _getTmdbGraphics(self, cfile, graphic_type, watched=False): '''Download either a movie Poster or Fanart return None return full qualified path and filename of downloaded graphic ''' if graphic_type == u'-P': graphic_name = u'poster' key_type = u'coverimage' rel_type = u'coverfile' else: graphic_name = u'fanart' key_type = u'fanart' rel_type = key_type
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 56, 27574, 17558, 12, 2890, 16, 276, 768, 16, 19548, 67, 723, 16, 23135, 33, 8381, 4672, 9163, 7109, 3344, 279, 21360, 5616, 264, 578, 478, 304, 485, 327, 599, 327, 1983, 934...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 56, 27574, 17558, 12, 2890, 16, 276, 768, 16, 19548, 67, 723, 16, 23135, 33, 8381, 4672, 9163, 7109, 3344, 279, 21360, 5616, 264, 578, 478, 304, 485, 327, 599, 327, 1983, 934...
self.publish(ext.vision.EventType.PIPE_CENTERED, ext.core.Event())
event = ext.core.Event() event.x = x event.y = y event.angle = angle event.id = closestPipe.id self.publish(ext.vision.EventType.PIPE_CENTERED, event)
def _checkOrangePipe(self): # Drop out if we have no Pipes if self._pipes is None: return found = False visibleBins = 0 robotPos = self.vehicle.robot.position + \ (self.vehicle.robot.orientation * ogre.Vector3(0.5, 0, 0))
91fa95ce5f91a80e6d18cfe31393ac1449865bc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10608/91fa95ce5f91a80e6d18cfe31393ac1449865bc9/vision.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 1162, 726, 11546, 12, 2890, 4672, 468, 10895, 596, 309, 732, 1240, 1158, 29305, 281, 309, 365, 6315, 16104, 281, 353, 599, 30, 327, 225, 1392, 273, 1083, 6021, 38, 2679, 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, 1893, 1162, 726, 11546, 12, 2890, 4672, 468, 10895, 596, 309, 732, 1240, 1158, 29305, 281, 309, 365, 6315, 16104, 281, 353, 599, 30, 327, 225, 1392, 273, 1083, 6021, 38, 2679, 273, ...
row = [self.frame.GetStatusImage(0), user, "0", "0", False, "", 0, 0, 0]
row = [self.frame.GetStatusImage(0), user, "0", "0", False, False, False, _("Never seen"), "", 0, 0, 0]
def AddToList(self, user): if user in [i[0] for i in self.userlist]: return row = [self.frame.GetStatusImage(0), user, "0", "0", False, "", 0, 0, 0] iter = self.usersmodel.append(row) self.userlist.append([user, "", iter]) self.SaveUserList() self.frame.np.queue.put(slskmessages.AddUser(user)) self.frame.np.queue.put(slskmessages.GetUserStatus(user)) self.frame.np.queue.put(slskmessages.GetUserStats(user)) for widget in self.frame.BuddiesComboEntries: widget.Append(user)
a2530f4f499f5036db35283ed1b9258038481c52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8738/a2530f4f499f5036db35283ed1b9258038481c52/userlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1436, 25772, 12, 2890, 16, 729, 4672, 309, 729, 316, 306, 77, 63, 20, 65, 364, 277, 316, 365, 18, 1355, 1098, 14542, 327, 225, 1027, 273, 306, 2890, 18, 3789, 18, 967, 1482, 2040, 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, 1436, 25772, 12, 2890, 16, 729, 4672, 309, 729, 316, 306, 77, 63, 20, 65, 364, 277, 316, 365, 18, 1355, 1098, 14542, 327, 225, 1027, 273, 306, 2890, 18, 3789, 18, 967, 1482, 2040, 12...
def _notify_watchers(self, response, user_id, type):
def _notify_watchers(self, response, user_id, event, type):
def _notify_watchers(self, response, user_id, type): def _eb_mi(f): log.error("Error while notifying OpenSIPS management interface for user %s: %s" % (user_id, f.getErrorMessage())) return response d = self._mi.notify_watchers('%s@%s' % (user_id.username, user_id.domain), type) d.addCallback(lambda x: response) d.addErrback(_eb_mi) return d
298fabe5c01b7c0d5e7ecf7ce28a5f3b644a4d0f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3446/298fabe5c01b7c0d5e7ecf7ce28a5f3b644a4d0f/opensips.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12336, 67, 7585, 414, 12, 2890, 16, 766, 16, 729, 67, 350, 16, 871, 16, 618, 4672, 1652, 389, 24008, 67, 9197, 12, 74, 4672, 613, 18, 1636, 2932, 668, 1323, 5066, 310, 3502, 232...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12336, 67, 7585, 414, 12, 2890, 16, 766, 16, 729, 67, 350, 16, 871, 16, 618, 4672, 1652, 389, 24008, 67, 9197, 12, 74, 4672, 613, 18, 1636, 2932, 668, 1323, 5066, 310, 3502, 232...
cr.execute('CREATE TABLE "%s" ("%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE, "%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE) WITH OIDS' % (f._rel, f._id1, self._table, f._id2, ref)) cr.execute('CREATE INDEX "%s_%s_index" ON "%s" ("%s")' % (f._rel, f._id1, f._rel, f._id1)) cr.execute('CREATE INDEX "%s_%s_index" ON "%s" ("%s")' % (f._rel, f._id2, f._rel, f._id2)) cr.execute("COMMENT ON TABLE \"%s\" IS 'RELATION BETWEEN %s AND %s'" % (f._rel, self._table, ref))
cr.execute('CREATE TABLE "%s" ("%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE, "%s" INTEGER NOT NULL REFERENCES "%s" ON DELETE CASCADE) WITH OIDS' % (f._rel, f._id1, self._table, f._id2, ref), debug=self._debug) cr.execute('CREATE INDEX "%s_%s_index" ON "%s" ("%s")' % (f._rel, f._id1, f._rel, f._id1), debug=self._debug) cr.execute('CREATE INDEX "%s_%s_index" ON "%s" ("%s")' % (f._rel, f._id2, f._rel, f._id2), debug=self._debug) cr.execute("COMMENT ON TABLE \"%s\" IS 'RELATION BETWEEN %s AND %s'" % (f._rel, self._table, ref), debug=self._debug)
def _auto_init(self, cr, context=None): store_compute = False create = False todo_end = [] if context is None: context = {} self._field_create(cr, context=context) if getattr(self, '_auto', True): cr.execute("SELECT relname FROM pg_class WHERE relkind IN ('r','v') AND relname=%s" ,( self._table,)) if not cr.rowcount: cr.execute('CREATE TABLE "%s" (id SERIAL NOT NULL, PRIMARY KEY(id)) WITHOUT OIDS' % (self._table,)) cr.execute("COMMENT ON TABLE \"%s\" IS '%s'" % (self._table, self._description.replace("'","''"))) create = True cr.commit() if self._parent_store: cr.execute("""SELECT c.relname FROM pg_class c, pg_attribute a WHERE c.relname=%s AND a.attname=%s AND c.oid=a.attrelid """, (self._table, 'parent_left')) if not cr.rowcount: if 'parent_left' not in self._columns: _logger.error('create a column parent_left on object %s: fields.integer(\'Left Parent\', select=1)' % (self._table, )) if 'parent_right' not in self._columns: _logger.error( 'create a column parent_right on object %s: fields.integer(\'Right Parent\', select=1)' % (self._table, )) if self._columns[self._parent_name].ondelete != 'cascade': _logger.error( "the columns %s on object must be set as ondelete='cascasde'" % (self._name, self._parent_name)) cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_left" INTEGER' % (self._table,)) cr.execute('ALTER TABLE "%s" ADD COLUMN "parent_right" INTEGER' % (self._table,)) cr.commit() store_compute = True
576b9b9dde9bc5cb94ed08af963a74742efcc864 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/576b9b9dde9bc5cb94ed08af963a74742efcc864/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6079, 67, 2738, 12, 2890, 16, 4422, 16, 819, 33, 7036, 4672, 1707, 67, 9200, 273, 225, 1083, 752, 273, 1083, 10621, 67, 409, 273, 5378, 309, 819, 353, 599, 30, 819, 273, 2618, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6079, 67, 2738, 12, 2890, 16, 4422, 16, 819, 33, 7036, 4672, 1707, 67, 9200, 273, 225, 1083, 752, 273, 1083, 10621, 67, 409, 273, 5378, 309, 819, 353, 599, 30, 819, 273, 2618, 3...
sage: E.lift(a^3)
sage: E.lift_x(a^3)
def lift_x(self, x, all=False): """ Given the x-coordinate of a point on the curve, use the defining polynomial to find all affine points on this curve with the given x-coordinate. EXAMPLES: sage: E = EllipticCurve('37a'); E Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field sage: E.lift_x(1) (1 : 0 : 1) sage: E.lift_x(2) (2 : 2 : 1) sage: E.lift_x(1/4, all=True) [(1/4 : -3/8 : 1), (1/4 : -5/8 : 1)] There are no rational points with x-cordinate 3. sage: E.lift_x(3) Traceback (most recent call last): ... ValueError: No point with x-coordinate 3 on Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field However, there are two such points in $E(\R)$: sage: E.change_ring(RR).lift_x(3, all=True) [(3.00000000000000 : 4.42442890089805 : 1.00000000000000), (3.00000000000000 : -5.42442890089805 : 1.00000000000000)] And of course it always works in $E(\C)$: sage: E.change_ring(RR).lift_x(.5, all=True) [] sage: E.change_ring(CC).lift_x(.5) (0.500000000000000 : -0.500000000000000 + 0.353553390593274*I : 1.00000000000000) We can perform these operations over finite fields too: sage: E = E.change_ring(GF(17)); E Elliptic Curve defined by y^2 + y = x^3 + 16*x over Finite Field of size 17 sage: E.lift_x(7) (7 : 11 : 1) sage: E.lift_x(3) Traceback (most recent call last): ... ValueError: No point with x-coordinate 3 on Elliptic Curve defined by y^2 + y = x^3 + 16*x over Finite Field of size 17 Note that there is only one lift with x-coordinate 10 in $E(\F_17)$. sage: E.lift_x(10, all=True) [(10 : 8 : 1)] We can lift over more exotic rings too. sage: E = EllipticCurve('37a'); sage: E.lift_x(pAdicField(17, 5)(6)) (6 + O(17^5) : 2 + 16*17 + 16*17^2 + 16*17^3 + 16*17^4 + O(17^5) : 1 + O(17^5)) sage: K.<t> = PowerSeriesRing(QQ, 't', 5) sage: E.lift_x(1+t) (1 + t : 2*t - t^2 + 5*t^3 - 21*t^4 + O(t^5) : 1) sage: K.<a> = GF(16) sage: E = E.change_ring(K) sage: E.lift(a^3) (a^3 : a^3 + a : 1) AUTHOR: Robert Bradshaw, 2007-04-24 TEST: sage: E = EllipticCurve('37a').weierstrass_model().change_ring(GF(17)) sage: E.lift_x(3, all=True) [] sage: E.lift_x(7, all=True) [(7 : 3 : 1), (7 : 14 : 1)] """ a1, a2, a3, a4, a6 = self.ainvs() f = ((x + a2) * x + a4) * x + a6 K = self.base_ring() x += K(0) one = x.parent()(1) if a1.is_zero() and a3.is_zero(): if f.is_square(): if all: ys = f.sqrt(all=True) return [self.point([x, y, one], check=False) for y in ys] else: return self.point([x, f.sqrt(), one], check=False) else: b = (a1*x + a3) D = b*b + 4*f if K.characteristic() == 2: R = PolynomialRing(K, 'y') F = R([-f,b,1]) ys = F.roots() if all: return [self.point([x, y[0], one], check=False) for y in ys] elif len(ys) > 0: return self.point([x, ys[0][0], one], check=False) elif D.is_square(): if all: return [self.point([x, (-b+d)/2, one], check=False) for d in D.sqrt(all=True)] else: return self.point([x, (-b+D.sqrt())/2, one], check=False) if all: return [] else: raise ValueError, "No point with x-coordinate %s on %s"%(x, self)
96a716009164abad61b7ab1c9d13f8d686decd98 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/96a716009164abad61b7ab1c9d13f8d686decd98/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28080, 67, 92, 12, 2890, 16, 619, 16, 777, 33, 8381, 4672, 3536, 16803, 326, 619, 17, 29191, 434, 279, 1634, 603, 326, 8882, 16, 999, 326, 9364, 16991, 358, 1104, 777, 28381, 3143, 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, 28080, 67, 92, 12, 2890, 16, 619, 16, 777, 33, 8381, 4672, 3536, 16803, 326, 619, 17, 29191, 434, 279, 1634, 603, 326, 8882, 16, 999, 326, 9364, 16991, 358, 1104, 777, 28381, 3143, 603...
def __init__(self, scale, **kwargs):
def __init__(self, diagram, scale, **kwargs):
def __init__(self, scale, **kwargs): self.scale_ratio = scale self.metrix = DiagramMetrix(**kwargs)
91495aba9bc444bdc89ef3803a9dff8936595f90 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/81/91495aba9bc444bdc89ef3803a9dff8936595f90/PngDiagramMetrix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 19750, 16, 3159, 16, 2826, 4333, 4672, 365, 18, 5864, 67, 9847, 273, 3159, 365, 18, 10578, 1932, 273, 14539, 1940, 12244, 1932, 12, 636, 4333, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19750, 16, 3159, 16, 2826, 4333, 4672, 365, 18, 5864, 67, 9847, 273, 3159, 365, 18, 10578, 1932, 273, 14539, 1940, 12244, 1932, 12, 636, 4333, 13, 2, -10...
if self["vendor"] not in (None, "Red Hat, Inc."):
if self["vendor"] not in (None, "Red Hat, Inc.", "Fedora Project"):
def __doVerify(self): self.__verifyWriteHeader(self.hdr.hash, rpmtag, "immutable", self.hdrdata, 1, self.rpmgroup) if self.strict: self.__verifyWriteHeader(self.sig.hash, rpmsigtag, "header_signatures", self.sigdata, 0, None) # disable the utf-8 test per default, should check against self.verbose: if self.strict and None: for i in ("summary", "description", "changelogtext"): if self[i] == None: continue for j in self[i]: try: j.decode("utf-8") except: self.printErr("not utf-8 in %s" % i) #self.printErr("text: %s" % j) break for i in rpmsigtagrequired: if not self.sig.has_key(i): self.printErr("sig header is missing: %s" % i) for i in rpmtagrequired: if not self.hdr.has_key(i): self.printErr("hdr is missing: %s" % i) size_in_sig = self.sig.getOne("size_in_sig") if size_in_sig != None and not isUrl(self.filename): rpmsize = os.stat(self.filename).st_size if rpmsize != 96 + self.sigdatasize + size_in_sig: self.printErr("wrong size in rpm package") filenames = self.getFilenames() if self.issrc: i = self.getSpecfile(filenames) if i == None: self.printErr("no specfile found in src.rpm") else: if self.strict and not filenames[i].endswith(".spec"): self.printErr("specfile does not end with .spec") #if self.strict and filenames[i] != self["name"] + ".spec": # self.printErr("specfile not using default name: %s" % \ # filenames[i]) if self["sourcerpm"] != None: self.printErr("binary rpm does contain sourcerpm tag") else: if self["sourcerpm"] == None: self.printErr("source rpm does not contain sourcerpm tag") if self["triggerscripts"] != None: if len(self["triggerscripts"]) != len(self["triggerscriptprog"]): self.printErr("wrong trigger lengths") if self.strict: for i in ("-", ":"): if i in self["version"] or i in self["release"]: self.printErr("version/release contains wrong char") for i in (",", " ", "\t"): if i in self["name"] or i in self["version"] or \ i in self["release"]: self.printErr("name/version/release contains wrong char") if self["payloadformat"] not in [None, "cpio", "drpm"]: self.printErr("wrong payload format %s" % self["payloadformat"]) if self.strict: if self["payloadcompressor"] not in [None, "gzip"]: self.printErr("no gzip compressor: %s" % \ self["payloadcompressor"]) else: if self["payloadcompressor"] not in [None, "gzip", "bzip2"]: self.printErr("no gzip/bzip2 compressor: %s" % \ self["payloadcompressor"]) if self.strict and self["payloadflags"] not in ["9"]: self.printErr("no payload flags: %s" % self["payloadflags"]) if self.strict and self["os"] not in ["Linux", "linux"]: self.printErr("bad os: %s" % self["os"]) elif self["os"] not in ["Linux", "linux", "darwin"]: self.printErr("bad os: %s" % self["os"]) if self.strict: if self["packager"] not in (None, "Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>"): self.printErr("unknown packager: %s" % self["packager"]) if self["vendor"] not in (None, "Red Hat, Inc."): self.printErr("unknown vendor: %s" % self["vendor"]) if self["distribution"] not in (None, "Red Hat Linux", "Red Hat FC-3", "Red Hat (FC-3)", "Red Hat (FC-4)", "Red Hat (FC-5)", "Red Hat (FC-6)", "Red Hat (scratch)", "Red Hat (RHEL-3)", "Red Hat (RHEL-4)"): self.printErr("unknown distribution: %s" % self["distribution"]) arch = self["arch"] if self["rhnplatform"] not in (None, arch): self.printErr("unknown arch for rhnplatform") if self.strict: if os.path.basename(self.filename) != self.getFilename(): self.printErr("bad filename: %s" % self.filename) if self["platform"] not in (None, "", arch + "-redhat-linux-gnu", arch + "-redhat-linux", "--target=${target_platform}", arch + "-unknown-linux", "--target=${TARGET_PLATFORM}", "--target=$TARGET_PLATFORM"): self.printErr("unknown arch %s" % self["platform"]) if self["exclusiveos"] not in (None, ["Linux"], ["linux"]): self.printErr("unknown os %s" % self["exclusiveos"]) if self.strict: if self["buildarchs"] not in (None, ["noarch"]): self.printErr("bad buildarch: %s" % self["buildarchs"]) if self["excludearch"] != None: for i in self["excludearch"]: if not possible_archs.has_key(i): self.printErr("new possible arch %s" % i) if self["exclusivearch"] != None: for i in self["exclusivearch"]: if not possible_archs.has_key(i): self.printErr("new possible arch %s" % i) for (s, p) in (("prein", "preinprog"), ("postin", "postinprog"), ("preun", "preunprog"), ("postun", "postunprog"), ("verifyscript", "verifyscriptprog")): (script, prog) = (self[s], self[p]) if script != None and prog == None: self.printErr("no prog") if self.strict: if (not isinstance(prog, basestring) and prog != None) or \ not possible_scripts.has_key(prog): self.printErr("unknown prog: %s" % prog) if script == None and prog == "/bin/sh": self.printErr("empty script: %s" % s) if script != None and isCommentOnly(script): self.printErr("empty(2) script: %s" % s) # some verify tests are also in these functions: for (n, f, v) in (("providename", "provideflags", "provideversion"), ("requirename", "requireflags", "requireversion"), ("obsoletename", "obsoleteflags", "obsoleteversion"), ("conflictname", "conflictflags", "conflictversion"), ("triggername", "triggerflags", "triggerversion")): self.__verifyDeps(n, f, v) if not self.issrc: provs = self.__getDeps("providename", "provideflags", "provideversion") mydep = (self["name"], RPMSENSE_EQUAL, self.getEVR()) ver = self["rpmversion"] # AS2.1 still has compat rpms which need this: if ver != None and ver[:4] < "4.3." and mydep not in provs: provs.append(mydep) if mydep not in provs: self.printErr("no provides for own rpm package, rpm=%s" % ver) self.getTriggers()
2fa09dcbe22e128c237f732c17ec7e4c7a29117b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/2fa09dcbe22e128c237f732c17ec7e4c7a29117b/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 8097, 12, 2890, 4672, 365, 16186, 8705, 3067, 1864, 12, 2890, 18, 16587, 18, 2816, 16, 8715, 1010, 346, 16, 315, 381, 5146, 3113, 365, 18, 16587, 892, 16, 404, 16, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 8097, 12, 2890, 4672, 365, 16186, 8705, 3067, 1864, 12, 2890, 18, 16587, 18, 2816, 16, 8715, 1010, 346, 16, 315, 381, 5146, 3113, 365, 18, 16587, 892, 16, 404, 16, 365, 18,...
Return the vector space dimension of the ring modulo the ideal generated by the initial terms of the generators of self. If the generators form a standard basis, this is the same as the vector space dimension of the ring modulo the ideal. If the ideal is not zero-dimensional, a TypeError is raised.
Return the vector space dimension of the ring modulo this ideal. If the ideal is not zero-dimensional, a TypeError is raised.
def vector_space_dimension(self): """ Return the vector space dimension of the ring modulo the ideal generated by the initial terms of the generators of self.
5db698fe57bb9c49ea195dd22e0cf05492c35e70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5db698fe57bb9c49ea195dd22e0cf05492c35e70/multi_polynomial_ideal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3806, 67, 2981, 67, 11808, 12, 2890, 4672, 3536, 2000, 326, 3806, 3476, 4968, 434, 326, 9221, 26109, 326, 23349, 4374, 635, 326, 2172, 6548, 434, 326, 13327, 434, 365, 18, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3806, 67, 2981, 67, 11808, 12, 2890, 4672, 3536, 2000, 326, 3806, 3476, 4968, 434, 326, 9221, 26109, 326, 23349, 4374, 635, 326, 2172, 6548, 434, 326, 13327, 434, 365, 18, 2, -100, -100,...
for id, dbname, type in self.ids: if dbname: style = None else: style = self.style dbname = self.dbname if dbname is None: raise TypeError("dbname not defined in the dbxref") self.callback( (dbname, id, type, negate) ) def start_dbxref_negate(self, name, tag): self.negate = 1
for ( (dbname_style, dbname, idtype), dbid) in zip(self.info, self.dbids): self.callback(dbname_style, dbname, idtype, dbid, negate) def start_fast_dbxref(self, tag, attrs): style = attrs["style"] self._fast_parser = _fast_dbxref_parser_table[style] self.save_characters() def end_fast_dbxref(self, tag): for info in self._fast_parser(self.get_characters()): self.callback(*info)
def end_dbxref(self, tag): negate = self.negate for id, dbname, type in self.ids: if dbname: style = None else: style = self.style dbname = self.dbname if dbname is None: raise TypeError("dbname not defined in the dbxref") self.callback( (dbname, id, type, negate) )
7795919201eb3f63ba6ae6a328d1c7499aba60a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/7795919201eb3f63ba6ae6a328d1c7499aba60a2/StdHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 1966, 22044, 12, 2890, 16, 1047, 4672, 15626, 273, 365, 18, 82, 4784, 364, 612, 16, 18448, 16, 618, 316, 365, 18, 2232, 30, 309, 18448, 30, 2154, 273, 599, 469, 30, 2154, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 1966, 22044, 12, 2890, 16, 1047, 4672, 15626, 273, 365, 18, 82, 4784, 364, 612, 16, 18448, 16, 618, 316, 365, 18, 2232, 30, 309, 18448, 30, 2154, 273, 599, 469, 30, 2154, 27...
(isinstance(exc, WindowsError) and exc.winerror in (ERROR_TIMEOUT, RPC_S_SERVER_UNAVAILABLE, RPC_S_CALL_FAILED_DNE))
(isinstance(exc, WindowsError) and exc.winerror in (ERROR_INVALID_WINDOW_HANDLE, ERROR_TIMEOUT, RPC_S_SERVER_UNAVAILABLE, RPC_S_CALL_FAILED_DNE))
def exception(self, msg="", exc_info=True): """Log an exception at an appropriate levle. Normally, it will be logged at level "ERROR". However, certain exceptions which aren't considered errors (or aren't errors that we can fix) are expected and will therefore be logged at a lower level. """ import comtypes if exc_info is True: exc_info = sys.exc_info()
de6898f4a42c37518502f2d06c15191e982c5ea8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/de6898f4a42c37518502f2d06c15191e982c5ea8/logHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1520, 12, 2890, 16, 1234, 1546, 3113, 3533, 67, 1376, 33, 5510, 4672, 3536, 1343, 392, 1520, 622, 392, 5505, 18565, 298, 18, 24773, 1230, 16, 518, 903, 506, 7545, 622, 1801, 315, 3589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1520, 12, 2890, 16, 1234, 1546, 3113, 3533, 67, 1376, 33, 5510, 4672, 3536, 1343, 392, 1520, 622, 392, 5505, 18565, 298, 18, 24773, 1230, 16, 518, 903, 506, 7545, 622, 1801, 315, 3589, ...
tmp = buf[:,stream_byte_indexes == i].ravel()
tmp = self.buf[:,stream_byte_indexes == i].ravel()
def __read_data_uncompressed(self, channels): # The data in the file are interleaved, so we'll potentially have # a different amount of data to read at each time slice. # It's possible we won't have any data for some time slices, I think. # The BIOPAC engineers tell you not to even try reading interleaved # data. Wusses.
e543dab375f79d81941cdc9f5a595e9ea1e0a46f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14571/e543dab375f79d81941cdc9f5a595e9ea1e0a46f/readers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 896, 67, 892, 67, 551, 362, 10906, 12, 2890, 16, 5750, 4672, 468, 1021, 501, 316, 326, 585, 854, 1554, 22593, 16, 1427, 732, 5614, 13935, 1240, 468, 279, 3775, 3844, 434, 501, 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, 1001, 896, 67, 892, 67, 551, 362, 10906, 12, 2890, 16, 5750, 4672, 468, 1021, 501, 316, 326, 585, 854, 1554, 22593, 16, 1427, 732, 5614, 13935, 1240, 468, 279, 3775, 3844, 434, 501, 35...
def hide_auto_tab(self, name, count): if count == 0 and name in self.auto_tabs: self.remove(name)
def remove_auto_tab_if_not_selected(self, name): if name not in self.iter_map: return for iter in self.view.get_selection(): info = self.view.model[iter][0] if info.id == name: return self.remove(name) def on_selection_changed(self, view): for name in self.auto_tabs: if name in self.iter_map and name not in self.auto_tabs_to_show: self.remove_auto_tab_if_not_selected(name)
def hide_auto_tab(self, name, count): if count == 0 and name in self.auto_tabs: self.remove(name)
80678c663d8abf6e685b43bef8b921e040eb42ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/80678c663d8abf6e685b43bef8b921e040eb42ec/tablist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6853, 67, 6079, 67, 7032, 12, 2890, 16, 508, 16, 1056, 4672, 309, 1056, 422, 374, 471, 508, 316, 365, 18, 6079, 67, 16056, 30, 365, 18, 4479, 12, 529, 13, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6853, 67, 6079, 67, 7032, 12, 2890, 16, 508, 16, 1056, 4672, 309, 1056, 422, 374, 471, 508, 316, 365, 18, 6079, 67, 16056, 30, 365, 18, 4479, 12, 529, 13, 2, -100, -100, -100, -100, ...
if (pre[0] != "/"):
if (pre[0] != "/" and not pre.startswith("./")):
def identifyVuln(self, URL, Params, VulnParam, identifyMode="inc"): # identify Mode can be set to 'inc' for inclusion check or to 'read' for read file check.
74040b707bb97b5e85fdfc788a9efe039dd01ab1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4412/74040b707bb97b5e85fdfc788a9efe039dd01ab1/targetScanner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 58, 332, 82, 12, 2890, 16, 1976, 16, 8861, 16, 776, 332, 82, 786, 16, 9786, 2309, 1546, 9523, 6, 4672, 468, 9786, 8126, 848, 506, 444, 358, 296, 9523, 11, 364, 26485, 866, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 58, 332, 82, 12, 2890, 16, 1976, 16, 8861, 16, 776, 332, 82, 786, 16, 9786, 2309, 1546, 9523, 6, 4672, 468, 9786, 8126, 848, 506, 444, 358, 296, 9523, 11, 364, 26485, 866, 578,...
self.xmlrpc_server = ServerProxy(self.server, transport=self.proxied_transport, allow_none=1)
self.xmlrpc_server = ServerProxy(server, transport=self.proxied_transport, allow_none=1)
def _connect(self): if self.proxy: self.proxied_transport = ProxiedTransport() self.proxied_transport.set_proxy(self.proxy) self.log.debug("Trying proxied connection...") self.xmlrpc_server = ServerProxy(self.server, transport=self.proxied_transport, allow_none=1) self.log.debug("...connected") return True elif test_connection(self.server): self.log.debug("Trying direct connection...") self.xmlrpc_server = ServerProxy(self.server) self.ServerInfo() self.log.debug("...connected") return True else: self.log.debug("...failed") self.log.error("Unable to connect. Try setting a proxy.") return False
af90766f611177d3caa96e81f7bedd6bb1cf023e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/af90766f611177d3caa96e81f7bedd6bb1cf023e/OSDBServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3612, 12, 2890, 4672, 309, 365, 18, 5656, 30, 365, 18, 20314, 2092, 67, 13049, 273, 1186, 92, 2092, 6568, 1435, 365, 18, 20314, 2092, 67, 13049, 18, 542, 67, 5656, 12, 2890, 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, 389, 3612, 12, 2890, 4672, 309, 365, 18, 5656, 30, 365, 18, 20314, 2092, 67, 13049, 273, 1186, 92, 2092, 6568, 1435, 365, 18, 20314, 2092, 67, 13049, 18, 542, 67, 5656, 12, 2890, 18, ...
section = docname.split(SEP, 1)[0]
def read_doc(self, docname, src_path=None, save_parsed=True, app=None): """ Parse a file and add/update inventory entries for the doctree. If srcpath is given, read from a different source file. """ section = docname.split(SEP, 1)[0] # remove all inventory entries for that file if app: app.emit('env-purge-doc', self, docname)
38e1e7770f98f3e041d14f7b949f5f69909f60a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/38e1e7770f98f3e041d14f7b949f5f69909f60a4/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2434, 12, 2890, 16, 997, 529, 16, 1705, 67, 803, 33, 7036, 16, 1923, 67, 10817, 33, 5510, 16, 595, 33, 7036, 4672, 3536, 2884, 279, 585, 471, 527, 19, 2725, 13086, 3222, 364...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2434, 12, 2890, 16, 997, 529, 16, 1705, 67, 803, 33, 7036, 16, 1923, 67, 10817, 33, 5510, 16, 595, 33, 7036, 4672, 3536, 2884, 279, 585, 471, 527, 19, 2725, 13086, 3222, 364...
else: values[field] = getattr(self, field) values['id'] = self.id return values def _on_change_args(self, args): res = {} values = {} for field, definition in self._fields.iteritems(): if definition['type'] in ('one2many', 'many2many'): values[field] = [x._get_eval() for x in getattr(self, field)]
def _get_eval(self): values = {} for field, definition in self._fields.iteritems(): if definition['type'] in ('one2many', 'many2many'): values[field] = [x.id for x in getattr(self, field) or []] else: values[field] = getattr(self, field) values['id'] = self.id return values
39c1c7f7309fe3bdb4aa869b46297cdb28b3986d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9150/39c1c7f7309fe3bdb4aa869b46297cdb28b3986d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8622, 12, 2890, 4672, 924, 273, 2618, 364, 652, 16, 2379, 316, 365, 6315, 2821, 18, 2165, 3319, 13332, 309, 2379, 3292, 723, 3546, 316, 7707, 476, 22, 9353, 2187, 296, 93...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8622, 12, 2890, 4672, 924, 273, 2618, 364, 652, 16, 2379, 316, 365, 6315, 2821, 18, 2165, 3319, 13332, 309, 2379, 3292, 723, 3546, 316, 7707, 476, 22, 9353, 2187, 296, 93...
j.showState()
j.showState()
def selfTest(args=[]): buildOnly = False if len(args) > 0: if "build" in args: buildOnly = True print "doing basic internal build/fill/run/delete/build/delete test." j = JobPersistence("sometest_db") j.buildTables() j.close() print " build and close" selfPopulateAndPrep(j) # clist = j.cmdsWithInput("/tmp/temp1111tempf_other.nc") j.showState() # now, pretend like we're executing. (cline, outname) = (None,None) while True: try: if cline is None: fetch = j.newFetchAndLockTransaction() (cline,outname) = fetch.execute() fetch = None else: print ":::opt skip fetch" except TypeError: print ":::no more lines to run!" break print ":::pretending to run %s" % (cline) j.showState() print ":::fake produce %s" % (outname) cmtcmd = j.newCommitAndFetchTransaction() tup = cmtcmd.execute(outname) cmtcmd = None (cline, outname) = (None,None) print "opt fetch got",tup if type(tup) is tuple and len(tup) == 2: (cline, outname) = tup print "opt got tuple!", tup j.showState() if buildOnly: return j.deleteTables() j.close() print " delete and closed" j.buildTables() j.close() print " build and closed" j.deleteTables() j.close() print " delete and closed" pass
aa6dbde9561cfb726097d6d2202601935b050184 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5203/aa6dbde9561cfb726097d6d2202601935b050184/ssdap_dbutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 365, 4709, 12, 1968, 33, 8526, 4672, 1361, 3386, 273, 1083, 309, 562, 12, 1968, 13, 405, 374, 30, 309, 315, 3510, 6, 316, 833, 30, 1361, 3386, 273, 1053, 1172, 315, 2896, 310, 5337, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 365, 4709, 12, 1968, 33, 8526, 4672, 1361, 3386, 273, 1083, 309, 562, 12, 1968, 13, 405, 374, 30, 309, 315, 3510, 6, 316, 833, 30, 1361, 3386, 273, 1053, 1172, 315, 2896, 310, 5337, ...
def enable(self):
def enable( self ):
def enable(self): self.__enabled = True
8fb9b92ed5b05b25cf0b23c6b3ceefbecf505a45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8fb9b92ed5b05b25cf0b23c6b3ceefbecf505a45/MonitoringClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4237, 12, 365, 262, 30, 365, 16186, 5745, 273, 1053, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4237, 12, 365, 262, 30, 365, 16186, 5745, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print stuff print msg
def incoming_ussd(self, stuff, msg): """connected to the 'incoming_message' edje signal""" print stuff print msg self._incoming_ussd(str(msg[1])).start()
32c5421812a0b7431beb25eefac6c589c2bc996a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/32c5421812a0b7431beb25eefac6c589c2bc996a/paroli-launcher2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6935, 67, 5567, 72, 12, 2890, 16, 10769, 16, 1234, 4672, 3536, 8537, 358, 326, 296, 31033, 67, 2150, 11, 1675, 78, 73, 4277, 8395, 282, 365, 6315, 31033, 67, 5567, 72, 12, 701, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6935, 67, 5567, 72, 12, 2890, 16, 10769, 16, 1234, 4672, 3536, 8537, 358, 326, 296, 31033, 67, 2150, 11, 1675, 78, 73, 4277, 8395, 282, 365, 6315, 31033, 67, 5567, 72, 12, 701, 12, 3...
self.assert_(fileobject.__class__ is socket._fileobject)
def test_close(self): import socket, httplib, gc
d8d4b90fd2564375f4e914efda0a24fdc7fe447c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d8d4b90fd2564375f4e914efda0a24fdc7fe447c/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 12, 2890, 4672, 1930, 2987, 16, 15851, 6673, 16, 8859, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 12, 2890, 4672, 1930, 2987, 16, 15851, 6673, 16, 8859, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
arch = [a for a in self.arches if a in metadata.groups][0]
arches = [a for a in self.arches if a in metadata.groups] if not arches: raise NoData arch = arches[0]
def get_provides(self, metadata, required): ret = set() arch = [a for a in self.arches if a in metadata.groups][0] if required in self.provides['global']: ret.update(Source.get_provides(self, metadata, required)) elif required in self.provides[arch]: ret.update(Source.get_provides(self, metadata, required)) elif required in self.filemap['global']: ret.update([self.filemap['global'][required]]) elif required in self.filemap[arch]: ret.update([self.filemap[arch][required]]) else: raise NoData return ret
eb92d4866a208c12ab89fdc1d5dc50eaeee3dd32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/eb92d4866a208c12ab89fdc1d5dc50eaeee3dd32/Packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 685, 13427, 12, 2890, 16, 1982, 16, 1931, 4672, 325, 273, 444, 1435, 6637, 281, 273, 306, 69, 364, 279, 316, 365, 18, 991, 281, 309, 279, 316, 1982, 18, 4650, 65, 309, 486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 685, 13427, 12, 2890, 16, 1982, 16, 1931, 4672, 325, 273, 444, 1435, 6637, 281, 273, 306, 69, 364, 279, 316, 365, 18, 991, 281, 309, 279, 316, 1982, 18, 4650, 65, 309, 486, ...
self.log_event(event)
logger.log_event(event)
def debug_control_c(self, event): event.continueStatus = win32.DBG_EXCEPTION_HANDLED self.log_event(event)
6d6079c7bcc0ba519b666a5d46e251aede9525d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/6d6079c7bcc0ba519b666a5d46e251aede9525d0/sehtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 67, 7098, 67, 71, 12, 2890, 16, 871, 4672, 871, 18, 17143, 1482, 273, 5657, 1578, 18, 2290, 43, 67, 12658, 67, 12346, 6687, 365, 18, 1330, 67, 2575, 12, 2575, 13, 2, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1198, 67, 7098, 67, 71, 12, 2890, 16, 871, 4672, 871, 18, 17143, 1482, 273, 5657, 1578, 18, 2290, 43, 67, 12658, 67, 12346, 6687, 365, 18, 1330, 67, 2575, 12, 2575, 13, 2, -100, -100...
if len(commits) > 0:
while len(commits) > 0:
def apply(id): print "Applying %s" % (os.popen("git-log --max-count=1 --pretty=oneline %s" % id).read()) diff = os.popen("git diff-tree -r --name-status \"%s^\" \"%s\"" % (id, id)).readlines() filesToAdd = set() filesToDelete = set() for line in diff: modifier = line[0] path = line[1:].strip() if modifier == "M": system("p4 edit %s" % path) elif modifier == "A": filesToAdd.add(path) if path in filesToDelete: filesToDelete.remove(path) elif modifier == "D": filesToDelete.add(path) if path in filesToAdd: filesToAdd.remove(path) else: die("unknown modifier %s for %s" % (modifier, path)) system("git-diff-files --name-only -z | git-update-index --remove -z --stdin") system("git cherry-pick --no-commit \"%s\"" % id) for f in filesToAdd: system("p4 add %s" % f) for f in filesToDelete: system("p4 revert %s" % f) system("p4 delete %s" % f) logMessage = "" foundTitle = False for log in os.popen("git-cat-file commit %s" % id).readlines(): log = log[:-1] if not foundTitle: if len(log) == 0: foundTitle = 1 continue if len(logMessage) > 0: logMessage += "\t" logMessage += log + "\n" template = os.popen("p4 change -o").read() fileName = "submit.txt" file = open(fileName, "w+") file.write(prepareLogMessage(template, logMessage)) file.close() print "Perforce submit template written as %s. Please review/edit and then use p4 submit -i < %s to submit directly!" % (fileName, fileName)
80a53a93c8d64c8c3d568353e9e95ef6fe8bc3af /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12824/80a53a93c8d64c8c3d568353e9e95ef6fe8bc3af/p4-git-sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 350, 4672, 1172, 315, 7001, 310, 738, 87, 6, 738, 261, 538, 18, 84, 3190, 2932, 6845, 17, 1330, 1493, 1896, 17, 1883, 33, 21, 1493, 19073, 33, 265, 3027, 738, 87, 6, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 12, 350, 4672, 1172, 315, 7001, 310, 738, 87, 6, 738, 261, 538, 18, 84, 3190, 2932, 6845, 17, 1330, 1493, 1896, 17, 1883, 33, 21, 1493, 19073, 33, 265, 3027, 738, 87, 6, 738, ...
const_q = [(const.estimateCost(), const)
const_q = [(const.estimate_cost(), const)
def satisfy_all(self): """really PROPAGATE""" const_q = [(const.estimateCost(), const) for const in self.constraints] affected_constraints = set() while True: if not const_q: const_q = [(const.estimateCost(), const) for const in affected_constraints] if not const_q: break const_q.sort() affected_constraints.clear() cost, const = const_q.pop(0) entailed = const.revise3() for var in const.affectedVariables(): dom = self.dom(var) if not dom.has_changed(): continue for dependant_const in self.dependant_constraints(var): if dependant_const is not const: affected_constraints.add(dependant_const) dom.reset_flags() if entailed: # we should also remove the constraint from # the set of satifiable constraints if const in affected_constraints: affected_constraints.remove(const)
617bab291499a7d2579c0901c4e68e67e54519b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/617bab291499a7d2579c0901c4e68e67e54519b6/computationspace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18866, 67, 454, 12, 2890, 4672, 3536, 266, 1230, 16258, 1781, 1777, 8395, 1866, 67, 85, 273, 306, 12, 10248, 18, 23562, 67, 12398, 9334, 1866, 13, 364, 1866, 316, 365, 18, 11967, 65, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18866, 67, 454, 12, 2890, 4672, 3536, 266, 1230, 16258, 1781, 1777, 8395, 1866, 67, 85, 273, 306, 12, 10248, 18, 23562, 67, 12398, 9334, 1866, 13, 364, 1866, 316, 365, 18, 11967, 65, 9...
for arg in args: if arg[0] == 'partner_id' and arg[1] == '=': partner = partner_obj.browse(cursor, user, arg[2],
i = 0 while i < len(args): if args[i][0] == 'partner_id' and args[i][1] == '=': partner = partner_obj.browse(cursor, user, args[i][2],
def _where_calc(self, cursor, user, args, active_test=True, context=None): partner_obj = self.pool.get('res.partner')
2ebdc64a8e2c9e7f51f12d2ec245d53a8ff228fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/2ebdc64a8e2c9e7f51f12d2ec245d53a8ff228fa/partner_relation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6051, 67, 12448, 12, 2890, 16, 3347, 16, 729, 16, 833, 16, 2695, 67, 3813, 33, 5510, 16, 819, 33, 7036, 4672, 19170, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 31993,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 6051, 67, 12448, 12, 2890, 16, 3347, 16, 729, 16, 833, 16, 2695, 67, 3813, 33, 5510, 16, 819, 33, 7036, 4672, 19170, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 455, 18, 31993,...
return str(view[ndx].id)
row = view[ndx] if not row._isdel: return str(row.id)
def lookup(self, keyvalue): if type(keyvalue) is not _STRINGTYPE: raise TypeError, "%r is not a string" % keyvalue iv = self.getindexview() if iv: ndx = iv.find(k=keyvalue) if ndx > -1: return str(iv[ndx].i) else: view = self.getview() ndx = view.find({self.keyname:keyvalue, '_isdel':0}) if ndx > -1: return str(view[ndx].id) raise KeyError, keyvalue
8a26f1933d2876e464fe11a666ad363c83f287dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8a26f1933d2876e464fe11a666ad363c83f287dd/back_metakit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 12, 2890, 16, 498, 1132, 4672, 309, 618, 12, 856, 1132, 13, 353, 486, 389, 5804, 2399, 30, 1002, 3580, 16, 2213, 86, 353, 486, 279, 533, 6, 738, 498, 1132, 4674, 273, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3689, 12, 2890, 16, 498, 1132, 4672, 309, 618, 12, 856, 1132, 13, 353, 486, 389, 5804, 2399, 30, 1002, 3580, 16, 2213, 86, 353, 486, 279, 533, 6, 738, 498, 1132, 4674, 273, 365, 18, ...
if self.shuttingDown or constants.OFFLINE:
if self.shuttingDown or Globals.options.offline:
def _testSuccess(self, result): if __debug__: trace("_testSuccess")
379ab73e239bf9322721892d03ddf994339856f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/379ab73e239bf9322721892d03ddf994339856f5/smtp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 4510, 12, 2890, 16, 563, 4672, 309, 1001, 4148, 972, 30, 2606, 2932, 67, 3813, 4510, 7923, 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, 389, 3813, 4510, 12, 2890, 16, 563, 4672, 309, 1001, 4148, 972, 30, 2606, 2932, 67, 3813, 4510, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
LumiSectionNumber=lumiinfo['LumiSectionNumber'], StartEventNumber=lumiinfo['StartEventNumber'], EndEventNumber=lumiinfo['EndEventNumber'], LumiStartTime=lumiinfo['LumiStartTime'], LumiEndTime=lumiinfo['LumiEndTime'], RunNumber=lumiinfo['RunNumber'],
LumiSectionNumber=long(lumiinfo['LumiSectionNumber']), StartEventNumber=long(lumiinfo['StartEventNumber']), EndEventNumber=long(lumiinfo['EndEventNumber']), LumiStartTime=str(lumiinfo['LumiStartTime']), LumiEndTime=str(lumiinfo['LumiEndTime']), RunNumber=long(lumiinfo['RunNumber']),
def createLumi(fileinfo, apiRef = None): """ _createLumi_ Create DbsLumiSection and insert them. Return a list of DbsLumiSection object. """ lumiList=[] for lumiinfo in fileinfo.lumisections: lumi = DbsLumiSection ( LumiSectionNumber=lumiinfo['LumiSectionNumber'], StartEventNumber=lumiinfo['StartEventNumber'], EndEventNumber=lumiinfo['EndEventNumber'], LumiStartTime=lumiinfo['LumiStartTime'], LumiEndTime=lumiinfo['LumiEndTime'], RunNumber=lumiinfo['RunNumber'], ) if apiRef != None: apiRef.insertLumiSection(lumi) lumiList.append(lumi) return lumiList
6de85755f138125c3df172ebd6455345c0a4d7da /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8886/6de85755f138125c3df172ebd6455345c0a4d7da/DBSWriterObjects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 48, 30865, 12, 768, 1376, 16, 1536, 1957, 273, 599, 4672, 3536, 389, 2640, 48, 30865, 67, 225, 1788, 463, 2038, 48, 30865, 5285, 471, 2243, 2182, 18, 2000, 279, 666, 434, 463, 203...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 48, 30865, 12, 768, 1376, 16, 1536, 1957, 273, 599, 4672, 3536, 389, 2640, 48, 30865, 67, 225, 1788, 463, 2038, 48, 30865, 5285, 471, 2243, 2182, 18, 2000, 279, 666, 434, 463, 203...
self.simSetupAction.setIconSet(QIconSet(self.image109))
self.simSetupAction.setIconSet(QIconSet(self.image110))
def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar()
1fffefaa2964961cbc9adc237e2fedcbaf53df97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/1fffefaa2964961cbc9adc237e2fedcbaf53df97/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...
if result.simulate:
if getattr(result, "simulate", False):
def run(self, result): result.startTest(self) if result.simulate: testMethod = lambda: None else: testMethod = getattr(self, self._testMethodName) try: try: self.setUp() except KeyboardInterrupt: raise except: result.addError(self, self._exc_info()) return
db9dd19ab31aebc356f0ef7ca0c014ea47fb39ba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14078/db9dd19ab31aebc356f0ef7ca0c014ea47fb39ba/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 563, 4672, 563, 18, 1937, 4709, 12, 2890, 13, 309, 3869, 12, 2088, 16, 315, 9812, 6243, 3113, 1083, 4672, 1842, 1305, 273, 3195, 30, 599, 469, 30, 1842, 1305, 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, 1086, 12, 2890, 16, 563, 4672, 563, 18, 1937, 4709, 12, 2890, 13, 309, 3869, 12, 2088, 16, 315, 9812, 6243, 3113, 1083, 4672, 1842, 1305, 273, 3195, 30, 599, 469, 30, 1842, 1305, 273, ...
write_file(dir / 'conf.py', u'\n\nproject = u"Jägermeister"\n', 'utf-8')
write_file(dir / 'conf.py', u' u'project = u"Jägermeister"\n', 'utf-8')
def test_errors_warnings(dir): # test the error for syntax errors in the config file write_file(dir / 'conf.py', u'project = \n', 'ascii') raises_msg(ConfigError, 'conf.py', Config, dir, 'conf.py', {}, None) # test the automatic conversion of 2.x only code in configs write_file(dir / 'conf.py', u'\n\nproject = u"Jägermeister"\n', 'utf-8') cfg = Config(dir, 'conf.py', {}, None) cfg.init_values() assert cfg.project == u'Jägermeister' # test the warning for bytestrings with non-ascii content # bytestrings with non-ascii content are a syntax error in python3 so we # skip the test there if sys.version_info >= (3, 0): return write_file(dir / 'conf.py', u'# -*- coding: latin-1\nproject = "fooä"\n', 'latin-1') cfg = Config(dir, 'conf.py', {}, None) warned = [False] def warn(msg): warned[0] = True cfg.check_unicode(warn) assert warned[0]
bd950c3bb4c687142559def3345fe36b84dd86cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/bd950c3bb4c687142559def3345fe36b84dd86cd/test_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4324, 67, 12103, 12, 1214, 4672, 468, 1842, 326, 555, 364, 6279, 1334, 316, 326, 642, 585, 1045, 67, 768, 12, 1214, 342, 296, 3923, 18, 2074, 2187, 582, 11, 4406, 273, 521, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4324, 67, 12103, 12, 1214, 4672, 468, 1842, 326, 555, 364, 6279, 1334, 316, 326, 642, 585, 1045, 67, 768, 12, 1214, 342, 296, 3923, 18, 2074, 2187, 582, 11, 4406, 273, 521, ...
self.mark = translate_mark(mark) if from_commit: self.from_commit = translate_mark(from_commit) else: self.from_commit = None self.merge_commits = [translate_mark(mark) for mark in merge_commits]
self.id = ids.new() self.from_commit = from_commit self.merge_commits = merge_commits
def __init__(self, branch, author_name, author_email, author_date, committer_name, committer_email, committer_date, message, file_changes, mark = None, from_commit = None, merge_commits = []): GitElement.__init__(self) self.type = 'commit' self.branch = branch self.author_name = author_name self.author_email = author_email self.author_date = author_date self.committer_name = committer_name self.committer_email = committer_email self.committer_date = committer_date self.message = message self.file_changes = file_changes self.mark = translate_mark(mark) if from_commit: self.from_commit = translate_mark(from_commit) else: self.from_commit = None self.merge_commits = [translate_mark(mark) for mark in merge_commits]
4f7e24351e8619f6f89645b4457ccb6c62f12487 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10384/4f7e24351e8619f6f89645b4457ccb6c62f12487/parseit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3803, 16, 2869, 67, 529, 16, 565, 2869, 67, 3652, 16, 565, 2869, 67, 712, 16, 3294, 387, 67, 529, 16, 3294, 387, 67, 3652, 16, 3294, 387, 67, 712, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3803, 16, 2869, 67, 529, 16, 565, 2869, 67, 3652, 16, 565, 2869, 67, 712, 16, 3294, 387, 67, 529, 16, 3294, 387, 67, 3652, 16, 3294, 387, 67, 712, 16...
if not mode & 0200:
if stat.S_ISLNK(mode): return if not (mode & 0200):
def doFile(self, path): d = util.joinPaths(self.recipe.macros.destdir, path) mode = os.lstat(d)[stat.ST_MODE] if not mode & 0200: os.chmod(d, mode | 0200) f = file(d, 'r+') l = f.readlines() l = [x.replace('/lib/security/$ISA/', '') for x in l] f.seek(0) f.truncate(0) # we may have shrunk the file, avoid garbage f.writelines(l) f.close() os.chmod(d, mode)
34d80be53336e1e2bbf77a4621468982729b6f7a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7642/34d80be53336e1e2bbf77a4621468982729b6f7a/normalize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 812, 12, 2890, 16, 589, 4672, 302, 273, 1709, 18, 5701, 4466, 12, 2890, 18, 3927, 3151, 18, 5821, 6973, 18, 10488, 1214, 16, 589, 13, 1965, 273, 1140, 18, 80, 5642, 12, 72, 2514...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 812, 12, 2890, 16, 589, 4672, 302, 273, 1709, 18, 5701, 4466, 12, 2890, 18, 3927, 3151, 18, 5821, 6973, 18, 10488, 1214, 16, 589, 13, 1965, 273, 1140, 18, 80, 5642, 12, 72, 2514...
'save_name' : ungettext(u'Save user', u'Save users', 2 if mass else 1),
'save_name' : ungettext(u'Add user', u'Add users', 2 if mass else 1),
def user_add(request, key=None, mass=False): text = get_text_by_keys_or_404(key) if key else None if request.method == 'POST': userform = UserForm(request.POST) if not mass else MassUserForm(request.POST) userroleform = UserRoleForm(request.POST) noteform = UserAddForm(request.POST) userprofileform = UserProfileAddForm(request.POST) localroleform = UserRoleTextForm(request.POST, prefix="local") if key else None if userform.is_valid() and userroleform.is_valid() and noteform.is_valid() and userprofileform.is_valid() and (not localroleform or localroleform.is_valid()): data = userform.cleaned_data data.update(userprofileform.cleaned_data) data.update(noteform.cleaned_data) emails = data['email'] del data['email'] email_created = set() for email in [s.strip() for s in SEPARATORS_RE.split(emails)]: if email and not User.objects.filter(email__iexact=email) and email not in email_created: user = UserProfile.objects.create_inactive_user(email, True, **data) userrole = UserRole.objects.create(user=user, role=userroleform.cleaned_data['role'], text=None) if key: localuserrole = UserRole.objects.create(user=user, role=localroleform.cleaned_data['role'], text=text) email_created.add(email) register_activity(request, "user_created", user=user) display_message(request, ungettext(u'%(nb_users)d user added', u'%(nb_users)d users added', len(email_created)) % {'nb_users': len(email_created)}) if key: return HttpResponseRedirect(reverse('text-share', args=[text.key])) else: return HttpResponseRedirect(reverse('user')) else: userform = UserForm() if not mass else MassUserForm() userroleform = UserRoleForm() userprofileform = UserProfileAddForm() noteform = UserAddForm() localroleform = UserRoleTextForm(prefix="local") if key else None if key: template = 'site/user_mass_add_text.html' if mass else 'site/user_add_text.html' else: template = 'site/user_mass_add.html' if mass else 'site/user_add.html' return render_to_response(template, {'forms' : [userform, userprofileform , userroleform, noteform, localroleform], 'save_name' : ungettext(u'Save user', u'Save users', 2 if mass else 1), 'mass' : mass, 'text' : text, }, context_instance=RequestContext(request))
67fa7e8f64f4a6e58cd66f2063f6c44e72655fd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5622/67fa7e8f64f4a6e58cd66f2063f6c44e72655fd9/user.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 729, 67, 1289, 12, 2293, 16, 498, 33, 7036, 16, 8039, 33, 8381, 4672, 977, 273, 336, 67, 955, 67, 1637, 67, 2452, 67, 280, 67, 11746, 12, 856, 13, 309, 498, 469, 599, 309, 590, 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, 729, 67, 1289, 12, 2293, 16, 498, 33, 7036, 16, 8039, 33, 8381, 4672, 977, 273, 336, 67, 955, 67, 1637, 67, 2452, 67, 280, 67, 11746, 12, 856, 13, 309, 498, 469, 599, 309, 590, 18,...
with fontame=gregorio for now. The script generates squarize-fontame.pe
with fontame=gregorio or parmesan for now. The script generates squarize-fontame.pe
def usage(): print """
47ca9b9285f2ec2b1d7b1ffd807e1fccac37d6b4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7096/47ca9b9285f2ec2b1d7b1ffd807e1fccac37d6b4/squarize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def now():
def now(self):
def now(): return datetime.datetime.now()
fe3f7e131b15d1d29b93fafe521facd5a896eb6a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1574/fe3f7e131b15d1d29b93fafe521facd5a896eb6a/timekpr-client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2037, 12, 2890, 4672, 327, 3314, 18, 6585, 18, 3338, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2037, 12, 2890, 4672, 327, 3314, 18, 6585, 18, 3338, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if out.find("Output files already retrieved") != -1 : self.logging.warning( job.runningJob['schedulerId'] + \ ' output already retrieved.' ) job.runningJob.warnings.append("Already retrieved") if ret == 0 and out.find("result: success") == -1 : self.logging.warning( job.runningJob['schedulerId'] + \ ' problems during getOutput operation.' ) job.runningJob.errors.append(out) if job.runningJob.errors is None or job.runningJob.errors == []:
command = "cp -R /tmp/" + uniqueString + "/* " + outdir + "/" os.system( command ) command = "rm -rf /tmp/" + uniqueString os.system( command )
def getOutput( self, obj, outdir='' ): """ retrieve job output """
9a9dbeba57bb1976ad9010f2b6dd4c8e2b33b449 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/9a9dbeba57bb1976ad9010f2b6dd4c8e2b33b449/SchedulerGLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 12, 365, 16, 1081, 16, 15398, 2218, 11, 262, 30, 3536, 4614, 1719, 876, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 11062, 12, 365, 16, 1081, 16, 15398, 2218, 11, 262, 30, 3536, 4614, 1719, 876, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
'zope.app.zapi',
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
c8b85c0b037605fef22b93a0aaaf86158b99da27 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9826/c8b85c0b037605fef22b93a0aaaf86158b99da27/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
def check_startendtag(self):
def test_startendtag(self):
def check_startendtag(self): self._run_check("<p/>", [ ("startendtag", "p", []), ]) self._run_check("<p></p>", [ ("starttag", "p", []), ("endtag", "p"), ]) self._run_check("<p><img src='foo' /></p>", [ ("starttag", "p", []), ("startendtag", "img", [("src", "foo")]), ("endtag", "p"), ])
742542a88fb7dc018e41593629baf7f75f78c1e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/742542a88fb7dc018e41593629baf7f75f78c1e6/test_htmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1937, 409, 2692, 12, 2890, 4672, 365, 6315, 2681, 67, 1893, 2932, 32, 84, 26293, 16, 306, 7566, 1937, 409, 2692, 3113, 315, 84, 3113, 5378, 3631, 308, 13, 365, 6315, 2681, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1937, 409, 2692, 12, 2890, 4672, 365, 6315, 2681, 67, 1893, 2932, 32, 84, 26293, 16, 306, 7566, 1937, 409, 2692, 3113, 315, 84, 3113, 5378, 3631, 308, 13, 365, 6315, 2681, 67...
this_book.uuid = library_books[book].album()
this_book.uuid = library_books[book].composer()
def books(self, oncard=None, end_session=True): """ Return a list of ebooks on the device. @param oncard: If 'carda' or 'cardb' return a list of ebooks on the specific storage card, otherwise return list of ebooks in main memory of device. If a card is specified and no books are on the card return empty list. @return: A BookList.
d568fbb3d82c593ba2e496e905f6f400fd958764 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/d568fbb3d82c593ba2e496e905f6f400fd958764/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6978, 87, 12, 2890, 16, 603, 3327, 33, 7036, 16, 679, 67, 3184, 33, 5510, 4672, 3536, 2000, 279, 666, 434, 425, 12567, 603, 326, 2346, 18, 632, 891, 603, 3327, 30, 225, 971, 296, 332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6978, 87, 12, 2890, 16, 603, 3327, 33, 7036, 16, 679, 67, 3184, 33, 5510, 4672, 3536, 2000, 279, 666, 434, 425, 12567, 603, 326, 2346, 18, 632, 891, 603, 3327, 30, 225, 971, 296, 332...
name, [self.proc_tp(arg) for arg in func.argtypes],
name, arg_tps,
def proc_func(self, func): name = func.__name__ ll_item = rffi.llexternal( name, [self.proc_tp(arg) for arg in func.argtypes], self.proc_tp(func.restype), includes=self.includes, libraries=self.libraries, include_dirs=self.include_dirs) self.ns[name] = ll_item return ll_item
dc99f28367ec32962ff175526df740198c17f28d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/dc99f28367ec32962ff175526df740198c17f28d/genrffi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5418, 67, 644, 12, 2890, 16, 1326, 4672, 508, 273, 1326, 16186, 529, 972, 6579, 67, 1726, 273, 436, 1403, 77, 18, 80, 4149, 1174, 12, 508, 16, 1501, 67, 88, 1121, 16, 365, 18, 9381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5418, 67, 644, 12, 2890, 16, 1326, 4672, 508, 273, 1326, 16186, 529, 972, 6579, 67, 1726, 273, 436, 1403, 77, 18, 80, 4149, 1174, 12, 508, 16, 1501, 67, 88, 1121, 16, 365, 18, 9381, ...
pManager.manager.DebugStr('cNetManager '+ __version__ +': Read %s neigbourowls from cache.' % str(iOwls))
pManager.manager.DebugStr('cNetManager '+ __version__ +': Read %s neigbourowls from cache.' % str(iOwls), 1)
def ReadCache(self): """Read cached neighbourowls from file"""
75d1942defe5d17f180f5e72fbdbaacc8c12e3b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/75d1942defe5d17f180f5e72fbdbaacc8c12e3b2/cNetManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 1649, 12, 2890, 4672, 3536, 1994, 3472, 16497, 543, 3251, 628, 585, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2720, 1649, 12, 2890, 4672, 3536, 1994, 3472, 16497, 543, 3251, 628, 585, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
elif status.jobStatus == 'cancelled':
elif new_stat == 'cancelled':
def master_updateMonitoringInformation(jobs): '''Monitor jobs''' from pandatools import Client
9581154059ad0ff17c1a9158bb75bec21a836f87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/9581154059ad0ff17c1a9158bb75bec21a836f87/Panda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4171, 67, 2725, 18410, 5369, 12, 10088, 4672, 9163, 7187, 6550, 26418, 628, 293, 464, 270, 8192, 1930, 2445, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4171, 67, 2725, 18410, 5369, 12, 10088, 4672, 9163, 7187, 6550, 26418, 628, 293, 464, 270, 8192, 1930, 2445, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return self.cleaned_data['emerg_phone_cell']
return self.cleaned_data
def clean_emerg_phone_cell(self): if self.cleaned_data.get('emerg_phone_day','') == '' and self.cleaned_data.get('emerg_phone_cell','') == '': raise forms.ValidationError("Please provide either a day phone or cell phone.") return self.cleaned_data['emerg_phone_cell']
3a5f343b73eafbab7116aa7d130b14a3d92a743c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12041/3a5f343b73eafbab7116aa7d130b14a3d92a743c/user_profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 67, 351, 18639, 67, 10540, 67, 3855, 12, 2890, 4672, 309, 365, 18, 6200, 329, 67, 892, 18, 588, 2668, 351, 18639, 67, 10540, 67, 2881, 17023, 6134, 422, 875, 471, 365, 18, 6200, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 351, 18639, 67, 10540, 67, 3855, 12, 2890, 4672, 309, 365, 18, 6200, 329, 67, 892, 18, 588, 2668, 351, 18639, 67, 10540, 67, 2881, 17023, 6134, 422, 875, 471, 365, 18, 6200, ...
query = "SELECT DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out)
res = run_sql("SELECT DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id=%s", (sysno,), 1) if res[0][0]: out = localtime_to_UTC(res[0][0]) return out
def get_creation_date(sysno): "Returns the creation date of the record 'sysno'." out = "" query = "SELECT DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out)
188076f16a4a54bae23fd66a92bc6f2ff56b588d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/188076f16a4a54bae23fd66a92bc6f2ff56b588d/oai_repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 17169, 67, 712, 12, 9499, 2135, 4672, 315, 1356, 326, 6710, 1509, 434, 326, 1409, 296, 9499, 2135, 14550, 225, 596, 282, 273, 1408, 400, 273, 1086, 67, 4669, 2932, 4803, 11457, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 17169, 67, 712, 12, 9499, 2135, 4672, 315, 1356, 326, 6710, 1509, 434, 326, 1409, 296, 9499, 2135, 14550, 225, 596, 282, 273, 1408, 400, 273, 1086, 67, 4669, 2932, 4803, 11457, ...
dict = {}
r=[]
def parse_qs(qs, keep_blank_values=0, strict_parsing=0): """Parse a query given as a string argument. Arguments: qs: URL-encoded query string to be parsed keep_blank_values: flag indicating whether blank values in URL encoded queries should be treated as blank strings. A true value inicates that blanks should be retained as blank strings. The default false value indicates that blank values are to be ignored and treated as if they were not included. strict_parsing: flag indicating what to do with parsing errors. If false (the default), errors are silently ignored. If true, errors raise a ValueError exception. """ name_value_pairs = string.splitfields(qs, '&') dict = {} for name_value in name_value_pairs: nv = string.splitfields(name_value, '=') if len(nv) != 2: if strict_parsing: raise ValueError, "bad query field: %s" % `name_value` continue name = urllib.unquote(string.replace(nv[0], '+', ' ')) value = urllib.unquote(string.replace(nv[1], '+', ' ')) if len(value) or keep_blank_values: if dict.has_key (name): dict[name].append(value) else: dict[name] = [value] return dict
57d6db101972fe655054f14927acb03bed43a6eb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/57d6db101972fe655054f14927acb03bed43a6eb/cgi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 12926, 12, 12926, 16, 3455, 67, 12111, 67, 2372, 33, 20, 16, 5490, 67, 24979, 33, 20, 4672, 3536, 3201, 279, 843, 864, 487, 279, 533, 1237, 18, 225, 13599, 30, 225, 8719, 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, 1109, 67, 12926, 12, 12926, 16, 3455, 67, 12111, 67, 2372, 33, 20, 16, 5490, 67, 24979, 33, 20, 4672, 3536, 3201, 279, 843, 864, 487, 279, 533, 1237, 18, 225, 13599, 30, 225, 8719, 3...
raise RuntimeError, "Unknown state in RDF parser"
raise RuntimeError, ("Unknown state in RDF parser", self._stack)
def startElementNS(self, name, qname, attrs): """ Handle start tag. """ self.flush() tagURI = ((name[0] or "") + name[1]).encode('utf-8')
e7d8fd48f6844615d83d64e50820c68703e48ff2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/e7d8fd48f6844615d83d64e50820c68703e48ff2/sax2rdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 3156, 12, 2890, 16, 508, 16, 12621, 16, 3422, 4672, 3536, 5004, 787, 1047, 18, 3536, 225, 365, 18, 11330, 1435, 225, 1047, 3098, 273, 14015, 529, 63, 20, 65, 578, 1408, 13, 397,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 3156, 12, 2890, 16, 508, 16, 12621, 16, 3422, 4672, 3536, 5004, 787, 1047, 18, 3536, 225, 365, 18, 11330, 1435, 225, 1047, 3098, 273, 14015, 529, 63, 20, 65, 578, 1408, 13, 397,...
if not is_unavailable_exception(e): self.fail("%s\n%s" % (e, e.headers))
self.fail("%s\n%s" % (e, e.headers))
def test_introspection2(self): try: p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divhelp = p.system.methodHelp('div') self.assertEqual(divhelp, 'This is the div function') except xmlrpclib.ProtocolError as e: # ignore failures due to non-blocking socket 'unavailable' errors if not is_unavailable_exception(e): # protocol error; provide additional information in test output self.fail("%s\n%s" % (e, e.headers))
80e909fe423bada8cfd4c5bf95f48a61f0dd2c3b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/80e909fe423bada8cfd4c5bf95f48a61f0dd2c3b/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 474, 26362, 22, 12, 2890, 4672, 775, 30, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 2668, 2505, 2207, 13014, 5319, 72, 11, 738, 20987, 13, 3739, 5201, 273, 293, 18, 429...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 474, 26362, 22, 12, 2890, 4672, 775, 30, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 2668, 2505, 2207, 13014, 5319, 72, 11, 738, 20987, 13, 3739, 5201, 273, 293, 18, 429...
_tagNodeMap = dict( (k._tag,k) for k in [BreakingReturn, HorizontalRule, Index, Teletyped, Reference, ReferenceList, Gallery, Center, Div, Span, Strike] )
_tagNodeMap = dict( (k._tag,k) for k in [Code, BreakingReturn, HorizontalRule, Index, Teletyped, Reference, ReferenceList, Gallery, Center, Div, Span, Strike, ImageMap] ) _styleNodeMap["s"] = Strike
def _isinlinenode(self): if self.caption.strip().startswith("\\begin{align}") or \ self.caption.strip().startswith("\\begin{alignat}"): return False return True
91cdd77512bb8d0fcbc9a55ecd49226e5c95914a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/91cdd77512bb8d0fcbc9a55ecd49226e5c95914a/advtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 267, 7511, 20680, 12, 2890, 4672, 309, 365, 18, 15386, 18, 6406, 7675, 17514, 1918, 2932, 1695, 10086, 95, 7989, 1532, 13, 225, 578, 521, 365, 18, 15386, 18, 6406, 7675, 17514,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 267, 7511, 20680, 12, 2890, 4672, 309, 365, 18, 15386, 18, 6406, 7675, 17514, 1918, 2932, 1695, 10086, 95, 7989, 1532, 13, 225, 578, 521, 365, 18, 15386, 18, 6406, 7675, 17514,...
for a in [UpdateSource, Make, Makefile, VmsMake]:
for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]:
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") if Config == "ALPHA32_VMS": Compile = "cc " elif Config == "ALPHA64_VMS": Compile = "cc /pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": Compile = "/usr/ccs/bin/cc -g -mt -xcode=pic32 -xldscope=symbolic " else: Compile = { "I386_INTERIX" : "gcc -g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "/usr/sfw/bin/gcc -g ", # -fPIC? }.get(Config) or "gcc -g -fPIC " Compile = Compile + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "SOLsun" : " -xarch=v8plus ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = Compile + " *.mo *.io *.o " if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # not in Link if not StringTagged(Config, "VMS"): Compile += " -c " AssembleOnHost = False CopyAssemblyToTarget = True if StringTagged(Target, "VMS"): Assemble = "macro /alpha " elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Assemble = "/usr/ccs/bin/as " else: Assemble = "as " if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32_")): Assemble = Assemble + " --64" else: Assemble = Assemble + " --32" Assemble = (Assemble + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: Compile = GnuPlatformPrefix + Compile Link = GnuPlatformPrefix + Link Assemble = GnuPlatformPrefix + Assemble if vms and AssembleOnHost: Assemble = GnuPlatformPrefix + Assemble # # squeeze runs of spaces and spaces at end # Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) Assemble = re.sub(" +", " ", Assemble) Assemble = re.sub(" +$", "", Assemble) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = [ ] Makefile.write(".SUFFIXES:\nall: cm3\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\nset -e\nset -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n") a.write("Assemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") a.write("\n\n# no more editing should be needed\n\n") for a in [Make]: a.write("Assemble=\"" + Assemble + "\"\nCompile=\"" + Compile + "\"\nLink=\"" + Link + "\"\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".mi") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or CopyAssemblyToTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) Objects += [Object] if vms: if ext_c: VmsMake.write(Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = Assemble + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write(Assemble + " " + a + "\n") continue Makefile.write("Objects=$(Objects) " + Object + "\n" + Object + ": " + a + "\n\t") if ext_c: Command = "Compile" else: Command = "Assemble" for b in [Make, Makefile]: b.write("$(" + Command + ") " + a + " -o " + Object + "\n") Makefile.write("cm3: $(Objects)\n\t") VmsMake.write("link /executable=cm3.exe ") for a in Objects: VmsMake.write(a + " ") VmsMake.write("\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() _MakeArchive(BootDir[2:])
d4000ec74e6d57a15fc1c20dc9234349ed4e61e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/d4000ec74e6d57a15fc1c20dc9234349ed4e61e4/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
return InstallTools.addDatabaseOptionsToCS( gConfig, system, database, overwrite = overwrite)
return InstallTools.addDatabaseOptionsToCS( gConfig, system, database, overwrite = overwrite )
def export_addDatabaseOptionsToCS( self, system, database, overwrite = False ): """ Add the section with the database options to the CS """ return InstallTools.addDatabaseOptionsToCS( gConfig, system, database, overwrite = overwrite)
1a39061cbe8c426f97cd62e1939b4621f5328450 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/1a39061cbe8c426f97cd62e1939b4621f5328450/SystemAdministratorHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 1289, 4254, 1320, 774, 4596, 12, 365, 16, 2619, 16, 2063, 16, 6156, 273, 1083, 262, 30, 3536, 1436, 326, 2442, 598, 326, 2063, 702, 358, 326, 6761, 3536, 327, 10284, 10348, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 1289, 4254, 1320, 774, 4596, 12, 365, 16, 2619, 16, 2063, 16, 6156, 273, 1083, 262, 30, 3536, 1436, 326, 2442, 598, 326, 2063, 702, 358, 326, 6761, 3536, 327, 10284, 10348, 1...
def patch(self, patches):
def patch(self, *patches):
def patch(self, patches): self.job.stdout.redirect(self.log_dir+'/stdout') local_patches = self.get_patches(patches) self.apply_patches(local_patches) self.job.stdout.restore()
1a15bcb259c412356b8d332b98f966972581e441 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/1a15bcb259c412356b8d332b98f966972581e441/kernel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2890, 16, 380, 30278, 4672, 365, 18, 4688, 18, 10283, 18, 7590, 12, 2890, 18, 1330, 67, 1214, 6797, 19, 10283, 6134, 1191, 67, 30278, 273, 365, 18, 588, 67, 30278, 12, 30278,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2890, 16, 380, 30278, 4672, 365, 18, 4688, 18, 10283, 18, 7590, 12, 2890, 18, 1330, 67, 1214, 6797, 19, 10283, 6134, 1191, 67, 30278, 273, 365, 18, 588, 67, 30278, 12, 30278,...